| Index: Source/core/dom/DOMTypedArray.h
|
| diff --git a/Source/core/dom/DOMTypedArray.h b/Source/core/dom/DOMTypedArray.h
|
| index 8b14ac0d41a56fbc76342c05cec6cb6aff4b946c..e8ea244f2d0bf12225cd317cbcf36dd025915ecb 100644
|
| --- a/Source/core/dom/DOMTypedArray.h
|
| +++ b/Source/core/dom/DOMTypedArray.h
|
| @@ -52,6 +52,12 @@ public:
|
| return adoptRef(new ThisType(bufferView.release(), buffer.release()));
|
| }
|
|
|
| + static PassRefPtr<ThisType> createOrNull(unsigned length)
|
| + {
|
| + RefPtr<WTF::ArrayBuffer> buffer = WTF::ArrayBuffer::createOrNull(length, 1);
|
| + return buffer ? create(buffer.release(), 0, length) : nullptr;
|
| + }
|
| +
|
| const WTFTypedArray* view() const { return static_cast<const WTFTypedArray*>(DOMArrayBufferView::view()); }
|
| WTFTypedArray* view() { return static_cast<WTFTypedArray*>(DOMArrayBufferView::view()); }
|
|
|
|
|