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

Proposed by Alexandre Abreu
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 Approve
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.
Revision history for this message
Chris Coulson (chrisccoulson) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'shared/browser/oxide_web_contents_unloader.cc'
--- shared/browser/oxide_web_contents_unloader.cc 2015-05-13 17:50:27 +0000
+++ shared/browser/oxide_web_contents_unloader.cc 2015-05-15 01:52:55 +0000
@@ -81,14 +81,14 @@
81 return;81 return;
82 }82 }
8383
84 content::WebContents* wc = contents.release();84 content::WebContents* wc = contents.get();
85 wc->SetUserData(85 wc->SetUserData(
86 kWebContentsUnloaderObserverKey,86 kWebContentsUnloaderObserverKey,
87 new WebContentsUnloaderObserver(wc));87 new WebContentsUnloaderObserver(wc));
8888
89 // So we can intercept CloseContents89 // So we can intercept CloseContents
90 contents->SetDelegate(this);90 contents->SetDelegate(this);
91 contents_unloading_.push_back(wc);91 contents_unloading_.push_back(contents.release());
9292
93 rvh->ClosePage();93 rvh->ClosePage();
94 // Note: |rvh| might be deleted at this point94 // Note: |rvh| might be deleted at this point

Subscribers

People subscribed via source and target branches