Simplify Resource Timing handling of cached resource
https://bugs.webkit.org/show_bug.cgi?id=171526

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2017-05-01
Reviewed by Youenn Fablet.

* loader/DocumentThreadableLoader.cpp:
(WebCore::DocumentThreadableLoader::loadRequest):
* loader/SubresourceLoader.cpp:
(WebCore::SubresourceLoader::init):
(WebCore::SubresourceLoader::reportResourceTiming):
Use auto in ResourceTiming construction.
Eliminate an outdated comment.

* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::requestResource):
We can avoid the checks around the request.origin. It should already
be the cases we were checking and asserting because of login in
CachedResourceLoader::prepareFetch.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@216051 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/WebCore/loader/DocumentThreadableLoader.cpp b/Source/WebCore/loader/DocumentThreadableLoader.cpp
index 34ea5af..5a0bf41 100644
--- a/Source/WebCore/loader/DocumentThreadableLoader.cpp
+++ b/Source/WebCore/loader/DocumentThreadableLoader.cpp
@@ -504,7 +504,7 @@
 
 #if ENABLE(WEB_TIMING)
     if (RuntimeEnabledFeatures::sharedFeatures().resourceTimingEnabled()) {
-        ResourceTiming resourceTiming = ResourceTiming::fromSynchronousLoad(requestURL, m_options.initiator, loadTiming, response.deprecatedNetworkLoadMetrics(), response, securityOrigin());
+        auto resourceTiming = ResourceTiming::fromSynchronousLoad(requestURL, m_options.initiator, loadTiming, response.deprecatedNetworkLoadMetrics(), response, securityOrigin());
         if (options().initiatorContext == InitiatorContext::Worker)
             finishedTimingForWorkerLoad(resourceTiming);
         else {