Index: third_party/WebKit/Source/core/dom/DOMArrayBuffer.h |
diff --git a/third_party/WebKit/Source/core/dom/DOMArrayBuffer.h b/third_party/WebKit/Source/core/dom/DOMArrayBuffer.h |
index 840cb83bba1a152fa1a333ec2fe4a1b753a8866a..583be56308ff58badf8e21fb6e6b0e8bbcc0d684 100644 |
--- a/third_party/WebKit/Source/core/dom/DOMArrayBuffer.h |
+++ b/third_party/WebKit/Source/core/dom/DOMArrayBuffer.h |
@@ -14,35 +14,35 @@ |
class CORE_EXPORT DOMArrayBuffer final : public DOMArrayBufferBase { |
DEFINE_WRAPPERTYPEINFO(); |
public: |
- static DOMArrayBuffer* create(PassRefPtr<WTF::ArrayBuffer> buffer) |
+ static PassRefPtr<DOMArrayBuffer> create(PassRefPtr<WTF::ArrayBuffer> buffer) |
{ |
- return new DOMArrayBuffer(buffer); |
+ return adoptRef(new DOMArrayBuffer(buffer)); |
} |
- static DOMArrayBuffer* create(unsigned numElements, unsigned elementByteSize) |
+ static PassRefPtr<DOMArrayBuffer> create(unsigned numElements, unsigned elementByteSize) |
{ |
return create(WTF::ArrayBuffer::create(numElements, elementByteSize)); |
} |
- static DOMArrayBuffer* create(const void* source, unsigned byteLength) |
+ static PassRefPtr<DOMArrayBuffer> create(const void* source, unsigned byteLength) |
{ |
return create(WTF::ArrayBuffer::create(source, byteLength)); |
} |
- static DOMArrayBuffer* create(WTF::ArrayBufferContents& contents) |
+ static PassRefPtr<DOMArrayBuffer> create(WTF::ArrayBufferContents& contents) |
{ |
return create(WTF::ArrayBuffer::create(contents)); |
} |
// Only for use by XMLHttpRequest::responseArrayBuffer and |
// Internals::serializeObject. |
- static DOMArrayBuffer* createUninitialized(unsigned numElements, unsigned elementByteSize) |
+ static PassRefPtr<DOMArrayBuffer> createUninitialized(unsigned numElements, unsigned elementByteSize) |
{ |
return create(WTF::ArrayBuffer::createUninitialized(numElements, elementByteSize)); |
} |
- DOMArrayBuffer* slice(int begin, int end) const |
+ PassRefPtr<DOMArrayBuffer> slice(int begin, int end) const |
{ |
return create(buffer()->slice(begin, end)); |
} |
- DOMArrayBuffer* slice(int begin) const |
+ PassRefPtr<DOMArrayBuffer> slice(int begin) const |
{ |
return create(buffer()->slice(begin)); |
} |