v8/test
Andreas Haas 16d9298a9c [api] Add callback to set up conditional features
Origin trials allow webpages to use experimental features even though
the features are not yet enabled by default. These features will then
get enabled per execution context: it is possible that the feature is
enabled in one execution context but disabled in another execution
context. In V8 we check for origin trials by calling a callback provided
by the embedder that takes the context as a parameter and returns
whether a feature is enabled in this context or not.

This approach fails when a feature changes the context itself, e.g. by
extending the global object. In that case the context is not available
yet to check for the origin trial.

To solve the problem this CL adds a new API function that can be called
by the embedder to notify V8 that context with the origin trial
information is finished. After that V8 can read the origin trial
information from the context and extend e.g. the global object with the
origin trial features.

Additionally to the API this CL also adds code to enable the
WebAssembly.Exception constructor conditionally, depending on whether
it has been enabled by an origin trial or not.

The Blink-side change: https://crrev.com/c/2775573

R=ulan@chromium.org, jkummerow@chromium.org

Change-Id: Ic05c4a89eb3e0e31469e49da8767d630c43b2e00
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2773287
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73597}
2021-03-23 09:03:34 +00:00
..
benchmarks IWYU: Added missing include: include/cppgc/persistent.h 2021-02-17 17:37:29 +00:00
cctest Revert "Reland [dict-proto] C++ implementation of SwissNameDictionary, pt. 10" 2021-03-23 08:15:07 +00:00
common [relaxed-simd] Move tests into separate file 2021-03-22 18:41:54 +00:00
debugger [debugger] Consider close-by functions when setting a breakpoint 2021-03-15 07:00:49 +00:00
debugging [wasm] Rename kWasmStmt -> kWasmVoid 2021-03-22 07:58:18 +00:00
fuzzer [api] Add callback to set up conditional features 2021-03-23 09:03:34 +00:00
fuzzilli Fix unhandled promise rejections in REPRL mode 2020-09-30 13:34:23 +00:00
inspector [inspector][fuzzer] Handle termination while creating context 2021-03-23 08:58:14 +00:00
intl Revert "[test] Disable tests failing with new msan roll" 2021-03-02 00:00:03 +00:00
js-perf-test Update OWNERS in test/* 2021-02-25 14:26:24 +00:00
memory Reland^4 "[serializer] Allocate during deserialization" 2020-10-07 08:15:50 +00:00
message [wasm] Rename kWasmStmt -> kWasmVoid 2021-03-22 07:58:18 +00:00
mjsunit [wasm] Rename kWasmStmt -> kWasmVoid 2021-03-22 07:58:18 +00:00
mkgrokdump [build] Fold v8_wrappers into v8_libbase 2021-02-25 10:56:20 +00:00
mozilla [compiler, infra] Add a --stress-concurrent-inlining flag and a bot 2021-01-29 12:05:03 +00:00
test262 [interpreter] Apply Reflect.apply transform in BytecodeGenerator 2021-03-19 11:02:43 +00:00
torque [torque] Add LazyNode support 2021-02-23 16:51:53 +00:00
unittests [turbofan] Introduce LoadImmutable, use it in wasm compiler 2021-03-23 08:16:09 +00:00
wasm-api-tests Reland "[no-wasm] Exclude src/wasm from compilation" 2021-03-11 14:29:26 +00:00
wasm-js Skip wasm-js limits tests 2021-03-17 16:34:02 +00:00
wasm-spec-tests [wasm][memory64] Fix typing of memory.grow 2021-03-19 13:51:23 +00:00
webkit Disallow \8 and \9 in strict mode and template literals 2020-08-03 18:05:14 +00:00
BUILD.gn [no-wasm] Exclude more targets from build 2021-03-09 11:25:54 +00:00
OWNERS