Summary: | Skip fetch event dispatching if no fetch event handler is added at script evaluation time | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | youenn fablet <youennf> | ||||||||
Component: | Service Workers | Assignee: | youenn fablet <youennf> | ||||||||
Status: | RESOLVED FIXED | ||||||||||
Severity: | Normal | CC: | cdumez, commit-queue, webkit-bug-importer | ||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||
Version: | WebKit Nightly Build | ||||||||||
Hardware: | Unspecified | ||||||||||
OS: | Unspecified | ||||||||||
Attachments: |
|
Description
youenn fablet
2019-08-27 00:50:26 PDT
Created attachment 377326 [details]
Patch
Comment on attachment 377326 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=377326&action=review > Source/WebCore/workers/service/server/SWServerWorker.h:115 > + bool shouldSkipFetchEvent() const { return m_shouldSkipHandleFetch && *m_shouldSkipHandleFetch; } return m_shouldSkipHandleFetch.valueOr(false); would look nicer IMO. > Source/WebCore/workers/service/server/SWServerWorker.h:135 > + Optional<bool> m_shouldSkipHandleFetch; Do we really need an Optional<> ? Why cannot it be a bool that is default-initialized to false? Nobody seems to rely on it being nullopt at the moment. Comment on attachment 377326 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=377326&action=review >> Source/WebCore/workers/service/server/SWServerWorker.h:135 >> + Optional<bool> m_shouldSkipHandleFetch; > > Do we really need an Optional<> ? Why cannot it be a bool that is default-initialized to false? Nobody seems to rely on it being nullopt at the moment. Will change it to a bool. Created attachment 377575 [details]
Patch for landing
Created attachment 377588 [details]
Patch for landing
Comment on attachment 377588 [details] Patch for landing Clearing flags on attachment: 377588 Committed r249287: <https://trac.webkit.org/changeset/249287> All reviewed patches have been landed. Closing bug. |