WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
214680
Add exception check for WebCore createRejectedPromiseWithTypeError
https://bugs.webkit.org/show_bug.cgi?id=214680
Summary
Add exception check for WebCore createRejectedPromiseWithTypeError
Yusuke Suzuki
Reported
2020-07-23 03:41:43 PDT
Add exception check for WebCore createRejectedPromiseWithTypeError
Attachments
Patch
(7.72 KB, patch)
2020-07-23 03:42 PDT
,
Yusuke Suzuki
mark.lam
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Yusuke Suzuki
Comment 1
2020-07-23 03:42:22 PDT
Created
attachment 405030
[details]
Patch
Yusuke Suzuki
Comment 2
2020-07-23 03:42:25 PDT
<
rdar://problem/65925490
>
Mark Lam
Comment 3
2020-07-23 10:58:11 PDT
Comment on
attachment 405030
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=405030&action=review
r=me with fix.
> Source/WebCore/bindings/js/JSDOMPromiseDeferred.cpp:228 > + auto rejectFunction = promiseConstructor->get(&lexicalGlobalObject, vm.propertyNames->builtinNames().rejectPrivateName()); > + EXCEPTION_ASSERT(!scope.exception() || isTerminatedExecutionException(vm, scope.exception()));
Are you sure that getting the property with rejectPrivateName() will never throw? I see that it can be lazily generated using promiseConstructorRejectCodeGenerator(). Can this trigger an OOME / StackOverflow? Regardless, I think you need a RETURN_IF_EXCEPTION() after this. Even if we're seeing a termination exception, we still need to bail.
Yusuke Suzuki
Comment 4
2020-07-23 13:17:33 PDT
Comment on
attachment 405030
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=405030&action=review
>> Source/WebCore/bindings/js/JSDOMPromiseDeferred.cpp:228 >> + EXCEPTION_ASSERT(!scope.exception() || isTerminatedExecutionException(vm, scope.exception())); > > Are you sure that getting the property with rejectPrivateName() will never throw? I see that it can be lazily generated using promiseConstructorRejectCodeGenerator(). Can this trigger an OOME / StackOverflow? Regardless, I think you need a RETURN_IF_EXCEPTION() after this. Even if we're seeing a termination exception, we still need to bail.
OK, maybe, just using RETURN_IF_EXCEPTION() is better. Changed.
Yusuke Suzuki
Comment 5
2020-07-23 13:37:47 PDT
Committed
r264788
: <
https://trac.webkit.org/changeset/264788
>
Yusuke Suzuki
Comment 6
2020-07-23 14:17:08 PDT
Re-opened since this is blocked by
bug 214698
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug