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 5dd8094fee9011efa722aefa5fe1522e8c41b79c..615e8ac941e9688143c8577ea178e27fc8fa2eb3 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" |
@@ -39,7 +40,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>(); |