Bug 213681 - Fix missing exception check in createIDBKeyFromValue().
Summary: Fix missing exception check in createIDBKeyFromValue().
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Mark Lam
Keywords: InRadar
Depends on:
Reported: 2020-06-27 10:04 PDT by Mark Lam
Modified: 2020-06-27 15:14 PDT (History)
7 users (show)

See Also:

proposed patch. (18.51 KB, patch)
2020-06-27 10:11 PDT, Mark Lam
mark.lam: review-
Details | Formatted Diff | Diff
proposed patch. (20.52 KB, patch)
2020-06-27 10:27 PDT, Mark Lam
cdumez: review+
Details | Formatted Diff | Diff
patch for landing. (20.52 KB, patch)
2020-06-27 11:02 PDT, Mark Lam
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Lam 2020-06-27 10:04:15 PDT
Comment 1 Mark Lam 2020-06-27 10:11:46 PDT
Created attachment 402962 [details]
proposed patch.
Comment 2 Mark Lam 2020-06-27 10:15:45 PDT
Comment on attachment 402962 [details]
proposed patch.

View in context: https://bugs.webkit.org/attachment.cgi?id=402962&action=review

> Source/WebCore/bridge/objc/WebScriptObject.mm:286
> +    bool isSafe =  BindingSecurity::shouldAllowAccessToDOMWindow(_private->originRootObject->globalObject(), target->wrapped());

Will remove extra space.
Comment 3 Mark Lam 2020-06-27 10:27:06 PDT
Created attachment 402963 [details]
proposed patch.
Comment 4 Chris Dumez 2020-06-27 10:42:56 PDT
Comment on attachment 402963 [details]
proposed patch.

r=me if the bots are happy
Comment 5 Mark Lam 2020-06-27 10:57:05 PDT
Comment on attachment 402963 [details]
proposed patch.

View in context: https://bugs.webkit.org/attachment.cgi?id=402963&action=review

> Source/WebCore/bridge/objc/WebScriptObject.mm:287
> +    bool isSafe = BindingSecurity::shouldAllowAccessToDOMWindow(_private->originRootObject->globalObject(), target->wrapped());
> +    CLEAR_AND_RETURN_IF_EXCEPTION(scope, false);

This call to BindingSecurity::shouldAllowAccessToDOMWindow() will never throw because it uses a default argument SecurityReportingOption = LogSecurityError.  I'll change this CLEAR_AND_RETURN_IF_EXCEPTION to an EXCEPTION_ASSERT_UNUSED to assert that no exception is thrown.
Comment 6 Mark Lam 2020-06-27 11:02:35 PDT
Created attachment 402966 [details]
patch for landing.

Thanks for the review.
Comment 7 EWS 2020-06-27 15:14:09 PDT
Committed r263628: <https://trac.webkit.org/changeset/263628>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 402966 [details].