| Index: third_party/WebKit/Source/bindings/tests/results/core/V8DataView.cpp
|
| diff --git a/third_party/WebKit/Source/bindings/tests/results/core/V8DataView.cpp b/third_party/WebKit/Source/bindings/tests/results/core/V8DataView.cpp
|
| index b43f82b2818e6bc5e5a3a82f411389b3b8b245d8..ac84d67e7fb4cda0911e0b422574d4b41d65149e 100644
|
| --- a/third_party/WebKit/Source/bindings/tests/results/core/V8DataView.cpp
|
| +++ b/third_party/WebKit/Source/bindings/tests/results/core/V8DataView.cpp
|
| @@ -48,32 +48,30 @@ static_assert(
|
| "[ActiveScriptWrappable] extended attribute in the IDL file. "
|
| "Be consistent.");
|
|
|
| -TestDataView* V8DataView::toImpl(v8::Local<v8::Object> object)
|
| -{
|
| - ASSERT(object->IsDataView());
|
| - ScriptWrappable* scriptWrappable = toScriptWrappable(object);
|
| - if (scriptWrappable)
|
| - return scriptWrappable->toImpl<TestDataView>();
|
| +TestDataView* V8DataView::toImpl(v8::Local<v8::Object> object) {
|
| + DCHECK(object->IsDataView());
|
| + ScriptWrappable* scriptWrappable = toScriptWrappable(object);
|
| + if (scriptWrappable)
|
| + return scriptWrappable->toImpl<TestDataView>();
|
|
|
| - v8::Local<v8::DataView> v8View = object.As<v8::DataView>();
|
| - v8::Local<v8::Object> arrayBuffer = v8View->Buffer();
|
| - TestDataView* typedArray = nullptr;
|
| - if (arrayBuffer->IsArrayBuffer()) {
|
| - typedArray = TestDataView::create(V8ArrayBuffer::toImpl(arrayBuffer), v8View->ByteOffset(), v8View->ByteLength());
|
| - } else if (arrayBuffer->IsSharedArrayBuffer()) {
|
| - typedArray = TestDataView::create(V8SharedArrayBuffer::toImpl(arrayBuffer), v8View->ByteOffset(), v8View->ByteLength());
|
| - } else {
|
| - ASSERT_NOT_REACHED();
|
| - }
|
| - v8::Local<v8::Object> associatedWrapper = typedArray->associateWithWrapper(v8::Isolate::GetCurrent(), typedArray->wrapperTypeInfo(), object);
|
| - DCHECK(associatedWrapper == object);
|
| + v8::Local<v8::DataView> v8View = object.As<v8::DataView>();
|
| + v8::Local<v8::Object> arrayBuffer = v8View->Buffer();
|
| + TestDataView* typedArray = nullptr;
|
| + if (arrayBuffer->IsArrayBuffer()) {
|
| + typedArray = TestDataView::create(V8ArrayBuffer::toImpl(arrayBuffer), v8View->ByteOffset(), v8View->ByteLength());
|
| + } else if (arrayBuffer->IsSharedArrayBuffer()) {
|
| + typedArray = TestDataView::create(V8SharedArrayBuffer::toImpl(arrayBuffer), v8View->ByteOffset(), v8View->ByteLength());
|
| + } else {
|
| + NOTREACHED();
|
| + }
|
| + v8::Local<v8::Object> associatedWrapper = typedArray->associateWithWrapper(v8::Isolate::GetCurrent(), typedArray->wrapperTypeInfo(), object);
|
| + DCHECK(associatedWrapper == object);
|
|
|
| - return typedArray->toImpl<TestDataView>();
|
| + return typedArray->toImpl<TestDataView>();
|
| }
|
|
|
| -TestDataView* V8DataView::toImplWithTypeCheck(v8::Isolate* isolate, v8::Local<v8::Value> value)
|
| -{
|
| - return value->IsDataView() ? toImpl(v8::Local<v8::Object>::Cast(value)) : nullptr;
|
| +TestDataView* V8DataView::toImplWithTypeCheck(v8::Isolate* isolate, v8::Local<v8::Value> value) {
|
| + return value->IsDataView() ? toImpl(v8::Local<v8::Object>::Cast(value)) : nullptr;
|
| }
|
|
|
| -} // namespace blink
|
| +} // namespace blink
|
|
|