Title: [175718] trunk/Source/WebCore
Revision
175718
Author
commit-qu...@webkit.org
Date
2014-11-06 14:51:34 -0800 (Thu, 06 Nov 2014)

Log Message

Don't send identifierForInitialRequest callback method for request with DoNotSendCallbacks option.
https://bugs.webkit.org/show_bug.cgi?id=138473

The iOS specific code that sets up a valid m_identifier is not needed any more, since this
will be done later in ResourceLoader::willSendRequest. This also matches the behavior that
we don't call assignIdentifierToInitialRequest callback method if the reqeust has
DoNotSendCallbacks option.

Patch by Yongjun Zhang <yongjun_zh...@apple.com> on 2014-11-06
Reviewed by Pratik Solanki.

* loader/ResourceLoader.cpp:
(WebCore::ResourceLoader::willSendRequest): Remove iOS specific block for setting up a valid
    m_identifier. In iOS, also make sure we still bail out if the resource loader was stopped
    in assignIdentifierToInitialRequest callback by a client.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (175717 => 175718)


--- trunk/Source/WebCore/ChangeLog	2014-11-06 22:41:31 UTC (rev 175717)
+++ trunk/Source/WebCore/ChangeLog	2014-11-06 22:51:34 UTC (rev 175718)
@@ -1,3 +1,20 @@
+2014-11-06  Yongjun Zhang  <yongjun_zh...@apple.com>
+
+        Don't send identifierForInitialRequest callback method for request with DoNotSendCallbacks option.
+        https://bugs.webkit.org/show_bug.cgi?id=138473
+
+        The iOS specific code that sets up a valid m_identifier is not needed any more, since this
+        will be done later in ResourceLoader::willSendRequest. This also matches the behavior that
+        we don't call assignIdentifierToInitialRequest callback method if the reqeust has
+        DoNotSendCallbacks option.
+
+        Reviewed by Pratik Solanki.
+
+        * loader/ResourceLoader.cpp: 
+        (WebCore::ResourceLoader::willSendRequest): Remove iOS specific block for setting up a valid
+            m_identifier. In iOS, also make sure we still bail out if the resource loader was stopped
+            in assignIdentifierToInitialRequest callback by a client.
+
 2014-11-06  Dean Jackson  <d...@apple.com>
 
         [filters2] Support for backdrop-filter

Modified: trunk/Source/WebCore/loader/ResourceLoader.cpp (175717 => 175718)


--- trunk/Source/WebCore/loader/ResourceLoader.cpp	2014-11-06 22:41:31 UTC (rev 175717)
+++ trunk/Source/WebCore/loader/ResourceLoader.cpp	2014-11-06 22:51:34 UTC (rev 175718)
@@ -254,20 +254,6 @@
 
     ASSERT(!m_reachedTerminalState);
     
-#if PLATFORM(IOS)
-    // Ensure an identifier is always set. This ensures that this assetion is not hit:
-    // <rdar://problem/11059794> ASSERTION FAILED: !HashTranslator::equal(KeyTraits::emptyValue(), key) in WebFrameLoaderClient::canAuthenticateAgainstProtectionSpace loading the attached web archive
-    // This is not needed in WebKit2, as it doesn't use m_identifier in WebFrameLoaderClient::canAuthenticateAgainstProtectionSpace
-    if (!m_identifier) {
-        m_identifier = m_frame->page()->progress().createUniqueIdentifier();
-        frameLoader()->notifier().assignIdentifierToInitialRequest(m_identifier, documentLoader(), request);
-
-        // If this ResourceLoader was stopped as a result of assignIdentifierToInitialRequest, bail out
-        if (m_reachedTerminalState)
-            return;
-    }
-#endif
-
     // We need a resource identifier for all requests, even if FrameLoader is never going to see it (such as with CORS preflight requests).
     bool createdResourceIdentifier = false;
     if (!m_identifier) {
@@ -279,6 +265,12 @@
         if (createdResourceIdentifier)
             frameLoader()->notifier().assignIdentifierToInitialRequest(m_identifier, documentLoader(), request);
 
+#if PLATFORM(IOS)
+        // If this ResourceLoader was stopped as a result of assignIdentifierToInitialRequest, bail out
+        if (m_reachedTerminalState)
+            return;
+#endif
+
         frameLoader()->notifier().willSendRequest(this, request, redirectResponse);
     }
 #if ENABLE(INSPECTOR)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to