Changeset 69041 in webkit


Ignore:
Timestamp:
Oct 4, 2010 3:14:32 PM (14 years ago)
Author:
ap@apple.com
Message:

Reviewed by Adam Barth.

https://bugs.webkit.org/show_bug.cgi?id=43506
<rdar://problem/8289284> foreign-iframe-main.html occasionally crashes (during the next test,
idempotent-update.html)

Application cache doesn't use ResourceLoader machinery (for better or worse), so we need to
abort update process explicitly.

Note that in principle, update could piggyback on any other existing frame - or even run
frameless - but currently, it's tied to the first frame that requested update.

  • loader/DocumentLoader.cpp: (WebCore::DocumentLoader::stopLoading):
  • loader/appcache/ApplicationCacheGroup.cpp: (WebCore::ApplicationCacheGroup::stopLoadingInFrame):
  • loader/appcache/ApplicationCacheGroup.h:
  • loader/appcache/ApplicationCacheHost.cpp: (WebCore::ApplicationCacheHost::~ApplicationCacheHost): (WebCore::ApplicationCacheHost::stopLoadingInFrame):
  • loader/appcache/ApplicationCacheHost.h:
Location:
trunk/WebCore
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r69039 r69041  
     12010-10-04  Alexey Proskuryakov  <ap@apple.com>
     2
     3        Reviewed by Adam Barth.
     4
     5        https://bugs.webkit.org/show_bug.cgi?id=43506
     6        <rdar://problem/8289284> foreign-iframe-main.html occasionally crashes (during the next test,
     7        idempotent-update.html)
     8
     9        Application cache doesn't use ResourceLoader machinery (for better or worse), so we need to
     10        abort update process explicitly.
     11
     12        Note that in principle, update could piggyback on any other existing frame - or even run
     13        frameless - but currently, it's tied to the first frame that requested update.
     14
     15        * loader/DocumentLoader.cpp:
     16        (WebCore::DocumentLoader::stopLoading):
     17        * loader/appcache/ApplicationCacheGroup.cpp:
     18        (WebCore::ApplicationCacheGroup::stopLoadingInFrame):
     19        * loader/appcache/ApplicationCacheGroup.h:
     20        * loader/appcache/ApplicationCacheHost.cpp:
     21        (WebCore::ApplicationCacheHost::~ApplicationCacheHost):
     22        (WebCore::ApplicationCacheHost::stopLoadingInFrame):
     23        * loader/appcache/ApplicationCacheHost.h:
     24
    1252010-10-04  Adam Barth  <abarth@webkit.org>
    226
  • trunk/WebCore/loader/DocumentLoader.cpp

    r67619 r69041  
    221221    cancelAll(m_multipartSubresourceLoaders);
    222222
     223    // Appcache uses ResourceHandle directly, DocumentLoader doesn't count these loads.
     224#if ENABLE(OFFLINE_WEB_APPLICATIONS)
     225    m_applicationCacheHost->stopLoadingInFrame(m_frame);
     226#endif
     227
    223228    if (!loading)
    224229        return;
  • trunk/WebCore/loader/appcache/ApplicationCacheGroup.cpp

    r69039 r69041  
    385385}
    386386
     387void ApplicationCacheGroup::stopLoadingInFrame(Frame* frame)
     388{
     389    if (frame != m_frame)
     390        return;
     391
     392    stopLoading();
     393}
     394
    387395#if ENABLE(INSPECTOR)
    388396static void inspectorUpdateApplicationCacheStatus(Frame* frame)
  • trunk/WebCore/loader/appcache/ApplicationCacheGroup.h

    r67553 r69041  
    8181    bool cacheIsBeingUpdated(const ApplicationCache* cache) const { return cache == m_cacheBeingUpdated; }
    8282
     83    void stopLoadingInFrame(Frame*);
     84
    8385    ApplicationCache* newestCache() const { return m_newestCache.get(); }
    8486    void setNewestCache(PassRefPtr<ApplicationCache>);
  • trunk/WebCore/loader/appcache/ApplicationCacheHost.cpp

    r64006 r69041  
    5656ApplicationCacheHost::~ApplicationCacheHost()
    5757{
     58    ASSERT(!m_applicationCache || !m_candidateApplicationCacheGroup || m_applicationCache->group() == m_candidateApplicationCacheGroup);
     59
    5860    if (m_applicationCache)
    5961        m_applicationCache->group()->disassociateDocumentLoader(m_documentLoader);
     
    238240    }
    239241    dispatchDOMEvent(id, total, done);
     242}
     243
     244void ApplicationCacheHost::stopLoadingInFrame(Frame* frame)
     245{
     246    ASSERT(!m_applicationCache || !m_candidateApplicationCacheGroup || m_applicationCache->group() == m_candidateApplicationCacheGroup);
     247
     248    if (m_candidateApplicationCacheGroup)
     249        m_candidateApplicationCacheGroup->stopLoadingInFrame(frame);
     250    else if (m_applicationCache)
     251        m_applicationCache->group()->stopLoadingInFrame(frame);
    240252}
    241253
  • trunk/WebCore/loader/appcache/ApplicationCacheHost.h

    r64006 r69041  
    4444    class DOMApplicationCache;
    4545    class DocumentLoader;
     46    class Frame;
    4647    class ResourceLoader;
    4748    class ResourceError;
     
    145146        void notifyDOMApplicationCache(EventID, int progressTotal, int progressDone);
    146147
     148        void stopLoadingInFrame(Frame*);
     149
    147150        void stopDeferringEvents(); // Also raises the events that have been queued up.
    148151
Note: See TracChangeset for help on using the changeset viewer.