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

Unified Diff: content/renderer/browser_plugin/browser_plugin.cc

Issue 12425007: Browser Plugin: Fix crash on closing Browser App (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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: content/renderer/browser_plugin/browser_plugin.cc
diff --git a/content/renderer/browser_plugin/browser_plugin.cc b/content/renderer/browser_plugin/browser_plugin.cc
index a53e32ad93425c7fb08b4853acd38cb207f7b288..67e6459b7f0bf187b72b1552c567fb7491e59fc9 100644
--- a/content/renderer/browser_plugin/browser_plugin.cc
+++ b/content/renderer/browser_plugin/browser_plugin.cc
@@ -106,9 +106,6 @@ BrowserPlugin::BrowserPlugin(
}
BrowserPlugin::~BrowserPlugin() {
- // Will be a no-op if we are not currently locked to.
- render_view_->mouse_lock_dispatcher()->OnLockTargetDestroyed(this);
-
// If the BrowserPlugin has never navigated then the browser process and
// BrowserPluginManager don't know about it and so there is nothing to do
// here.
@@ -1080,6 +1077,9 @@ void BrowserPlugin::destroy() {
container_ = NULL;
if (compositing_helper_)
compositing_helper_->OnContainerDestroy();
+ // Will be a no-op if the mouse is not currently locked.
+ if (render_view_)
+ render_view_->mouse_lock_dispatcher()->OnLockTargetDestroyed(this);
MessageLoop::current()->DeleteSoon(FROM_HERE, 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