Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(239)

Unified Diff: third_party/WebKit/Source/core/fileapi/FileReaderLoader.cpp

Issue 1414553002: Fix out-of-memory crashes related to ArrayBuffer allocation Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase+more tweaks Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/fileapi/FileReaderLoader.cpp
diff --git a/third_party/WebKit/Source/core/fileapi/FileReaderLoader.cpp b/third_party/WebKit/Source/core/fileapi/FileReaderLoader.cpp
index c94cacd8d597499d2f42c602f25111d4347c3f8d..d48481d7d87613d5358fb59e118f6bc798b0fd99 100644
--- a/third_party/WebKit/Source/core/fileapi/FileReaderLoader.cpp
+++ b/third_party/WebKit/Source/core/fileapi/FileReaderLoader.cpp
@@ -307,7 +307,7 @@ FileError::ErrorCode FileReaderLoader::httpStatusCodeToErrorCode(int httpStatusC
}
}
-PassRefPtr<DOMArrayBuffer> FileReaderLoader::arrayBufferResult() const
+PassRefPtr<DOMArrayBuffer> FileReaderLoader::arrayBufferResultOrNull() const
{
ASSERT(m_readType == ReadAsArrayBuffer);
@@ -315,7 +315,7 @@ PassRefPtr<DOMArrayBuffer> FileReaderLoader::arrayBufferResult() const
if (!m_rawData || m_errorCode)
return nullptr;
- return DOMArrayBuffer::create(m_rawData->toArrayBuffer());
+ return DOMArrayBuffer::createOrNull(m_rawData->toArrayBuffer());
}
String FileReaderLoader::stringResult()
« no previous file with comments | « third_party/WebKit/Source/core/fileapi/FileReaderLoader.h ('k') | third_party/WebKit/Source/core/fileapi/FileReaderSync.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698