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

Unified Diff: Source/core/loader/DocumentLoader.cpp

Issue 916273002: Make DocumentLoader::timing return a reference (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 10 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: Source/core/loader/DocumentLoader.cpp
diff --git a/Source/core/loader/DocumentLoader.cpp b/Source/core/loader/DocumentLoader.cpp
index 2f5dc812508476855447eeb91dc44da45628146e..93f43c0e017417606f413cc4196a0812b84b7303 100644
--- a/Source/core/loader/DocumentLoader.cpp
+++ b/Source/core/loader/DocumentLoader.cpp
@@ -228,7 +228,7 @@ void DocumentLoader::finishedLoading(double finishTime)
responseEndTime = m_timeOfLastDataReceived;
if (!responseEndTime)
responseEndTime = monotonicallyIncreasingTime();
- timing()->setResponseEnd(responseEndTime);
+ timing().setResponseEnd(responseEndTime);
commitIfReady();
if (!frameLoader())
@@ -325,7 +325,7 @@ void DocumentLoader::willSendRequest(ResourceRequest& newRequest, const Resource
return;
}
- ASSERT(timing()->fetchStart());
+ ASSERT(timing().fetchStart());
if (!redirectResponse.isNull()) {
// If the redirecting url is not allowed to display content from the target origin,
// then block the redirect.
@@ -335,7 +335,7 @@ void DocumentLoader::willSendRequest(ResourceRequest& newRequest, const Resource
cancelMainResourceLoad(ResourceError::cancelledError(newRequest.url()));
return;
}
- timing()->addRedirect(redirectResponse.url(), newRequest.url());
+ timing().addRedirect(redirectResponse.url(), newRequest.url());
}
// If we're fielding a redirect in response to a POST, force a load from origin, since
@@ -698,7 +698,7 @@ void DocumentLoader::startLoadingMainResource()
{
RefPtr<DocumentLoader> protect(this);
m_mainDocumentError = ResourceError();
- timing()->markNavigationStart();
+ timing().markNavigationStart();
ASSERT(!m_mainResource);
ASSERT(!m_loadingMainResource);
m_loadingMainResource = true;
@@ -706,9 +706,9 @@ void DocumentLoader::startLoadingMainResource()
if (maybeLoadEmpty())
return;
- ASSERT(timing()->navigationStart());
- ASSERT(!timing()->fetchStart());
- timing()->markFetchStart();
+ ASSERT(timing().navigationStart());
+ ASSERT(!timing().fetchStart());
+ timing().markFetchStart();
willSendRequest(m_request, ResourceResponse());
// willSendRequest() may lead to our LocalFrame being detached or cancelling the load via nulling the ResourceRequest.

Powered by Google App Engine
This is Rietveld 408576698