Enable the UI thread in browser to receive synchronous messages.
This is required to send synchronous message from renderer to browser.
This commit is contained in:
parent
9c52af8253
commit
ce569ebf78
1 changed files with 5 additions and 2 deletions
|
@ -98,11 +98,14 @@ v8::Handle<v8::Value> RendererIPC::SendSync(const v8::Arguments &args) {
|
||||||
RenderView* render_view = GetCurrentRenderView();
|
RenderView* render_view = GetCurrentRenderView();
|
||||||
|
|
||||||
base::DictionaryValue result;
|
base::DictionaryValue result;
|
||||||
bool success = render_view->Send(new AtomViewHostMsg_Message_Sync(
|
IPC::SyncMessage* message = new AtomViewHostMsg_Message_Sync(
|
||||||
render_view->GetRoutingID(),
|
render_view->GetRoutingID(),
|
||||||
channel,
|
channel,
|
||||||
*static_cast<base::ListValue*>(arguments.get()),
|
*static_cast<base::ListValue*>(arguments.get()),
|
||||||
&result));
|
&result);
|
||||||
|
// Enable the UI thread in browser to receive messages.
|
||||||
|
message->EnableMessagePumping();
|
||||||
|
bool success = render_view->Send(message);
|
||||||
|
|
||||||
if (!success)
|
if (!success)
|
||||||
return node::ThrowError("Unable to send AtomViewHostMsg_Message_Sync");
|
return node::ThrowError("Unable to send AtomViewHostMsg_Message_Sync");
|
||||||
|
|
Loading…
Reference in a new issue