-
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
lib: trigger uncaught exception handler for microtasks #23794
Conversation
Should also update relevant docs: https://github.com/nodejs/node/blob/master/doc/api/globals.md#queuemicrotaskcallback diff --git doc/api/globals.md doc/api/globals.md
index e4965a43af..b46ef6f08a 100644
--- doc/api/globals.md
+++ doc/api/globals.md
@@ -119,8 +119,8 @@ added: REPLACEME
* `callback` {Function} Function to be queued.
The `queueMicrotask()` method queues a microtask to invoke `callback`. If
-`callback` throws an exception, the [`process` object][] `'error'` event will
-be emitted.
+`callback` throws an exception, the [`process` object][] `'uncaughtException'`
+event will be emitted.
In general, `queueMicrotask` is the idiomatic choice over `process.nextTick()`.
`process.nextTick()` will always run before the microtask queue, and so |
This (and the previous behavior) doesn't cope well with |
17a1415
to
6a0f394
Compare
@mmarchini all fixed up |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
b389143
to
cab0d86
Compare
windows rebuild https://ci.nodejs.org/job/node-test-commit-windows-fanned/21699/ |
ci is a bit weird, linking my build to an unrelated one, but as far as i can tell everything is now green. |
cab0d86
to
2caf079
Compare
landed in 2caf079 |
PR-URL: nodejs#23794 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Matheus Marchini <[email protected]>
PR-URL: #23794 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Matheus Marchini <[email protected]>
Should this land on 8.x or 10.x? If so it will require a manual backport |
@MylesBorins this patches behaviour in a semver-major feature (global.queueMicrotask) |
@jasnell this should make 11.0.0
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes