Index: third_party/WebKit/Source/bindings/core/v8/V8Initializer.cpp |
diff --git a/third_party/WebKit/Source/bindings/core/v8/V8Initializer.cpp b/third_party/WebKit/Source/bindings/core/v8/V8Initializer.cpp |
index cb060a3914b2c4af8aacaff84e39b6b6390de629..557823eb2a231adefc52612371b58fce71e13358 100644 |
--- a/third_party/WebKit/Source/bindings/core/v8/V8Initializer.cpp |
+++ b/third_party/WebKit/Source/bindings/core/v8/V8Initializer.cpp |
@@ -352,14 +352,20 @@ class ArrayBufferAllocator : public v8::ArrayBuffer::Allocator { |
void* Allocate(size_t size) override |
{ |
void* data; |
- WTF::ArrayBufferContents::allocateMemory(size, WTF::ArrayBufferContents::ZeroInitialize, data); |
+ // TODO(junov): crbug.com/536816 |
+ // Use AllocateMemoryOrNull. Requires verification that all |
+ // call sites can handle allocation failures (nullptr) gracefully. |
+ WTF::ArrayBufferContents::deprecatedAllocateMemoryOrCrash(size, WTF::ArrayBufferContents::ZeroInitialize, data); |
return data; |
} |
void* AllocateUninitialized(size_t size) override |
{ |
void* data; |
- WTF::ArrayBufferContents::allocateMemory(size, WTF::ArrayBufferContents::DontInitialize, data); |
+ // TODO(junov): crbug.com/536816 |
+ // Use AllocateMemoryOrNull. Requires verification that all |
+ // call sites can handle allocation failures (nullptr) gracefully. |
+ WTF::ArrayBufferContents::deprecatedAllocateMemoryOrCrash(size, WTF::ArrayBufferContents::DontInitialize, data); |
return data; |
} |