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

Unified Diff: content/public/browser/web_contents_observer.h

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
« no previous file with comments | « content/browser/web_contents/web_contents_impl.cc ('k') | content/public/browser/web_contents_observer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/browser/web_contents_observer.h
diff --git a/content/public/browser/web_contents_observer.h b/content/public/browser/web_contents_observer.h
index 1ebb4639b63487b7009f1bd33a03773b80690aca..da9e8239d688412d1bc617f5e35d01c2e6b55b77 100644
--- a/content/public/browser/web_contents_observer.h
+++ b/content/public/browser/web_contents_observer.h
@@ -293,9 +293,9 @@ class CONTENT_EXPORT WebContentsObserver : public IPC::Listener,
WebContents* new_web_contents) {}
// Invoked when the WebContents is being destroyed. Gives subclasses a chance
- // to cleanup. At the time this is invoked |web_contents()| returns NULL.
- // It is safe to delete 'this' from here.
- virtual void WebContentsDestroyed(WebContents* web_contents) {}
+ // to cleanup. After the whole loop over all WebContentsObservers has been
+ // finished, web_contents() returns NULL.
+ virtual void WebContentsDestroyed() {}
// Called when the user agent override for a WebContents has been changed.
virtual void UserAgentOverrideSet(const std::string& user_agent) {}
@@ -362,9 +362,7 @@ class CONTENT_EXPORT WebContentsObserver : public IPC::Listener,
private:
friend class WebContentsImpl;
- // Invoked from WebContentsImpl. Invokes WebContentsDestroyed and NULL out
- // |web_contents_|.
- void WebContentsImplDestroyed();
+ void ResetWebContents();
WebContentsImpl* web_contents_;
« no previous file with comments | « content/browser/web_contents/web_contents_impl.cc ('k') | content/public/browser/web_contents_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698