No more plan for ipc.sendSync in browser.
authorCheng Zhao <zcbenz@gmail.com>
Tue, 23 Apr 2013 14:21:49 +0000 (22:21 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Tue, 23 Apr 2013 14:21:49 +0000 (22:21 +0800)
I want the browser to be fully asynchronous, so sending synchronous
messages from browser to renderer will be unacceptable.

common/api/api_messages.h
renderer/api/lib/ipc.coffee

index cc6d5f6..48f6d0e 100644 (file)
@@ -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 */)
index 4c21c48..0592940 100644 (file)
@@ -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...)