diff --git a/src/lib/libpthread.js b/src/lib/libpthread.js index 6b07f590eefda..64f49ea429292 100644 --- a/src/lib/libpthread.js +++ b/src/lib/libpthread.js @@ -22,6 +22,9 @@ #if EVAL_CTORS #error "EVAL_CTORS is not compatible with pthreads yet (passive segments)" #endif +#if EXPORT_ES6 && (MIN_FIREFOX_VERSION < 114 || MIN_CHROME_VERSION < 80 || MIN_SAFARI_VERSION < 150000) +#error "internal error, feature_matrix should not allow this" +#endif {{{ #if MEMORY64 @@ -42,15 +45,6 @@ const pthreadWorkerScript = TARGET_JS_NAME; // See https://github.com/emscripten-core/emscripten/issues/22394 const pthreadWorkerOptions = `{ #if EXPORT_ES6 -#if MIN_FIREFOX_VERSION < 114 -#error new Worker() supports ECMAScript module only starting from Firefox 114. Pass -sMIN_FIREFOX_VERSION=114 to target -sEXPORT_ES6 with -pthread. See https://caniuse.com/mdn-api_worker_worker_ecmascript_modules -#endif -#if MIN_CHROME_VERSION < 80 -#error new Worker() supports ECMAScript module only starting from Chrome 80. Pass -sMIN_CHROME_VERSION=80 to target -sEXPORT_ES6 with -pthread. See https://caniuse.com/mdn-api_worker_worker_ecmascript_modules -#endif -#if MIN_SAFARI_VERSION < 150000 -#error new Worker() supports ECMAScript module only starting from Safari 15. Pass -sMIN_SAFARI_VERSION=150000 to target -sEXPORT_ES6 with -pthread. See https://caniuse.com/mdn-api_worker_worker_ecmascript_modules -#endif 'type': 'module', #endif #if ENVIRONMENT_MAY_BE_NODE diff --git a/src/lib/libwasm_worker.js b/src/lib/libwasm_worker.js index 7a3e0dfeeb66c..385002ea3b162 100644 --- a/src/lib/libwasm_worker.js +++ b/src/lib/libwasm_worker.js @@ -24,6 +24,9 @@ #if WASM2JS && MODULARIZE #error "-sWASM=0 + -sMODULARIZE + -sWASM_WORKERS is not supported" #endif +#if EXPORT_ES6 && (MIN_FIREFOX_VERSION < 114 || MIN_CHROME_VERSION < 80 || MIN_SAFARI_VERSION < 150000) +#error "internal error, feature_matrix should not allow this" +#endif {{{ const workerSupportsFutexWait = () => AUDIO_WORKLET ? "!ENVIRONMENT_IS_AUDIO_WORKLET" : '1'; @@ -40,15 +43,6 @@ `; const wasmWorkerOptions = `{ #if EXPORT_ES6 -#if MIN_FIREFOX_VERSION < 114 -#error new Worker() supports ECMAScript module only starting from Firefox 114. Pass -sMIN_FIREFOX_VERSION=114 to target -sEXPORT_ES6 with -sWASM_WORKERS. See https://caniuse.com/mdn-api_worker_worker_ecmascript_modules -#endif -#if MIN_CHROME_VERSION < 80 -#error new Worker() supports ECMAScript module only starting from Chrome 80. Pass -sMIN_CHROME_VERSION=80 to target -sEXPORT_ES6 with -sWASM_WORKERS. See https://caniuse.com/mdn-api_worker_worker_ecmascript_modules -#endif -#if MIN_SAFARI_VERSION < 150000 -#error new Worker() supports ECMAScript module only starting from Safari 15. Pass -sMIN_SAFARI_VERSION=150000 to target -sEXPORT_ES6 with -sWASM_WORKERS. See https://caniuse.com/mdn-api_worker_worker_ecmascript_modules -#endif 'type': 'module', #endif #if ENVIRONMENT_MAY_BE_NODE