Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1218)

Unified Diff: content/browser/web_contents/web_contents_impl.cc

Issue 257153003: We have a problem in the process on destroying WebContentsImpl because (Closed) Base URL: https://git.chromium.org/chromium/src.git@master
Patch Set: Rebased onto origin/master again, resolved conflicts Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/web_contents/web_contents_impl.cc
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 0e4b23d590f117148a3d9a0509e99f406a8b5aa3..a690d085b0d62e853c862538d7a3232791ccd45d 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -287,8 +287,9 @@ class WebContentsImpl::DestructionObserver : public WebContentsObserver {
}
// WebContentsObserver:
- virtual void WebContentsDestroyed(WebContents* web_contents) OVERRIDE {
- owner_->OnWebContentsDestroyed(static_cast<WebContentsImpl*>(web_contents));
+ virtual void WebContentsDestroyed() OVERRIDE {
+ owner_->OnWebContentsDestroyed(
+ static_cast<WebContentsImpl*>(web_contents()));
}
private:
@@ -361,14 +362,6 @@ WebContentsImpl::WebContentsImpl(
WebContentsImpl::~WebContentsImpl() {
is_being_destroyed_ = true;
- // If there is an interstitial page being shown, tell it to close down early
- // so that this contents will be alive enough to handle all the UI triggered
- // by that. <http://crbug.com/363564>
- InterstitialPageImpl* interstitial_page =
- static_cast<InterstitialPageImpl*>(GetInterstitialPage());
- if (interstitial_page)
- interstitial_page->WebContentsWillBeDestroyed();
-
// Delete all RFH pending shutdown, which will lead the corresponding RVH to
// shutdown and be deleted as well.
frame_tree_.ForEach(
@@ -417,7 +410,11 @@ WebContentsImpl::~WebContentsImpl() {
FOR_EACH_OBSERVER(WebContentsObserver,
observers_,
- WebContentsImplDestroyed());
+ WebContentsDestroyed());
+
+ FOR_EACH_OBSERVER(WebContentsObserver,
+ observers_,
+ ResetWebContents());
SetDelegate(NULL);
« no previous file with comments | « content/browser/media/capture/web_contents_video_capture_device.cc ('k') | content/public/browser/web_contents_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698