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.
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.
<rdar://problem/76423585>