| Index: third_party/WebKit/Source/wtf/ArrayBufferBuilder.h
|
| diff --git a/third_party/WebKit/Source/wtf/ArrayBufferBuilder.h b/third_party/WebKit/Source/wtf/ArrayBufferBuilder.h
|
| index 38b285a0bf02dbec54bda02d7985b31e80899bda..2a6cf747aa74301a221b280b52c968496df129e7 100644
|
| --- a/third_party/WebKit/Source/wtf/ArrayBufferBuilder.h
|
| +++ b/third_party/WebKit/Source/wtf/ArrayBufferBuilder.h
|
| @@ -53,7 +53,7 @@ public:
|
| : m_bytesUsed(0)
|
| , m_variableCapacity(true)
|
| {
|
| - m_buffer = ArrayBuffer::create(capacity, 1);
|
| + m_buffer = ArrayBuffer::createOrNull(capacity, 1);
|
| }
|
|
|
| bool isValid() const
|
| @@ -82,6 +82,7 @@ public:
|
| // Number of bytes allocated.
|
| unsigned capacity() const
|
| {
|
| + ASSERT(isValid());
|
| return m_buffer->byteLength();
|
| }
|
|
|
| @@ -89,6 +90,7 @@ public:
|
|
|
| const void* data() const
|
| {
|
| + ASSERT(isValid());
|
| return m_buffer->data();
|
| }
|
|
|
|
|