Chromium Code Reviews| Index: third_party/WebKit/Source/wtf/Float32Array.h |
| diff --git a/third_party/WebKit/Source/wtf/Float32Array.h b/third_party/WebKit/Source/wtf/Float32Array.h |
| index 25bec0542bd22e0fb23e2aabdee292ebe0cfec50..3dfec5a02f67a532426ea9ee0ae3ddc9954390bf 100644 |
| --- a/third_party/WebKit/Source/wtf/Float32Array.h |
| +++ b/third_party/WebKit/Source/wtf/Float32Array.h |
| @@ -34,10 +34,9 @@ namespace WTF { |
| class Float32Array final : public TypedArrayBase<float> { |
| public: |
| - static inline PassRefPtr<Float32Array> create(unsigned length); |
| - static inline PassRefPtr<Float32Array> create(const float* array, unsigned length); |
| static inline PassRefPtr<Float32Array> create(PassRefPtr<ArrayBuffer>, unsigned byteOffset, unsigned length); |
| - |
| + static inline PassRefPtr<Float32Array> createOrNull(const float* array, unsigned length); |
| + static inline PassRefPtr<Float32Array> deprecatedCreateOrCrash(const float* array, unsigned length); // Prefer createOrNull |
| static inline PassRefPtr<Float32Array> createOrNull(unsigned length); |
| using TypedArrayBase<float>::set; |
| @@ -60,24 +59,24 @@ private: |
| friend class TypedArrayBase<float>; |
| }; |
| -PassRefPtr<Float32Array> Float32Array::create(unsigned length) |
| +PassRefPtr<Float32Array> Float32Array::createOrNull(unsigned length) |
| { |
| - return TypedArrayBase<float>::create<Float32Array>(length); |
| + return TypedArrayBase<float>::createOrNull<Float32Array>(length); |
| } |
| -PassRefPtr<Float32Array> Float32Array::create(const float* array, unsigned length) |
| +PassRefPtr<Float32Array> Float32Array::createOrNull(const float* array, unsigned length) |
| { |
| - return TypedArrayBase<float>::create<Float32Array>(array, length); |
| + return TypedArrayBase<float>::createOrNull<Float32Array>(array, length); |
| } |
| -PassRefPtr<Float32Array> Float32Array::create(PassRefPtr<ArrayBuffer> buffer, unsigned byteOffset, unsigned length) |
| +PassRefPtr<Float32Array> Float32Array::deprecatedCreateOrCrash(const float* array, unsigned length) |
| { |
| - return TypedArrayBase<float>::create<Float32Array>(buffer, byteOffset, length); |
| + return TypedArrayBase<float>::createOrNull<Float32Array>(array, length); |
|
binji
2015/10/16 22:12:39
should be deprecatedCreateOrCrash?
Justin Novosad
2015/10/19 16:42:52
Acknowledged.
|
| } |
| -PassRefPtr<Float32Array> Float32Array::createOrNull(unsigned length) |
| +PassRefPtr<Float32Array> Float32Array::create(PassRefPtr<ArrayBuffer> buffer, unsigned byteOffset, unsigned length) |
| { |
| - return TypedArrayBase<float>::createOrNull<Float32Array>(length); |
| + return TypedArrayBase<float>::create<Float32Array>(buffer, byteOffset, length); |
| } |
| Float32Array::Float32Array(PassRefPtr<ArrayBuffer> buffer, unsigned byteOffset, unsigned length) |