Changeset 273222 in webkit
- Timestamp:
- Feb 21, 2021 1:08:03 PM (3 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r273217 r273222 1 2021-02-21 Yusuke Suzuki <ysuzuki@apple.com> 2 3 [JSC] JSInternalPromise::then can fail if execution is terminated 4 https://bugs.webkit.org/show_bug.cgi?id=222244 5 6 Reviewed by Mark Lam. 7 8 JSInternalPromise::then assumed that call's result is always JSInternalPromise. 9 But this is wrong if termination exception is thrown. In that case, this call fails. 10 This patch makes it robust against this behavior. 11 12 * runtime/JSInternalPromise.cpp: 13 (JSC::JSInternalPromise::then): 14 1 15 2021-02-21 Yusuke Suzuki <ysuzuki@apple.com> 2 16 -
trunk/Source/JavaScriptCore/runtime/JSInternalPromise.cpp
r271766 r273222 70 70 arguments.append(onRejected ? onRejected : jsUndefined()); 71 71 ASSERT(!arguments.hasOverflowed()); 72 73 RELEASE_AND_RETURN(scope, jsCast<JSInternalPromise*>(call(globalObject, function, callData, this, arguments))); 72 JSValue result = call(globalObject, function, callData, this, arguments); 73 RETURN_IF_EXCEPTION(scope, nullptr); 74 return jsCast<JSInternalPromise*>(result); 74 75 } 75 76
Note: See TracChangeset
for help on using the changeset viewer.