[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
ap at apple.com
ap at apple.com
Wed Dec 22 14:07:14 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 9532dfaafdfbb4733ce9cf22bd65445b0f411a59
Author: ap at apple.com <ap at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Mon Oct 4 22:14:32 2010 +0000
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:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@69041 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index d7895fa..1cb915d 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,27 @@
+2010-10-04 Alexey Proskuryakov <ap at apple.com>
+
+ 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:
+
2010-10-04 Adam Barth <abarth at webkit.org>
Reviewed by Darin Adler.
diff --git a/WebCore/loader/DocumentLoader.cpp b/WebCore/loader/DocumentLoader.cpp
index 0a4708c..7ee7bcc 100644
--- a/WebCore/loader/DocumentLoader.cpp
+++ b/WebCore/loader/DocumentLoader.cpp
@@ -220,6 +220,11 @@ void DocumentLoader::stopLoading(DatabasePolicy databasePolicy)
// Always cancel multipart loaders
cancelAll(m_multipartSubresourceLoaders);
+ // Appcache uses ResourceHandle directly, DocumentLoader doesn't count these loads.
+#if ENABLE(OFFLINE_WEB_APPLICATIONS)
+ m_applicationCacheHost->stopLoadingInFrame(m_frame);
+#endif
+
if (!loading)
return;
diff --git a/WebCore/loader/appcache/ApplicationCacheGroup.cpp b/WebCore/loader/appcache/ApplicationCacheGroup.cpp
index daa6f4a..c479a37 100644
--- a/WebCore/loader/appcache/ApplicationCacheGroup.cpp
+++ b/WebCore/loader/appcache/ApplicationCacheGroup.cpp
@@ -384,6 +384,14 @@ void ApplicationCacheGroup::cacheDestroyed(ApplicationCache* cache)
}
}
+void ApplicationCacheGroup::stopLoadingInFrame(Frame* frame)
+{
+ if (frame != m_frame)
+ return;
+
+ stopLoading();
+}
+
#if ENABLE(INSPECTOR)
static void inspectorUpdateApplicationCacheStatus(Frame* frame)
{
diff --git a/WebCore/loader/appcache/ApplicationCacheGroup.h b/WebCore/loader/appcache/ApplicationCacheGroup.h
index 99ab71a..29d0749 100644
--- a/WebCore/loader/appcache/ApplicationCacheGroup.h
+++ b/WebCore/loader/appcache/ApplicationCacheGroup.h
@@ -80,6 +80,8 @@ public:
bool cacheIsBeingUpdated(const ApplicationCache* cache) const { return cache == m_cacheBeingUpdated; }
+ void stopLoadingInFrame(Frame*);
+
ApplicationCache* newestCache() const { return m_newestCache.get(); }
void setNewestCache(PassRefPtr<ApplicationCache>);
diff --git a/WebCore/loader/appcache/ApplicationCacheHost.cpp b/WebCore/loader/appcache/ApplicationCacheHost.cpp
index eca6861..0637eba 100644
--- a/WebCore/loader/appcache/ApplicationCacheHost.cpp
+++ b/WebCore/loader/appcache/ApplicationCacheHost.cpp
@@ -55,6 +55,8 @@ ApplicationCacheHost::ApplicationCacheHost(DocumentLoader* documentLoader)
ApplicationCacheHost::~ApplicationCacheHost()
{
+ ASSERT(!m_applicationCache || !m_candidateApplicationCacheGroup || m_applicationCache->group() == m_candidateApplicationCacheGroup);
+
if (m_applicationCache)
m_applicationCache->group()->disassociateDocumentLoader(m_documentLoader);
else if (m_candidateApplicationCacheGroup)
@@ -239,6 +241,16 @@ void ApplicationCacheHost::notifyDOMApplicationCache(EventID id, int total, int
dispatchDOMEvent(id, total, done);
}
+void ApplicationCacheHost::stopLoadingInFrame(Frame* frame)
+{
+ ASSERT(!m_applicationCache || !m_candidateApplicationCacheGroup || m_applicationCache->group() == m_candidateApplicationCacheGroup);
+
+ if (m_candidateApplicationCacheGroup)
+ m_candidateApplicationCacheGroup->stopLoadingInFrame(frame);
+ else if (m_applicationCache)
+ m_applicationCache->group()->stopLoadingInFrame(frame);
+}
+
void ApplicationCacheHost::stopDeferringEvents()
{
RefPtr<DocumentLoader> protect(documentLoader());
diff --git a/WebCore/loader/appcache/ApplicationCacheHost.h b/WebCore/loader/appcache/ApplicationCacheHost.h
index c224172..667205d 100644
--- a/WebCore/loader/appcache/ApplicationCacheHost.h
+++ b/WebCore/loader/appcache/ApplicationCacheHost.h
@@ -43,6 +43,7 @@
namespace WebCore {
class DOMApplicationCache;
class DocumentLoader;
+ class Frame;
class ResourceLoader;
class ResourceError;
class ResourceRequest;
@@ -144,6 +145,8 @@ namespace WebCore {
void setDOMApplicationCache(DOMApplicationCache*);
void notifyDOMApplicationCache(EventID, int progressTotal, int progressDone);
+ void stopLoadingInFrame(Frame*);
+
void stopDeferringEvents(); // Also raises the events that have been queued up.
#if ENABLE(INSPECTOR)
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list