[webkit-changes] [WebKit/WebKit] 14d4f5: [JSC] add support for `Error.isError`
Devin Rousso
noreply at github.com
Wed Oct 9 02:10:37 PDT 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 14d4f53e8d772aa49d29bbf4381608a86c6944d1
https://github.com/WebKit/WebKit/commit/14d4f53e8d772aa49d29bbf4381608a86c6944d1
Author: Devin Rousso <hi at devinrousso.com>
Date: 2024-10-09 (Wed, 09 Oct 2024)
Changed paths:
A JSTests/stress/error-isError.js
M Source/JavaScriptCore/runtime/ErrorConstructor.cpp
M Source/JavaScriptCore/runtime/OptionsList.h
Log Message:
-----------
[JSC] add support for `Error.isError`
https://bugs.webkit.org/show_bug.cgi?id=272623
Reviewed by Yusuke Suzuki.
Similar to `Array.isArray`, this will give developers a simpler and much more reliable way to know if a given object is an `Error`.
Spec: <https://tc39.es/proposal-is-error/>
Proposal: <https://github.com/tc39/proposal-is-error>
* Source/JavaScriptCore/runtime/ErrorConstructor.cpp:
(JSC::ErrorConstructor::finishCreation):
(JSC::errorConstructorIsError): Added.
* Source/JavaScriptCore/runtime/OptionsList.h:
Add a feature flag for this.
* JSTests/stress/error-isError.js: Added.
Canonical link: https://commits.webkit.org/284879@main
To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications
More information about the webkit-changes
mailing list