diff --git a/.circleci/config.yml b/.circleci/config.yml index 2b917e75ced8b..c1e0a5816445b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1113,10 +1113,16 @@ jobs: # initial position of the mouse pointer relative to the canvas. # browser.test_html5_webgl_create_context is skipped because # anti-aliasing is not well supported. + # browser.test_webgl_offscreen_canvas_in_pthread and + # browser.test_webgl_offscreen_canvas_in_mainthread_after_pthread + # are crashing Firefox (bugzil.la/1281796). The former case is + # further blocked by issue #6897. test_targets: " browser skip:browser.test_sdl2_mouse skip:browser.test_html5_webgl_create_context + skip:browser.test_webgl_offscreen_canvas_in_pthread + skip:browser.test_webgl_offscreen_canvas_in_mainthread_after_pthread skip:browser.test_glut_glutget " test-browser-firefox-wasm64: diff --git a/ChangeLog.md b/ChangeLog.md index de4c9bf79556f..d22df7fda65b3 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -20,8 +20,6 @@ See docs/process.md for more on how version tagging works. 4.0.16 (in development) ----------------------- -- For windows users, colored console output for error messages and logging now - requires Windows 10 or above. (#25502) - A warning was added about usage of embind without C++17 or above. (#25424) - The minimum supported versions of Node, Chrome and Firefox were bumped enabling the removal of the `globalThis` polyfill and universally enabling diff --git a/emrun.py b/emrun.py index 26f65a572cb2f..7dfc3f8c8ebd7 100644 --- a/emrun.py +++ b/emrun.py @@ -1345,10 +1345,10 @@ def browser_display_name(browser): def subprocess_env(): e = os.environ.copy() - # https://bugzil.la/745154 + # https://bugzilla.mozilla.org/show_bug.cgi?id=745154 e['MOZ_DISABLE_AUTO_SAFE_MODE'] = '1' - e['MOZ_DISABLE_SAFE_MODE_KEY'] = '1' # https://bugzil.la/653410#c9 - e['JIT_OPTION_asmJSAtomicsEnable'] = 'true' # https://bugzil.la/1299359#c0 + e['MOZ_DISABLE_SAFE_MODE_KEY'] = '1' # https://bugzilla.mozilla.org/show_bug.cgi?id=653410#c9 + e['JIT_OPTION_asmJSAtomicsEnable'] = 'true' # https://bugzilla.mozilla.org/show_bug.cgi?id=1299359#c0 return e diff --git a/site/source/conf.py b/site/source/conf.py index a4d3d3dd2fe67..942d7cee48125 100644 --- a/site/source/conf.py +++ b/site/source/conf.py @@ -97,7 +97,7 @@ # |version| and |release|, also used in various other places throughout the # built documents. # -version_path = Path(os.path.dirname(os.path.dirname(os.path.dirname(__file__))), 'emscripten-version.txt') +version_path = Path(os.path.dirname(os.path.dirname(os.path.dirname(__file__))), 'emscripten-version.txt').resolve() emscripten_version = version_path.read_text().strip().strip('"') # The short X.Y version. diff --git a/site/source/docs/api_reference/wasm_workers.rst b/site/source/docs/api_reference/wasm_workers.rst index bea9afbeba3a0..7bf98577f3e35 100644 --- a/site/source/docs/api_reference/wasm_workers.rst +++ b/site/source/docs/api_reference/wasm_workers.rst @@ -153,7 +153,7 @@ a Wasm Worker, consider which type of hierarchy you would like, and if necessary hierarchy manually by posting the Worker creation over to the main thread yourself. Note that support for nested Workers varies across browsers. As of 02/2022, nested Workers are `not -supported in Safari `_. See `here +supported in Safari `_. See `here `_ for a polyfill. Pthreads can use the Wasm Worker synchronization API, but not vice versa diff --git a/site/source/docs/porting/pthreads.rst b/site/source/docs/porting/pthreads.rst index 75ec035f35694..0c46422d21295 100644 --- a/site/source/docs/porting/pthreads.rst +++ b/site/source/docs/porting/pthreads.rst @@ -136,7 +136,7 @@ The Emscripten implementation for the pthreads API should follow the POSIX stand - The Emscripten implementation does also not support multiprocessing via ``fork()`` and ``join()``. -- For web security purposes, there exists a fixed limit (by default 20) of threads that can be spawned when running in Firefox Nightly. `#1052398 `_. To adjust the limit, navigate to about:config and change the value of the pref "dom.workers.maxPerDomain". +- For web security purposes, there exists a fixed limit (by default 20) of threads that can be spawned when running in Firefox Nightly. `#1052398 `_. To adjust the limit, navigate to about:config and change the value of the pref "dom.workers.maxPerDomain". - Some of the features in the pthreads specification are unsupported since the upstream musl library that Emscripten utilizes does not support them, or they are marked optional and a conformant implementation need not support them. Such unsupported features in Emscripten include prioritization of threads, and pthread_rwlock_unlock() is not performed in thread priority order. The functions pthread_mutexattr_set/getprotocol(), pthread_mutexattr_set/getprioceiling() and pthread_attr_set/getscope() are no-ops. diff --git a/site/source/docs/tools_reference/settings_reference.rst b/site/source/docs/tools_reference/settings_reference.rst index a01aafb6c5c66..6faf6c0767ebf 100644 --- a/site/source/docs/tools_reference/settings_reference.rst +++ b/site/source/docs/tools_reference/settings_reference.rst @@ -921,7 +921,7 @@ GL_DISABLE_HALF_FLOAT_EXTENSION_IF_BROKEN From Safari 8 (where WebGL was introduced to Safari) onwards, OES_texture_half_float and OES_texture_half_float_linear extensions are broken and do not function correctly, when used as source textures. -See https://webkit.org/b/183321, https://webkit.org/b/169999, +See https://bugs.webkit.org/show_bug.cgi?id=183321, https://bugs.webkit.org/show_bug.cgi?id=169999, https://stackoverflow.com/questions/54248633/cannot-create-half-float-oes-texture-from-uint16array-on-ipad Default value: false @@ -933,7 +933,7 @@ GL_WORKAROUND_SAFARI_GETCONTEXT_BUG Workaround Safari WebGL issue: After successfully acquiring WebGL context on a canvas, calling .getContext() will always return that context independent of which 'webgl' or 'webgl2' -context version was passed. See https://webkit.org/b/222758 and +context version was passed. See https://bugs.webkit.org/show_bug.cgi?id=222758 and https://github.com/emscripten-core/emscripten/issues/13295. Set this to 0 to force-disable the workaround if you know the issue will not affect you. diff --git a/src/audio_worklet.js b/src/audio_worklet.js index ab8dfa2d9ef66..09c719063d6f3 100644 --- a/src/audio_worklet.js +++ b/src/audio_worklet.js @@ -256,8 +256,8 @@ function createWasmAudioWorkletProcessor() { // that has a MessagePort over to the AudioWorklet, then polyfill that by // a hacky AudioWorkletProcessor that provides the MessagePort. // Firefox added support in https://hg-edge.mozilla.org/integration/autoland/rev/ab38a1796126f2b3fc06475ffc5a625059af59c1 -// Chrome ticket: https://crbug.com/446920095 -// Safari ticket: https://webkit.org/b/299386 +// Chrome ticket: https://issues.chromium.org/issues/446920095 +// Safari ticket: https://bugs.webkit.org/show_bug.cgi?id=299386 /** * @suppress {duplicate, checkTypes} */ diff --git a/src/jsifier.mjs b/src/jsifier.mjs index 6d9f25560f09a..0f756027531cc 100644 --- a/src/jsifier.mjs +++ b/src/jsifier.mjs @@ -642,7 +642,7 @@ function(${args}) { } }); - const isFunction = typeof snippet == 'function'; + let isFunction = false; let isNativeAlias = false; const postsetId = symbol + '__postset'; @@ -680,7 +680,8 @@ function(${args}) { } else if (typeof snippet == 'object') { snippet = stringifyWithFunctions(snippet); addImplicitDeps(snippet, deps); - } else if (isFunction) { + } else if (typeof snippet == 'function') { + isFunction = true; snippet = processLibraryFunction(snippet, symbol, mangled, deps, isStub); addImplicitDeps(snippet, deps); if (CHECK_DEPS && !isUserSymbol) { @@ -726,7 +727,6 @@ function(${args}) { // Handle arrow functions contentText = `var ${mangled} = ` + contentText + ';'; } else if (contentText.startsWith('class ')) { - // Handle class declarations (which also have typeof == 'function'.) contentText = contentText.replace(/^class /, `class ${mangled} `); } else { // Handle regular (non-arrow) functions diff --git a/src/lib/libhtml5.js b/src/lib/libhtml5.js index b7363179d097b..a61100fcbf9ff 100644 --- a/src/lib/libhtml5.js +++ b/src/lib/libhtml5.js @@ -120,7 +120,7 @@ var LibraryHTML5 = { // whether it is possible to perform a request here without needing to defer. See // https://developer.mozilla.org/en-US/docs/Web/Security/User_activation#transient_activation // and https://caniuse.com/mdn-api_useractivation - // At the time of writing, Firefox does not support this API: https://bugzil.la/1791079 + // At the time of writing, Firefox does not support this API: https://bugzilla.mozilla.org/show_bug.cgi?id=1791079 return navigator.userActivation.isActive; } diff --git a/src/lib/libsdl.js b/src/lib/libsdl.js index c810a2c5e0302..8a52597bb6ef5 100644 --- a/src/lib/libsdl.js +++ b/src/lib/libsdl.js @@ -2521,7 +2521,7 @@ var LibrarySDL = { source['connect'](SDL.audioContext['destination']); SDL.fillWebAudioBufferFromHeap(ptr, sizeSamplesPerChannel, soundBuffer); - // Workaround https://bugzil.la/883675 by setting the buffer only after filling. The order is important here! + // Workaround https://bugzilla.mozilla.org/show_bug.cgi?id=883675 by setting the buffer only after filling. The order is important here! source['buffer'] = soundBuffer; // Schedule the generated sample buffer to be played out at the correct time right after the previously scheduled @@ -2775,7 +2775,7 @@ var LibrarySDL = { // To allow user code to work around browser bugs with audio playback on