In case of COOP-based process swap, we need to make sure the document gets controlled by its matching service worker registration
<rdar://problem/91288849>
Created attachment 456705 [details] Patch
Comment on attachment 456705 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=456705&action=review r=me > Source/WebKit/NetworkProcess/NetworkLoadParameters.h:47 > + mutable WebPageProxyIdentifier webPageProxyID; These mutable seem a little odd. Maybe we should imply not mark the NetworkResourceLoader data member as const?
(In reply to Chris Dumez from comment #3) > Comment on attachment 456705 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=456705&action=review > > r=me > > > Source/WebKit/NetworkProcess/NetworkLoadParameters.h:47 > > + mutable WebPageProxyIdentifier webPageProxyID; > > These mutable seem a little odd. Maybe we should imply not mark the > NetworkResourceLoader data member as const? There used to be no mutable, I guess we should remove them, and const_cast m_parameters when needed instead. Or make the member no longer const.
> There used to be no mutable, I guess we should remove them, and const_cast > m_parameters when needed instead. Or make the member no longer const. I'll look into cleaning all these mutables in a follow-up.
(In reply to youenn fablet from comment #4) > (In reply to Chris Dumez from comment #3) > > Comment on attachment 456705 [details] > > Patch > > > > View in context: > > https://bugs.webkit.org/attachment.cgi?id=456705&action=review > > > > r=me > > > > > Source/WebKit/NetworkProcess/NetworkLoadParameters.h:47 > > > + mutable WebPageProxyIdentifier webPageProxyID; > > > > These mutable seem a little odd. Maybe we should imply not mark the > > NetworkResourceLoader data member as const? > > There used to be no mutable, I guess we should remove them, and const_cast > m_parameters when needed instead. Or make the member no longer const. Right, I think keeping the m_parameters const at this point no longer makes sense since we're updating its data member. Mutable has some use cases (e.g. lazy init) but IMO this isn't a good use case for it.
Committed r292468 (249319@main): <https://commits.webkit.org/249319@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 456705 [details].
This fix shipped with Safari 15.5 (all platforms).