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

Unified Diff: third_party/WebKit/Source/wtf/typed_arrays/ArrayBuffer.h

Issue 2730943002: XMLHttpRequest: return null upon failing responseArrayBuffer allocation. (Closed)
Patch Set: Created 3 years, 10 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/wtf/typed_arrays/ArrayBuffer.h
diff --git a/third_party/WebKit/Source/wtf/typed_arrays/ArrayBuffer.h b/third_party/WebKit/Source/wtf/typed_arrays/ArrayBuffer.h
index d9011cf552868091aa0cbec6f8fb5fee7d2a2680..014ecf9c9cd6ec42eb69eaff2a93d606a5d1775c 100644
--- a/third_party/WebKit/Source/wtf/typed_arrays/ArrayBuffer.h
+++ b/third_party/WebKit/Source/wtf/typed_arrays/ArrayBuffer.h
@@ -52,7 +52,7 @@ class WTF_EXPORT ArrayBuffer : public RefCounted<ArrayBuffer> {
// Only for use by XMLHttpRequest::responseArrayBuffer and
// Internals::serializeObject (through DOMArrayBuffer::createUninitialized).
- static inline PassRefPtr<ArrayBuffer> createUninitialized(
+ static inline PassRefPtr<ArrayBuffer> createUninitializedOrNull(
unsigned numElements,
unsigned elementByteSize);
@@ -154,11 +154,11 @@ PassRefPtr<ArrayBuffer> ArrayBuffer::createOrNull(unsigned numElements,
ArrayBufferContents::ZeroInitialize);
}
-PassRefPtr<ArrayBuffer> ArrayBuffer::createUninitialized(
+PassRefPtr<ArrayBuffer> ArrayBuffer::createUninitializedOrNull(
unsigned numElements,
unsigned elementByteSize) {
- return create(numElements, elementByteSize,
- ArrayBufferContents::DontInitialize);
+ return createOrNull(numElements, elementByteSize,
+ ArrayBufferContents::DontInitialize);
}
PassRefPtr<ArrayBuffer> ArrayBuffer::create(

Powered by Google App Engine
This is Rietveld 408576698