[webkit-reviews] review granted: [Bug 192951] navigator.userAgent in service workers does not reflect customUserAgent set by client : [Attachment 357994] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Dec 21 16:46:36 PST 2018


youenn fablet <youennf at gmail.com> has granted Chris Dumez <cdumez at apple.com>'s
request for review:
Bug 192951: navigator.userAgent in service workers does not reflect
customUserAgent set by client
https://bugs.webkit.org/show_bug.cgi?id=192951

Attachment 357994: Patch

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




--- Comment #6 from youenn fablet <youennf at gmail.com> ---
Comment on attachment 357994
  --> https://bugs.webkit.org/attachment.cgi?id=357994
Patch

I wonder whether we should release_log the case of a client registered to a
running service worker with a different user agent.
Maybe we could store the user agent in the SWServerWorker and when registering
a client, check the user agent of the active worker if any?

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

> Source/WebCore/workers/service/server/SWServer.cpp:743
> +void SWServer::registerServiceWorkerClient(ClientOrigin&& clientOrigin,
ServiceWorkerClientData&& data, const
Optional<ServiceWorkerRegistrationIdentifier>&
controllingServiceWorkerRegistrationIdentifier, const String& userAgent)

String&&

> Source/WebKit/WebProcess/Storage/WebSWContextManagerConnection.cpp:138
> +void WebSWContextManagerConnection::installServiceWorker(const
ServiceWorkerContextData& data, SessionID sessionID, const String& userAgent)

String&&


More information about the webkit-reviews mailing list