summaryrefslogtreecommitdiffstats
path: root/chrome/renderer/plugins/plugin_placeholder.cc
diff options
context:
space:
mode:
authorbauerb@chromium.org <bauerb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-23 10:19:03 +0000
committerbauerb@chromium.org <bauerb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-23 10:19:03 +0000
commit4d5f89251922df6f3e3d768a7557f19791b2fc3e (patch)
treecd4278ea049a67ae132b2f871154c72f3337b882 /chrome/renderer/plugins/plugin_placeholder.cc
parent4a0a7db5bc2152e4a2d1620952dcbdebd4ffc98b (diff)
downloadchromium_src-4d5f89251922df6f3e3d768a7557f19791b2fc3e.zip
chromium_src-4d5f89251922df6f3e3d768a7557f19791b2fc3e.tar.gz
chromium_src-4d5f89251922df6f3e3d768a7557f19791b2fc3e.tar.bz2
Don't return too early in PluginPlaceholder destructor.
BUG=155877 Review URL: https://chromiumcodereview.appspot.com/11230027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@163537 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/plugins/plugin_placeholder.cc')
-rw-r--r--chrome/renderer/plugins/plugin_placeholder.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/chrome/renderer/plugins/plugin_placeholder.cc b/chrome/renderer/plugins/plugin_placeholder.cc
index c3eeff5..8fe9a52 100644
--- a/chrome/renderer/plugins/plugin_placeholder.cc
+++ b/chrome/renderer/plugins/plugin_placeholder.cc
@@ -234,6 +234,9 @@ PluginPlaceholder::PluginPlaceholder(content::RenderView* render_view,
PluginPlaceholder::~PluginPlaceholder() {
RenderThread::Get()->RemoveObserver(this);
+ if (context_menu_request_id_)
+ render_view()->CancelContextMenu(context_menu_request_id_);
+
#if defined(ENABLE_PLUGIN_INSTALLATION)
if (placeholder_routing_id_ == MSG_ROUTING_NONE)
return;
@@ -244,8 +247,6 @@ PluginPlaceholder::~PluginPlaceholder() {
routing_id(), placeholder_routing_id_));
}
#endif
- if (context_menu_request_id_)
- render_view()->CancelContextMenu(context_menu_request_id_);
}
#if defined(ENABLE_PLUGIN_INSTALLATION)
@@ -455,6 +456,7 @@ void PluginPlaceholder::PluginListChanged() {
}
void PluginPlaceholder::OnMenuAction(int request_id, unsigned action) {
+ DCHECK_EQ(context_menu_request_id_, request_id);
if (g_last_active_menu != this)
return;
switch (action) {
@@ -474,7 +476,7 @@ void PluginPlaceholder::OnMenuAction(int request_id, unsigned action) {
}
void PluginPlaceholder::OnMenuClosed(int request_id) {
- DCHECK(request_id == context_menu_request_id_);
+ DCHECK_EQ(context_menu_request_id_, request_id);
context_menu_request_id_ = 0;
}