Skip to content

Conversation

@sbc100
Copy link
Collaborator

@sbc100 sbc100 commented Aug 11, 2025

This argument has been used since 3839dd4.

Even when this function was first added in 74f3242, errback was only used for the IDB failures, not the fetch failures. Fetch failure were left to propagate to the global error handlers.

The exception here was that when node support was added in #11785 it, I believe incorrectly used errback to handle file read errors (doesn't match the web version that does not handle fetch error using errback).

I'm not claiming this is correct/best behaviour, this is simply an NFC to cleanup an already-unused argument.

This is small cleanup in advance of #24893.

@sbc100 sbc100 requested review from RReverser and kripken August 11, 2025 15:49
@kripken
Copy link
Member

kripken commented Aug 11, 2025

Isn't errback used on line 958 (for node)?

This argument has basically used since 3839dd4.

Even when this function was first add in 74f3242 the errback
callback was only used for the IDB failures, not the fetch failures.
Fetch failure were left to propagate to the global error handlers.

The exception here was that when node support was added in emscripten-core#11785 it,
I believe incorrectly used errback to handle file read errors (doesn't
match the web version that does *not* handle fetch error using errback).

This is small cleanup in advance of emscripten-core#24893.
@sbc100 sbc100 force-pushed the file_packager_fix_fetchRemotePackage branch from 67af9a8 to ba82237 Compare August 11, 2025 17:48
@sbc100
Copy link
Collaborator Author

sbc100 commented Aug 11, 2025

Oops, you are correct, however I believe that usage was wrong so I updated it.

@sbc100
Copy link
Collaborator Author

sbc100 commented Aug 11, 2025

I also updated the PR description.

@sbc100 sbc100 merged commit 83b1301 into emscripten-core:main Aug 11, 2025
30 checks passed
@sbc100 sbc100 deleted the file_packager_fix_fetchRemotePackage branch August 11, 2025 19:04
sbc100 added a commit to sbc100/emscripten that referenced this pull request Aug 11, 2025
The last usage was removed in emscripten-core#24904 but I forgot to remove the function
itself.
sbc100 added a commit that referenced this pull request Aug 11, 2025
The last usage was removed in #24904 but I forgot to remove the function
itself.
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