Index: third_party/WebKit/Source/bindings/core/v8/SerializedScriptValue.cpp |
diff --git a/third_party/WebKit/Source/bindings/core/v8/SerializedScriptValue.cpp b/third_party/WebKit/Source/bindings/core/v8/SerializedScriptValue.cpp |
index bc1e32f4a090fdb4f9d5092eab00f52cbc79609f..c96bcdf24c75f5bb4b73cc04afbbf7b2f2c21992 100644 |
--- a/third_party/WebKit/Source/bindings/core/v8/SerializedScriptValue.cpp |
+++ b/third_party/WebKit/Source/bindings/core/v8/SerializedScriptValue.cpp |
@@ -136,8 +136,8 @@ PassOwnPtr<SerializedScriptValue::ArrayBufferContentsArray> SerializedScriptValu |
RefPtr<DOMArrayBufferBase> toTransfer = arrayBuffers[i]; |
if (!isNeuterable) |
- toTransfer = DOMArrayBuffer::create(arrayBuffers[i]->buffer()); |
- bool result = toTransfer->transfer(contents->at(i)); |
+ toTransfer = DOMArrayBuffer::createOrNull(arrayBuffers[i]->buffer()); |
+ bool result = toTransfer ? toTransfer->transfer(contents->at(i)) : false; |
if (!result) { |
exceptionState.throwDOMException(DataCloneError, "ArrayBuffer at index " + String::number(i) + " could not be transferred."); |
return nullptr; |