Changeset 117181 in webkit


Ignore:
Timestamp:
May 15, 2012 4:31:43 PM (12 years ago)
Author:
Nate Chapin
Message:

MainResourceLoader::load() always returns true, so make it return
void and delete the related dead code.
https://bugs.webkit.org/show_bug.cgi?id=86413

Reviewed by Alexey Proskuryakov.

No new tests, cleanup only.

  • loader/DocumentLoader.cpp:

(WebCore::DocumentLoader::startLoadingMainResource):

  • loader/MainResourceLoader.cpp:

(WebCore::MainResourceLoader::load):

  • loader/MainResourceLoader.h:

(MainResourceLoader):

Location:
trunk/Source/WebCore
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r117171 r117181  
     12012-05-15  Nate Chapin  <japhet@chromium.org>
     2
     3        MainResourceLoader::load() always returns true, so make it return
     4        void and delete the related dead code.
     5        https://bugs.webkit.org/show_bug.cgi?id=86413
     6
     7        Reviewed by Alexey Proskuryakov.
     8
     9        No new tests, cleanup only.
     10
     11        * loader/DocumentLoader.cpp:
     12        (WebCore::DocumentLoader::startLoadingMainResource):
     13        * loader/MainResourceLoader.cpp:
     14        (WebCore::MainResourceLoader::load):
     15        * loader/MainResourceLoader.h:
     16        (MainResourceLoader):
     17
    1182012-05-15  Ian Vollick  <vollick@chromium.org>
    219
  • trunk/Source/WebCore/loader/DocumentLoader.cpp

    r115774 r117181  
    838838    // If not, it would be great to remove this line of code.
    839839    frameLoader()->addExtraFieldsToMainResourceRequest(m_request);
    840    
    841     // Protect MainResourceLoader::load() method chain from clearMainResourceLoader() stomping m_mainResourceLoader.
    842     RefPtr<MainResourceLoader> protectedMainResourceLoader(m_mainResourceLoader);
    843     if (!protectedMainResourceLoader->load(m_request, m_substituteData)) {
    844         // FIXME: If this should really be caught, we should just ASSERT this doesn't happen;
    845         // should it be caught by other parts of WebKit or other parts of the app?
    846         LOG_ERROR("could not create WebResourceHandle for URL %s -- should be caught by policy handler level", m_request.url().string().ascii().data());
    847         m_mainResourceLoader = 0;
    848         ASSERT(!isLoading());
    849         checkLoadComplete();
    850     }
     840    m_mainResourceLoader->load(m_request, m_substituteData);
    851841}
    852842
  • trunk/Source/WebCore/loader/MainResourceLoader.cpp

    r115765 r117181  
    652652}
    653653
    654 bool MainResourceLoader::load(const ResourceRequest& r, const SubstituteData& substituteData)
     654void MainResourceLoader::load(const ResourceRequest& r, const SubstituteData& substituteData)
    655655{
    656656    ASSERT(!m_handle);
     657
     658    // It appears that it is possible for this load to be cancelled and derefenced by the DocumentLoader
     659    // in willSendRequest() if loadNow() is called.
     660    RefPtr<MainResourceLoader> protect(this);
    657661
    658662    m_substituteData = substituteData;
     
    680684    if (defer)
    681685        m_initialRequest = request;
    682 
    683     return true;
    684686}
    685687
  • trunk/Source/WebCore/loader/MainResourceLoader.h

    r115765 r117181  
    5555        virtual ~MainResourceLoader();
    5656
    57         virtual bool load(const ResourceRequest&, const SubstituteData&);
     57        void load(const ResourceRequest&, const SubstituteData&);
    5858        virtual void addData(const char*, int, bool allAtOnce);
    5959
Note: See TracChangeset for help on using the changeset viewer.