Remove the calls to CRASH() from ResourceLoader.cpp.
authorjberlin@webkit.org <jberlin@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 14 Apr 2012 00:34:19 +0000 (00:34 +0000)
committerjberlin@webkit.org <jberlin@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 14 Apr 2012 00:34:19 +0000 (00:34 +0000)
https://bugs.webkit.org/show_bug.cgi?id=83962

Reviewed by Alexey Proskuryakov.

They were added in r91316 to aid debugging for the issue fixed in r105556 and r106130.

* 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):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@114188 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/loader/ResourceLoader.cpp

index c924964..905687a 100644 (file)
@@ -1,3 +1,24 @@
+2012-04-13  Jessie Berlin  <jberlin@apple.com>
+
+        Remove the calls to CRASH() from ResourceLoader.cpp.
+        https://bugs.webkit.org/show_bug.cgi?id=83962
+
+        Reviewed by Alexey Proskuryakov.
+
+        They were added in r91316 to aid debugging for the issue fixed in r105556 and r106130.
+
+        * 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):
+
 2012-04-13  Xiaomei Ji  <xji@chromium.org>
 
         REGRESSION(r102190) [chromium] text rendering (font and font size) in some Arabic/Persian page is wrong
index d8fe7da..d26f23b 100644 (file)
@@ -216,10 +216,6 @@ void ResourceLoader::clearResourceData()
 
 void ResourceLoader::willSendRequest(ResourceRequest& request, const ResourceResponse& redirectResponse)
 {
-    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);
@@ -242,18 +238,10 @@ void ResourceLoader::willSendRequest(ResourceRequest& request, const ResourceRes
 
 void ResourceLoader::didSendData(unsigned long long, unsigned long long)
 {
-    if (!fastMallocSize(documentLoader()->applicationCacheHost()))
-        CRASH();
-    if (!fastMallocSize(documentLoader()->frame()))
-        CRASH();
 }
 
 void ResourceLoader::didReceiveResponse(const ResourceResponse& r)
 {
-    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
@@ -271,10 +259,6 @@ void ResourceLoader::didReceiveResponse(const ResourceResponse& r)
 
 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
@@ -445,19 +429,11 @@ void ResourceLoader::didReceiveData(ResourceHandle*, const char* data, int lengt
 
 void ResourceLoader::didFinishLoading(ResourceHandle*, double finishTime)
 {
-    if (!fastMallocSize(documentLoader()->applicationCacheHost()))
-        CRASH();
-    if (!fastMallocSize(documentLoader()->frame()))
-        CRASH();
     didFinishLoading(finishTime);
 }
 
 void ResourceLoader::didFail(ResourceHandle*, const ResourceError& error)
 {
-    if (!fastMallocSize(documentLoader()->applicationCacheHost()))
-        CRASH();
-    if (!fastMallocSize(documentLoader()->frame()))
-        CRASH();
     if (documentLoader()->applicationCacheHost()->maybeLoadFallbackForError(this, error))
         return;
     didFail(error);
@@ -465,29 +441,16 @@ void ResourceLoader::didFail(ResourceHandle*, const ResourceError& error)
 
 void ResourceLoader::wasBlocked(ResourceHandle*)
 {
-    if (!fastMallocSize(documentLoader()->applicationCacheHost()))
-        CRASH();
-    if (!fastMallocSize(documentLoader()->frame()))
-        CRASH();
     didFail(blockedError());
 }
 
 void ResourceLoader::cannotShowURL(ResourceHandle*)
 {
-    if (!fastMallocSize(documentLoader()->applicationCacheHost()))
-        CRASH();
-    if (!fastMallocSize(documentLoader()->frame()))
-        CRASH();
     didFail(cannotShowURLError());
 }
 
 bool ResourceLoader::shouldUseCredentialStorage()
 {
-    if (!fastMallocSize(documentLoader()->applicationCacheHost()))
-        CRASH();
-    if (!fastMallocSize(documentLoader()->frame()))
-        CRASH();
-
     if (m_options.allowCredentials == DoNotAllowStoredCredentials)
         return false;
     
@@ -541,10 +504,6 @@ void ResourceLoader::receivedCancellation(const AuthenticationChallenge&)
 
 void ResourceLoader::willCacheResponse(ResourceHandle*, CacheStoragePolicy& policy)
 {
-    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.