Make sure all sync messages get a return value.
This commit is contained in:
parent
a9c824eba1
commit
07b5039c64
2 changed files with 3 additions and 0 deletions
|
@ -75,6 +75,7 @@ ipc.on 'ATOM_BROWSER_GLOBAL', (event, processId, routingId, name) ->
|
||||||
|
|
||||||
ipc.on 'ATOM_BROWSER_RELEASE_RENDER_VIEW', (event, processId, routingId) ->
|
ipc.on 'ATOM_BROWSER_RELEASE_RENDER_VIEW', (event, processId, routingId) ->
|
||||||
objectsRegistry.clear processId, routingId
|
objectsRegistry.clear processId, routingId
|
||||||
|
event.returnValue = null
|
||||||
|
|
||||||
ipc.on 'ATOM_BROWSER_CURRENT_WINDOW', (event, processId, routingId) ->
|
ipc.on 'ATOM_BROWSER_CURRENT_WINDOW', (event, processId, routingId) ->
|
||||||
try
|
try
|
||||||
|
@ -127,6 +128,7 @@ ipc.on 'ATOM_BROWSER_MEMBER_SET', (event, processId, routingId, id, name, value)
|
||||||
try
|
try
|
||||||
obj = objectsRegistry.get id
|
obj = objectsRegistry.get id
|
||||||
obj[name] = value
|
obj[name] = value
|
||||||
|
event.returnValue = null
|
||||||
catch e
|
catch e
|
||||||
event.returnValue = errorToMeta e
|
event.returnValue = errorToMeta e
|
||||||
|
|
||||||
|
|
|
@ -72,6 +72,7 @@ metaToValue = (meta) ->
|
||||||
ret.__defineSetter__ member.name, (value) ->
|
ret.__defineSetter__ member.name, (value) ->
|
||||||
# Set member data.
|
# Set member data.
|
||||||
ipc.sendChannelSync 'ATOM_BROWSER_MEMBER_SET', meta.id, member.name, value
|
ipc.sendChannelSync 'ATOM_BROWSER_MEMBER_SET', meta.id, member.name, value
|
||||||
|
value
|
||||||
|
|
||||||
ret.__defineGetter__ member.name, ->
|
ret.__defineGetter__ member.name, ->
|
||||||
# Get member data.
|
# Get member data.
|
||||||
|
|
Loading…
Reference in a new issue