Skip to content

Node: always define __filename and __dirname in non-ES6 workers #18397

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

Closed

Conversation

kleisauke
Copy link
Collaborator

In favor of location.href. This ensures we can remove those ENVIRONMENT_IS_WORKER specific guards.

Alternative to commit 5decc70 introduced in PR #10343.


This is a first step to unify/simplify the _scriptDir / scriptDirectory entanglement.

Context: #17915.

@kleisauke
Copy link
Collaborator Author

Is test_pthread_create_standalone known to be flaky? That test was added in commit ad41934 but seems to fail on this PR within the core2 and core3 suites (somehow core0 is fine). I could not reproduce this locally.

@kripken
Copy link
Member

kripken commented Dec 19, 2022

@kleisauke Yes, I just opened an issue for that, and disabled the test. (I also can't reproduce it locally.. very odd)

In favor of `location.href`. This ensures we can remove those
`ENVIRONMENT_IS_WORKER` specific guards.

Alternative to commit 5decc70
introduced in PR emscripten-core#10343.
This failed with:
```
Aborted(Assertion failed: scriptDirectory (./) should be an absolute path)
```
@kleisauke kleisauke force-pushed the simplify-script-dir-part1 branch from f247d18 to b04fd51 Compare December 22, 2022 14:52
@kleisauke kleisauke force-pushed the simplify-script-dir-part1 branch 2 times, most recently from 12a447b to 69553ef Compare March 27, 2023 15:57
This change was generated using:
$ ./test/runner other.*code_size* other.*metadce* --rebase
@kleisauke kleisauke force-pushed the simplify-script-dir-part1 branch from 69553ef to 4b21f48 Compare March 28, 2023 08:44
@kleisauke
Copy link
Collaborator Author

Closing in favor of #24023.

@kleisauke kleisauke closed this Apr 1, 2025
@kleisauke kleisauke deleted the simplify-script-dir-part1 branch April 1, 2025 16:24
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.

3 participants