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) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All
rights reserved. | 5 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All
rights reserved. |
6 Copyright (C) 2009 Torch Mobile Inc. http://www.torchmobile.com/ | 6 Copyright (C) 2009 Torch Mobile Inc. http://www.torchmobile.com/ |
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 1144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1155 return; | 1155 return; |
1156 case Revalidate: | 1156 case Revalidate: |
1157 ++m_revalidateCount; | 1157 ++m_revalidateCount; |
1158 return; | 1158 return; |
1159 case Use: | 1159 case Use: |
1160 ++m_useCount; | 1160 ++m_useCount; |
1161 return; | 1161 return; |
1162 } | 1162 } |
1163 } | 1163 } |
1164 | 1164 |
| 1165 void ResourceFetcher::purgeMemory() |
| 1166 { |
| 1167 if (isFetching()) |
| 1168 stopFetching(); |
| 1169 m_documentResources.clear(); |
| 1170 m_validatedURLs.clear(); |
| 1171 clearPreloads(ClearAllPreloads); |
| 1172 } |
| 1173 |
1165 DEFINE_TRACE(ResourceFetcher) | 1174 DEFINE_TRACE(ResourceFetcher) |
1166 { | 1175 { |
1167 visitor->trace(m_context); | 1176 visitor->trace(m_context); |
1168 visitor->trace(m_archive); | 1177 visitor->trace(m_archive); |
1169 visitor->trace(m_loaders); | 1178 visitor->trace(m_loaders); |
1170 visitor->trace(m_nonBlockingLoaders); | 1179 visitor->trace(m_nonBlockingLoaders); |
1171 #if ENABLE(OILPAN) | 1180 #if ENABLE(OILPAN) |
1172 visitor->trace(m_documentResources); | 1181 visitor->trace(m_documentResources); |
1173 visitor->trace(m_preloads); | 1182 visitor->trace(m_preloads); |
1174 visitor->trace(m_resourceTimingInfoMap); | 1183 visitor->trace(m_resourceTimingInfoMap); |
1175 #endif | 1184 #endif |
1176 } | 1185 } |
1177 | 1186 |
1178 } // namespace blink | 1187 } // namespace blink |
OLD | NEW |