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

Unified Diff: content/plugin/npobject_proxy.cc

Issue 7037027: Fixes Issues #5751 & #22631: NPObject identity (Closed)
Patch Set: fixes bogus change 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
Index: content/plugin/npobject_proxy.cc
diff --git a/content/plugin/npobject_proxy.cc b/content/plugin/npobject_proxy.cc
index 5c08724b086ce94236037d5b1e538c795840eb49..c00bf3457a713afbd6283e2f91814fc0d58c4f3a 100644
--- a/content/plugin/npobject_proxy.cc
+++ b/content/plugin/npobject_proxy.cc
@@ -69,8 +69,10 @@ NPObjectProxy::NPObjectProxy(
NPObjectProxy::~NPObjectProxy() {
if (channel_.get()) {
Send(new NPObjectMsg_Release(route_id_));
- if (channel_.get())
+ if (channel_.get()) {
channel_->RemoveRoute(route_id_);
+ channel_->RemoveMappingForProxy(route_id_);
+ }
}
}
@@ -82,7 +84,7 @@ NPObject* NPObjectProxy::Create(PluginChannelBase* channel,
WebBindings::createObject(0, &npclass_proxy_));
obj->proxy = new NPObjectProxy(
channel, route_id, containing_window, page_url);
-
+ channel->AddMappingForProxy(route_id, reinterpret_cast<NPObject*>(obj));
jam 2011/05/20 23:22:22 no need to cast, if you have an NPObjectWrapper, j
Kelly Norton 2011/05/23 15:02:56 Done.
return reinterpret_cast<NPObject*>(obj);
}

Powered by Google App Engine
This is Rietveld 408576698