For testing purposes.
Created attachment 292632 [details] patch
Comment on attachment 292632 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=292632&action=review > Source/WebKit2/NetworkProcess/NetworkLoad.cpp:298 > +void NetworkLoad::notifyDidReceiveResponse(ResourceResponse&& response, ResponseCompletionHandler&& completionHandler) Let's just put this in didReceiveResponseNetworkSession with an if statement. > Source/WebKit2/NetworkProcess/NetworkLoad.cpp:327 > void NetworkLoad::didCompleteWithError(const ResourceError& error) > { > + if (m_throttle) { > + m_throttle->completionError = error; > + return; > + } What if there's an error before we receive the response?
Comment on attachment 292632 [details] patch Attachment 292632 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-queues.webkit.org/results/2359972 New failing tests: svg/wicd/test-rightsizing-b.xhtml
Created attachment 292642 [details] Archive of layout-test-results from ews104 for mac-yosemite-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews104 Port: mac-yosemite-wk2 Platform: Mac OS X 10.10.5
> > +void NetworkLoad::notifyDidReceiveResponse(ResourceResponse&& response, ResponseCompletionHandler&& completionHandler) > > Let's just put this in didReceiveResponseNetworkSession with an if statement. This the part of didReceiveResponseNetworkSession that is also called from timer completion function. It would be awkward to know whether initialize throttling without the split. > What if there's an error before we receive the response? It does not get throttled. I suppose it could be though it doesn't seem super important.
Test failures are flakes.
https://trac.webkit.org/r207812 (With some cleanups. Turns out just delaying response is enough as data/didComplete are blocked by not calling the completion handler).