зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1623889 - Allow SAB to be disabled in js shell. r=bbouvier
The previous fix here was a hack that would disable SAB in the JS shell on non-nightly, but this breaks various tests that no longer guard properly for SAB. Instead of embedding the hack more deeply by changing those tests, we fix it the way it should have been from the outset: SAB is enabled in the shell on all channels but can be disabled by a switch. Differential Revision: https://phabricator.services.mozilla.com/D68515 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
9b727b1e0b
Коммит
7b4366d9af
|
@ -616,17 +616,15 @@ set_define('ENABLE_WASM_MULTI_VALUE', depends_if('--enable-wasm-multi-value')(la
|
|||
# and atomics it can go away.
|
||||
# =====================================================
|
||||
|
||||
@depends(milestone.is_nightly)
|
||||
def default_wasm_threads(is_nightly):
|
||||
return is_nightly
|
||||
js_option('--disable-shared-memory', help='Disable JS/WebAssembly shared memory and atomics')
|
||||
|
||||
js_option('--enable-wasm-threads',
|
||||
default=default_wasm_threads,
|
||||
help='{Enable|Disable} WebAssembly shared memory and atomics')
|
||||
|
||||
set_config('ENABLE_WASM_THREADS', depends_if('--enable-wasm-threads')(lambda x: True))
|
||||
set_define('ENABLE_WASM_THREADS', depends_if('--enable-wasm-threads')(lambda x: True))
|
||||
@depends('--disable-shared-memory')
|
||||
def enable_shared_memory(value):
|
||||
if value:
|
||||
return True
|
||||
|
||||
set_config('ENABLE_SHARED_MEMORY', enable_shared_memory)
|
||||
set_define('ENABLE_SHARED_MEMORY', enable_shared_memory)
|
||||
|
||||
|
||||
# Initial support for new regexp engine
|
||||
|
|
|
@ -208,7 +208,7 @@ static const size_t gMaxStackSize = 128 * sizeof(size_t) * 1024;
|
|||
static const double MAX_TIMEOUT_SECONDS = 1800.0;
|
||||
|
||||
// Not necessarily in sync with the browser
|
||||
#ifdef ENABLE_WASM_THREADS
|
||||
#ifdef ENABLE_SHARED_MEMORY
|
||||
# define SHARED_MEMORY_DEFAULT 1
|
||||
#else
|
||||
# define SHARED_MEMORY_DEFAULT 0
|
||||
|
|
Загрузка…
Ссылка в новой задаче