| Index: Source/core/fileapi/FileReader.cpp
|
| diff --git a/Source/core/fileapi/FileReader.cpp b/Source/core/fileapi/FileReader.cpp
|
| index 36361c26914f2c8b0ec7203419fd548a6c00028d..218e28e8a1e5bdb822a3bc4e468269256d8ab944 100644
|
| --- a/Source/core/fileapi/FileReader.cpp
|
| +++ b/Source/core/fileapi/FileReader.cpp
|
| @@ -255,11 +255,7 @@ bool FileReader::hasPendingActivity() const
|
|
|
| void FileReader::readAsArrayBuffer(Blob* blob, ExceptionState& exceptionState)
|
| {
|
| - if (!blob) {
|
| - exceptionState.throwTypeError("The argument is not a Blob.");
|
| - return;
|
| - }
|
| -
|
| + ASSERT(blob);
|
| WTF_LOG(FileAPI, "FileReader: reading as array buffer: %s %s\n", utf8BlobUUID(blob).data(), utf8FilePath(blob).data());
|
|
|
| readInternal(blob, FileReaderLoader::ReadAsArrayBuffer, exceptionState);
|
| @@ -267,11 +263,7 @@ void FileReader::readAsArrayBuffer(Blob* blob, ExceptionState& exceptionState)
|
|
|
| void FileReader::readAsBinaryString(Blob* blob, ExceptionState& exceptionState)
|
| {
|
| - if (!blob) {
|
| - exceptionState.throwTypeError("The argument is not a Blob.");
|
| - return;
|
| - }
|
| -
|
| + ASSERT(blob);
|
| WTF_LOG(FileAPI, "FileReader: reading as binary: %s %s\n", utf8BlobUUID(blob).data(), utf8FilePath(blob).data());
|
|
|
| readInternal(blob, FileReaderLoader::ReadAsBinaryString, exceptionState);
|
| @@ -279,11 +271,7 @@ void FileReader::readAsBinaryString(Blob* blob, ExceptionState& exceptionState)
|
|
|
| void FileReader::readAsText(Blob* blob, const String& encoding, ExceptionState& exceptionState)
|
| {
|
| - if (!blob) {
|
| - exceptionState.throwTypeError("The argument is not a Blob.");
|
| - return;
|
| - }
|
| -
|
| + ASSERT(blob);
|
| WTF_LOG(FileAPI, "FileReader: reading as text: %s %s\n", utf8BlobUUID(blob).data(), utf8FilePath(blob).data());
|
|
|
| m_encoding = encoding;
|
| @@ -297,11 +285,7 @@ void FileReader::readAsText(Blob* blob, ExceptionState& exceptionState)
|
|
|
| void FileReader::readAsDataURL(Blob* blob, ExceptionState& exceptionState)
|
| {
|
| - if (!blob) {
|
| - exceptionState.throwTypeError("The argument is not a Blob.");
|
| - return;
|
| - }
|
| -
|
| + ASSERT(blob);
|
| WTF_LOG(FileAPI, "FileReader: reading as data URL: %s %s\n", utf8BlobUUID(blob).data(), utf8FilePath(blob).data());
|
|
|
| readInternal(blob, FileReaderLoader::ReadAsDataURL, exceptionState);
|
|
|