QuickLook specific code path creates NSURLResponse in the web process for every response. It is rarely needed so this is unnecessary work.
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.
https://trac.webkit.org/r174889