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

Unified Diff: content/browser/renderer_host/render_widget_host_view_mac.mm

Issue 11416040: [Mac] Prevent ppapi fullscreen window from dealloc while on stack. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: unit test Created 8 years, 1 month 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 | « no previous file | content/browser/renderer_host/render_widget_host_view_mac_unittest.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/render_widget_host_view_mac.mm
diff --git a/content/browser/renderer_host/render_widget_host_view_mac.mm b/content/browser/renderer_host/render_widget_host_view_mac.mm
index f9e65b8c2c9582eec7e1346cb21dbc34e4d1df4d..537985ada0c9b27745e05fd38bcd3766bee4a660 100644
--- a/content/browser/renderer_host/render_widget_host_view_mac.mm
+++ b/content/browser/renderer_host/render_widget_host_view_mac.mm
@@ -728,7 +728,11 @@ void RenderWidgetHostViewMac::Destroy() {
[fullscreen_window_manager_ exitFullscreenMode];
fullscreen_window_manager_.reset();
[pepper_fullscreen_window_ close];
- pepper_fullscreen_window_.reset();
+
+ // This can be called as part of processing the window's responder
+ // chain, for instance |-performKeyEquivalent:|. In that case the
+ // object needs to survive until the stack unwinds.
+ pepper_fullscreen_window_.autorelease();
// We get this call just before |render_widget_host_| deletes
// itself. But we are owned by |cocoa_view_|, which may be retained
« no previous file with comments | « no previous file | content/browser/renderer_host/render_widget_host_view_mac_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698