Index: third_party/WebKit/Source/core/testing/Internals.cpp |
diff --git a/third_party/WebKit/Source/core/testing/Internals.cpp b/third_party/WebKit/Source/core/testing/Internals.cpp |
index bb577b81a6a09800f02cd5c42d1c11dc8ad67ea6..da1d48b4b68c77fd75ac2f50deae39f399b88d3a 100644 |
--- a/third_party/WebKit/Source/core/testing/Internals.cpp |
+++ b/third_party/WebKit/Source/core/testing/Internals.cpp |
@@ -2138,15 +2138,15 @@ |
return frame()->eventHandler().cursorUpdatePending(); |
} |
-DOMArrayBuffer* Internals::serializeObject(PassRefPtr<SerializedScriptValue> value) const |
+PassRefPtr<DOMArrayBuffer> Internals::serializeObject(PassRefPtr<SerializedScriptValue> value) const |
{ |
String stringValue = value->toWireString(); |
- DOMArrayBuffer* buffer = DOMArrayBuffer::createUninitialized(stringValue.length(), sizeof(UChar)); |
+ RefPtr<DOMArrayBuffer> buffer = DOMArrayBuffer::createUninitialized(stringValue.length(), sizeof(UChar)); |
stringValue.copyTo(static_cast<UChar*>(buffer->data()), 0, stringValue.length()); |
- return buffer; |
-} |
- |
-PassRefPtr<SerializedScriptValue> Internals::deserializeBuffer(DOMArrayBuffer* buffer) const |
+ return buffer.release(); |
+} |
+ |
+PassRefPtr<SerializedScriptValue> Internals::deserializeBuffer(PassRefPtr<DOMArrayBuffer> buffer) const |
{ |
String value(static_cast<const UChar*>(buffer->data()), buffer->byteLength() / sizeof(UChar)); |
return SerializedScriptValueFactory::instance().createFromWire(value); |