summaryrefslogtreecommitdiffstats
path: root/content/plugin/webplugin_proxy.cc
diff options
context:
space:
mode:
Diffstat (limited to 'content/plugin/webplugin_proxy.cc')
-rw-r--r--content/plugin/webplugin_proxy.cc9
1 files changed, 7 insertions, 2 deletions
diff --git a/content/plugin/webplugin_proxy.cc b/content/plugin/webplugin_proxy.cc
index 7c3025c..84d6d0d 100644
--- a/content/plugin/webplugin_proxy.cc
+++ b/content/plugin/webplugin_proxy.cc
@@ -94,6 +94,11 @@ 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) {
@@ -196,7 +201,7 @@ void WebPluginProxy::InvalidateRect(const gfx::Rect& rect) {
NPObject* WebPluginProxy::GetWindowScriptNPObject() {
if (window_npobject_)
- return WebBindings::retainObject(window_npobject_);
+ return window_npobject_;
int npobject_route_id = channel_->GenerateRouteID();
bool success = false;
@@ -213,7 +218,7 @@ NPObject* WebPluginProxy::GetWindowScriptNPObject() {
NPObject* WebPluginProxy::GetPluginElement() {
if (plugin_element_)
- return WebBindings::retainObject(plugin_element_);
+ return plugin_element_;
int npobject_route_id = channel_->GenerateRouteID();
bool success = false;