Skip to content

Fix reference for undefined errback. NFC #24886

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 8, 2025

Conversation

sbc100
Copy link
Collaborator

@sbc100 sbc100 commented Aug 8, 2025

This went unnoticed by the tests because the calling code has a .catch handler that calls the fallback function. So the test still passed but with a bunch of extra output:

ReferenceError: errback is not defined
    at openDatabase (/usr/local/google/home/sbc/dev/wasm/emscripten/out/test/src.js:173:13)
    at runWithFS (/usr/local/google/home/sbc/dev/wasm/emscripten/out/test/src.js:333:9)
    at callRuntimeCallbacks (/usr/local/google/home/sbc/dev/wasm/emscripten/out/test/src.js:1164:26)
    at preRun (/usr/local/google/home/sbc/dev/wasm/emscripten/out/test/src.js:841:3)
    at run (/usr/local/google/home/sbc/dev/wasm/emscripten/out/test/src.js:4658:3)
    at Object.removeRunDependency (/usr/local/google/home/sbc/dev/wasm/emscripten/out/test/src.js:950:7)
    at loadPackage (/usr/local/google/home/sbc/dev/wasm/emscripten/out/test/src.js:362:34)
    at runMetaWithFS (/usr/local/google/home/sbc/dev/wasm/emscripten/out/test/src.js:371:18)
falling back to default preload behavior
done

Followup to #24883

This went unnoticed by the tests because the calling code has a `.catch`
handler that calls the fallback function.  So the test still passed but
with a bunch of extra output:

```
ReferenceError: errback is not defined
    at openDatabase (/usr/local/google/home/sbc/dev/wasm/emscripten/out/test/src.js:173:13)
    at runWithFS (/usr/local/google/home/sbc/dev/wasm/emscripten/out/test/src.js:333:9)
    at callRuntimeCallbacks (/usr/local/google/home/sbc/dev/wasm/emscripten/out/test/src.js:1164:26)
    at preRun (/usr/local/google/home/sbc/dev/wasm/emscripten/out/test/src.js:841:3)
    at run (/usr/local/google/home/sbc/dev/wasm/emscripten/out/test/src.js:4658:3)
    at Object.removeRunDependency (/usr/local/google/home/sbc/dev/wasm/emscripten/out/test/src.js:950:7)
    at loadPackage (/usr/local/google/home/sbc/dev/wasm/emscripten/out/test/src.js:362:34)
    at runMetaWithFS (/usr/local/google/home/sbc/dev/wasm/emscripten/out/test/src.js:371:18)
falling back to default preload behavior
done
```

Followup to emscripten-core#24883
@kripken
Copy link
Member

kripken commented Aug 8, 2025

This makes me think, I wonder if we can check for no unexpected stderr in these tests?

@sbc100 sbc100 merged commit f4a5267 into emscripten-core:main Aug 8, 2025
13 of 30 checks passed
@sbc100 sbc100 deleted the fix_undefined branch August 8, 2025 15:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants