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

Unified Diff: third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.cpp

Issue 2530323002: Replace boolean return value SharedBuffer::getAsBytes with DCHECK (Closed)
Patch Set: done Created 4 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/SharedBuffer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.cpp
diff --git a/third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.cpp b/third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.cpp
index 87c5d6516dd2acdf6ad322a64c0ed535a6193948..3c08d761d44e1cbfb60dcac6c0f1b1d7e92ea0d8 100644
--- a/third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.cpp
+++ b/third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.cpp
@@ -386,13 +386,8 @@ DOMArrayBuffer* XMLHttpRequest::responseArrayBuffer() {
if (m_binaryResponseBuilder && m_binaryResponseBuilder->size()) {
DOMArrayBuffer* buffer = DOMArrayBuffer::createUninitialized(
m_binaryResponseBuilder->size(), 1);
- if (!m_binaryResponseBuilder->getAsBytes(
- buffer->data(), static_cast<size_t>(buffer->byteLength()))) {
- // m_binaryResponseBuilder failed to allocate an ArrayBuffer.
- // We need to crash the renderer since there's no way defined in
- // the spec to tell this to the user.
- CRASH();
- }
+ m_binaryResponseBuilder->getAsBytes(
+ buffer->data(), static_cast<size_t>(buffer->byteLength()));
m_responseArrayBuffer = buffer;
m_binaryResponseBuilder.clear();
} else {
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/SharedBuffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698