Index: Source/bindings/tests/results/core/V8Uint8ClampedArray.cpp |
diff --git a/Source/bindings/tests/results/core/V8Uint8ClampedArray.cpp b/Source/bindings/tests/results/core/V8Uint8ClampedArray.cpp |
index 8364f8a1c737d8780de7e6d164064a18d1d6ee79..7100d0c9aaca26e1140b83a67f3733e8053899b7 100644 |
--- a/Source/bindings/tests/results/core/V8Uint8ClampedArray.cpp |
+++ b/Source/bindings/tests/results/core/V8Uint8ClampedArray.cpp |
@@ -11,6 +11,7 @@ |
#include "bindings/core/v8/V8ArrayBuffer.h" |
#include "bindings/core/v8/V8DOMConfiguration.h" |
#include "bindings/core/v8/V8ObjectConstructor.h" |
+#include "bindings/core/v8/V8SharedArrayBuffer.h" |
#include "core/dom/ContextFeatures.h" |
#include "core/dom/Document.h" |
#include "platform/RuntimeEnabledFeatures.h" |
@@ -48,7 +49,15 @@ TestUint8ClampedArray* V8Uint8ClampedArray::toImpl(v8::Local<v8::Object> object) |
return scriptWrappable->toImpl<TestUint8ClampedArray>(); |
v8::Local<v8::Uint8ClampedArray> v8View = object.As<v8::Uint8ClampedArray>(); |
- RefPtr<TestUint8ClampedArray> typedArray = TestUint8ClampedArray::create(V8ArrayBuffer::toImpl(v8View->Buffer()), v8View->ByteOffset(), v8View->Length()); |
+ v8::Local<v8::Object> arrayBuffer = v8View->Buffer(); |
+ RefPtr<TestUint8ClampedArray> typedArray; |
+ if (arrayBuffer->IsArrayBuffer()) { |
+ typedArray = TestUint8ClampedArray::create(V8ArrayBuffer::toImpl(arrayBuffer), v8View->ByteOffset(), v8View->Length()); |
+ } else if (arrayBuffer->IsSharedArrayBuffer()) { |
+ typedArray = TestUint8ClampedArray::create(V8SharedArrayBuffer::toImpl(arrayBuffer), v8View->ByteOffset(), v8View->Length()); |
+ } else { |
+ ASSERT_NOT_REACHED(); |
+ } |
typedArray->associateWithWrapper(v8::Isolate::GetCurrent(), typedArray->wrapperTypeInfo(), object); |
return typedArray->toImpl<TestUint8ClampedArray>(); |