Title: [231066] trunk/Source/WebCore
Revision
231066
Author
[email protected]
Date
2018-04-26 13:36:48 -0700 (Thu, 26 Apr 2018)

Log Message

Unreviewed, rolling out r231052.
https://bugs.webkit.org/show_bug.cgi?id=185044

Broke test http/tests/security/credentials-main-resource.html
(Requested by dydz on #webkit).

Reverted changeset:

"DocumentLoader::loadMainResource() should WTFMove() the
passed ResourceRequest"
https://bugs.webkit.org/show_bug.cgi?id=185002
https://trac.webkit.org/changeset/231052

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (231065 => 231066)


--- trunk/Source/WebCore/ChangeLog	2018-04-26 20:19:39 UTC (rev 231065)
+++ trunk/Source/WebCore/ChangeLog	2018-04-26 20:36:48 UTC (rev 231066)
@@ -1,3 +1,18 @@
+2018-04-26  Commit Queue  <[email protected]>
+
+        Unreviewed, rolling out r231052.
+        https://bugs.webkit.org/show_bug.cgi?id=185044
+
+        Broke test http/tests/security/credentials-main-resource.html
+        (Requested by dydz on #webkit).
+
+        Reverted changeset:
+
+        "DocumentLoader::loadMainResource() should WTFMove() the
+        passed ResourceRequest"
+        https://bugs.webkit.org/show_bug.cgi?id=185002
+        https://trac.webkit.org/changeset/231052
+
 2018-04-26  Jer Noble  <[email protected]>
 
         WK_COCOA_TOUCH all the things.

Modified: trunk/Source/WebCore/loader/DocumentLoader.cpp (231065 => 231066)


--- trunk/Source/WebCore/loader/DocumentLoader.cpp	2018-04-26 20:19:39 UTC (rev 231065)
+++ trunk/Source/WebCore/loader/DocumentLoader.cpp	2018-04-26 20:36:48 UTC (rev 231066)
@@ -1732,7 +1732,7 @@
 void DocumentLoader::loadMainResource(ResourceRequest&& request)
 {
     static NeverDestroyed<ResourceLoaderOptions> mainResourceLoadOptions(SendCallbacks, SniffContent, BufferData, StoredCredentialsPolicy::Use, ClientCredentialPolicy::MayAskClientForCredentials, FetchOptions::Credentials::Include, SkipSecurityCheck, FetchOptions::Mode::Navigate, IncludeCertificateInfo, ContentSecurityPolicyImposition::SkipPolicyCheck, DefersLoadingPolicy::AllowDefersLoading, CachingPolicy::AllowCaching);
-    CachedResourceRequest mainResourceRequest(WTFMove(request), mainResourceLoadOptions);
+    CachedResourceRequest mainResourceRequest(ResourceRequest(request), mainResourceLoadOptions);
     if (!m_frame->isMainFrame() && m_frame->document()) {
         // If we are loading the main resource of a subframe, use the cache partition of the main document.
         mainResourceRequest.setDomainForCachePartition(*m_frame->document());
@@ -1783,19 +1783,20 @@
 
     if (!mainResourceLoader()) {
         m_identifierForLoadWithoutResourceLoader = m_frame->page()->progress().createUniqueIdentifier();
-        frameLoader()->notifier().assignIdentifierToInitialRequest(m_identifierForLoadWithoutResourceLoader, this, mainResourceRequest.resourceRequest());
-        frameLoader()->notifier().dispatchWillSendRequest(this, m_identifierForLoadWithoutResourceLoader, mainResourceRequest.resourceRequest(), ResourceResponse());
+        frameLoader()->notifier().assignIdentifierToInitialRequest(m_identifierForLoadWithoutResourceLoader, this, request);
+        frameLoader()->notifier().dispatchWillSendRequest(this, m_identifierForLoadWithoutResourceLoader, request, ResourceResponse());
     }
 
     becomeMainResourceClient();
 
     // A bunch of headers are set when the underlying ResourceLoader is created, and m_request needs to include those.
-    ResourceRequest updatedRequest = mainResourceLoader() ? mainResourceLoader()->originalRequest() : mainResourceRequest.resourceRequest();
+    if (mainResourceLoader())
+        request = mainResourceLoader()->originalRequest();
     // If there was a fragment identifier on m_request, the cache will have stripped it. m_request should include
     // the fragment identifier, so add that back in.
-    if (equalIgnoringFragmentIdentifier(m_request.url(), updatedRequest.url()))
-        updatedRequest.setURL(m_request.url());
-    setRequest(updatedRequest);
+    if (equalIgnoringFragmentIdentifier(m_request.url(), request.url()))
+        request.setURL(m_request.url());
+    setRequest(request);
 }
 
 void DocumentLoader::cancelPolicyCheckIfNeeded()
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to