[webkit-reviews] review granted: [Bug 215456] Set Sec-WebSocket-Protocol for WebSocket NSURLSession code path : [Attachment 406606] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Aug 14 11:06:19 PDT 2020


Alex Christensen <achristensen at apple.com> has granted  review:
Bug 215456: Set Sec-WebSocket-Protocol for WebSocket NSURLSession code path
https://bugs.webkit.org/show_bug.cgi?id=215456

Attachment 406606: Patch

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




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

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

> Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm:1569
> +    auto *nsRequest =
request.nsURLRequest(WebCore::HTTPBodyUpdatePolicy::DoNotUpdateHTTPBody);

I think this returns an NSMutableURLRequest, so we could avoid a copy. 
Probably not too important here.

> Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm:1571
> +	   NSMutableURLRequest *requestWithProtocols = [[nsRequest mutableCopy]
autorelease];

adoptNS could avoid putting a reference in the autorelease pool.


More information about the webkit-reviews mailing list