| 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 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 | 159 |
| 160 void FileReader::stop() | 160 void FileReader::stop() |
| 161 { | 161 { |
| 162 if (hasPendingActivity()) | 162 if (hasPendingActivity()) |
| 163 throttlingController()->finishReader(this, throttlingController()->remov
eReader(this)); | 163 throttlingController()->finishReader(this, throttlingController()->remov
eReader(this)); |
| 164 terminate(); | 164 terminate(); |
| 165 } | 165 } |
| 166 | 166 |
| 167 bool FileReader::hasPendingActivity() const | 167 bool FileReader::hasPendingActivity() const |
| 168 { | 168 { |
| 169 return m_loadingState == LoadingStateLoading || m_loadingState == LoadingSta
tePending; | 169 return m_state == LOADING; |
| 170 } | 170 } |
| 171 | 171 |
| 172 void FileReader::readAsArrayBuffer(Blob* blob, ExceptionState& exceptionState) | 172 void FileReader::readAsArrayBuffer(Blob* blob, ExceptionState& exceptionState) |
| 173 { | 173 { |
| 174 if (!blob) { | 174 if (!blob) { |
| 175 exceptionState.throwTypeError("The argument is not a Blob."); | 175 exceptionState.throwTypeError("The argument is not a Blob."); |
| 176 return; | 176 return; |
| 177 } | 177 } |
| 178 | 178 |
| 179 WTF_LOG(FileAPI, "FileReader: reading as array buffer: %s %s\n", utf8BlobUUI
D(blob).data(), utf8FilePath(blob).data()); | 179 WTF_LOG(FileAPI, "FileReader: reading as array buffer: %s %s\n", utf8BlobUUI
D(blob).data(), utf8FilePath(blob).data()); |
| (...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 407 return m_loader->stringResult(); | 407 return m_loader->stringResult(); |
| 408 } | 408 } |
| 409 | 409 |
| 410 void FileReader::trace(Visitor* visitor) | 410 void FileReader::trace(Visitor* visitor) |
| 411 { | 411 { |
| 412 visitor->trace(m_error); | 412 visitor->trace(m_error); |
| 413 EventTargetWithInlineData::trace(visitor); | 413 EventTargetWithInlineData::trace(visitor); |
| 414 } | 414 } |
| 415 | 415 |
| 416 } // namespace WebCore | 416 } // namespace WebCore |
| OLD | NEW |