Add remote.createFunctionWithReturnValue API.

This commit is contained in:
Cheng Zhao 2013-08-25 17:22:36 +08:00
parent d88676bf65
commit c86acc4cd7
5 changed files with 33 additions and 3 deletions

View file

@ -44,10 +44,13 @@ unwrapArgs = (processId, routingId, args) ->
when 'remote-object' then objectsRegistry.get meta.id
when 'array' then unwrapArgs processId, routingId, meta.value
when 'object'
ret = {}
ret = v8Util.createObjectWithName meta.name
for member in meta.members
ret[member.name] = metaToValue(member.value)
ret
when 'function-with-return-value'
returnValue = metaToValue meta.value
-> returnValue
when 'function'
ret = ->
ipc.sendChannel processId, routingId, 'ATOM_RENDERER_CALLBACK', meta.id, valueToMeta(processId, routingId, arguments)