-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Only set launch sandbox state variable once #14881
Only set launch sandbox state variable once #14881
Conversation
EWS run on previous version of this PR (hash 01c1405) |
@@ -484,8 +484,11 @@ Ref<WebPage> WebPage::create(PageIdentifier pageID, WebPageCreationParameters&& | |||
WebProcess::singleton().injectedBundle()->didCreatePage(page.ptr()); | |||
|
|||
#if HAVE(SANDBOX_STATE_FLAGS) | |||
auto auditToken = WebProcess::singleton().auditTokenForSelf(); | |||
sandbox_enable_state_flag("WebContentProcessLaunched", *auditToken); | |||
static dispatch_once_t onceToken; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should use a global static boolean. We don't need a dispatch_once because we don't need locking because there is only a single thread involved.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, good point, will fix!
Thanks for reviewing!
01c1405
to
82f0dcf
Compare
EWS run on current version of this PR (hash 82f0dcf) |
https://bugs.webkit.org/show_bug.cgi?id=257974 rdar://110660033 Reviewed by Chris Dumez. Only set launch sandbox state variable once to improve performance. * Source/WebKit/WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::create): Canonical link: https://commits.webkit.org/265088@main
82f0dcf
to
b4b2f80
Compare
Committed 265088@main (b4b2f80): https://commits.webkit.org/265088@main Reviewed commits have been landed. Closing PR #14881 and removing active labels. |
b4b2f80
82f0dcf
π wincairoπ§ͺ api-macπ§ͺ gtk-wk2π§ͺ api-iosπ§ͺ mac-wk2π§ͺ mac-AS-debug-wk2π tv-simπ watch