| Index: third_party/WebKit/Source/bindings/tests/results/core/TestInterfaceOrLong.cpp
|
| diff --git a/third_party/WebKit/Source/bindings/tests/results/core/TestInterfaceOrLong.cpp b/third_party/WebKit/Source/bindings/tests/results/core/TestInterfaceOrLong.cpp
|
| index 8dd9929a5fa6eca6b3381dc6857a8aae84882cda..af1125c47aa5598f3874c79ebf9c567aafa16e08 100644
|
| --- a/third_party/WebKit/Source/bindings/tests/results/core/TestInterfaceOrLong.cpp
|
| +++ b/third_party/WebKit/Source/bindings/tests/results/core/TestInterfaceOrLong.cpp
|
| @@ -25,37 +25,37 @@ namespace blink {
|
|
|
| TestInterfaceOrLong::TestInterfaceOrLong() : m_type(SpecificTypeNone) {}
|
|
|
| -TestInterfaceImplementation* TestInterfaceOrLong::getAsTestInterface() const {
|
| - DCHECK(isTestInterface());
|
| - return m_testInterface;
|
| +int32_t TestInterfaceOrLong::getAsLong() const {
|
| + DCHECK(isLong());
|
| + return m_long;
|
| }
|
|
|
| -void TestInterfaceOrLong::setTestInterface(TestInterfaceImplementation* value) {
|
| +void TestInterfaceOrLong::setLong(int32_t value) {
|
| DCHECK(isNull());
|
| - m_testInterface = value;
|
| - m_type = SpecificTypeTestInterface;
|
| + m_long = value;
|
| + m_type = SpecificTypeLong;
|
| }
|
|
|
| -TestInterfaceOrLong TestInterfaceOrLong::fromTestInterface(TestInterfaceImplementation* value) {
|
| +TestInterfaceOrLong TestInterfaceOrLong::fromLong(int32_t value) {
|
| TestInterfaceOrLong container;
|
| - container.setTestInterface(value);
|
| + container.setLong(value);
|
| return container;
|
| }
|
|
|
| -int32_t TestInterfaceOrLong::getAsLong() const {
|
| - DCHECK(isLong());
|
| - return m_long;
|
| +TestInterfaceImplementation* TestInterfaceOrLong::getAsTestInterface() const {
|
| + DCHECK(isTestInterface());
|
| + return m_testInterface;
|
| }
|
|
|
| -void TestInterfaceOrLong::setLong(int32_t value) {
|
| +void TestInterfaceOrLong::setTestInterface(TestInterfaceImplementation* value) {
|
| DCHECK(isNull());
|
| - m_long = value;
|
| - m_type = SpecificTypeLong;
|
| + m_testInterface = value;
|
| + m_type = SpecificTypeTestInterface;
|
| }
|
|
|
| -TestInterfaceOrLong TestInterfaceOrLong::fromLong(int32_t value) {
|
| +TestInterfaceOrLong TestInterfaceOrLong::fromTestInterface(TestInterfaceImplementation* value) {
|
| TestInterfaceOrLong container;
|
| - container.setLong(value);
|
| + container.setTestInterface(value);
|
| return container;
|
| }
|
|
|
| @@ -101,10 +101,10 @@ v8::Local<v8::Value> ToV8(const TestInterfaceOrLong& impl, v8::Local<v8::Object>
|
| switch (impl.m_type) {
|
| case TestInterfaceOrLong::SpecificTypeNone:
|
| return v8::Null(isolate);
|
| - case TestInterfaceOrLong::SpecificTypeTestInterface:
|
| - return ToV8(impl.getAsTestInterface(), creationContext, isolate);
|
| case TestInterfaceOrLong::SpecificTypeLong:
|
| return v8::Integer::New(isolate, impl.getAsLong());
|
| + case TestInterfaceOrLong::SpecificTypeTestInterface:
|
| + return ToV8(impl.getAsTestInterface(), creationContext, isolate);
|
| default:
|
| NOTREACHED();
|
| }
|
|
|