v8/test/mjsunit/harmony/weakrefs
Shu-yu Guo 45bb44985e [weakrefs] Hold unregister tokens weakly
Change unregister tokens to be held weakly instead of strongly. This
enables the use case for an object to be used as its own unregister
token.

To avoid using an ephemeron table, FinalizationGroup's key_map is
changed to key off unregister tokens' identity hashes. Because hashes
may collide, a single key list may rarely contain multiple tokens. When
a FinalizationGroup WeakCell's token becomes unreachable, during GC, it
is removed from the the doubly linked key list and removed from the key
map if it had a unique key.

Bug: v8:8179
Change-Id: If88fd2ab196e3f9a287990ae345117a0abb2f04d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1970493
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65532}
2019-12-19 22:42:09 +00:00
..
basics.js [WeakRefs] Make unregister spec compliant 2019-06-13 08:48:16 +00:00
cleanup-doesnt-iterate-all-holdings.js [WeakRefs] Make cleanup callback run as a task 2019-07-30 12:19:39 +00:00
cleanup-from-different-realm.js [js weak refs] Update to new API 2019-01-30 13:47:18 +00:00
cleanup-is-not-a-microtask.js [WeakRefs] Make cleanup callback run as a task 2019-07-30 12:19:39 +00:00
cleanup-on-detached-realm.js [WeakRefs] Make cleanup callback run as a task 2019-07-30 12:19:39 +00:00
cleanup-proxy-from-different-realm.js [js weak refs] Update to new API 2019-01-30 13:47:18 +00:00
cleanupsome-2.js [WeakRefs] Update cleanupSome to be spec compliant 2019-06-12 16:10:35 +00:00
cleanupsome-after-unregister.js [tests] Fix two tests to be --gc-interval robust 2019-05-17 16:59:37 +00:00
cleanupsome.js [WeakRefs] Update cleanupSome to be spec compliant 2019-06-12 16:10:35 +00:00
finalization-group-keeps-holdings-alive.js [js weak refs] Update to new API 2019-01-30 13:47:18 +00:00
finalizationgroup-and-weakref.js [WeakRefs] Make cleanup callback run as a task 2019-07-30 12:19:39 +00:00
finalizationgroup-scheduled-for-cleanup-multiple-times.js [js weak refs] Update to new API 2019-01-30 13:47:18 +00:00
iterating-in-cleanup.js [js weak refs] Update to new API 2019-01-30 13:47:18 +00:00
multiple-dirty-finalization-groups.js [js weak refs] Update to new API 2019-01-30 13:47:18 +00:00
two-weakrefs.js [WeakRefs] Make cleanup callback run as a task 2019-07-30 12:19:39 +00:00
undefined-holdings.js [js weak refs] Update to new API 2019-01-30 13:47:18 +00:00
unregister-after-cleanup.js [WeakRefs] Make unregister spec compliant 2019-06-13 08:48:16 +00:00
unregister-before-cleanup.js [WeakRefs] Make unregister spec compliant 2019-06-13 08:48:16 +00:00
unregister-called-twice.js [WeakRefs] Make unregister spec compliant 2019-06-13 08:48:16 +00:00
unregister-inside-cleanup1.js [WeakRefs] Make unregister spec compliant 2019-06-13 08:48:16 +00:00
unregister-inside-cleanup2.js [WeakRefs] Make unregister spec compliant 2019-06-13 08:48:16 +00:00
unregister-inside-cleanup3.js [WeakRefs] Make unregister spec compliant 2019-06-13 08:48:16 +00:00
unregister-inside-cleanup4.js [WeakRefs] Make unregister spec compliant 2019-06-13 08:48:16 +00:00
unregister-inside-cleanup5.js [WeakRefs] Make unregister spec compliant 2019-06-13 08:48:16 +00:00
unregister-many.js [WeakRefs] Make unregister spec compliant 2019-06-13 08:48:16 +00:00
unregister-when-cleanup-already-scheduled.js [WeakRefs] Make unregister spec compliant 2019-06-13 08:48:16 +00:00
weak-cell-basics.js [js weak refs] Update to new API 2019-01-30 13:47:18 +00:00
weak-unregistertoken.js [weakrefs] Hold unregister tokens weakly 2019-12-19 22:42:09 +00:00
weakref-creation-keeps-alive.js [WeakRefs] Make cleanup callback run as a task 2019-07-30 12:19:39 +00:00
weakref-deref-keeps-alive.js [WeakRefs] Make cleanup callback run as a task 2019-07-30 12:19:39 +00:00