Title: [112308] trunk/Source/WebCore
Revision
112308
Author
[email protected]
Date
2012-03-27 13:30:28 -0700 (Tue, 27 Mar 2012)

Log Message

2012-03-27  Nate Chapin  <[email protected]>

        Don't manually set an identifier for main resource
        loads in FrameLoader. ResourceLoader::willSendRequest()
        will set an identifier for the request if one isn't found,
        so this code appears to be unnecessary duplication.
        https://bugs.webkit.org/show_bug.cgi?id=82248

        Reviewed by Adam Barth.

        No new tests, no functionality change intended.

        * loader/DocumentLoader.cpp:
        (WebCore::DocumentLoader::startLoadingMainResource): Mark navigation start
            here, since it's conceptually part of starting the main resource load.
        * loader/DocumentLoader.h:
        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::continueLoadAfterWillSubmitForm): Remove duplicate identifier
            logic, and move navigation timing call to startLoadingMainResource, since
            it fits better logically there.
        * loader/ResourceLoader.h: No callers of setIdentifier() remain, so delete it.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (112307 => 112308)


--- trunk/Source/WebCore/ChangeLog	2012-03-27 20:20:38 UTC (rev 112307)
+++ trunk/Source/WebCore/ChangeLog	2012-03-27 20:30:28 UTC (rev 112308)
@@ -1,3 +1,25 @@
+2012-03-27  Nate Chapin  <[email protected]>
+
+        Don't manually set an identifier for main resource
+        loads in FrameLoader. ResourceLoader::willSendRequest()
+        will set an identifier for the request if one isn't found,
+        so this code appears to be unnecessary duplication.
+        https://bugs.webkit.org/show_bug.cgi?id=82248
+
+        Reviewed by Adam Barth.
+
+        No new tests, no functionality change intended.
+
+        * loader/DocumentLoader.cpp:
+        (WebCore::DocumentLoader::startLoadingMainResource): Mark navigation start
+            here, since it's conceptually part of starting the main resource load.
+        * loader/DocumentLoader.h:
+        * loader/FrameLoader.cpp:
+        (WebCore::FrameLoader::continueLoadAfterWillSubmitForm): Remove duplicate identifier
+            logic, and move navigation timing call to startLoadingMainResource, since
+            it fits better logically there.
+        * loader/ResourceLoader.h: No callers of setIdentifier() remain, so delete it.
+
 2012-03-27  Dirk Pranke  <[email protected]>
 
         Unreviewed, rolling out r112277.

Modified: trunk/Source/WebCore/loader/DocumentLoader.cpp (112307 => 112308)


--- trunk/Source/WebCore/loader/DocumentLoader.cpp	2012-03-27 20:20:38 UTC (rev 112307)
+++ trunk/Source/WebCore/loader/DocumentLoader.cpp	2012-03-27 20:30:28 UTC (rev 112308)
@@ -791,11 +791,11 @@
     return m_mainResourceLoader && m_mainResourceLoader->isLoadingMultipartContent();
 }
 
-void DocumentLoader::startLoadingMainResource(unsigned long identifier)
+void DocumentLoader::startLoadingMainResource()
 {
+    timing()->markNavigationStart(m_frame);
     ASSERT(!m_mainResourceLoader);
     m_mainResourceLoader = MainResourceLoader::create(m_frame);
-    m_mainResourceLoader->setIdentifier(identifier);
 
     // FIXME: Is there any way the extra fields could have not been added by now?
     // If not, it would be great to remove this line of code.

Modified: trunk/Source/WebCore/loader/DocumentLoader.h (112307 => 112308)


--- trunk/Source/WebCore/loader/DocumentLoader.h	2012-03-27 20:20:38 UTC (rev 112307)
+++ trunk/Source/WebCore/loader/DocumentLoader.h	2012-03-27 20:30:28 UTC (rev 112308)
@@ -193,7 +193,7 @@
         
         void setDefersLoading(bool);
 
-        void startLoadingMainResource(unsigned long identifier);
+        void startLoadingMainResource();
         void cancelMainResourceLoad(const ResourceError&);
         
         // Support iconDatabase in synchronous mode.

Modified: trunk/Source/WebCore/loader/FrameLoader.cpp (112307 => 112308)


--- trunk/Source/WebCore/loader/FrameLoader.cpp	2012-03-27 20:20:38 UTC (rev 112307)
+++ trunk/Source/WebCore/loader/FrameLoader.cpp	2012-03-27 20:30:28 UTC (rev 112308)
@@ -2226,16 +2226,7 @@
         return;
 
     m_loadingFromCachedPage = false;
-
-    unsigned long identifier = 0;
-
-    if (Page* page = m_frame->page()) {
-        identifier = page->progress()->createUniqueIdentifier();
-        notifier()->assignIdentifierToInitialRequest(identifier, m_provisionalDocumentLoader.get(), m_provisionalDocumentLoader->originalRequest());
-    }
-
-    m_provisionalDocumentLoader->timing()->markNavigationStart(frame());
-    m_provisionalDocumentLoader->startLoadingMainResource(identifier);
+    m_provisionalDocumentLoader->startLoadingMainResource();
 }
 
 static KURL originatingURLFromBackForwardList(Page* page)

Modified: trunk/Source/WebCore/loader/ResourceLoader.h (112307 => 112308)


--- trunk/Source/WebCore/loader/ResourceLoader.h	2012-03-27 20:20:38 UTC (rev 112307)
+++ trunk/Source/WebCore/loader/ResourceLoader.h	2012-03-27 20:30:28 UTC (rev 112308)
@@ -66,7 +66,6 @@
         
         virtual void setDefersLoading(bool);
 
-        void setIdentifier(unsigned long identifier) { m_identifier = identifier; }
         unsigned long identifier() const { return m_identifier; }
 
         virtual void releaseResources();
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to