RESOLVED FIXED233490
Reuse navigation preload if service worker is fetching the corresponding navigation request
https://bugs.webkit.org/show_bug.cgi?id=233490
Summary Reuse navigation preload if service worker is fetching the corresponding navi...
youenn fablet
Reported 2021-11-25 03:25:35 PST
Reuse navigation preload is service worker is fetching the corresponding navigation request
Attachments
Patch (48.78 KB, patch)
2021-11-25 03:37 PST, youenn fablet
no flags
Patch (40.26 KB, patch)
2021-11-26 07:09 PST, youenn fablet
no flags
Patch (39.27 KB, patch)
2021-11-30 03:05 PST, youenn fablet
no flags
Patch for landing (39.33 KB, patch)
2021-12-01 03:23 PST, youenn fablet
no flags
youenn fablet
Comment 1 2021-11-25 03:37:29 PST
youenn fablet
Comment 2 2021-11-26 07:09:51 PST
youenn fablet
Comment 3 2021-11-30 03:05:10 PST
Chris Dumez
Comment 4 2021-11-30 07:58:11 PST
Comment on attachment 445405 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=445405&action=review r=me with comments. > Source/WebCore/loader/ResourceLoaderOptions.h:226 > + FetchIdentifier navigationPreloadIdentifier; We probably want to move this data member before the bitfield? > Source/WebKit/NetworkProcess/NetworkSession.h:178 > + ServiceWorkerFetchTask* navigationPreloaderTaskFromFetchIdentifier(WebCore::FetchIdentifier); Shouldn't this be const? > Source/WebKit/NetworkProcess/ServiceWorker/ServiceWorkerFetchTask.cpp:83 > + , m_timeoutTimer(makeUnique<Timer>(*this, &ServiceWorkerFetchTask::timeoutTimerFired)) I don't understand this change. You made it a pointer and you unconditionally initialize it. Yet, you never seem to null the pointer out. I don't understand the purpose of making it a pointer and null checking it every time then.
youenn fablet
Comment 5 2021-11-30 08:01:46 PST
Comment on attachment 445405 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=445405&action=review >> Source/WebKit/NetworkProcess/ServiceWorker/ServiceWorkerFetchTask.cpp:83 >> + , m_timeoutTimer(makeUnique<Timer>(*this, &ServiceWorkerFetchTask::timeoutTimerFired)) > > I don't understand this change. You made it a pointer and you unconditionally initialize it. Yet, you never seem to null the pointer out. I don't understand the purpose of making it a pointer and null checking it every time then. m_timeoutTimer is only created in one of the two ServiceWorkerFetchTask constructor.
Chris Dumez
Comment 6 2021-11-30 08:06:10 PST
(In reply to youenn fablet from comment #5) > Comment on attachment 445405 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=445405&action=review > > >> Source/WebKit/NetworkProcess/ServiceWorker/ServiceWorkerFetchTask.cpp:83 > >> + , m_timeoutTimer(makeUnique<Timer>(*this, &ServiceWorkerFetchTask::timeoutTimerFired)) > > > > I don't understand this change. You made it a pointer and you unconditionally initialize it. Yet, you never seem to null the pointer out. I don't understand the purpose of making it a pointer and null checking it every time then. > > m_timeoutTimer is only created in one of the two ServiceWorkerFetchTask > constructor. Oh, I missed that. All good then.
youenn fablet
Comment 7 2021-12-01 03:23:09 PST
Created attachment 445546 [details] Patch for landing
EWS
Comment 8 2021-12-01 05:37:05 PST
Committed r286361 (244720@main): <https://commits.webkit.org/244720@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 445546 [details].
Radar WebKit Bug Importer
Comment 9 2021-12-01 05:38:24 PST
Note You need to log in before you can comment on or make changes to this bug.