Index: third_party/WebKit/Source/core/dom/DOMTypedArray.h |
diff --git a/third_party/WebKit/Source/core/dom/DOMTypedArray.h b/third_party/WebKit/Source/core/dom/DOMTypedArray.h |
index e8ea244f2d0bf12225cd317cbcf36dd025915ecb..e93bac1c8c39ff70b0895b0f9ca0ba390a358aa9 100644 |
--- a/third_party/WebKit/Source/core/dom/DOMTypedArray.h |
+++ b/third_party/WebKit/Source/core/dom/DOMTypedArray.h |
@@ -29,30 +29,29 @@ class CORE_TEMPLATE_CLASS_EXPORT DOMTypedArray final : public DOMArrayBufferView |
public: |
typedef typename WTFTypedArray::ValueType ValueType; |
- static PassRefPtr<ThisType> create(PassRefPtr<WTFTypedArray> bufferView) |
+ static ThisType* create(PassRefPtr<WTFTypedArray> bufferView) |
{ |
- return adoptRef(new ThisType(bufferView)); |
+ return new ThisType(bufferView); |
} |
- static PassRefPtr<ThisType> create(unsigned length) |
+ static ThisType* create(unsigned length) |
{ |
return create(WTFTypedArray::create(length)); |
} |
- static PassRefPtr<ThisType> create(const ValueType* array, unsigned length) |
+ static ThisType* create(const ValueType* array, unsigned length) |
{ |
return create(WTFTypedArray::create(array, length)); |
} |
- static PassRefPtr<ThisType> create(PassRefPtr<WTF::ArrayBuffer> buffer, unsigned byteOffset, unsigned length) |
+ static ThisType* create(PassRefPtr<WTF::ArrayBuffer> buffer, unsigned byteOffset, unsigned length) |
{ |
return create(WTFTypedArray::create(buffer, byteOffset, length)); |
} |
- static PassRefPtr<ThisType> create(PassRefPtr<DOMArrayBufferBase> prpBuffer, unsigned byteOffset, unsigned length) |
+ static ThisType* create(DOMArrayBufferBase *buffer, unsigned byteOffset, unsigned length) |
{ |
- RefPtr<DOMArrayBufferBase> buffer = prpBuffer; |
RefPtr<WTFTypedArray> bufferView = WTFTypedArray::create(buffer->buffer(), byteOffset, length); |
- return adoptRef(new ThisType(bufferView.release(), buffer.release())); |
+ return new ThisType(bufferView.release(), buffer); |
} |
- static PassRefPtr<ThisType> createOrNull(unsigned length) |
+ static ThisType* createOrNull(unsigned length) |
{ |
RefPtr<WTF::ArrayBuffer> buffer = WTF::ArrayBuffer::createOrNull(length, 1); |
return buffer ? create(buffer.release(), 0, length) : nullptr; |
@@ -72,7 +71,7 @@ public: |
private: |
explicit DOMTypedArray(PassRefPtr<WTFTypedArray> bufferView) |
: DOMArrayBufferView(bufferView) { } |
- DOMTypedArray(PassRefPtr<WTFTypedArray> bufferView, PassRefPtr<DOMArrayBufferBase> domArrayBuffer) |
+ DOMTypedArray(PassRefPtr<WTFTypedArray> bufferView, DOMArrayBufferBase* domArrayBuffer) |
: DOMArrayBufferView(bufferView, domArrayBuffer) { } |
}; |