Remove the useless remote.getObject API.

This commit is contained in:
Cheng Zhao 2013-07-29 16:35:25 +08:00
parent e1ac21aa7a
commit cd19666307
3 changed files with 2 additions and 20 deletions

View file

@ -6,7 +6,7 @@ class ObjectsStore
@stores = {}
constructor: ->
@nextId = 1
@nextId = 0
@objects = []
getNextId: ->
@ -48,13 +48,7 @@ objectsWeakMap.add = (obj) ->
windowsWeakMap = new IDWeakMap
process.on 'ATOM_BROWSER_INTERNAL_NEW', (obj) ->
# It's possible that user created a object in browser side and then want to
# get it in renderer via remote.getObject. So we must add every native object
# created in browser to the weak map even it may not be referenced by the
# renderer.
objectsWeakMap.add obj
# Also remember all windows.
# Remember all windows.
if obj.constructor is BrowserWindow
id = windowsWeakMap.add obj
obj.on 'destroyed', ->