Skip fetch event dispatching if no fetch event handler is added at script evaluation time https://w3c.github.io/ServiceWorker/#handle-fetch step 16
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.
<rdar://problem/54848514>