Remove the useless remote.getObject API.
This commit is contained in:
parent
e1ac21aa7a
commit
cd19666307
3 changed files with 2 additions and 20 deletions
|
@ -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', ->
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue