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

Unified Diff: extensions/browser/guest_view/web_view/web_view_guest.h

Issue 611563002: GuestView: Use Weak Pointers Throughout (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed bug where openers become NULL before WillDestroy Created 6 years, 2 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: extensions/browser/guest_view/web_view/web_view_guest.h
diff --git a/extensions/browser/guest_view/web_view/web_view_guest.h b/extensions/browser/guest_view/web_view/web_view_guest.h
index 9b9c702ec9828e1f9ca7b2476e546ca4b2d9615e..63cf7503c7d60c29cd2b44de144350606150fc00 100644
--- a/extensions/browser/guest_view/web_view/web_view_guest.h
+++ b/extensions/browser/guest_view/web_view/web_view_guest.h
@@ -369,6 +369,10 @@ class WebViewGuest : public GuestView<WebViewGuest>,
typedef std::map<WebViewGuest*, NewWindowInfo> PendingWindowMap;
PendingWindowMap pending_new_windows_;
+ // This is used to ensure pending tasks will not fire after this object is
+ // destroyed.
+ base::WeakPtrFactory<WebViewGuest> weak_ptr_factory_;
+
DISALLOW_COPY_AND_ASSIGN(WebViewGuest);
};
« no previous file with comments | « extensions/browser/guest_view/guest_view_base.cc ('k') | extensions/browser/guest_view/web_view/web_view_guest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698