| OLD | NEW |
| 1 /* | 1 /* |
| 2 Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de) | 2 Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de) |
| 3 Copyright (C) 2001 Dirk Mueller (mueller@kde.org) | 3 Copyright (C) 2001 Dirk Mueller (mueller@kde.org) |
| 4 Copyright (C) 2002 Waldo Bastian (bastian@kde.org) | 4 Copyright (C) 2002 Waldo Bastian (bastian@kde.org) |
| 5 Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) | 5 Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) |
| 6 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All
rights reserved. | 6 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All
rights reserved. |
| 7 | 7 |
| 8 This library is free software; you can redistribute it and/or | 8 This library is free software; you can redistribute it and/or |
| 9 modify it under the terms of the GNU Library General Public | 9 modify it under the terms of the GNU Library General Public |
| 10 License as published by the Free Software Foundation; either | 10 License as published by the Free Software Foundation; either |
| (...skipping 457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 468 | 468 |
| 469 CachedMetadata* CachedResource::cachedMetadata(unsigned dataTypeID) const | 469 CachedMetadata* CachedResource::cachedMetadata(unsigned dataTypeID) const |
| 470 { | 470 { |
| 471 if (!m_cachedMetadata || m_cachedMetadata->dataTypeID() != dataTypeID) | 471 if (!m_cachedMetadata || m_cachedMetadata->dataTypeID() != dataTypeID) |
| 472 return 0; | 472 return 0; |
| 473 return m_cachedMetadata.get(); | 473 return m_cachedMetadata.get(); |
| 474 } | 474 } |
| 475 | 475 |
| 476 void CachedResource::stopLoading() | 476 void CachedResource::stopLoading() |
| 477 { | 477 { |
| 478 ASSERT(m_loader); | 478 ASSERT(m_loader); |
| 479 bool isFrameDetaching = m_loader->frameLoader()->isFrameDetaching(); |
| 479 m_loader = 0; | 480 m_loader = 0; |
| 481 // Don't notify clients if the frame is being torn down. |
| 482 if (isFrameDetaching) |
| 483 return; |
| 480 | 484 |
| 481 CachedResourceHandle<CachedResource> protect(this); | 485 CachedResourceHandle<CachedResource> protect(this); |
| 482 | 486 |
| 483 // All loads finish with finish() or error(), except for | 487 // All loads finish with finish() or error(), except for |
| 484 // canceled loads, which silently set our request to 0. Be sure to notify ou
r | 488 // canceled loads, which silently set our request to 0. Be sure to notify ou
r |
| 485 // client in that case, so we don't seem to continue loading forever. | 489 // client in that case, so we don't seem to continue loading forever. |
| 486 if (isLoading()) { | 490 if (isLoading()) { |
| 487 setLoading(false); | 491 setLoading(false); |
| 488 setStatus(LoadError); | 492 setStatus(LoadError); |
| 489 checkNotify(); | 493 checkNotify(); |
| (...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 946 info.addMember(m_proxyResource, "proxyResource"); | 950 info.addMember(m_proxyResource, "proxyResource"); |
| 947 info.addMember(m_handlesToRevalidate, "handlesToRevalidate"); | 951 info.addMember(m_handlesToRevalidate, "handlesToRevalidate"); |
| 948 info.addMember(m_options, "options"); | 952 info.addMember(m_options, "options"); |
| 949 info.addMember(m_decodedDataDeletionTimer, "decodedDataDeletionTimer"); | 953 info.addMember(m_decodedDataDeletionTimer, "decodedDataDeletionTimer"); |
| 950 info.ignoreMember(m_clientsAwaitingCallback); | 954 info.ignoreMember(m_clientsAwaitingCallback); |
| 951 | 955 |
| 952 if (m_purgeableData && !m_purgeableData->wasPurged()) | 956 if (m_purgeableData && !m_purgeableData->wasPurged()) |
| 953 info.addRawBuffer(m_purgeableData.get(), m_purgeableData->size(), "Purge
ableData", "purgeableData"); | 957 info.addRawBuffer(m_purgeableData.get(), m_purgeableData->size(), "Purge
ableData", "purgeableData"); |
| 954 } | 958 } |
| 955 } | 959 } |
| OLD | NEW |