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

Unified Diff: content/plugin/npobject_proxy.cc

Issue 7068022: Preserves NPObject identity for objects created in a plugin and passed to JavaScript. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' 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 | « chrome/test/ui/npapi_uitest.cc ('k') | content/plugin/npobject_stub.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/plugin/npobject_proxy.cc
===================================================================
--- content/plugin/npobject_proxy.cc (revision 86681)
+++ content/plugin/npobject_proxy.cc (working copy)
@@ -69,8 +69,10 @@
NPObjectProxy::~NPObjectProxy() {
if (channel_.get()) {
Send(new NPObjectMsg_Release(route_id_));
- if (channel_.get())
+ if (channel_.get()) {
channel_->RemoveRoute(route_id_);
+ channel_->RemoveMappingForNPObjectProxy(route_id_);
+ }
}
}
@@ -82,7 +84,7 @@
WebBindings::createObject(0, &npclass_proxy_));
obj->proxy = new NPObjectProxy(
channel, route_id, containing_window, page_url);
-
+ channel->AddMappingForNPObjectProxy(route_id, &obj->object);
return reinterpret_cast<NPObject*>(obj);
}
« no previous file with comments | « chrome/test/ui/npapi_uitest.cc ('k') | content/plugin/npobject_stub.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698