Summary: | Persist NavigationPreloadState in service worker registration database | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | youenn fablet <youennf> | ||||||||||||
Component: | Service Workers | Assignee: | youenn fablet <youennf> | ||||||||||||
Status: | RESOLVED FIXED | ||||||||||||||
Severity: | Normal | CC: | cdumez, webkit-bug-importer | ||||||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||||||
Version: | WebKit Nightly Build | ||||||||||||||
Hardware: | Unspecified | ||||||||||||||
OS: | Unspecified | ||||||||||||||
Bug Depends on: | 233523 | ||||||||||||||
Bug Blocks: | 182852 | ||||||||||||||
Attachments: |
|
Description
youenn fablet
2021-12-01 05:13:55 PST
Created attachment 445564 [details]
Patch
Created attachment 445684 [details]
Patch
Created attachment 445691 [details]
Patch
Comment on attachment 445691 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=445691&action=review > Source/WebCore/workers/service/NavigationPreloadState.h:36 > + static NavigationPreloadState defaultValue() { return { false, "true"_s }; } Maybe we should do `String headerValue { "true"_s };` below and use the default constructor instead of this defaultValue()? Or do we need to distinguish default-constructed objects somehow? > Source/WebCore/workers/service/server/RegistrationStore.h:43 > +struct NavigationPreloadState; Seems unnecessary? It isn't used in this header. (In reply to Chris Dumez from comment #5) > Comment on attachment 445691 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=445691&action=review > > > Source/WebCore/workers/service/NavigationPreloadState.h:36 > > + static NavigationPreloadState defaultValue() { return { false, "true"_s }; } > > Maybe we should do `String headerValue { "true"_s };` below and use the > default constructor instead of this defaultValue()? Or do we need to > distinguish default-constructed objects somehow? We use default constructed NavigationPreloadState when installing context data. It is better to keep it smaller since we are IPCing. Or we could add a specific InstallingServiceWorkerContextData without this parameter. > > > Source/WebCore/workers/service/server/RegistrationStore.h:43 > > +struct NavigationPreloadState; > > Seems unnecessary? It isn't used in this header. Right, forgot to remove it. Created attachment 445720 [details]
Patch for landing
Created attachment 445845 [details]
Fixing path in API tests
Committed r286488 (244827@main): <https://commits.webkit.org/244827@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 445845 [details]. |