Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: a3250c92026a3f8b4599037aaf1eed7babdce062
https://github.com/WebKit/WebKit/commit/a3250c92026a3f8b4599037aaf1eed7babdce062
Author: Devin Rousso <[email protected]>
Date: 2026-04-13 (Mon, 13 Apr 2026)
Changed paths:
A JSTests/stress/promise-isPromise.js
A LayoutTests/js/promise-isPromise-expected.txt
A LayoutTests/js/promise-isPromise.html
M Source/JavaScriptCore/runtime/JSPromiseConstructor.cpp
M Source/JavaScriptCore/runtime/OptionsList.h
Log Message:
-----------
[JSC] add support for Promise.isPromise
https://bugs.webkit.org/show_bug.cgi?id=304580
Reviewed by Keith Miller.
Similar to `Array.isArray` and `Error.isError`, this will give developers a
simpler and much more reliable way to know if a given object is a `Promise`.
Spec: <https://tc39.es/proposal-native-promise-predicate/>
Proposal: <https://github.com/tc39/proposal-native-promise-predicate/>
* Source/JavaScriptCore/runtime/JSPromiseConstructor.cpp:
(JSC::JSPromiseConstructor::finishCreation):
(JSC::promiseConstructorFuncIsPromise): Added.
* Source/JavaScriptCore/runtime/OptionsList.h:
Add a feature flag for this.
* JSTests/stress/promise-isPromise.js: Added.
* LayoutTests/js/promise-isPromise.html: Added.
* LayoutTests/js/promise-isPromise-expected.txt: Added.
Canonical link: https://commits.webkit.org/311095@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications