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

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

Issue 2748933003: XMLHttpRequest: return null upon failing responseArrayBuffer allocation. (Closed)
Patch Set: 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 0ae42778335411c744034c169d24a21ffa984f91..8aaa112a3ab1f925243635b910b6b0070461a742 100644
--- a/third_party/WebKit/Source/core/mojo/MojoHandle.cpp
+++ b/third_party/WebKit/Source/core/mojo/MojoHandle.cpp
@@ -76,7 +76,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