Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(358)

Unified Diff: content/plugin/webplugin_proxy.cc

Issue 6693052: Don't retain NPNVWindowNPObject and NPNVPluginElementNPObject twice (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: release plugin_element_ and window_npobject_ proxies Created 9 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | webkit/plugins/npapi/webplugin.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/plugin/webplugin_proxy.cc
diff --git a/content/plugin/webplugin_proxy.cc b/content/plugin/webplugin_proxy.cc
index 5006b6cb6abf57a00cb70507a64e77478d869ef2..28c7247c51630a78e2207a97be04c2fe2f74262a 100644
--- a/content/plugin/webplugin_proxy.cc
+++ b/content/plugin/webplugin_proxy.cc
@@ -93,6 +93,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) {
@@ -190,7 +195,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;
@@ -207,7 +212,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;
« no previous file with comments | « no previous file | webkit/plugins/npapi/webplugin.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698