| Index: content/renderer/pepper/pepper_plugin_instance_impl.cc
|
| diff --git a/content/renderer/pepper/pepper_plugin_instance_impl.cc b/content/renderer/pepper/pepper_plugin_instance_impl.cc
|
| index 573831d4d55983252115a44c5c447c1ffc081ea5..6b249810e442771bb9baefa08a33d34b0d057e1e 100644
|
| --- a/content/renderer/pepper/pepper_plugin_instance_impl.cc
|
| +++ b/content/renderer/pepper/pepper_plugin_instance_impl.cc
|
| @@ -1160,8 +1160,8 @@ void PepperPluginInstanceImpl::HandleMessage(ScopedPPVar message) {
|
| ppapi::proxy::HostDispatcher* dispatcher =
|
| ppapi::proxy::HostDispatcher::GetForInstance(pp_instance());
|
| if (!dispatcher || (message.get().type == PP_VARTYPE_OBJECT)) {
|
| - // The dispatcher should always be valid, and the browser should never send
|
| - // an 'object' var over PPP_Messaging.
|
| + // The dispatcher should always be valid, and MessageChannel should never
|
| + // send an 'object' var over PPP_Messaging.
|
| NOTREACHED();
|
| return;
|
| }
|
| @@ -1172,6 +1172,32 @@ void PepperPluginInstanceImpl::HandleMessage(ScopedPPVar message) {
|
| pp_instance())));
|
| }
|
|
|
| +bool PepperPluginInstanceImpl::HandleBlockingMessage(ScopedPPVar message,
|
| + ScopedPPVar* result) {
|
| + TRACE_EVENT0("ppapi", "PepperPluginInstanceImpl::HandleBlockingMessage");
|
| + ppapi::proxy::HostDispatcher* dispatcher =
|
| + ppapi::proxy::HostDispatcher::GetForInstance(pp_instance());
|
| + if (!dispatcher || (message.get().type == PP_VARTYPE_OBJECT)) {
|
| + // The dispatcher should always be valid, and MessageChannel should never
|
| + // send an 'object' var over PPP_Messaging.
|
| + NOTREACHED();
|
| + return false;
|
| + }
|
| + ppapi::proxy::ReceiveSerializedVarReturnValue msg_reply;
|
| + bool was_handled = false;
|
| + dispatcher->Send(new PpapiMsg_PPPMessageHandler_HandleBlockingMessage(
|
| + ppapi::API_ID_PPP_MESSAGING,
|
| + pp_instance(),
|
| + ppapi::proxy::SerializedVarSendInputShmem(dispatcher, message.get(),
|
| + pp_instance()),
|
| + &msg_reply,
|
| + &was_handled));
|
| + *result = ScopedPPVar(ScopedPPVar::PassRef(), msg_reply.Return(dispatcher));
|
| + TRACE_EVENT0("ppapi",
|
| + "PepperPluginInstanceImpl::HandleBlockingMessage return.");
|
| + return was_handled;
|
| +}
|
| +
|
| PP_Var PepperPluginInstanceImpl::GetInstanceObject() {
|
| // Keep a reference on the stack. See NOTE above.
|
| scoped_refptr<PepperPluginInstanceImpl> ref(this);
|
|
|