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

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

Issue 11490014: PPAPI: Make Messaging not PostTask and copy when out-of-process. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fixed NaCl plugins Created 8 years 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: webkit/plugins/ppapi/ppapi_plugin_instance.cc
diff --git a/webkit/plugins/ppapi/ppapi_plugin_instance.cc b/webkit/plugins/ppapi/ppapi_plugin_instance.cc
index 1bc047761bc95f9757473cc5b9bf90bfa78e4a79..03f6d686b15e673ca864dc488fa183675e61772a 100644
--- a/webkit/plugins/ppapi/ppapi_plugin_instance.cc
+++ b/webkit/plugins/ppapi/ppapi_plugin_instance.cc
@@ -580,10 +580,13 @@ bool PluginInstance::Initialize(const std::vector<std::string>& arg_names,
argv_ = arg_values;
scoped_array<const char*> argn_array(StringVectorToArgArray(argn_));
scoped_array<const char*> argv_array(StringVectorToArgArray(argv_));
- return PP_ToBool(instance_interface_->DidCreate(pp_instance(),
- argn_.size(),
- argn_array.get(),
- argv_array.get()));
+ bool success = PP_ToBool(instance_interface_->DidCreate(pp_instance(),
+ argn_.size(),
+ argn_array.get(),
+ argv_array.get()));
+ if (success)
+ message_channel_->EndQueueingJavaScriptMessages();
+ return success;
}
bool PluginInstance::HandleDocumentLoad(PPB_URLLoader_Impl* loader) {
@@ -2386,6 +2389,7 @@ bool PluginInstance::ResetAsProxied(scoped_refptr<PluginModule> module) {
original_module_ = module_;
module_ = module;
+ message_channel_->QueueJavaScriptMessages();
dmichael (off chromium) 2012/12/11 18:55:55 Probably worth a comment?
teravest 2012/12/11 21:32:12 Done.
// For NaCl instances, remember the NaCl plugin instance interface, so we
// can shut it down by calling its DidDestroy in our Delete() method.
original_instance_interface_.reset(instance_interface_.release());
@@ -2420,6 +2424,7 @@ bool PluginInstance::ResetAsProxied(scoped_refptr<PluginModule> module) {
if (!instance_interface_->DidCreate(pp_instance(), argn_.size(),
argn_array.get(), argv_array.get()))
return false;
+ message_channel_->EndQueueingJavaScriptMessages();
// Clear sent_initial_did_change_view_ and cancel any pending DidChangeView
// event. This way, SendDidChangeView will send the "current" view
« webkit/plugins/ppapi/message_channel.cc ('K') | « webkit/plugins/ppapi/plugin_module.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698