Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(52)

Unified Diff: third_party/WebKit/Source/bindings/tests/results/core/V8DataView.cpp

Issue 2446213002: [Bindings] [Reformat] Reformat template files (Closed)
Patch Set: Rebase (Split out Callbackfunctions) Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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

Powered by Google App Engine
This is Rietveld 408576698