Changeset 89323 in webkit


Ignore:
Timestamp:
Jun 20, 2011 6:00:18 PM (13 years ago)
Author:
abarth@webkit.org
Message:

2011-06-20 Adam Barth <abarth@webkit.org>

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):
Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r89322 r89323  
     12011-06-20  Adam Barth  <abarth@webkit.org>
     2
     3        Reviewed by Darin Adler.
     4
     5        Remove numRequests
     6        https://bugs.webkit.org/show_bug.cgi?id=63028
     7
     8        numRequests exists just to cargo-cult null-check m_frame->document(),
     9        which is always non-null.
     10
     11        * loader/FrameLoader.cpp:
     12        (WebCore::FrameLoader::checkCompleted):
     13        (WebCore::FrameLoader::numPendingOrLoadingRequests):
     14
    1152011-06-20  Alexey Proskuryakov  <ap@apple.com>
    216
  • trunk/Source/WebCore/loader/FrameLoader.cpp

    r89312 r89323  
    157157}
    158158
    159 static int numRequests(Document* document)
    160 {
    161     if (!document)
    162         return 0;
    163    
    164     return document->cachedResourceLoader()->requestCount();
    165 }
    166 
    167159// This is not in the FrameLoader class to emphasize that it does not depend on
    168160// private FrameLoader data, and to avoid increasing the number of public functions
     
    723715
    724716    // Still waiting for images/scripts?
    725     if (numRequests(m_frame->document()))
     717    if (m_frame->document()->cachedResourceLoader()->requestCount())
    726718        return;
    727719
     
    24012393{
    24022394    if (!recurse)
    2403         return numRequests(m_frame->document());
     2395        return m_frame->document()->cachedResourceLoader()->requestCount();
    24042396
    24052397    int count = 0;
    24062398    for (Frame* frame = m_frame; frame; frame = frame->tree()->traverseNext(m_frame))
    2407         count += numRequests(frame->document());
     2399        count += frame->document()->cachedResourceLoader()->requestCount();
    24082400    return count;
    24092401}
Note: See TracChangeset for help on using the changeset viewer.