From f8899242c5263f6fda7f5f91067ea427e6641945 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Tue, 23 Apr 2013 22:21:49 +0800 Subject: [PATCH] No more plan for ipc.sendSync in browser. I want the browser to be fully asynchronous, so sending synchronous messages from browser to renderer will be unacceptable. --- common/api/api_messages.h | 5 ----- renderer/api/lib/ipc.coffee | 4 +--- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/common/api/api_messages.h b/common/api/api_messages.h index cc6d5f681f3..48f6d0e2970 100644 --- a/common/api/api_messages.h +++ b/common/api/api_messages.h @@ -27,8 +27,3 @@ IPC_SYNC_MESSAGE_ROUTED2_1(AtomViewHostMsg_Message_Sync, IPC_MESSAGE_ROUTED2(AtomViewMsg_Message, std::string /* channel */, ListValue /* arguments */) - -IPC_SYNC_MESSAGE_ROUTED2_1(AtomViewMsg_Message_Sync, - std::string /* channel */, - ListValue /* arguments */, - DictionaryValue /* result */) diff --git a/renderer/api/lib/ipc.coffee b/renderer/api/lib/ipc.coffee index 4c21c48b2db..05929406aac 100644 --- a/renderer/api/lib/ipc.coffee +++ b/renderer/api/lib/ipc.coffee @@ -5,11 +5,9 @@ class Ipc extends EventEmitter constructor: -> process.on 'ATOM_INTERNAL_MESSAGE', (args...) => @emit(args...) - process.on 'ATOM_INTERNAL_MESSAGE_SYNC', (args...) => - @emit(args...) send: (args...) -> - @sendChannel('message', args...) + ipc.send('ATOM_INTERNAL_MESSAGE', 'message', args...) sendChannel: (args...) -> ipc.send('ATOM_INTERNAL_MESSAGE', args...)