Index: third_party/WebKit/Source/core/dom/DOMSharedArrayBuffer.h |
diff --git a/third_party/WebKit/Source/core/dom/DOMSharedArrayBuffer.h b/third_party/WebKit/Source/core/dom/DOMSharedArrayBuffer.h |
index 1b6572ed9e67e65a725701918a9075ace007cf9d..75900678626198a4289f02fe5b37d0ab9d9d6640 100644 |
--- a/third_party/WebKit/Source/core/dom/DOMSharedArrayBuffer.h |
+++ b/third_party/WebKit/Source/core/dom/DOMSharedArrayBuffer.h |
@@ -14,20 +14,20 @@ |
class CORE_EXPORT DOMSharedArrayBuffer final : public DOMArrayBufferBase { |
DEFINE_WRAPPERTYPEINFO(); |
public: |
- static DOMSharedArrayBuffer* create(PassRefPtr<WTF::ArrayBuffer> buffer) |
+ static PassRefPtr<DOMSharedArrayBuffer> create(PassRefPtr<WTF::ArrayBuffer> buffer) |
{ |
DCHECK(buffer->isShared()); |
- return new DOMSharedArrayBuffer(buffer); |
+ return adoptRef(new DOMSharedArrayBuffer(buffer)); |
} |
- static DOMSharedArrayBuffer* create(unsigned numElements, unsigned elementByteSize) |
+ static PassRefPtr<DOMSharedArrayBuffer> create(unsigned numElements, unsigned elementByteSize) |
{ |
return create(WTF::ArrayBuffer::createShared(numElements, elementByteSize)); |
} |
- static DOMSharedArrayBuffer* create(const void* source, unsigned byteLength) |
+ static PassRefPtr<DOMSharedArrayBuffer> create(const void* source, unsigned byteLength) |
{ |
return create(WTF::ArrayBuffer::createShared(source, byteLength)); |
} |
- static DOMSharedArrayBuffer* create(WTF::ArrayBufferContents& contents) |
+ static PassRefPtr<DOMSharedArrayBuffer> create(WTF::ArrayBufferContents& contents) |
{ |
DCHECK(contents.isShared()); |
return create(WTF::ArrayBuffer::create(contents)); |