Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(71)

Unified Diff: third_party/WebKit/Source/core/fetch/ResourceLoader.cpp

Issue 2163183002: Fix PerformanceResourceTiming transferSize field for sync XHR (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@resource_timing_sizes_worker_tests
Patch Set: Rebase Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/fetch/ResourceLoader.cpp
diff --git a/third_party/WebKit/Source/core/fetch/ResourceLoader.cpp b/third_party/WebKit/Source/core/fetch/ResourceLoader.cpp
index 8fa0dfd9e57d4d779bc06f1542787b0b5f8a8e54..1e2bb2f2687e048902505e7c33e4396199a7c8fd 100644
--- a/third_party/WebKit/Source/core/fetch/ResourceLoader.cpp
+++ b/third_party/WebKit/Source/core/fetch/ResourceLoader.cpp
@@ -242,7 +242,8 @@ void ResourceLoader::requestSynchronously(const ResourceRequest& request)
WebURLResponse responseOut;
WebURLError errorOut;
WebData dataOut;
- m_loader->loadSynchronously(requestIn, responseOut, errorOut, dataOut);
+ int64_t encodedDataLength = WebURLLoaderClient::kUnknownEncodedDataLength;
+ m_loader->loadSynchronously(requestIn, responseOut, errorOut, dataOut, encodedDataLength);
// A message dispatched while synchronously fetching the resource
// can bring about the cancellation of this load.
@@ -255,8 +256,6 @@ void ResourceLoader::requestSynchronously(const ResourceRequest& request)
didReceiveResponse(0, responseOut);
if (!m_loader)
return;
- RefPtr<ResourceLoadInfo> resourceLoadInfo = responseOut.toResourceResponse().resourceLoadInfo();
- int64_t encodedDataLength = resourceLoadInfo ? resourceLoadInfo->encodedDataLength : WebURLLoaderClient::kUnknownEncodedDataLength;
DCHECK_GE(responseOut.toResourceResponse().encodedBodyLength(), 0);
// Follow the async case convention of not calling didReceiveData or

Powered by Google App Engine
This is Rietveld 408576698