Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: f2b02eb84f2547e9896e3b8cd892c48683cf4c19
https://github.com/WebKit/WebKit/commit/f2b02eb84f2547e9896e3b8cd892c48683cf4c19
Author: Sosuke Suzuki <[email protected]>
Date: 2026-08-10 (Mon, 10 Aug 2026)
Changed paths:
M Source/JavaScriptCore/runtime/MicrotaskQueueInlines.h
Log Message:
-----------
[JSC] `MicrotaskQueue::performMicrotaskCheckpoint` should not call `drain()`
on an empty queue
https://bugs.webkit.org/show_bug.cgi?id=321433
Reviewed by Keith Miller.
performMicrotaskCheckpoint calls the out-of-line drain() even when the queue
is empty, which constructs and destroys a MicrotaskCallCache just to return
`{ nullptr, true }`. Check m_queue.isEmpty() in the loop condition instead.
An empty VM::drainMicrotasks() goes from 12.1ns to 6.1ns in the jsc shell.
* Source/JavaScriptCore/runtime/MicrotaskQueueInlines.h:
(JSC::MicrotaskQueue::performMicrotaskCheckpoint):
Canonical link: https://commits.webkit.org/318957@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications