diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:27 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:27 +0000 |
commit | 40a355a42d4a9444dc753c04c6608dade2f06a23 (patch) | |
tree | 871fc667d2de662f171103ce5ec067014ef85e61 /js/src/fuzz-tests/testWasm.cpp | |
parent | Adding upstream version 124.0.1. (diff) | |
download | firefox-adbda400be353e676059e335c3c0aaf99e719475.tar.xz firefox-adbda400be353e676059e335c3c0aaf99e719475.zip |
Adding upstream version 125.0.1.upstream/125.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'js/src/fuzz-tests/testWasm.cpp')
-rw-r--r-- | js/src/fuzz-tests/testWasm.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/js/src/fuzz-tests/testWasm.cpp b/js/src/fuzz-tests/testWasm.cpp index 719c38174a..d7ba0511b4 100644 --- a/js/src/fuzz-tests/testWasm.cpp +++ b/js/src/fuzz-tests/testWasm.cpp @@ -9,6 +9,7 @@ #include "fuzz-tests/tests.h" #include "js/CallAndConstruct.h" +#include "js/Prefs.h" #include "js/PropertyAndElement.h" // JS_Enumerate, JS_GetProperty, JS_GetPropertyById, JS_HasProperty, JS_SetProperty #include "vm/GlobalObject.h" #include "vm/Interpreter.h" @@ -40,13 +41,11 @@ static int testWasmInit(int* argc, char*** argv) { MOZ_CRASH("Wasm is not supported"); } - JS::ContextOptionsRef(gCx) -#define WASM_FEATURE(NAME, LOWER_NAME, STAGE, COMPILE_PRED, COMPILER_PRED, \ - FLAG_PRED, FLAG_FORCE_ON, FLAG_FUZZ_ON, SHELL, PREF) \ - .setWasm##NAME(FLAG_FUZZ_ON) - JS_FOR_WASM_FEATURES(WASM_FEATURE) +#define WASM_FEATURE(NAME, LOWER_NAME, COMPILE_PRED, COMPILER_PRED, FLAG_PRED, \ + FLAG_FORCE_ON, FLAG_FUZZ_ON, PREF) \ + JS::Prefs::setAtStartup_wasm_##PREF(FLAG_FUZZ_ON); + JS_FOR_WASM_FEATURES(WASM_FEATURE) #undef WASM_FEATURE - ; if (!GlobalObject::getOrCreateConstructor(gCx, JSProto_WebAssembly)) { MOZ_CRASH("Failed to initialize wasm engine"); |