| Index: third_party/WebKit/Source/bindings/tests/results/core/TestInterfaceOrTestInterfaceEmpty.cpp
|
| diff --git a/third_party/WebKit/Source/bindings/tests/results/core/TestInterfaceOrTestInterfaceEmpty.cpp b/third_party/WebKit/Source/bindings/tests/results/core/TestInterfaceOrTestInterfaceEmpty.cpp
|
| index cfe297e02c8a928a8da4d3f05bad6f70c5637e23..f1b9ce1a40052f18a20211d973bf073e9ee84563 100644
|
| --- a/third_party/WebKit/Source/bindings/tests/results/core/TestInterfaceOrTestInterfaceEmpty.cpp
|
| +++ b/third_party/WebKit/Source/bindings/tests/results/core/TestInterfaceOrTestInterfaceEmpty.cpp
|
| @@ -18,104 +18,91 @@
|
|
|
| namespace blink {
|
|
|
| -TestInterfaceOrTestInterfaceEmpty::TestInterfaceOrTestInterfaceEmpty()
|
| - : m_type(SpecificTypeNone)
|
| -{
|
| -}
|
| +TestInterfaceOrTestInterfaceEmpty::TestInterfaceOrTestInterfaceEmpty() : m_type(SpecificTypeNone) {}
|
|
|
| -TestInterfaceImplementation* TestInterfaceOrTestInterfaceEmpty::getAsTestInterface() const
|
| -{
|
| - ASSERT(isTestInterface());
|
| - return m_testInterface;
|
| +TestInterfaceImplementation* TestInterfaceOrTestInterfaceEmpty::getAsTestInterface() const {
|
| + DCHECK(isTestInterface());
|
| + return m_testInterface;
|
| }
|
|
|
| -void TestInterfaceOrTestInterfaceEmpty::setTestInterface(TestInterfaceImplementation* value)
|
| -{
|
| - ASSERT(isNull());
|
| - m_testInterface = value;
|
| - m_type = SpecificTypeTestInterface;
|
| +void TestInterfaceOrTestInterfaceEmpty::setTestInterface(TestInterfaceImplementation* value) {
|
| + DCHECK(isNull());
|
| + m_testInterface = value;
|
| + m_type = SpecificTypeTestInterface;
|
| }
|
|
|
| -TestInterfaceOrTestInterfaceEmpty TestInterfaceOrTestInterfaceEmpty::fromTestInterface(TestInterfaceImplementation* value)
|
| -{
|
| - TestInterfaceOrTestInterfaceEmpty container;
|
| - container.setTestInterface(value);
|
| - return container;
|
| +TestInterfaceOrTestInterfaceEmpty TestInterfaceOrTestInterfaceEmpty::fromTestInterface(TestInterfaceImplementation* value) {
|
| + TestInterfaceOrTestInterfaceEmpty container;
|
| + container.setTestInterface(value);
|
| + return container;
|
| }
|
|
|
| -TestInterfaceEmpty* TestInterfaceOrTestInterfaceEmpty::getAsTestInterfaceEmpty() const
|
| -{
|
| - ASSERT(isTestInterfaceEmpty());
|
| - return m_testInterfaceEmpty;
|
| +TestInterfaceEmpty* TestInterfaceOrTestInterfaceEmpty::getAsTestInterfaceEmpty() const {
|
| + DCHECK(isTestInterfaceEmpty());
|
| + return m_testInterfaceEmpty;
|
| }
|
|
|
| -void TestInterfaceOrTestInterfaceEmpty::setTestInterfaceEmpty(TestInterfaceEmpty* value)
|
| -{
|
| - ASSERT(isNull());
|
| - m_testInterfaceEmpty = value;
|
| - m_type = SpecificTypeTestInterfaceEmpty;
|
| +void TestInterfaceOrTestInterfaceEmpty::setTestInterfaceEmpty(TestInterfaceEmpty* value) {
|
| + DCHECK(isNull());
|
| + m_testInterfaceEmpty = value;
|
| + m_type = SpecificTypeTestInterfaceEmpty;
|
| }
|
|
|
| -TestInterfaceOrTestInterfaceEmpty TestInterfaceOrTestInterfaceEmpty::fromTestInterfaceEmpty(TestInterfaceEmpty* value)
|
| -{
|
| - TestInterfaceOrTestInterfaceEmpty container;
|
| - container.setTestInterfaceEmpty(value);
|
| - return container;
|
| +TestInterfaceOrTestInterfaceEmpty TestInterfaceOrTestInterfaceEmpty::fromTestInterfaceEmpty(TestInterfaceEmpty* value) {
|
| + TestInterfaceOrTestInterfaceEmpty container;
|
| + container.setTestInterfaceEmpty(value);
|
| + return container;
|
| }
|
|
|
| TestInterfaceOrTestInterfaceEmpty::TestInterfaceOrTestInterfaceEmpty(const TestInterfaceOrTestInterfaceEmpty&) = default;
|
| TestInterfaceOrTestInterfaceEmpty::~TestInterfaceOrTestInterfaceEmpty() = default;
|
| TestInterfaceOrTestInterfaceEmpty& TestInterfaceOrTestInterfaceEmpty::operator=(const TestInterfaceOrTestInterfaceEmpty&) = default;
|
|
|
| -DEFINE_TRACE(TestInterfaceOrTestInterfaceEmpty)
|
| -{
|
| - visitor->trace(m_testInterface);
|
| - visitor->trace(m_testInterfaceEmpty);
|
| +DEFINE_TRACE(TestInterfaceOrTestInterfaceEmpty) {
|
| + visitor->trace(m_testInterface);
|
| + visitor->trace(m_testInterfaceEmpty);
|
| }
|
|
|
| -void V8TestInterfaceOrTestInterfaceEmpty::toImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value, TestInterfaceOrTestInterfaceEmpty& impl, UnionTypeConversionMode conversionMode, ExceptionState& exceptionState)
|
| -{
|
| - if (v8Value.IsEmpty())
|
| - return;
|
| +void V8TestInterfaceOrTestInterfaceEmpty::toImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value, TestInterfaceOrTestInterfaceEmpty& impl, UnionTypeConversionMode conversionMode, ExceptionState& exceptionState) {
|
| + if (v8Value.IsEmpty())
|
| + return;
|
|
|
| - if (conversionMode == UnionTypeConversionMode::Nullable && isUndefinedOrNull(v8Value))
|
| - return;
|
| + if (conversionMode == UnionTypeConversionMode::Nullable && isUndefinedOrNull(v8Value))
|
| + return;
|
|
|
| - if (V8TestInterface::hasInstance(v8Value, isolate)) {
|
| - TestInterfaceImplementation* cppValue = V8TestInterface::toImpl(v8::Local<v8::Object>::Cast(v8Value));
|
| - impl.setTestInterface(cppValue);
|
| - return;
|
| - }
|
| + if (V8TestInterface::hasInstance(v8Value, isolate)) {
|
| + TestInterfaceImplementation* cppValue = V8TestInterface::toImpl(v8::Local<v8::Object>::Cast(v8Value));
|
| + impl.setTestInterface(cppValue);
|
| + return;
|
| + }
|
|
|
| - if (V8TestInterfaceEmpty::hasInstance(v8Value, isolate)) {
|
| - TestInterfaceEmpty* cppValue = V8TestInterfaceEmpty::toImpl(v8::Local<v8::Object>::Cast(v8Value));
|
| - impl.setTestInterfaceEmpty(cppValue);
|
| - return;
|
| - }
|
| + if (V8TestInterfaceEmpty::hasInstance(v8Value, isolate)) {
|
| + TestInterfaceEmpty* cppValue = V8TestInterfaceEmpty::toImpl(v8::Local<v8::Object>::Cast(v8Value));
|
| + impl.setTestInterfaceEmpty(cppValue);
|
| + return;
|
| + }
|
|
|
| - exceptionState.throwTypeError("The provided value is not of type '(TestInterface or TestInterfaceEmpty)'");
|
| + exceptionState.throwTypeError("The provided value is not of type '(TestInterface or TestInterfaceEmpty)'");
|
| }
|
|
|
| -v8::Local<v8::Value> toV8(const TestInterfaceOrTestInterfaceEmpty& impl, v8::Local<v8::Object> creationContext, v8::Isolate* isolate)
|
| -{
|
| - switch (impl.m_type) {
|
| +v8::Local<v8::Value> toV8(const TestInterfaceOrTestInterfaceEmpty& impl, v8::Local<v8::Object> creationContext, v8::Isolate* isolate) {
|
| + switch (impl.m_type) {
|
| case TestInterfaceOrTestInterfaceEmpty::SpecificTypeNone:
|
| - return v8::Null(isolate);
|
| + return v8::Null(isolate);
|
| case TestInterfaceOrTestInterfaceEmpty::SpecificTypeTestInterface:
|
| - return toV8(impl.getAsTestInterface(), creationContext, isolate);
|
| + return toV8(impl.getAsTestInterface(), creationContext, isolate);
|
| case TestInterfaceOrTestInterfaceEmpty::SpecificTypeTestInterfaceEmpty:
|
| - return toV8(impl.getAsTestInterfaceEmpty(), creationContext, isolate);
|
| + return toV8(impl.getAsTestInterfaceEmpty(), creationContext, isolate);
|
| default:
|
| - ASSERT_NOT_REACHED();
|
| - }
|
| - return v8::Local<v8::Value>();
|
| + NOTREACHED();
|
| + }
|
| + return v8::Local<v8::Value>();
|
| }
|
|
|
| -TestInterfaceOrTestInterfaceEmpty NativeValueTraits<TestInterfaceOrTestInterfaceEmpty>::nativeValue(v8::Isolate* isolate, v8::Local<v8::Value> value, ExceptionState& exceptionState)
|
| -{
|
| - TestInterfaceOrTestInterfaceEmpty impl;
|
| - V8TestInterfaceOrTestInterfaceEmpty::toImpl(isolate, value, impl, UnionTypeConversionMode::NotNullable, exceptionState);
|
| - return impl;
|
| +TestInterfaceOrTestInterfaceEmpty NativeValueTraits<TestInterfaceOrTestInterfaceEmpty>::nativeValue(v8::Isolate* isolate, v8::Local<v8::Value> value, ExceptionState& exceptionState) {
|
| + TestInterfaceOrTestInterfaceEmpty impl;
|
| + V8TestInterfaceOrTestInterfaceEmpty::toImpl(isolate, value, impl, UnionTypeConversionMode::NotNullable, exceptionState);
|
| + return impl;
|
| }
|
|
|
| -} // namespace blink
|
| +} // namespace blink
|
|
|