Merge lp:~abreu-alexandre/oxide/fix-unloads-crash into lp:oxide/1.7

Proposed by Alexandre Abreu on 2015-05-15
Status: Merged
Merged at revision: 1061
Proposed branch: lp:~abreu-alexandre/oxide/fix-unloads-crash
Merge into: lp:oxide/1.7
Diff against target: 20 lines (+2/-2)
1 file modified
shared/browser/oxide_web_contents_unloader.cc (+2/-2)
To merge this branch: bzr merge lp:~abreu-alexandre/oxide/fix-unloads-crash
Reviewer Review Type Date Requested Status
Chris Coulson 2015-05-15 Approve on 2015-05-15
Review via email: mp+259192@code.launchpad.net

This proposal supersedes a proposal from 2015-05-15.

Commit message

Fix premature web contents ptr release

Description of the change

Fix premature web contents ptr release

To post a comment you must log in.
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'shared/browser/oxide_web_contents_unloader.cc'
2--- shared/browser/oxide_web_contents_unloader.cc 2015-05-13 17:50:27 +0000
3+++ shared/browser/oxide_web_contents_unloader.cc 2015-05-15 01:52:55 +0000
4@@ -81,14 +81,14 @@
5 return;
6 }
7
8- content::WebContents* wc = contents.release();
9+ content::WebContents* wc = contents.get();
10 wc->SetUserData(
11 kWebContentsUnloaderObserverKey,
12 new WebContentsUnloaderObserver(wc));
13
14 // So we can intercept CloseContents
15 contents->SetDelegate(this);
16- contents_unloading_.push_back(wc);
17+ contents_unloading_.push_back(contents.release());
18
19 rvh->ClosePage();
20 // Note: |rvh| might be deleted at this point

Subscribers

People subscribed via source and target branches