Title: [89323] trunk/Source/WebCore
Revision
89323
Author
[email protected]
Date
2011-06-20 18:00:18 -0700 (Mon, 20 Jun 2011)

Log Message

2011-06-20  Adam Barth  <[email protected]>

        Reviewed by Darin Adler.

        Remove numRequests
        https://bugs.webkit.org/show_bug.cgi?id=63028

        numRequests exists just to cargo-cult null-check m_frame->document(),
        which is always non-null.

        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::checkCompleted):
        (WebCore::FrameLoader::numPendingOrLoadingRequests):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (89322 => 89323)


--- trunk/Source/WebCore/ChangeLog	2011-06-21 00:57:31 UTC (rev 89322)
+++ trunk/Source/WebCore/ChangeLog	2011-06-21 01:00:18 UTC (rev 89323)
@@ -1,3 +1,17 @@
+2011-06-20  Adam Barth  <[email protected]>
+
+        Reviewed by Darin Adler.
+
+        Remove numRequests
+        https://bugs.webkit.org/show_bug.cgi?id=63028
+
+        numRequests exists just to cargo-cult null-check m_frame->document(),
+        which is always non-null.
+
+        * loader/FrameLoader.cpp:
+        (WebCore::FrameLoader::checkCompleted):
+        (WebCore::FrameLoader::numPendingOrLoadingRequests):
+
 2011-06-20  Alexey Proskuryakov  <[email protected]>
 
         Reviewed by Darin Adler.

Modified: trunk/Source/WebCore/loader/FrameLoader.cpp (89322 => 89323)


--- trunk/Source/WebCore/loader/FrameLoader.cpp	2011-06-21 00:57:31 UTC (rev 89322)
+++ trunk/Source/WebCore/loader/FrameLoader.cpp	2011-06-21 01:00:18 UTC (rev 89323)
@@ -156,14 +156,6 @@
     return false;
 }
 
-static int numRequests(Document* document)
-{
-    if (!document)
-        return 0;
-    
-    return document->cachedResourceLoader()->requestCount();
-}
-
 // This is not in the FrameLoader class to emphasize that it does not depend on
 // private FrameLoader data, and to avoid increasing the number of public functions
 // with access to private data.  Since only this .cpp file needs it, making it
@@ -722,7 +714,7 @@
         return;
 
     // Still waiting for images/scripts?
-    if (numRequests(m_frame->document()))
+    if (m_frame->document()->cachedResourceLoader()->requestCount())
         return;
 
     // Still waiting for elements that don't go through a FrameLoader?
@@ -2400,11 +2392,11 @@
 int FrameLoader::numPendingOrLoadingRequests(bool recurse) const
 {
     if (!recurse)
-        return numRequests(m_frame->document());
+        return m_frame->document()->cachedResourceLoader()->requestCount();
 
     int count = 0;
     for (Frame* frame = m_frame; frame; frame = frame->tree()->traverseNext(m_frame))
-        count += numRequests(frame->document());
+        count += frame->document()->cachedResourceLoader()->requestCount();
     return count;
 }
 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to