summaryrefslogtreecommitdiffstats
path: root/content
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-05 18:59:00 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-05 18:59:00 +0000
commit2944b6787cb7e75fc0b7d5c517e8a3c0fe762063 (patch)
tree16559ee0fc8420748b0489ecd794b304baf164ed /content
parent6c03414ce2e2b4456ee012d3d5699e2f73a74132 (diff)
downloadchromium_src-2944b6787cb7e75fc0b7d5c517e8a3c0fe762063.zip
chromium_src-2944b6787cb7e75fc0b7d5c517e8a3c0fe762063.tar.gz
chromium_src-2944b6787cb7e75fc0b7d5c517e8a3c0fe762063.tar.bz2
Don't CHECK that a plugin window coming from the renderer is a plugin window, since on plugin shutdown there's a race coniditon where the hwnd isn't valid.
BUG=159310 Review URL: https://codereview.chromium.org/11275143 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@165976 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content')
-rw-r--r--content/browser/renderer_host/render_widget_host_view_base.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/content/browser/renderer_host/render_widget_host_view_base.cc b/content/browser/renderer_host/render_widget_host_view_base.cc
index 0124030..9390c1e 100644
--- a/content/browser/renderer_host/render_widget_host_view_base.cc
+++ b/content/browser/renderer_host/render_widget_host_view_base.cc
@@ -216,7 +216,6 @@ void RenderWidgetHostViewBase::MovePluginWindowsHelper(
unsigned long flags = 0;
const webkit::npapi::WebPluginGeometry& move = moves[i];
HWND window = move.window;
- CHECK(WebPluginDelegateImpl::IsPluginDelegateWindow(window));
// As the plugin parent window which lives on the browser UI thread is
// destroyed asynchronously, it is possible that we have a stale window
@@ -228,6 +227,13 @@ void RenderWidgetHostViewBase::MovePluginWindowsHelper(
if (!::IsWindow(window))
continue;
+ if (!WebPluginDelegateImpl::IsPluginDelegateWindow(window)) {
+ // The renderer should only be trying to move plugin windows. However,
+ // this may happen as a result of a race condition (i.e. even after the
+ // check right above), so we ignore it.
+ continue;
+ }
+
if (oop_plugins) {
if (cur_parent == WebPluginDelegateImpl::GetDefaultWindowParent()) {
// The plugin window hasn't been parented yet, add an intermediate