Bug 213261 - Check for inAppBrowserPrivacyEnabled flag in WebsiteDataStore::initializeAppBoundDomains is expensive and calls a non-static function WebsiteDataStore::parameters().
Summary: Check for inAppBrowserPrivacyEnabled flag in WebsiteDataStore::initializeAppB...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Kate Cheney
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-06-16 14:34 PDT by Kate Cheney
Modified: 2020-06-16 19:33 PDT (History)
4 users (show)

See Also:


Attachments
Patch (12.62 KB, patch)
2020-06-16 14:59 PDT, Kate Cheney
no flags Details | Formatted Diff | Diff
Patch for landing (12.62 KB, patch)
2020-06-16 15:21 PDT, Kate Cheney
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kate Cheney 2020-06-16 14:34:11 PDT
appBoundDomains() is static, so initializing it should not rely on non-static functions, like WebsiteDataStore::parameters(). Also the call to WebsiteDataStore::parameters() is expensive and unnecessary when we really only need to check the value of one flag.
Comment 1 Kate Cheney 2020-06-16 14:34:36 PDT
<rdar://problem/64317084>
Comment 2 Kate Cheney 2020-06-16 14:59:53 PDT
Created attachment 402043 [details]
Patch
Comment 3 Brent Fulgham 2020-06-16 15:11:54 PDT
Comment on attachment 402043 [details]
Patch

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

> Source/WebKit/UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:455
> +        RunLoop::main().dispatch([this, protectedThis = makeRef(*this), completionHandler = WTFMove(completionHandler)] () mutable {

I think we could just WTFMove(protectedThis).
Comment 4 Kate Cheney 2020-06-16 15:21:35 PDT
Created attachment 402047 [details]
Patch for landing
Comment 5 Kate Cheney 2020-06-16 15:22:13 PDT
(In reply to Brent Fulgham from comment #3)
> Comment on attachment 402043 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=402043&action=review
> 
> > Source/WebKit/UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:455
> > +        RunLoop::main().dispatch([this, protectedThis = makeRef(*this), completionHandler = WTFMove(completionHandler)] () mutable {
> 
> I think we could just WTFMove(protectedThis).

Good call, thanks for the review!
Comment 6 EWS 2020-06-16 15:57:11 PDT
Committed r263122: <https://trac.webkit.org/changeset/263122>

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