Title: [91316] trunk/Source/WebCore
- Revision
- 91316
- Author
- [email protected]
- Date
- 2011-07-19 15:57:33 -0700 (Tue, 19 Jul 2011)
Log Message
Work towards determining the cause of frequent crashes due to null frame below
ApplicationCacheHost::scheduleLoadFallbackResourceFromApplicationCache.
https://bugs.webkit.org/show_bug.cgi?id=62764
Reviewed by Alexey Proskuryakov.
Make these unexpected cases crash in the WebKit nightlies so we can gather more
information and potentially find a repro case.
* loader/ResourceLoader.cpp:
(WebCore::ResourceLoader::willSendRequest):
(WebCore::ResourceLoader::didSendData):
(WebCore::ResourceLoader::didReceiveResponse):
(WebCore::ResourceLoader::didReceiveData):
(WebCore::ResourceLoader::didFinishLoading):
(WebCore::ResourceLoader::didFail):
(WebCore::ResourceLoader::wasBlocked):
(WebCore::ResourceLoader::cannotShowURL):
(WebCore::ResourceLoader::shouldUseCredentialStorage):
(WebCore::ResourceLoader::willCacheResponse):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (91315 => 91316)
--- trunk/Source/WebCore/ChangeLog 2011-07-19 22:56:06 UTC (rev 91315)
+++ trunk/Source/WebCore/ChangeLog 2011-07-19 22:57:33 UTC (rev 91316)
@@ -1,3 +1,26 @@
+2011-07-19 Jessie Berlin <[email protected]>
+
+ Work towards determining the cause of frequent crashes due to null frame below
+ ApplicationCacheHost::scheduleLoadFallbackResourceFromApplicationCache.
+ https://bugs.webkit.org/show_bug.cgi?id=62764
+
+ Reviewed by Alexey Proskuryakov.
+
+ Make these unexpected cases crash in the WebKit nightlies so we can gather more
+ information and potentially find a repro case.
+
+ * loader/ResourceLoader.cpp:
+ (WebCore::ResourceLoader::willSendRequest):
+ (WebCore::ResourceLoader::didSendData):
+ (WebCore::ResourceLoader::didReceiveResponse):
+ (WebCore::ResourceLoader::didReceiveData):
+ (WebCore::ResourceLoader::didFinishLoading):
+ (WebCore::ResourceLoader::didFail):
+ (WebCore::ResourceLoader::wasBlocked):
+ (WebCore::ResourceLoader::cannotShowURL):
+ (WebCore::ResourceLoader::shouldUseCredentialStorage):
+ (WebCore::ResourceLoader::willCacheResponse):
+
2011-07-19 Dan Bernstein <[email protected]>
Nothing printed when specifying a very large maximum layout width
Modified: trunk/Source/WebCore/loader/ResourceLoader.cpp (91315 => 91316)
--- trunk/Source/WebCore/loader/ResourceLoader.cpp 2011-07-19 22:56:06 UTC (rev 91315)
+++ trunk/Source/WebCore/loader/ResourceLoader.cpp 2011-07-19 22:57:33 UTC (rev 91316)
@@ -224,7 +224,10 @@
void ResourceLoader::willSendRequest(ResourceRequest& request, const ResourceResponse& redirectResponse)
{
- ASSERT(documentLoader()->frame());
+ if (!fastMallocSize(documentLoader()->applicationCacheHost()))
+ CRASH();
+ if (!fastMallocSize(documentLoader()->frame()))
+ CRASH();
// Protect this in this delegate method since the additional processing can do
// anything including possibly derefing this; one example of this is Radar 3266216.
RefPtr<ResourceLoader> protector(this);
@@ -247,12 +250,18 @@
void ResourceLoader::didSendData(unsigned long long, unsigned long long)
{
- ASSERT(documentLoader()->frame());
+ if (!fastMallocSize(documentLoader()->applicationCacheHost()))
+ CRASH();
+ if (!fastMallocSize(documentLoader()->frame()))
+ CRASH();
}
void ResourceLoader::didReceiveResponse(const ResourceResponse& r)
{
- ASSERT(documentLoader()->frame());
+ if (!fastMallocSize(documentLoader()->applicationCacheHost()))
+ CRASH();
+ if (!fastMallocSize(documentLoader()->frame()))
+ CRASH();
ASSERT(!m_reachedTerminalState);
// Protect this in this delegate method since the additional processing can do
@@ -270,6 +279,10 @@
void ResourceLoader::didReceiveData(const char* data, int length, long long encodedDataLength, bool allAtOnce)
{
+ if (!m_cancelled && !fastMallocSize(documentLoader()->applicationCacheHost()))
+ CRASH();
+ if (!m_cancelled && !fastMallocSize(documentLoader()->frame()))
+ CRASH();
// The following assertions are not quite valid here, since a subclass
// might override didReceiveData in a way that invalidates them. This
// happens with the steps listed in 3266216
@@ -444,13 +457,19 @@
void ResourceLoader::didFinishLoading(ResourceHandle*, double finishTime)
{
- ASSERT(documentLoader()->frame());
+ if (!fastMallocSize(documentLoader()->applicationCacheHost()))
+ CRASH();
+ if (!fastMallocSize(documentLoader()->frame()))
+ CRASH();
didFinishLoading(finishTime);
}
void ResourceLoader::didFail(ResourceHandle*, const ResourceError& error)
{
- ASSERT(documentLoader()->frame());
+ if (!fastMallocSize(documentLoader()->applicationCacheHost()))
+ CRASH();
+ if (!fastMallocSize(documentLoader()->frame()))
+ CRASH();
#if ENABLE(OFFLINE_WEB_APPLICATIONS)
if (documentLoader()->applicationCacheHost()->maybeLoadFallbackForError(this, error))
return;
@@ -460,19 +479,28 @@
void ResourceLoader::wasBlocked(ResourceHandle*)
{
- ASSERT(documentLoader()->frame());
+ if (!fastMallocSize(documentLoader()->applicationCacheHost()))
+ CRASH();
+ if (!fastMallocSize(documentLoader()->frame()))
+ CRASH();
didFail(blockedError());
}
void ResourceLoader::cannotShowURL(ResourceHandle*)
{
- ASSERT(documentLoader()->frame());
+ if (!fastMallocSize(documentLoader()->applicationCacheHost()))
+ CRASH();
+ if (!fastMallocSize(documentLoader()->frame()))
+ CRASH();
didFail(cannotShowURLError());
}
bool ResourceLoader::shouldUseCredentialStorage()
{
- ASSERT(documentLoader()->frame());
+ if (!fastMallocSize(documentLoader()->applicationCacheHost()))
+ CRASH();
+ if (!fastMallocSize(documentLoader()->frame()))
+ CRASH();
RefPtr<ResourceLoader> protector(this);
return frameLoader()->client()->shouldUseCredentialStorage(documentLoader(), identifier());
}
@@ -508,7 +536,10 @@
void ResourceLoader::willCacheResponse(ResourceHandle*, CacheStoragePolicy& policy)
{
- ASSERT(documentLoader()->frame());
+ if (!fastMallocSize(documentLoader()->applicationCacheHost()))
+ CRASH();
+ if (!fastMallocSize(documentLoader()->frame()))
+ CRASH();
// <rdar://problem/7249553> - There are reports of crashes with this method being called
// with a null m_frame->settings(), which can only happen if the frame doesn't have a page.
// Sadly we have no reproducible cases of this.
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes