| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 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 are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 | 42 |
| 43 void ResourceLoaderSet::trace(Visitor* visitor) | 43 void ResourceLoaderSet::trace(Visitor* visitor) |
| 44 { | 44 { |
| 45 #if ENABLE(OILPAN) | 45 #if ENABLE(OILPAN) |
| 46 visitor->trace(m_set); | 46 visitor->trace(m_set); |
| 47 #endif | 47 #endif |
| 48 } | 48 } |
| 49 | 49 |
| 50 void ResourceLoaderSet::cancelAll() | 50 void ResourceLoaderSet::cancelAll() |
| 51 { | 51 { |
| 52 WillBeHeapVector<RefPtrWillBeMember<ResourceLoader> > loadersCopy; | 52 WillBeHeapVector<RefPtrWillBeMember<ResourceLoader>> loadersCopy; |
| 53 copyToVector(m_set, loadersCopy); | 53 copyToVector(m_set, loadersCopy); |
| 54 size_t size = loadersCopy.size(); | 54 for (const auto& loader : loadersCopy) |
| 55 for (size_t i = 0; i < size; ++i) | 55 loader->cancel(); |
| 56 loadersCopy[i]->cancel(); | |
| 57 } | 56 } |
| 58 | 57 |
| 59 void ResourceLoaderSet::setAllDefersLoading(bool defers) | 58 void ResourceLoaderSet::setAllDefersLoading(bool defers) |
| 60 { | 59 { |
| 61 WillBeHeapVector<RefPtrWillBeMember<ResourceLoader> > loadersCopy; | 60 WillBeHeapVector<RefPtrWillBeMember<ResourceLoader>> loadersCopy; |
| 62 copyToVector(m_set, loadersCopy); | 61 copyToVector(m_set, loadersCopy); |
| 63 size_t size = loadersCopy.size(); | 62 for (const auto& loader : loadersCopy) |
| 64 for (size_t i = 0; i < size; ++i) | 63 loader->setDefersLoading(defers); |
| 65 loadersCopy[i]->setDefersLoading(defers); | |
| 66 } | 64 } |
| 67 | 65 |
| 68 } | 66 } |
| OLD | NEW |