[webkit-reviews] review granted: [Bug 177673] http/tests/preconnect/link-rel-preconnect-https.html is flaky : [Attachment 322241] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Sep 29 16:45:04 PDT 2017
Alex Christensen <achristensen at apple.com> has granted Chris Dumez
<cdumez at apple.com>'s request for review:
Bug 177673: http/tests/preconnect/link-rel-preconnect-https.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=177673
Attachment 322241: Patch
https://bugs.webkit.org/attachment.cgi?id=322241&action=review
--- Comment #7 from Alex Christensen <achristensen at apple.com> ---
Comment on attachment 322241
--> https://bugs.webkit.org/attachment.cgi?id=322241
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=322241&action=review
> Source/WebKit/WebProcess/Network/WebLoaderStrategy.cpp:466
> +void WebLoaderStrategy::preconnectTo(NetworkingContext* context, const
WebCore::URL& url, StoredCredentialsPolicy storedCredentialsPolicy,
PreconnectCompletionHandler&& completionHandler)
Could we make this take a reference? If there's no NetworkingContext, we
probably just shouldn't try to preconnect.
> Source/WebKit/WebProcess/Network/WebLoaderStrategy.cpp:475
> + WebFrameNetworkingContext* webContext =
static_cast<WebFrameNetworkingContext*>(context);
> + WebFrameLoaderClient* webFrameLoaderClient =
webContext->webFrameLoaderClient();
> + WebFrame* webFrame = webFrameLoaderClient ?
webFrameLoaderClient->webFrame() : nullptr;
> + WebPage* webPage = webFrame ? webFrame->page() : nullptr;
I think we should early return if any of these are null instead of trying to
connect without a page. The caller has already verified that a frame exists.
> Source/WebKit/WebProcess/Network/WebLoaderStrategy.cpp:477
> + NetworkResourceLoadParameters parameters;
Could we use an initializer list to make sure we haven't forgotten any
parameters?
More information about the webkit-reviews
mailing list