-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Fix initialization of nodePath variable #15805
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
Conversation
|
Oh, wow, is the issue that node will create a global How do you hit this with an emscripten program, btw? Are you doing something like This PR looks reasonable. But IIUC it only works because we have Please add a comment in the code that explains why we need that extra check. A small test in |
Yeah, actually it was But using
Yeah, this variable used to be called something different prior to #15587 , which is why this has only just come up.
Done.
Done, hopefully it's not too fragile. |
|
Is |
Agreed. I did it because I didn't know about |
|
It's the same with the REPL so if you're testing stuff there you'll run into it as well. |
|
Would you mind rebasing or merging with origin/main? It should fix the failures. |
When running Emscripten-generated scripts via `node -e "<script>"`, the `fs` variable is already defined and so `nodePath` was never being initialized.
This 6 byte in create was due to #15805. This suggests we should probably be measuring codesize with `--closure=1`.
When running Emscripten-generated scripts via `node -e "<script>"`, the `fs` variable is already defined and so `nodePath` was never being initialized.
This 6 byte in create was due to emscripten-core#15805. This suggests we should probably be measuring codesize with `--closure=1`.
When running Emscripten-generated scripts via
node -e "<script>",the
fsvariable is already defined and sonodePathwas never beinginitialized.
This fixes a breakage caused by #15587.