| Index: third_party/WebKit/Source/bindings/tests/results/core/V8Uint8ClampedArray.cpp
|
| diff --git a/third_party/WebKit/Source/bindings/tests/results/core/V8Uint8ClampedArray.cpp b/third_party/WebKit/Source/bindings/tests/results/core/V8Uint8ClampedArray.cpp
|
| index 6e0f7c4f2aabd3e06f13d99044bb934d7b8941aa..50124f7ca520c4618ae41bdd3efdf52abc4e3e5d 100644
|
| --- a/third_party/WebKit/Source/bindings/tests/results/core/V8Uint8ClampedArray.cpp
|
| +++ b/third_party/WebKit/Source/bindings/tests/results/core/V8Uint8ClampedArray.cpp
|
| @@ -43,32 +43,30 @@ static_assert(
|
| "[ActiveScriptWrappable] extended attribute in the IDL file. "
|
| "Be consistent.");
|
|
|
| -TestUint8ClampedArray* V8Uint8ClampedArray::toImpl(v8::Local<v8::Object> object)
|
| -{
|
| - ASSERT(object->IsUint8ClampedArray());
|
| - ScriptWrappable* scriptWrappable = toScriptWrappable(object);
|
| - if (scriptWrappable)
|
| - return scriptWrappable->toImpl<TestUint8ClampedArray>();
|
| +TestUint8ClampedArray* V8Uint8ClampedArray::toImpl(v8::Local<v8::Object> object) {
|
| + DCHECK(object->IsUint8ClampedArray());
|
| + ScriptWrappable* scriptWrappable = toScriptWrappable(object);
|
| + if (scriptWrappable)
|
| + return scriptWrappable->toImpl<TestUint8ClampedArray>();
|
|
|
| - v8::Local<v8::Uint8ClampedArray> v8View = object.As<v8::Uint8ClampedArray>();
|
| - v8::Local<v8::Object> arrayBuffer = v8View->Buffer();
|
| - TestUint8ClampedArray* typedArray = nullptr;
|
| - 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();
|
| - }
|
| - v8::Local<v8::Object> associatedWrapper = typedArray->associateWithWrapper(v8::Isolate::GetCurrent(), typedArray->wrapperTypeInfo(), object);
|
| - DCHECK(associatedWrapper == object);
|
| + v8::Local<v8::Uint8ClampedArray> v8View = object.As<v8::Uint8ClampedArray>();
|
| + v8::Local<v8::Object> arrayBuffer = v8View->Buffer();
|
| + TestUint8ClampedArray* typedArray = nullptr;
|
| + 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 {
|
| + NOTREACHED();
|
| + }
|
| + v8::Local<v8::Object> associatedWrapper = typedArray->associateWithWrapper(v8::Isolate::GetCurrent(), typedArray->wrapperTypeInfo(), object);
|
| + DCHECK(associatedWrapper == object);
|
|
|
| - return typedArray->toImpl<TestUint8ClampedArray>();
|
| + return typedArray->toImpl<TestUint8ClampedArray>();
|
| }
|
|
|
| -TestUint8ClampedArray* V8Uint8ClampedArray::toImplWithTypeCheck(v8::Isolate* isolate, v8::Local<v8::Value> value)
|
| -{
|
| - return value->IsUint8ClampedArray() ? toImpl(v8::Local<v8::Object>::Cast(value)) : nullptr;
|
| +TestUint8ClampedArray* V8Uint8ClampedArray::toImplWithTypeCheck(v8::Isolate* isolate, v8::Local<v8::Value> value) {
|
| + return value->IsUint8ClampedArray() ? toImpl(v8::Local<v8::Object>::Cast(value)) : nullptr;
|
| }
|
|
|
| -} // namespace blink
|
| +} // namespace blink
|
|
|