-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
vm: do not overwrite error when creating context #26112
Conversation
An empty `Local<>` already indicates that an exception is pending, so there is no need to throw an exception. In the case of Workers, this could override a `.terminate()` call.
if (!process.env.HAS_STARTED_WORKER) { | ||
process.env.HAS_STARTED_WORKER = 1; | ||
const w = new Worker(__filename); | ||
setTimeout(() => w.terminate(), 50); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is using the 'online'
event here instead an option?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cjihrig I’ve added that but kept the timeout, it still seems to make this fail more reliably locally (with the node master
executable).
CI: https://ci.nodejs.org/job/node-test-pull-request/20787/ (:white_check_mark:) |
Landed in 0896fbe |
An empty `Local<>` already indicates that an exception is pending, so there is no need to throw an exception. In the case of Workers, this could override a `.terminate()` call. PR-URL: #26112 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Gus Caplan <[email protected]> Reviewed-By: James M Snell <[email protected]>
An empty `Local<>` already indicates that an exception is pending, so there is no need to throw an exception. In the case of Workers, this could override a `.terminate()` call. PR-URL: #26112 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Gus Caplan <[email protected]> Reviewed-By: James M Snell <[email protected]>
An empty `Local<>` already indicates that an exception is pending, so there is no need to throw an exception. In the case of Workers, this could override a `.terminate()` call. PR-URL: #26112 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Gus Caplan <[email protected]> Reviewed-By: James M Snell <[email protected]>
An empty
Local<>
already indicates that an exception is pending,so there is no need to throw an exception. In the case of Workers,
this could override a
.terminate()
call.Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes