v8/test/unittests
Sathya Gunasekaran 743ce7726d [WeakRefs] Make cleanup callback run as a task
Previously, this was run as a microtask and this CL changes it to run
as a separate task as mandated by the current WeakRef spec.

This CL also introduces a FinalizationGroup type to the V8 API
representing the JSFinalizationGroup. This has a `Cleanup`
function that runs the cleanup callback associated with it.

SetHostCleanupFinalizationGroupCallback is added to set
the embedder defined HostCleanupFinalizationGroupCallback.

ClearKeptObject is exposed on the v8::Isolate to reset the strongly
held set of objects.

The general workflow is the following:

(a) When the GC notices that a given finalization group has dirty
    cells, it calls HostCleanupFinalizationGroupCallback with the given
    finalization group.

(b) As part of HostCleanupFinalizationGroupCallback, the embedder
    enqueues a task that at some point later calls
    FinalizationGroup::Cleanup.

(c) At some point in the future, FinalizationGroup::Cleanup is called,
    which runs the cleanup callback of the finalization group.

This patch also includes d8 changes to use these new APIs. Currently,
d8 cycles through the enqueued finalization groups after a synchronous
turn (and it's microtask checkpoint) and runs the cleanup callbacks.

Change-Id: I06eb4da2c103b2792a9c62bc4b98fd4e5c4892fc
Bug: v8:8179
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1655655
Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62984}
2019-07-30 12:19:39 +00:00
..
api [cleanup] Add %PrepareFunctionForOptimize for tests that use %OptimizeOsr 2019-06-18 16:47:29 +00:00
asmjs Move more relevant files to src/objects 2019-05-23 08:52:30 +00:00
assembler Move architecture dependent files 2019-05-28 14:02:15 +00:00
base Reland "[d8] Remove maximum workers limitation" 2019-07-30 07:56:17 +00:00
codegen Move unittest files 2019-05-27 08:52:23 +00:00
compiler [csa] block cloning to optimize branch on phi 2019-07-30 10:30:29 +00:00
compiler-dispatcher [wasm] Remove unused stack limit in export wrappers 2019-07-29 12:52:53 +00:00
date Reland "[d8] Remove maximum workers limitation" 2019-07-30 07:56:17 +00:00
diagnostics Move unittest files 2019-05-27 08:52:23 +00:00
execution [WeakRefs] Make cleanup callback run as a task 2019-07-30 12:19:39 +00:00
heap Reland "[d8] Remove maximum workers limitation" 2019-07-30 07:56:17 +00:00
interpreter Handlify bytecode array accessor's constant getters. 2019-06-17 16:13:30 +00:00
libplatform Reland "[d8] Remove maximum workers limitation" 2019-07-30 07:56:17 +00:00
logging [counters] Introduce proper bottleneck for FunctionCallback. 2019-06-12 09:04:38 +00:00
numbers [cleanup] Replace simple typedefs by using 2019-05-27 12:39:49 +00:00
objects Revert "Reland "Reland "[arraybuffer] Rearchitect backing store ownership""" 2019-07-23 12:25:16 +00:00
parser Move remaining files in src/ 2019-05-24 18:24:36 +00:00
profiler [cleanup] Replace simple typedefs by using 2019-05-27 12:39:49 +00:00
regress Move relevant files to src/execution 2019-05-22 08:36:33 +00:00
strings [cleanup] Remove 'typedef struct' and 'typedef enum' 2019-05-28 12:17:35 +00:00
tasks Reland "[d8] Remove maximum workers limitation" 2019-07-30 07:56:17 +00:00
torque [torque] Replace ReferenceType by generic Torque struct Reference<T> 2019-07-26 14:26:51 +00:00
utils [cleanup] Replace simple typedefs by using 2019-05-27 12:39:49 +00:00
wasm Reland "[d8] Remove maximum workers limitation" 2019-07-30 07:56:17 +00:00
zone [zone] Remove segment pooling from accounting allocator 2019-03-01 09:25:48 +00:00
BUILD.gn Revert "Reland "Reland "[arraybuffer] Rearchitect backing store ownership""" 2019-07-23 12:25:16 +00:00
DEPS Move unit tests to test/unittests. 2014-10-01 08:34:25 +00:00
run-all-unittests.cc Reland "Add test to show the crashing of TimeZone::AdoptDefault" 2019-05-16 09:38:43 +00:00
test-helpers.cc [SFI] Always store function_literal_id in SFI. 2019-06-21 16:23:27 +00:00
test-helpers.h [Compiler] Remove CompilerDispatcherJob and use BackgroundCompileTask directly 2018-10-09 10:39:27 +00:00
test-utils.cc Move remaining files in src/ 2019-05-24 18:24:36 +00:00
test-utils.h [cleanup] Replace simple typedefs by using 2019-05-27 12:39:49 +00:00
testcfg.py Reland "Preparing v8 to use with python3 /test" 2019-03-20 09:56:06 +00:00
unittests.status [torque] disable Windows ASAN unittests 2019-05-28 13:16:06 +00:00