NEW 224315
Throw within queueMicrotask callbacks are not reported
https://bugs.webkit.org/show_bug.cgi?id=224315
Summary Throw within queueMicrotask callbacks are not reported
Xuan Huang
Reported 2021-04-07 19:29:49 PDT
Created attachment 425470 [details] Safari 13 does nothing Webkit does nothing if a callback queued via `queueMicrotask` throw. The spec (https://html.spec.whatwg.org/multipage/timers-and-user-prompts.html#microtask-queuing) specified: > The queueMicrotask(callback) method must queue a microtask to invoke callback, and if callback throws an exception, report the exception. The expected behavior is similar to `throw` within `setTimeout` callback.
Attachments
Safari 13 does nothing (56.61 KB, image/jpeg)
2021-04-07 19:29 PDT, Xuan Huang
no flags
Xuan Huang
Comment 1 2021-04-07 20:51:00 PDT
I first tested in in Safari 13 but now I tried with technology preview and it's the same. I'm not sure how to fix this though. As far as I know, JavaScriptCore automatically drains its internal microtask queue when JSLock is released. I'm not sure how would exceptions thrown during the draining can propagate to WebCore.
Radar WebKit Bug Importer
Comment 2 2021-04-08 15:05:27 PDT
Note You need to log in before you can comment on or make changes to this bug.