lib: trigger uncaught exception handler for microtasks#23794
lib: trigger uncaught exception handler for microtasks#23794devsnek merged 1 commit intonodejs:masterfrom
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 <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Matheus Marchini <mat@mmarchini.me>
PR-URL: #23794 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Matheus Marchini <mat@mmarchini.me>
|
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