Title: [184888] trunk/Source/WebCore
- Revision
- 184888
- Author
- [email protected]
- Date
- 2015-05-26 17:05:52 -0700 (Tue, 26 May 2015)
Log Message
Add assertions to make sure pages in the PageCache are not loading
https://bugs.webkit.org/show_bug.cgi?id=145397
<rdar://problem/20613631>
Reviewed by Antti Koivisto.
Add assertions to make sure pages in the PageCache are not loading.
These will hopefully help track down why PacheCache entries sometimes
have pending subresource loads when being destroyed.
* history/CachedFrame.cpp:
(WebCore::CachedFrame::CachedFrame):
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::stopLoadingSubresources):
(WebCore::DocumentLoader::addSubresourceLoader):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (184887 => 184888)
--- trunk/Source/WebCore/ChangeLog 2015-05-26 23:11:13 UTC (rev 184887)
+++ trunk/Source/WebCore/ChangeLog 2015-05-27 00:05:52 UTC (rev 184888)
@@ -1,3 +1,21 @@
+2015-05-26 Chris Dumez <[email protected]>
+
+ Add assertions to make sure pages in the PageCache are not loading
+ https://bugs.webkit.org/show_bug.cgi?id=145397
+ <rdar://problem/20613631>
+
+ Reviewed by Antti Koivisto.
+
+ Add assertions to make sure pages in the PageCache are not loading.
+ These will hopefully help track down why PacheCache entries sometimes
+ have pending subresource loads when being destroyed.
+
+ * history/CachedFrame.cpp:
+ (WebCore::CachedFrame::CachedFrame):
+ * loader/DocumentLoader.cpp:
+ (WebCore::DocumentLoader::stopLoadingSubresources):
+ (WebCore::DocumentLoader::addSubresourceLoader):
+
2015-05-26 Commit Queue <[email protected]>
Unreviewed, rolling out r184872.
Modified: trunk/Source/WebCore/history/CachedFrame.cpp (184887 => 184888)
--- trunk/Source/WebCore/history/CachedFrame.cpp 2015-05-26 23:11:13 UTC (rev 184887)
+++ trunk/Source/WebCore/history/CachedFrame.cpp 2015-05-27 00:05:52 UTC (rev 184888)
@@ -207,6 +207,8 @@
}
}
#endif
+
+ ASSERT_WITH_SECURITY_IMPLICATION(!m_documentLoader->isLoading());
}
void CachedFrame::open()
Modified: trunk/Source/WebCore/loader/DocumentLoader.cpp (184887 => 184888)
--- trunk/Source/WebCore/loader/DocumentLoader.cpp 2015-05-26 23:11:13 UTC (rev 184887)
+++ trunk/Source/WebCore/loader/DocumentLoader.cpp 2015-05-27 00:05:52 UTC (rev 184888)
@@ -1297,6 +1297,7 @@
void DocumentLoader::stopLoadingSubresources()
{
cancelAll(m_subresourceLoaders);
+ ASSERT(m_subresourceLoaders.isEmpty());
}
void DocumentLoader::addSubresourceLoader(ResourceLoader* loader)
@@ -1312,6 +1313,9 @@
ASSERT(!m_subresourceLoaders.contains(loader->identifier()));
ASSERT(!mainResourceLoader() || mainResourceLoader() != loader);
+ // A page in the PageCache should not be able to start loads.
+ ASSERT_WITH_SECURITY_IMPLICATION(!document() || !document()->inPageCache());
+
m_subresourceLoaders.add(loader->identifier(), loader);
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes