[Webkit-unassigned] [Bug 251772] New: DocumentLoader should use std::unique_ptr<ServiceWorkerRegistrationData> rather than std::optional<>

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Feb 5 20:41:28 PST 2023


https://bugs.webkit.org/show_bug.cgi?id=251772

            Bug ID: 251772
           Summary: DocumentLoader should use
                    std::unique_ptr<ServiceWorkerRegistrationData> rather
                    than std::optional<>
           Product: WebKit
           Version: WebKit Local Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Page Loading
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: simon.fraser at apple.com
                CC: beidson at apple.com

DocumentLoader wastes 352 + 7 bytes for the std::optional< ServiceWorkerRegistrationData> which is nullopt for most loads. We should heap-allocate ServiceWorkerRegistrationData.

Also, in ServiceWorkerRegistrationData, is scopeURL the same as key.scope()? Do we need to store the URL twice?

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20230206/88d712e3/attachment.htm>


More information about the webkit-unassigned mailing list