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

Unified Diff: third_party/WebKit/Source/core/mojo/MojoHandle.cpp

Issue 2730943002: XMLHttpRequest: return null upon failing responseArrayBuffer allocation. (Closed)
Patch Set: mirror updated spec, and return |null| for failed allocs Created 3 years, 9 months 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/mojo/MojoHandle.cpp
diff --git a/third_party/WebKit/Source/core/mojo/MojoHandle.cpp b/third_party/WebKit/Source/core/mojo/MojoHandle.cpp
index d2441055265f982ca4f212811d946c9ef5815aff..b48b61fe850d08039d9324fd29dbecb7cacdcead 100644
--- a/third_party/WebKit/Source/core/mojo/MojoHandle.cpp
+++ b/third_party/WebKit/Source/core/mojo/MojoHandle.cpp
@@ -79,7 +79,9 @@ void MojoHandle::readMessage(const MojoReadMessageFlags& flagsDict,
return;
}
- DOMArrayBuffer* buffer = DOMArrayBuffer::createUninitialized(numBytes, 1);
+ DOMArrayBuffer* buffer =
+ DOMArrayBuffer::createUninitializedOrNull(numBytes, 1);
+ CHECK(buffer);
Vector<::MojoHandle, kHandleVectorInlineCapacity> rawHandles(numHandles);
result = MojoReadMessage(m_handle->value(), buffer->data(), &numBytes,
rawHandles.data(), &numHandles, flags);
« no previous file with comments | « third_party/WebKit/Source/core/dom/DOMArrayBuffer.cpp ('k') | third_party/WebKit/Source/core/testing/Internals.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698