summaryrefslogtreecommitdiffstats
path: root/chrome/renderer/webplugin_delegate_proxy.h
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-06 19:11:22 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-06 19:11:22 +0000
commit49f69aeb0f507096666e58e037a389712be4e585 (patch)
tree36d2b291928e0e1a539467b26d7186d096956dcf /chrome/renderer/webplugin_delegate_proxy.h
parent519c21a5a3aefe5afc4123bda99d4e76d2a012bb (diff)
downloadchromium_src-49f69aeb0f507096666e58e037a389712be4e585.zip
chromium_src-49f69aeb0f507096666e58e037a389712be4e585.tar.gz
chromium_src-49f69aeb0f507096666e58e037a389712be4e585.tar.bz2
Fix scripting during NPP_Destroy. Note that if the plugin is making a call to the renderer so this instance is in the callstack, destruction will have to be asynchronous and so scripting still won't work. This change also fixes use of PluginChannel after it's deleted (if this was the last instance).
BUG=23713, 23706 TEST=added ui test Review URL: http://codereview.chromium.org/258026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28141 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/webplugin_delegate_proxy.h')
-rw-r--r--chrome/renderer/webplugin_delegate_proxy.h7
1 files changed, 2 insertions, 5 deletions
diff --git a/chrome/renderer/webplugin_delegate_proxy.h b/chrome/renderer/webplugin_delegate_proxy.h
index 043bdb8..8651aabf 100644
--- a/chrome/renderer/webplugin_delegate_proxy.h
+++ b/chrome/renderer/webplugin_delegate_proxy.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2009 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -45,9 +45,6 @@ class WebPluginDelegateProxy :
WebPluginDelegateProxy(const std::string& mime_type,
const base::WeakPtr<RenderView>& render_view);
- // Called to drop our pointer to the window script object.
- void DropWindowScriptObject() { window_script_object_ = NULL; }
-
// WebPluginDelegate implementation:
virtual void PluginDestroyed();
virtual bool Initialize(const GURL& url,
@@ -171,7 +168,7 @@ class WebPluginDelegateProxy :
gfx::Rect plugin_rect_;
NPObject* npobject_;
- NPObjectStub* window_script_object_;
+ base::WeakPtr<NPObjectStub> window_script_object_;
// Event passed in by the plugin process and is used to decide if
// messages need to be pumped in the NPP_HandleEvent sync call.