Index: Source/WebCore/loader/cache/CachedResource.cpp |
=================================================================== |
--- Source/WebCore/loader/cache/CachedResource.cpp (revision 90856) |
+++ Source/WebCore/loader/cache/CachedResource.cpp (working copy) |
@@ -263,6 +263,8 @@ |
m_status = Pending; |
m_request = request; |
+ CachedResourceHandle<CachedResource> protect(this); |
+ |
// All loads finish with data(allDataReceived = true) or error(), except for |
// canceled loads, which silently set our request to 0. Be sure to notify our |
// client in that case, so we don't seem to continue loading forever. |
@@ -271,9 +273,6 @@ |
setStatus(Canceled); |
checkNotify(); |
} |
- |
- if (canDelete() && !inCache()) |
- delete this; |
} |
void CachedResource::addClient(CachedResourceClient* client) |