Skip to content

Commit

Permalink
Fix tests (3)
Browse files Browse the repository at this point in the history
  • Loading branch information
kleisauke committed Sep 26, 2022
1 parent 360f803 commit 5396372
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,9 @@ self.onmessage = (e) => {
Module['dynamicLibraries'] = e.data.dynamicLibraries;
#endif

for (var handler of e.data.handlers) {
// Use `const` here to ensure that the variable is scoped only to
// that iteration, allowing safe reference from a closure.
for (const handler of e.data.handlers) {
Module[handler] = function() {
postMessage({ cmd: 'callHandler', handler, args: [...arguments] });
}
Expand Down
2 changes: 1 addition & 1 deletion test/test_browser.py
Original file line number Diff line number Diff line change
Expand Up @@ -4904,7 +4904,7 @@ def test_unicode_html_shell(self):
# Tests the functionality of the emscripten_thread_sleep() function.
@requires_threads
def test_emscripten_thread_sleep(self):
self.btest_exit(test_file('pthread/emscripten_thread_sleep.c'), args=['-sUSE_PTHREADS', '-sEXPORTED_RUNTIME_METHODS=[print]'])
self.btest_exit(test_file('pthread/emscripten_thread_sleep.c'), args=['-sUSE_PTHREADS'])

# Tests that Emscripten-compiled applications can be run from a relative path in browser that is different than the address of the current page
def test_browser_run_from_different_directory(self):
Expand Down

0 comments on commit 5396372

Please sign in to comment.