Pass synchronous messages by JSON string.

We are going to use IPC_MESSAGE_HANDLER_DELAY_REPLY to handle
synchronous messages but DictionaryValue is not copyable, so we pass the
JSON string instead.
This commit is contained in:
Cheng Zhao 2013-09-20 22:32:59 +08:00
parent 07b5039c64
commit ef5a4b5fe0
10 changed files with 44 additions and 20 deletions

View file

@ -17,10 +17,10 @@ class Ipc extends EventEmitter
sendSync: (args...) ->
msg = ipc.sendSync('ATOM_INTERNAL_MESSAGE_SYNC', 'sync-message', args...)
msg.returnValue ? msg.result
JSON.parse(msg)
sendChannelSync: (args...) ->
msg = ipc.sendSync('ATOM_INTERNAL_MESSAGE_SYNC', args...)
msg.returnValue ? msg.result
JSON.parse(msg)
module.exports = new Ipc