Bug 226930 - Add fast-path for binding security check of DOMWindow
Summary: Add fast-path for binding security check of DOMWindow
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Yusuke Suzuki
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-06-11 10:53 PDT by Yusuke Suzuki
Modified: 2021-06-11 14:22 PDT (History)
4 users (show)

See Also:


Attachments
Patch (6.18 KB, patch)
2021-06-11 10:56 PDT, Yusuke Suzuki
ggaren: review+
ews-feeder: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yusuke Suzuki 2021-06-11 10:53:38 PDT
Add fast-path for binding security check of DOMWindow
Comment 1 Yusuke Suzuki 2021-06-11 10:56:55 PDT
Created attachment 431211 [details]
Patch
Comment 2 Geoffrey Garen 2021-06-11 11:09:17 PDT
Comment on attachment 431211 [details]
Patch

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

r=me

> Source/WebCore/bindings/js/JSDOMBindingSecurity.cpp:111
> +bool BindingSecurity::shouldAllowAccessToDOMWindow(JSC::JSGlobalObject* lexicalGlobalObject, JSDOMWindow& target, SecurityReportingOption reportingOption)

Since this is a fast path, and just a pointer comparison, should we put it inline in the header?
Comment 3 Yusuke Suzuki 2021-06-11 11:11:36 PDT
Comment on attachment 431211 [details]
Patch

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

>> Source/WebCore/bindings/js/JSDOMBindingSecurity.cpp:111
>> +bool BindingSecurity::shouldAllowAccessToDOMWindow(JSC::JSGlobalObject* lexicalGlobalObject, JSDOMWindow& target, SecurityReportingOption reportingOption)
> 
> Since this is a fast path, and just a pointer comparison, should we put it inline in the header?

Right! I'll move it to that.
Comment 4 Yusuke Suzuki 2021-06-11 14:21:43 PDT
Committed r278782 (238739@main): <https://commits.webkit.org/238739@main>
Comment 5 Radar WebKit Bug Importer 2021-06-11 14:22:19 PDT
<rdar://problem/79215873>