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

Unified Diff: third_party/WebKit/Source/core/dom/DOMArrayBuffer.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/dom/DOMArrayBuffer.cpp
diff --git a/third_party/WebKit/Source/core/dom/DOMArrayBuffer.cpp b/third_party/WebKit/Source/core/dom/DOMArrayBuffer.cpp
index 67e9324cc957ba86ef187cbbfb8906c97b3ca656..9a5aabfde8c68288b480d7859d8dfb52fcd4d657 100644
--- a/third_party/WebKit/Source/core/dom/DOMArrayBuffer.cpp
+++ b/third_party/WebKit/Source/core/dom/DOMArrayBuffer.cpp
@@ -5,9 +5,20 @@
#include "core/dom/DOMArrayBuffer.h"
#include "bindings/core/v8/DOMDataStore.h"
+#include "wtf/RefPtr.h"
namespace blink {
+DOMArrayBuffer* DOMArrayBuffer::createUninitializedOrNull(
+ unsigned numElements,
+ unsigned elementByteSize) {
+ RefPtr<ArrayBuffer> buffer =
+ WTF::ArrayBuffer::createUninitializedOrNull(numElements, elementByteSize);
+ if (!buffer)
+ return nullptr;
+ return create(std::move(buffer));
+}
+
v8::Local<v8::Object> DOMArrayBuffer::wrap(
v8::Isolate* isolate,
v8::Local<v8::Object> creationContext) {
« no previous file with comments | « third_party/WebKit/Source/core/dom/DOMArrayBuffer.h ('k') | third_party/WebKit/Source/core/mojo/MojoHandle.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698