| Summary: | Avoid unnecessary NSURLResponse construction for QuickLook on iOS | ||||||
|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Antti Koivisto <koivisto> | ||||
| Component: | Page Loading | Assignee: | Nobody <webkit-unassigned> | ||||
| Status: | RESOLVED FIXED | ||||||
| Severity: | Normal | CC: | aestes, ddkilzer, psolanki | ||||
| Priority: | P2 | ||||||
| Version: | 528+ (Nightly build) | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Attachments: |
|
||||||
|
Description
Antti Koivisto
2014-10-20 04:14:55 PDT
Created attachment 240109 [details]
patch
Comment on attachment 240109 [details]
patch
Does this work in WebKit1?
Comment on attachment 240109 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=240109&action=review > Source/WebCore/ChangeLog:21 > + Switch inteface to take ResourceResponse. interface (In reply to comment #2) > Comment on attachment 240109 [details] > patch > > Does this work in WebKit1? WK1 shouldn't be affected as these code paths are WK2 only. Comment on attachment 240109 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=240109&action=review > Source/WebCore/platform/network/ios/QuickLook.mm:501 > + std::unique_ptr<QuickLookHandle> quickLookHandle(new QuickLookHandle([loader.originalRequest().nsURLRequest(DoNotUpdateHTTPBody) URL], nil, response.nsURLResponse(), delegate.get())); The correct style here is to use std::make_unique, not new. But I imagine if we tried that we’d have to change what’s public. > Source/WebCore/platform/network/ios/QuickLook.mm:504 > return WTF::move(quickLookHandle); Normally we don’t need WTF::move for a return value in a case like this. |