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

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

Issue 2454133002: [Bindings] Reformat template files for Interface (1/4) (Closed)
Patch Set: Rebase 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/V8ArrayBuffer.cpp
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/V8ArrayBuffer.cpp b/third_party/WebKit/Source/bindings/tests/results/core/V8ArrayBuffer.cpp
index 58091f4499243daac02137222eb428a10c13a0eb..b37b7a7c1c3a6e1706b6416919cfd9e6efc522b4 100644
--- a/third_party/WebKit/Source/bindings/tests/results/core/V8ArrayBuffer.cpp
+++ b/third_party/WebKit/Source/bindings/tests/results/core/V8ArrayBuffer.cpp
@@ -48,31 +48,29 @@ static_assert(
"[ActiveScriptWrappable] extended attribute in the IDL file. "
"Be consistent.");
-TestArrayBuffer* V8ArrayBuffer::toImpl(v8::Local<v8::Object> object)
-{
- ASSERT(object->IsArrayBuffer());
- v8::Local<v8::ArrayBuffer> v8buffer = object.As<v8::ArrayBuffer>();
- if (v8buffer->IsExternal()) {
- const WrapperTypeInfo* wrapperTypeInfo = toWrapperTypeInfo(object);
- RELEASE_ASSERT(wrapperTypeInfo);
- RELEASE_ASSERT(wrapperTypeInfo->ginEmbedder == gin::kEmbedderBlink);
- return toScriptWrappable(object)->toImpl<TestArrayBuffer>();
- }
+TestArrayBuffer* V8ArrayBuffer::toImpl(v8::Local<v8::Object> object) {
+ DCHECK(object->IsArrayBuffer());
+ v8::Local<v8::ArrayBuffer> v8buffer = object.As<v8::ArrayBuffer>();
+ if (v8buffer->IsExternal()) {
+ const WrapperTypeInfo* wrapperTypeInfo = toWrapperTypeInfo(object);
+ CHECK(wrapperTypeInfo);
+ CHECK_EQ(wrapperTypeInfo->ginEmbedder, gin::kEmbedderBlink);
+ return toScriptWrappable(object)->toImpl<TestArrayBuffer>();
+ }
- // Transfer the ownership of the allocated memory to an ArrayBuffer without
- // copying.
- v8::ArrayBuffer::Contents v8Contents = v8buffer->Externalize();
- WTF::ArrayBufferContents contents(v8Contents.Data(), v8Contents.ByteLength(), WTF::ArrayBufferContents::NotShared);
- TestArrayBuffer* buffer = TestArrayBuffer::create(contents);
- v8::Local<v8::Object> associatedWrapper = buffer->associateWithWrapper(v8::Isolate::GetCurrent(), buffer->wrapperTypeInfo(), object);
- DCHECK(associatedWrapper == object);
+ // Transfer the ownership of the allocated memory to an ArrayBuffer without
+ // copying.
+ v8::ArrayBuffer::Contents v8Contents = v8buffer->Externalize();
+ WTF::ArrayBufferContents contents(v8Contents.Data(), v8Contents.ByteLength(), WTF::ArrayBufferContents::NotShared);
+ TestArrayBuffer* buffer = TestArrayBuffer::create(contents);
+ v8::Local<v8::Object> associatedWrapper = buffer->associateWithWrapper(v8::Isolate::GetCurrent(), buffer->wrapperTypeInfo(), object);
+ DCHECK(associatedWrapper == object);
- return buffer;
+ return buffer;
}
-TestArrayBuffer* V8ArrayBuffer::toImplWithTypeCheck(v8::Isolate* isolate, v8::Local<v8::Value> value)
-{
- return value->IsArrayBuffer() ? toImpl(v8::Local<v8::Object>::Cast(value)) : nullptr;
+TestArrayBuffer* V8ArrayBuffer::toImplWithTypeCheck(v8::Isolate* isolate, v8::Local<v8::Value> value) {
+ return value->IsArrayBuffer() ? toImpl(v8::Local<v8::Object>::Cast(value)) : nullptr;
}
-} // namespace blink
+} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698