From 39bd548d900442aa698dbc03aa02ef9391acd708 Mon Sep 17 00:00:00 2001 From: Brendan Dahl Date: Fri, 19 Sep 2025 21:29:51 +0000 Subject: [PATCH 1/2] [audioworklet] Fix test_audio_worklet shutdown hang. --- test/webaudio/audioworklet.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/webaudio/audioworklet.c b/test/webaudio/audioworklet.c index 964b30ddad5da..883834b3843d7 100644 --- a/test/webaudio/audioworklet.c +++ b/test/webaudio/audioworklet.c @@ -20,6 +20,8 @@ begin to fire. */ +EMSCRIPTEN_WEBAUDIO_T context; + // TEST_AND_EXIT is defined when running in the Emscripten test harness. You can // strip these out in your own project (otherwise playback will end quickly). #ifdef TEST_AND_EXIT @@ -70,6 +72,7 @@ bool main_thread_tls_access(double time, void *userData) { testTlsVariable = (int)time; // Exit to the test harness after enough calls to ProcessAudio() if (lastTlsVariableValueInAudioThread >= 100) { + emscripten_destroy_audio_context(context); emscripten_force_exit(0); } return true; @@ -128,7 +131,7 @@ int main() { assert(!emscripten_current_thread_is_audio_worklet()); // Create an audio context - EMSCRIPTEN_WEBAUDIO_T context = emscripten_create_audio_context(0 /* use default constructor options */); + context = emscripten_create_audio_context(0 /* use default constructor options */); // and kick off Audio Worklet scope initialization, which shares the Wasm // Module and Memory to the AudioWorklet scope and initializes its stack. From 9ef31250279227dd2f020a50fe6589c32b3ff41b Mon Sep 17 00:00:00 2001 From: Brendan Dahl Date: Fri, 19 Sep 2025 21:53:25 +0000 Subject: [PATCH 2/2] Automatic rebaseline of codesize expectations. NFC This is an automatic change generated by tools/maint/rebaseline_tests.py. The following (1) test expectation files were updated by running the tests with `--rebaseline`: ``` codesize/test_minimal_runtime_code_size_audio_worklet.json: 5894 => 5904 [+10 bytes / +0.17%] Average change: +0.17% (+0.17% - +0.17%) ``` --- .../test_minimal_runtime_code_size_audio_worklet.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/codesize/test_minimal_runtime_code_size_audio_worklet.json b/test/codesize/test_minimal_runtime_code_size_audio_worklet.json index 981710d42f492..d4904dbec2e14 100644 --- a/test/codesize/test_minimal_runtime_code_size_audio_worklet.json +++ b/test/codesize/test_minimal_runtime_code_size_audio_worklet.json @@ -3,8 +3,8 @@ "a.html.gz": 357, "a.js": 4077, "a.js.gz": 2137, - "a.wasm": 1298, - "a.wasm.gz": 868, - "total": 5894, - "total_gz": 3362 + "a.wasm": 1308, + "a.wasm.gz": 876, + "total": 5904, + "total_gz": 3370 }