| Index: third_party/WebKit/Source/wtf/Uint8Array.h
|
| diff --git a/third_party/WebKit/Source/wtf/Uint8Array.h b/third_party/WebKit/Source/wtf/Uint8Array.h
|
| index 1c38cc5a0928a8d0e533fc26522ab453297839a8..ea65405dfdabb17cdbe335c9b19008ab254f2e9d 100644
|
| --- a/third_party/WebKit/Source/wtf/Uint8Array.h
|
| +++ b/third_party/WebKit/Source/wtf/Uint8Array.h
|
| @@ -35,8 +35,9 @@ class ArrayBuffer;
|
|
|
| class Uint8Array : public IntegralTypedArrayBase<unsigned char> {
|
| public:
|
| - static inline PassRefPtr<Uint8Array> create(unsigned length);
|
| - static inline PassRefPtr<Uint8Array> create(const unsigned char* array, unsigned length);
|
| + static inline PassRefPtr<Uint8Array> createOrNull(unsigned length);
|
| + static inline PassRefPtr<Uint8Array> createOrNull(const unsigned char* array, unsigned length);
|
| + static inline PassRefPtr<Uint8Array> deprecatedCreateOrCrash(const unsigned char* array, unsigned length);
|
| static inline PassRefPtr<Uint8Array> create(PassRefPtr<ArrayBuffer>, unsigned byteOffset, unsigned length);
|
|
|
| using TypedArrayBase<unsigned char>::set;
|
| @@ -53,14 +54,19 @@ protected:
|
| friend class TypedArrayBase<unsigned char>;
|
| };
|
|
|
| -PassRefPtr<Uint8Array> Uint8Array::create(unsigned length)
|
| +PassRefPtr<Uint8Array> Uint8Array::createOrNull(unsigned length)
|
| {
|
| - return TypedArrayBase<unsigned char>::create<Uint8Array>(length);
|
| + return TypedArrayBase<unsigned char>::createOrNull<Uint8Array>(length);
|
| }
|
|
|
| -PassRefPtr<Uint8Array> Uint8Array::create(const unsigned char* array, unsigned length)
|
| +PassRefPtr<Uint8Array> Uint8Array::createOrNull(const unsigned char* array, unsigned length)
|
| {
|
| - return TypedArrayBase<unsigned char>::create<Uint8Array>(array, length);
|
| + return TypedArrayBase<unsigned char>::createOrNull<Uint8Array>(array, length);
|
| +}
|
| +
|
| +PassRefPtr<Uint8Array> Uint8Array::deprecatedCreateOrCrash(const unsigned char* array, unsigned length)
|
| +{
|
| + return TypedArrayBase<unsigned char>::deprecatedCreateOrCrash<Uint8Array>(array, length);
|
| }
|
|
|
| PassRefPtr<Uint8Array> Uint8Array::create(PassRefPtr<ArrayBuffer> buffer, unsigned byteOffset, unsigned length)
|
|
|