summaryrefslogtreecommitdiffstats
path: root/content/plugin/webplugin_proxy.cc
diff options
context:
space:
mode:
authorananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-06-15 18:24:12 +0000
committerananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-06-15 18:24:12 +0000
commitb870bff6929a43137639a7ba5a97f08e4c8a5108 (patch)
treebd6481d78001630e86b6402bb020820e447e4306 /content/plugin/webplugin_proxy.cc
parentf2b010372b588e349972760985d4d6619d2b950d (diff)
downloadchromium_src-b870bff6929a43137639a7ba5a97f08e4c8a5108.zip
chromium_src-b870bff6929a43137639a7ba5a97f08e4c8a5108.tar.gz
chromium_src-b870bff6929a43137639a7ba5a97f08e4c8a5108.tar.bz2
Reverting this to see if the Flash crashes on Mac canary are due to this CL.
Revert 88773 - Don't retain NPNVWindowNPObject and NPNVPluginElementNPObject twice Both NPN_GetValue and WebPluginProxy take a reference on access, with the latter conflating the caller's reference and its internal reference. To be consistent with WebPluginImpl, let WebPluginProxy only manage its internal reference and leave the plugin's reference to NPN_GetValue. Document this in the WebPlugin interface. Also release plugin-side proxies when WebPluginProxy is destroyed. R=ananta BUG=86124 TEST=none Review URL: http://codereview.chromium.org/6693052 TBR=davidben@chromium.org Review URL: http://codereview.chromium.org/7171021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89221 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/plugin/webplugin_proxy.cc')
-rw-r--r--content/plugin/webplugin_proxy.cc9
1 files changed, 2 insertions, 7 deletions
diff --git a/content/plugin/webplugin_proxy.cc b/content/plugin/webplugin_proxy.cc
index 84d6d0d..7c3025c 100644
--- a/content/plugin/webplugin_proxy.cc
+++ b/content/plugin/webplugin_proxy.cc
@@ -94,11 +94,6 @@ WebPluginProxy::~WebPluginProxy() {
if (accelerated_surface_.get())
accelerated_surface_.reset();
#endif
-
- if (plugin_element_)
- WebBindings::releaseObject(plugin_element_);
- if (window_npobject_)
- WebBindings::releaseObject(window_npobject_);
}
bool WebPluginProxy::Send(IPC::Message* msg) {
@@ -201,7 +196,7 @@ void WebPluginProxy::InvalidateRect(const gfx::Rect& rect) {
NPObject* WebPluginProxy::GetWindowScriptNPObject() {
if (window_npobject_)
- return window_npobject_;
+ return WebBindings::retainObject(window_npobject_);
int npobject_route_id = channel_->GenerateRouteID();
bool success = false;
@@ -218,7 +213,7 @@ NPObject* WebPluginProxy::GetWindowScriptNPObject() {
NPObject* WebPluginProxy::GetPluginElement() {
if (plugin_element_)
- return plugin_element_;
+ return WebBindings::retainObject(plugin_element_);
int npobject_route_id = channel_->GenerateRouteID();
bool success = false;