diff --git a/js/src/shell/js.cpp b/js/src/shell/js.cpp index daf08c7475be..476ee89e79f5 100644 --- a/js/src/shell/js.cpp +++ b/js/src/shell/js.cpp @@ -267,6 +267,7 @@ static bool enableNativeRegExp = false; static bool enableUnboxedArrays = false; static bool enableSharedMemory = SHARED_MEMORY_DEFAULT; static bool enableWasmAlwaysBaseline = false; +static bool enableAsyncStacks = false; #ifdef JS_GC_ZEAL static uint32_t gZealBits = 0; static uint32_t gZealFrequency = 0; @@ -7771,6 +7772,7 @@ SetContextOptions(JSContext* cx, const OptionParser& op) enableNativeRegExp = !op.getBoolOption("no-native-regexp"); enableUnboxedArrays = op.getBoolOption("unboxed-arrays"); enableWasmAlwaysBaseline = op.getBoolOption("wasm-always-baseline"); + enableAsyncStacks = !op.getBoolOption("no-async-stacks"); JS::ContextOptionsRef(cx).setBaseline(enableBaseline) .setIon(enableIon) @@ -7778,7 +7780,8 @@ SetContextOptions(JSContext* cx, const OptionParser& op) .setWasm(enableWasm) .setWasmAlwaysBaseline(enableWasmAlwaysBaseline) .setNativeRegExp(enableNativeRegExp) - .setUnboxedArrays(enableUnboxedArrays); + .setUnboxedArrays(enableUnboxedArrays) + .setAsyncStack(enableAsyncStacks); if (op.getBoolOption("wasm-check-bce")) jit::JitOptions.wasmAlwaysCheckBounds = true; @@ -8379,6 +8382,7 @@ main(int argc, char** argv, char** envp) || !op.addStringOption('z', "gc-zeal", "LEVEL(;LEVEL)*[,N]", gc::ZealModeHelpText) #endif || !op.addStringOption('\0', "module-load-path", "DIR", "Set directory to load modules from") + || !op.addBoolOption('\0', "no-async-stacks", "Disable async stacks") ) { return EXIT_FAILURE;