Bug 186551

Summary: NetworkLoadChecker should not need to hard ref NetworkConnectionToWebProcess
Product: WebKit Reporter: youenn fablet <youennf>
Component: WebKit Misc.Assignee: youenn fablet <youennf>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, cdumez, commit-queue, dbates, ews-watchlist, mkwst, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch for landing none

Description youenn fablet 2018-06-11 17:47:29 PDT
This is unnecessary and if ping loads last for long, it can keep NetworkConnectionToWebProcess alive for more time than it should
Comment 1 youenn fablet 2018-06-14 16:01:05 PDT
Created attachment 342772 [details]
Patch
Comment 2 Alex Christensen 2018-06-18 10:22:04 PDT
Comment on attachment 342772 [details]
Patch

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

Looks good to me.

> Source/WebCore/page/csp/ContentSecurityPolicy.h:172
> +    void setClient(ContentSecurityPolicyClient* client) { m_client = client; }

Ask Dan how he feels about this.

> Source/WebKit/NetworkProcess/NetworkLoadChecker.cpp:200
> +        contentSecurityPolicy->setClient(client);
> +        bool isAllowed = isAllowedByContentSecurityPolicy(request);
> +        contentSecurityPolicy->setClient(nullptr);
> +        if (!isAllowed) {

This definitely has room for improvement.
Comment 3 youenn fablet 2018-06-27 13:01:00 PDT
Created attachment 343742 [details]
Patch for landing
Comment 4 WebKit Commit Bot 2018-06-27 14:15:30 PDT
Comment on attachment 343742 [details]
Patch for landing

Clearing flags on attachment: 343742

Committed r233277: <https://trac.webkit.org/changeset/233277>
Comment 5 WebKit Commit Bot 2018-06-27 14:15:32 PDT
All reviewed patches have been landed.  Closing bug.
Comment 6 Radar WebKit Bug Importer 2018-06-27 14:16:26 PDT
<rdar://problem/41542890>