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

Unified Diff: chrome/browser/renderer_host/render_widget_host_view_win.cc

Issue 284019: Speculative fix for a crash where RenderWidgetHostViewWin tries to access a d... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/renderer_host/render_widget_host_view_win.cc
===================================================================
--- chrome/browser/renderer_host/render_widget_host_view_win.cc (revision 29335)
+++ chrome/browser/renderer_host/render_widget_host_view_win.cc (working copy)
@@ -630,6 +630,12 @@
// triggering further destructions. The deletion of this is handled by
// OnFinalMessage();
close_on_deactivate_ = false;
+
+ // In case OnFinalMessage() does not get called before DestroyWindow()
+ // returns, make sure we don't try to access |render_widget_host_| later.
+ // http://crbug.com/24248
+ render_widget_host_ = NULL;
+
DestroyWindow();
}
@@ -1266,7 +1272,8 @@
}
void RenderWidgetHostViewWin::OnFinalMessage(HWND window) {
- render_widget_host_->ViewDestroyed();
+ if (render_widget_host_)
+ render_widget_host_->ViewDestroyed();
delete this;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698