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

Unified Diff: webkit/plugins/ppapi/message_channel.cc

Issue 15941006: Track NPObject ownership by the originating plugins' NPP identifier. [2/3] (Chrome) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix CppBoundClass. Created 7 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 | « webkit/plugins/npapi/webplugin_impl.cc ('k') | webkit/plugins/ppapi/plugin_object.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/plugins/ppapi/message_channel.cc
diff --git a/webkit/plugins/ppapi/message_channel.cc b/webkit/plugins/ppapi/message_channel.cc
index e0e0a390ce789c1212d8bcd2e0d85bf5969ac574..bbb3eb2274edcdda992eb1c92b98b8a77030a3c4 100644
--- a/webkit/plugins/ppapi/message_channel.cc
+++ b/webkit/plugins/ppapi/message_channel.cc
@@ -324,7 +324,8 @@ MessageChannel::MessageChannel(PluginInstance* instance)
early_message_queue_state_(QUEUE_MESSAGES) {
// Now create an NPObject for receiving calls to postMessage. This sets the
// reference count to 1. We release it in the destructor.
- NPObject* obj = WebBindings::createObject(NULL, &message_channel_class);
+ NPObject* obj = WebBindings::createObject(instance_->instanceNPP(),
+ &message_channel_class);
DCHECK(obj);
np_object_ = static_cast<MessageChannel::MessageChannelNPObject*>(obj);
np_object_->message_channel = weak_ptr_factory_.GetWeakPtr();
« no previous file with comments | « webkit/plugins/npapi/webplugin_impl.cc ('k') | webkit/plugins/ppapi/plugin_object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698