| Index: third_party/WebKit/Source/bindings/core/v8/V8Binding.h
|
| diff --git a/third_party/WebKit/Source/bindings/core/v8/V8Binding.h b/third_party/WebKit/Source/bindings/core/v8/V8Binding.h
|
| index f783f6ab25da629154318713a47ad392a43c46bb..de21d8018ca5ea60255b34039618be8ef50e1240 100644
|
| --- a/third_party/WebKit/Source/bindings/core/v8/V8Binding.h
|
| +++ b/third_party/WebKit/Source/bindings/core/v8/V8Binding.h
|
| @@ -47,7 +47,7 @@
|
| #include "bindings/core/v8/V8ThrowException.h"
|
| #include "bindings/core/v8/V8ValueCache.h"
|
| #include "core/CoreExport.h"
|
| -#include "core/dom/NotShared.h"
|
| +#include "core/dom/ArrayBufferViewHelpers.h"
|
| #include "platform/heap/Handle.h"
|
| #include "platform/wtf/text/AtomicString.h"
|
| #include "platform/wtf/text/StringView.h"
|
| @@ -1121,6 +1121,18 @@ NotSharedType ToNotShared(v8::Isolate* isolate,
|
| return NotSharedType(dom_typed_array);
|
| }
|
|
|
| +// Wrap a typed array value in MaybeShared<>, to signify that it may be backed
|
| +// by a SharedArrayBuffer.
|
| +template <typename MaybeSharedType>
|
| +MaybeSharedType ToMaybeShared(v8::Isolate* isolate,
|
| + v8::Local<v8::Value> value,
|
| + ExceptionState& exception_state) {
|
| + using DOMTypedArray = typename MaybeSharedType::TypedArrayType;
|
| + DOMTypedArray* dom_typed_array =
|
| + V8TypeOf<DOMTypedArray>::Type::toImplWithTypeCheck(isolate, value);
|
| + return MaybeSharedType(dom_typed_array);
|
| +}
|
| +
|
| } // namespace blink
|
|
|
| #endif // V8Binding_h
|
|
|