OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Google Inc. All Rights Reserved. | 2 * Copyright (C) 2011 Google Inc. All Rights Reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 CachedResourceClientWalker<CachedRawResourceClient> w(m_clients); | 121 CachedResourceClientWalker<CachedRawResourceClient> w(m_clients); |
122 while (CachedRawResourceClient* c = w.next()) | 122 while (CachedRawResourceClient* c = w.next()) |
123 c->redirectReceived(this, request, response); | 123 c->redirectReceived(this, request, response); |
124 m_redirectChain.append(RedirectPair(request, response)); | 124 m_redirectChain.append(RedirectPair(request, response)); |
125 } | 125 } |
126 CachedResource::willSendRequest(request, response); | 126 CachedResource::willSendRequest(request, response); |
127 } | 127 } |
128 | 128 |
129 void CachedRawResource::responseReceived(const ResourceResponse& response) | 129 void CachedRawResource::responseReceived(const ResourceResponse& response) |
130 { | 130 { |
| 131 CachedResourceHandle<CachedRawResource> protect(this); |
131 if (!m_identifier) | 132 if (!m_identifier) |
132 m_identifier = m_loader->identifier(); | 133 m_identifier = m_loader->identifier(); |
133 CachedResource::responseReceived(response); | 134 CachedResource::responseReceived(response); |
134 CachedResourceClientWalker<CachedRawResourceClient> w(m_clients); | 135 CachedResourceClientWalker<CachedRawResourceClient> w(m_clients); |
135 while (CachedRawResourceClient* c = w.next()) | 136 while (CachedRawResourceClient* c = w.next()) |
136 c->responseReceived(this, m_response); | 137 c->responseReceived(this, m_response); |
137 } | 138 } |
138 | 139 |
139 void CachedRawResource::didSendData(unsigned long long bytesSent, unsigned long
long totalBytesToBeSent) | 140 void CachedRawResource::didSendData(unsigned long long bytesSent, unsigned long
long totalBytesToBeSent) |
140 { | 141 { |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
229 } | 230 } |
230 | 231 |
231 void CachedRawResource::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) co
nst | 232 void CachedRawResource::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) co
nst |
232 { | 233 { |
233 MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CachedResou
rceRaw); | 234 MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CachedResou
rceRaw); |
234 CachedResource::reportMemoryUsage(memoryObjectInfo); | 235 CachedResource::reportMemoryUsage(memoryObjectInfo); |
235 } | 236 } |
236 | 237 |
237 | 238 |
238 } // namespace WebCore | 239 } // namespace WebCore |
OLD | NEW |