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

Unified Diff: content/plugin/webplugin_proxy.cc

Issue 17208003: Track NPObject ownership by the originating plugins' NPP identifier. [4/6] (Chrome) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove DCHECKs on proxy and stub maps. Created 7 years, 6 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 | « content/plugin/webplugin_delegate_stub.cc ('k') | content/renderer/webplugin_delegate_proxy.cc » ('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 65a8505f2bc0c8f78fb6dc9814068159f411bef8..8afbfb097cdcfc63468b9ff6c4a2d7ed1d54fdad 100644
--- a/content/plugin/webplugin_proxy.cc
+++ b/content/plugin/webplugin_proxy.cc
@@ -220,10 +220,15 @@ NPObject* WebPluginProxy::GetWindowScriptNPObject() {
if (!success)
return NULL;
+ // PluginChannel creates a dummy owner identifier for unknown owners, so
+ // use that.
+ NPP owner = channel_->GetExistingNPObjectOwner(MSG_ROUTING_NONE);
+
window_npobject_ = NPObjectProxy::Create(channel_.get(),
npobject_route_id,
host_render_view_routing_id_,
- page_url_);
+ page_url_,
+ owner);
return window_npobject_;
}
@@ -239,10 +244,15 @@ NPObject* WebPluginProxy::GetPluginElement() {
if (!success)
return NULL;
+ // PluginChannel creates a dummy owner identifier for unknown owners, so
+ // use that.
+ NPP owner = channel_->GetExistingNPObjectOwner(MSG_ROUTING_NONE);
+
plugin_element_ = NPObjectProxy::Create(channel_.get(),
npobject_route_id,
host_render_view_routing_id_,
- page_url_);
+ page_url_,
+ owner);
return plugin_element_;
}
« no previous file with comments | « content/plugin/webplugin_delegate_stub.cc ('k') | content/renderer/webplugin_delegate_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698