diff options
Diffstat (limited to 'chromium/third_party/blink/renderer/core/typed_arrays/dom_array_buffer_view.h')
-rw-r--r-- | chromium/third_party/blink/renderer/core/typed_arrays/dom_array_buffer_view.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/chromium/third_party/blink/renderer/core/typed_arrays/dom_array_buffer_view.h b/chromium/third_party/blink/renderer/core/typed_arrays/dom_array_buffer_view.h index 701292794d5..504a8db9447 100644 --- a/chromium/third_party/blink/renderer/core/typed_arrays/dom_array_buffer_view.h +++ b/chromium/third_party/blink/renderer/core/typed_arrays/dom_array_buffer_view.h @@ -111,17 +111,26 @@ class CORE_EXPORT DOMArrayBufferView : public ScriptWrappable { return !IsDetached() ? raw_base_address_ : nullptr; } + // ScriptWrappable overrides: v8::Local<v8::Value> Wrap(v8::Isolate*, v8::Local<v8::Object> creation_context) override { NOTREACHED(); return v8::Local<v8::Object>(); } + v8::MaybeLocal<v8::Value> WrapV2(ScriptState*) override { + NOTREACHED(); + return v8::MaybeLocal<v8::Value>(); + } void Trace(Visitor* visitor) const override { visitor->Trace(dom_array_buffer_); ScriptWrappable::Trace(visitor); } + void DetachForTesting() { dom_array_buffer_->Detach(); } + + bool IsDetached() const { return dom_array_buffer_->IsDetached(); } + protected: DOMArrayBufferView(DOMArrayBufferBase* dom_array_buffer, size_t byte_offset) : raw_byte_offset_(byte_offset), dom_array_buffer_(dom_array_buffer) { @@ -130,8 +139,6 @@ class CORE_EXPORT DOMArrayBufferView : public ScriptWrappable { static_cast<char*>(dom_array_buffer_->DataMaybeShared()) + byte_offset; } - bool IsDetached() const { return dom_array_buffer_->IsDetached(); } - private: // The raw_* fields may be stale after Detach. Use getters instead. // This is the address of the ArrayBuffer's storage, plus the byte offset. |