Index: Source/core/loader/cache/CachedResource.cpp |
diff --git a/Source/core/loader/cache/CachedResource.cpp b/Source/core/loader/cache/CachedResource.cpp |
index 7b7df611652ba66a90322af6cc90eb72c6a60db3..b7d60fdd952d06994887120614e1937826497f87 100644 |
--- a/Source/core/loader/cache/CachedResource.cpp |
+++ b/Source/core/loader/cache/CachedResource.cpp |
@@ -475,8 +475,12 @@ CachedMetadata* CachedResource::cachedMetadata(unsigned dataTypeID) const |
void CachedResource::stopLoading() |
{ |
- ASSERT(m_loader); |
+ ASSERT(m_loader); |
+ bool isFrameDetaching = m_loader->frameLoader()->isFrameDetaching(); |
m_loader = 0; |
+ // Don't notify clients if the frame is being torn down. |
+ if (isFrameDetaching) |
+ return; |
CachedResourceHandle<CachedResource> protect(this); |