Changeset 248793 in webkit
- Timestamp:
- Aug 16, 2019 1:44:37 PM (5 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JSTests/ChangeLog
r248787 r248793 1 2019-08-16 Yusuke Suzuki <ysuzuki@apple.com> 2 3 [JSC] Promise.prototype.finally should accept non-promise objects 4 https://bugs.webkit.org/show_bug.cgi?id=200829 5 6 Reviewed by Mark Lam. 7 8 * stress/promise-finally-should-accept-non-promise-objects.js: Added. 9 (shouldBe): 10 (Thenable): 11 (Thenable.prototype.then): 12 1 13 2019-08-16 Alexey Shvayka <shvaikalesh@gmail.com> 2 14 -
trunk/Source/JavaScriptCore/ChangeLog
r248787 r248793 1 2019-08-16 Yusuke Suzuki <ysuzuki@apple.com> 2 3 [JSC] Promise.prototype.finally should accept non-promise objects 4 https://bugs.webkit.org/show_bug.cgi?id=200829 5 6 Reviewed by Mark Lam. 7 8 According to the Promise.prototype.finally spec step 2[1], we should check @isObject instead of @isPromise, 9 since Promise.prototype.finally should accept thenable objects that are defined by user libraries (like, bluebird for example). 10 This patch changes this check to the specified one. 11 12 [1]: https://tc39.es/proposal-promise-finally/ 13 14 * builtins/PromisePrototype.js: 15 (finally): 16 1 17 2019-08-16 Alexey Shvayka <shvaikalesh@gmail.com> 2 18 -
trunk/Source/JavaScriptCore/builtins/PromisePrototype.js
r230459 r248793 69 69 "use strict"; 70 70 71 if (!@is Promise(this))72 @throwTypeError("|this| is not a Promise");71 if (!@isObject(this)) 72 @throwTypeError("|this| is not a object"); 73 73 74 74 const constructor = @speciesConstructor(this, @Promise);
Note: See TracChangeset
for help on using the changeset viewer.