| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 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 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 FinishReaderType removeReader(FileReader* reader) { | 143 FinishReaderType removeReader(FileReader* reader) { |
| 144 FileReaderHashSet::const_iterator hashIter = m_runningReaders.find(reader); | 144 FileReaderHashSet::const_iterator hashIter = m_runningReaders.find(reader); |
| 145 if (hashIter != m_runningReaders.end()) { | 145 if (hashIter != m_runningReaders.end()) { |
| 146 m_runningReaders.erase(hashIter); | 146 m_runningReaders.erase(hashIter); |
| 147 return RunPendingReaders; | 147 return RunPendingReaders; |
| 148 } | 148 } |
| 149 FileReaderDeque::const_iterator dequeEnd = m_pendingReaders.end(); | 149 FileReaderDeque::const_iterator dequeEnd = m_pendingReaders.end(); |
| 150 for (FileReaderDeque::const_iterator it = m_pendingReaders.begin(); | 150 for (FileReaderDeque::const_iterator it = m_pendingReaders.begin(); |
| 151 it != dequeEnd; ++it) { | 151 it != dequeEnd; ++it) { |
| 152 if (*it == reader) { | 152 if (*it == reader) { |
| 153 m_pendingReaders.remove(it); | 153 m_pendingReaders.erase(it); |
| 154 break; | 154 break; |
| 155 } | 155 } |
| 156 } | 156 } |
| 157 return DoNotRunPendingReaders; | 157 return DoNotRunPendingReaders; |
| 158 } | 158 } |
| 159 | 159 |
| 160 void finishReader(FileReader* reader, FinishReaderType nextStep) { | 160 void finishReader(FileReader* reader, FinishReaderType nextStep) { |
| 161 if (nextStep == RunPendingReaders) | 161 if (nextStep == RunPendingReaders) |
| 162 executeReaders(); | 162 executeReaders(); |
| 163 } | 163 } |
| (...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 466 ProgressEvent::create(type, false, m_loader->bytesLoaded(), 0)); | 466 ProgressEvent::create(type, false, m_loader->bytesLoaded(), 0)); |
| 467 } | 467 } |
| 468 | 468 |
| 469 DEFINE_TRACE(FileReader) { | 469 DEFINE_TRACE(FileReader) { |
| 470 visitor->trace(m_error); | 470 visitor->trace(m_error); |
| 471 EventTargetWithInlineData::trace(visitor); | 471 EventTargetWithInlineData::trace(visitor); |
| 472 ContextLifecycleObserver::trace(visitor); | 472 ContextLifecycleObserver::trace(visitor); |
| 473 } | 473 } |
| 474 | 474 |
| 475 } // namespace blink | 475 } // namespace blink |
| OLD | NEW |