Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(145)

Side by Side Diff: Source/WebCore/loader/cache/CachedResource.cpp

Issue 7350001: Merge 90595 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/782/
Patch Set: Created 9 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 Apple Inc. All rights reserved. 6 Copyright (C) 2004, 2005, 2006, 2007, 2008 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 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 return 0; 256 return 0;
257 return m_cachedMetadata.get(); 257 return m_cachedMetadata.get();
258 } 258 }
259 259
260 void CachedResource::setRequest(CachedResourceRequest* request) 260 void CachedResource::setRequest(CachedResourceRequest* request)
261 { 261 {
262 if (request && !m_request) 262 if (request && !m_request)
263 m_status = Pending; 263 m_status = Pending;
264 m_request = request; 264 m_request = request;
265 265
266 CachedResourceHandle<CachedResource> protect(this);
267
266 // All loads finish with data(allDataReceived = true) or error(), except for 268 // All loads finish with data(allDataReceived = true) or error(), except for
267 // canceled loads, which silently set our request to 0. Be sure to notify ou r 269 // canceled loads, which silently set our request to 0. Be sure to notify ou r
268 // client in that case, so we don't seem to continue loading forever. 270 // client in that case, so we don't seem to continue loading forever.
269 if (!m_request && isLoading()) { 271 if (!m_request && isLoading()) {
270 setLoading(false); 272 setLoading(false);
271 setStatus(Canceled); 273 setStatus(Canceled);
272 checkNotify(); 274 checkNotify();
273 } 275 }
274
275 if (canDelete() && !inCache())
276 delete this;
277 } 276 }
278 277
279 void CachedResource::addClient(CachedResourceClient* client) 278 void CachedResource::addClient(CachedResourceClient* client)
280 { 279 {
281 addClientToSet(client); 280 addClientToSet(client);
282 didAddClient(client); 281 didAddClient(client);
283 } 282 }
284 283
285 void CachedResource::didAddClient(CachedResourceClient* c) 284 void CachedResource::didAddClient(CachedResourceClient* c)
286 { 285 {
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after
623 } 622 }
624 623
625 void CachedResource::setLoadPriority(ResourceLoadPriority loadPriority) 624 void CachedResource::setLoadPriority(ResourceLoadPriority loadPriority)
626 { 625 {
627 if (loadPriority == ResourceLoadPriorityUnresolved) 626 if (loadPriority == ResourceLoadPriorityUnresolved)
628 return; 627 return;
629 m_loadPriority = loadPriority; 628 m_loadPriority = loadPriority;
630 } 629 }
631 630
632 } 631 }
OLDNEW
« no previous file with comments | « LayoutTests/platform/chromium-linux/fast/dom/HTMLLinkElement/link-and-subresource-test-nonexistent-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698