[webkit-reviews] review granted: [Bug 230649] Add support for running service workers on the main thread : [Attachment 439366] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Sep 29 13:56:45 PDT 2021


Alex Christensen <achristensen at apple.com> has granted Chris Dumez
<cdumez at apple.com>'s request for review:
Bug 230649: Add support for running service workers on the main thread
https://bugs.webkit.org/show_bug.cgi?id=230649

Attachment 439366: Patch

https://bugs.webkit.org/attachment.cgi?id=439366&action=review




--- Comment #9 from Alex Christensen <achristensen at apple.com> ---
Comment on attachment 439366
  --> https://bugs.webkit.org/attachment.cgi?id=439366
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=439366&action=review

> Source/WebKit/NetworkProcess/NetworkProcess.cpp:2492
> +	   return makeUnique<SWServer>(makeUniqueRef<WebSWOriginStore>(),
info.processTerminationDelayEnabled, WTFMove(path), sessionID,
workerThreadMode, parentProcessHasServiceWorkerEntitlement(), [this,
sessionID](auto&& jobData, bool shouldRefreshCache, auto&& request, auto&&
completionHandler) mutable {

Not new to this patch, but I don't think we need the unsafe capture of this
here.  Below we could also just capture a RefPtr<Connection> instead of this.

> Source/WebKit/UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.mm:489
> +- (BOOL)shouldRunServiceWorkersOnMainThread

ForTesting would be nice on this here and everywhere else.


More information about the webkit-reviews mailing list