| Index: third_party/WebKit/Source/wtf/typed_arrays/ArrayBufferContents.h
|
| diff --git a/third_party/WebKit/Source/wtf/typed_arrays/ArrayBufferContents.h b/third_party/WebKit/Source/wtf/typed_arrays/ArrayBufferContents.h
|
| index 0a76b93d95a12851e813d4bbc74ce740dec6a759..6c5b54af6ccaca9b1ed15abfbb3f9af9c06074a9 100644
|
| --- a/third_party/WebKit/Source/wtf/typed_arrays/ArrayBufferContents.h
|
| +++ b/third_party/WebKit/Source/wtf/typed_arrays/ArrayBufferContents.h
|
| @@ -68,7 +68,17 @@ class WTF_EXPORT ArrayBufferContents {
|
|
|
| void neuter();
|
|
|
| - void* data() const { return m_holder ? m_holder->data() : nullptr; }
|
| + void* data() const {
|
| + DCHECK(!isShared());
|
| + return dataMaybeShared();
|
| + }
|
| + void* dataShared() const {
|
| + DCHECK(isShared());
|
| + return dataMaybeShared();
|
| + }
|
| + void* dataMaybeShared() const {
|
| + return m_holder ? m_holder->data() : nullptr;
|
| + }
|
| unsigned sizeInBytes() const {
|
| return m_holder ? m_holder->sizeInBytes() : 0;
|
| }
|
|
|