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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 : m_resourceRequest(request) | 99 : m_resourceRequest(request) |
100 , m_responseTimestamp(currentTime()) | 100 , m_responseTimestamp(currentTime()) |
101 , m_cancelTimer(this, &Resource::cancelTimerFired) | 101 , m_cancelTimer(this, &Resource::cancelTimerFired) |
102 , m_loadFinishTime(0) | 102 , m_loadFinishTime(0) |
103 , m_identifier(0) | 103 , m_identifier(0) |
104 , m_encodedSize(0) | 104 , m_encodedSize(0) |
105 , m_decodedSize(0) | 105 , m_decodedSize(0) |
106 , m_handleCount(0) | 106 , m_handleCount(0) |
107 , m_preloadCount(0) | 107 , m_preloadCount(0) |
108 , m_protectorCount(0) | 108 , m_protectorCount(0) |
| 109 , m_cacheIdentifier(MemoryCache::defaultCacheIdentifier()) |
109 , m_preloadResult(PreloadNotReferenced) | 110 , m_preloadResult(PreloadNotReferenced) |
110 , m_requestedFromNetworkingLayer(false) | 111 , m_requestedFromNetworkingLayer(false) |
111 , m_loading(false) | 112 , m_loading(false) |
112 , m_switchingClientsToRevalidatedResource(false) | 113 , m_switchingClientsToRevalidatedResource(false) |
113 , m_type(type) | 114 , m_type(type) |
114 , m_status(Pending) | 115 , m_status(Pending) |
115 , m_wasPurged(false) | 116 , m_wasPurged(false) |
116 , m_needsSynchronousCacheHit(false) | 117 , m_needsSynchronousCacheHit(false) |
117 #ifdef ENABLE_RESOURCE_IS_DELETED_CHECK | 118 #ifdef ENABLE_RESOURCE_IS_DELETED_CHECK |
118 , m_deleted(false) | 119 , m_deleted(false) |
(...skipping 16 matching lines...) Expand all Loading... |
135 m_fragmentIdentifierForRequest = m_resourceRequest.url().fragmentIdentifier(
); | 136 m_fragmentIdentifierForRequest = m_resourceRequest.url().fragmentIdentifier(
); |
136 m_resourceRequest.setURL(urlForCache); | 137 m_resourceRequest.setURL(urlForCache); |
137 } | 138 } |
138 | 139 |
139 Resource::~Resource() | 140 Resource::~Resource() |
140 { | 141 { |
141 ASSERT(!m_resourceToRevalidate); // Should be true because canDelete() check
s this. | 142 ASSERT(!m_resourceToRevalidate); // Should be true because canDelete() check
s this. |
142 ASSERT(canDelete()); | 143 ASSERT(canDelete()); |
143 RELEASE_ASSERT(!memoryCache()->contains(this)); | 144 RELEASE_ASSERT(!memoryCache()->contains(this)); |
144 RELEASE_ASSERT(!ResourceCallback::callbackHandler()->isScheduled(this)); | 145 RELEASE_ASSERT(!ResourceCallback::callbackHandler()->isScheduled(this)); |
145 ASSERT(url().isNull() || memoryCache()->resourceForURL(KURL(ParsedURLString,
url())) != this); | |
146 assertAlive(); | 146 assertAlive(); |
147 | 147 |
148 #ifdef ENABLE_RESOURCE_IS_DELETED_CHECK | 148 #ifdef ENABLE_RESOURCE_IS_DELETED_CHECK |
149 m_deleted = true; | 149 m_deleted = true; |
150 #endif | 150 #endif |
151 #ifndef NDEBUG | 151 #ifndef NDEBUG |
152 cachedResourceLeakCounter.decrement(); | 152 cachedResourceLeakCounter.decrement(); |
153 #endif | 153 #endif |
154 --s_instanceCount; | 154 --s_instanceCount; |
155 } | 155 } |
(...skipping 850 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1006 return "ImportResource"; | 1006 return "ImportResource"; |
1007 case Resource::Media: | 1007 case Resource::Media: |
1008 return "Media"; | 1008 return "Media"; |
1009 } | 1009 } |
1010 ASSERT_NOT_REACHED(); | 1010 ASSERT_NOT_REACHED(); |
1011 return "Unknown"; | 1011 return "Unknown"; |
1012 } | 1012 } |
1013 #endif // !LOG_DISABLED | 1013 #endif // !LOG_DISABLED |
1014 | 1014 |
1015 } | 1015 } |
OLD | NEW |