Bug 251772
| Summary: | DocumentLoader should use std::unique_ptr<ServiceWorkerRegistrationData> rather than std::optional<> | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Simon Fraser (smfr) <simon.fraser> |
| Component: | Page Loading | Assignee: | youenn fablet <youennf> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | beidson, cdumez, simon.fraser, webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Local Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
Simon Fraser (smfr)
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?
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
youenn fablet
(In reply to Simon Fraser (smfr) from comment #0)
> DocumentLoader wastes 352 + 7 bytes for the std::optional<
> ServiceWorkerRegistrationData> which is nullopt for most loads. We should
> heap-allocate ServiceWorkerRegistrationData.
Sounds good.
> Also, in ServiceWorkerRegistrationData, is scopeURL the same as key.scope()?
Almost, minor the fragment identifier.
> Do we need to store the URL twice?
We could probably just store the fragment identifier in ServiceWorkerRegistrationData. which is often null.
Radar WebKit Bug Importer
<rdar://problem/105074302>
youenn fablet
Pull request: https://github.com/WebKit/WebKit/pull/9682
EWS
Committed 259977@main (f0228a3f07df): <https://commits.webkit.org/259977@main>
Reviewed commits have been landed. Closing PR #9682 and removing active labels.
EWS
Committed 259548.294@safari-7615-branch (3e295cf38bde): <https://commits.webkit.org/259548.294@safari-7615-branch>
Reviewed commits have been landed. Closing PR #417 and removing active labels.