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

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

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
« no previous file with comments | « third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..971526c638e64089e51d955bdba71d3b4292c1ac 100644
--- a/third_party/WebKit/Source/wtf/typed_arrays/ArrayBuffer.h
+++ b/third_party/WebKit/Source/wtf/typed_arrays/ArrayBuffer.h
@@ -50,9 +50,8 @@ class WTF_EXPORT ArrayBuffer : public RefCounted<ArrayBuffer> {
static inline PassRefPtr<ArrayBuffer> createOrNull(unsigned numElements,
unsigned elementByteSize);
- // Only for use by XMLHttpRequest::responseArrayBuffer and
- // Internals::serializeObject (through DOMArrayBuffer::createUninitialized).
- static inline PassRefPtr<ArrayBuffer> createUninitialized(
+ // Only for use by DOMArrayBuffer::createUninitializedOrNull().
+ static inline PassRefPtr<ArrayBuffer> createUninitializedOrNull(
unsigned numElements,
unsigned elementByteSize);
@@ -154,11 +153,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(
« no previous file with comments | « third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698