Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 346b6ce3d9f0e534a1379eb381906cfa6a7193b2
https://github.com/WebKit/WebKit/commit/346b6ce3d9f0e534a1379eb381906cfa6a7193b2
Author: Sosuke Suzuki <[email protected]>
Date: 2026-10-05 (Mon, 05 Oct 2026)
Changed paths:
M Source/JavaScriptCore/runtime/TopExceptionScope.h
Log Message:
-----------
[JSC] `TopExceptionScope::clearExceptionExceptTermination` should not clear
the trap bit when no exception is pending
https://bugs.webkit.org/show_bug.cgi?id=325968
Reviewed by Yusuke Suzuki.
VM::clearException() clears VMTraps::NeedExceptionHandling with an atomic
exchangeAnd. clearExceptionExceptTermination() called it even when no
exception was pending, and VM::drainMicrotasks calls
clearExceptionExceptTermination() after every microtask, so each microtask
paid for a lock-prefixed instruction.
Return early when there is no pending exception. NeedExceptionHandling is
only set while VM::m_exception is non-null, so there is nothing to clear in
that case.
* Source/JavaScriptCore/runtime/TopExceptionScope.h:
(JSC::TopExceptionScope::clearExceptionExceptTermination):
Canonical link: https://commits.webkit.org/322701@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications