Don't rely on IDWeakMap for bookkeeping remote objects

It frees us from using C++ to track JS objects, thus improves the
performance of collecting memory.
This commit is contained in:
Cheng Zhao 2015-08-27 19:01:34 +08:00
parent bd64f5ced2
commit 64e8ce0c07
4 changed files with 59 additions and 70 deletions

View file

@ -102,7 +102,7 @@ metaToValue = (meta) ->
# Track delegate object's life time, and tell the browser to clean up
# when the object is GCed.
v8Util.setDestructor ret, ->
ipc.send 'ATOM_BROWSER_DEREFERENCE', meta.storeId
ipc.send 'ATOM_BROWSER_DEREFERENCE', meta.id
# Remember object's id.
v8Util.setHiddenValue ret, 'atomId', meta.id