v8/test
Shu-yu Guo 9f0f2cb7f0 [weakrefs] Call Isolate::ClearKeptObjects() as part of microtask checkpoint
In the spec, WeakRefs that are dereferenced are kept alive until there's
no JS on the stack, and then the host is expected to call
ClearKeptObjects to clear those strong references [1]. HTML calls
ClearKeptObjects at the end of a PerformMicrotaskCheckpoint [2].

In V8, leaving this up to the embedder is error prone in the same way
the deprecated FinalizationGroup callback APIs were error prone: it
depends on the embedder doing the right thing. This CL moves the call to
ClearKeptObjects to be after running of microtasks within V8.

However, the Isolate::ClearKeptObjects API should not be removed or
deprecated in case an embedder uses an entirely custom MicrotaskQueue
implementation and invokes MicrotaskQueue::PerformCheckpoint manually.

[1] https://tc39.es/proposal-weakrefs/#sec-clear-kept-objects
[2] https://github.com/whatwg/html/pull/4571

Bug: v8:8179
Change-Id: Ie243804157b56241ca69ed8fad300e839a0c9f75
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2055967
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66327}
2020-02-19 02:25:34 +00:00
..
benchmarks Remove 'embedded_builtins' variant 2019-10-22 12:58:02 +00:00
cctest [weakrefs] Call Isolate::ClearKeptObjects() as part of microtask checkpoint 2020-02-19 02:25:34 +00:00
common [wasm][reference-types] Implement declarative segments 2020-02-17 17:38:27 +00:00
debugger [wasm] Keep new module in tiered down upon "debugger.enable" 2020-02-18 19:52:18 +00:00
fuzzer [weakrefs] Call Isolate::ClearKeptObjects() as part of microtask checkpoint 2020-02-19 02:25:34 +00:00
inspector [wasm] Keep new module in tiered down upon "debugger.enable" 2020-02-18 19:52:18 +00:00
intl Reland "[Intl] Fix RelativeTimeFormat fatal" 2020-02-18 18:29:08 +00:00
js-perf-test [cleanup][test] Fix typo in js-perf-test/Scope/with.js 2020-02-12 10:59:54 +00:00
memory [owners] Remove redundant OWNERS files in test/ 2019-06-24 12:44:32 +00:00
message [stack-trace] Add url to wasm stack traces 2020-02-18 06:55:28 +00:00
mjsunit [parser] Track labels in the parser-base rather than parser+ast 2020-02-18 18:04:13 +00:00
mkgrokdump [heap] Enable Verify for RO_SPACE when it is shared 2019-11-04 09:55:45 +00:00
mozilla Remove and update some outdated TODO(mstarzinger). 2019-12-13 10:18:04 +00:00
test262 [Intl] Change order of "currency" and "unit" validation. 2020-01-31 20:31:05 +00:00
torque [torque] use iterators and constructors for ExtractFixedArray 2020-01-16 13:51:04 +00:00
unittests [wasm][reference-types] Implement declarative segments 2020-02-17 17:38:27 +00:00
wasm-api-tests [wasm] Clean up WASM_CALL_INDIRECT macros 2019-11-28 14:44:06 +00:00
wasm-js [wasm] Update spec tests 2020-02-18 15:16:38 +00:00
wasm-spec-tests [wasm] Update spec tests 2020-02-18 15:16:38 +00:00
webkit [class] Improve error message for calling anonymous class constructors 2019-12-05 21:13:07 +00:00
BUILD.gn [preparser] deprecate stand-alone "preparser" test-suite 2019-11-20 08:52:59 +00:00
OWNERS Use relative paths to OWNERS files 2019-08-12 13:52:52 +00:00