[webkit-reviews] review granted: [Bug 194651] Make ServiceWorkerClientFetch closer to WebResourceLoader : [Attachment 362067] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Feb 15 10:49:12 PST 2019


Alex Christensen <achristensen at apple.com> has granted youenn fablet
<youennf at gmail.com>'s request for review:
Bug 194651: Make ServiceWorkerClientFetch closer to WebResourceLoader
https://bugs.webkit.org/show_bug.cgi?id=194651

Attachment 362067: Patch

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




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

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

> Source/WebCore/workers/service/context/ServiceWorkerThreadProxy.cpp:220
> +    }, WorkerRunLoop::defaultMode());

Could we make this a default parameter?

> Source/WebKit/WebProcess/Storage/ServiceWorkerClientFetch.h:65
> +    void didReceiveRedirectResponse(WebCore::ResourceResponse&&);

Do we want to just inform that a redirect happened, or will we in the future
have a need for the service worker to be able to reject the redirect?

> Source/WebKit/WebProcess/Storage/WebServiceWorkerFetchTaskClient.cpp:201
> +	   auto formData = WTFMove(m_formData);
> +	   didReceiveFormDataAndFinish(formData.releaseNonNull());

Could we just call m_formData.releaseNonNull() without WTFMove?

> Source/WebKit/WebProcess/Storage/WebServiceWorkerFetchTaskClient.h:86
> +    RefPtr<WebCore::SharedBuffer> m_buffer;
> +    RefPtr<FormData> m_formData;

Can these be a Variant, or could we have more than one of these?

> Source/WebKit/WebProcess/Storage/WebServiceWorkerFetchTaskClient.h:88
> +    Optional<ResourceError> m_error;

Making this a std::unique_ptr would save memory in the common case.


More information about the webkit-reviews mailing list