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 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
390 | 390 |
391 void Resource::error(const ResourceError& error) | 391 void Resource::error(const ResourceError& error) |
392 { | 392 { |
393 ASSERT(!error.isNull()); | 393 ASSERT(!error.isNull()); |
394 m_error = error; | 394 m_error = error; |
395 m_isRevalidating = false; | 395 m_isRevalidating = false; |
396 | 396 |
397 if (m_error.isCancellation() || !isPreloaded()) | 397 if (m_error.isCancellation() || !isPreloaded()) |
398 memoryCache()->remove(this); | 398 memoryCache()->remove(this); |
399 | 399 |
400 setStatus(LoadError); | 400 if (!errorOccurred()) |
| 401 setStatus(LoadError); |
401 ASSERT(errorOccurred()); | 402 ASSERT(errorOccurred()); |
402 m_data.clear(); | 403 m_data.clear(); |
403 m_loader = nullptr; | 404 m_loader = nullptr; |
404 checkNotify(); | 405 checkNotify(); |
405 markClientsAndObserversFinished(); | 406 markClientsAndObserversFinished(); |
406 } | 407 } |
407 | 408 |
408 void Resource::finish(double loadFinishTime) | 409 void Resource::finish(double loadFinishTime) |
409 { | 410 { |
410 DCHECK(!m_isRevalidating); | 411 DCHECK(!m_isRevalidating); |
(...skipping 689 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1100 case Resource::TextTrack: | 1101 case Resource::TextTrack: |
1101 case Resource::Media: | 1102 case Resource::Media: |
1102 case Resource::Manifest: | 1103 case Resource::Manifest: |
1103 return false; | 1104 return false; |
1104 } | 1105 } |
1105 ASSERT_NOT_REACHED(); | 1106 ASSERT_NOT_REACHED(); |
1106 return false; | 1107 return false; |
1107 } | 1108 } |
1108 | 1109 |
1109 } // namespace blink | 1110 } // namespace blink |
OLD | NEW |