| Index: third_party/WebKit/Source/bindings/tests/results/core/UnrestrictedDoubleOrString.cpp
|
| diff --git a/third_party/WebKit/Source/bindings/tests/results/core/UnrestrictedDoubleOrString.cpp b/third_party/WebKit/Source/bindings/tests/results/core/UnrestrictedDoubleOrString.cpp
|
| index c11c3db3602da25c25785178f7561a3e8ecac27a..421329cdb6062299976e063224eba28457ee1213 100644
|
| --- a/third_party/WebKit/Source/bindings/tests/results/core/UnrestrictedDoubleOrString.cpp
|
| +++ b/third_party/WebKit/Source/bindings/tests/results/core/UnrestrictedDoubleOrString.cpp
|
| @@ -19,37 +19,37 @@ namespace blink {
|
|
|
| UnrestrictedDoubleOrString::UnrestrictedDoubleOrString() : m_type(SpecificTypeNone) {}
|
|
|
| -double UnrestrictedDoubleOrString::getAsUnrestrictedDouble() const {
|
| - DCHECK(isUnrestrictedDouble());
|
| - return m_unrestrictedDouble;
|
| +String UnrestrictedDoubleOrString::getAsString() const {
|
| + DCHECK(isString());
|
| + return m_string;
|
| }
|
|
|
| -void UnrestrictedDoubleOrString::setUnrestrictedDouble(double value) {
|
| +void UnrestrictedDoubleOrString::setString(String value) {
|
| DCHECK(isNull());
|
| - m_unrestrictedDouble = value;
|
| - m_type = SpecificTypeUnrestrictedDouble;
|
| + m_string = value;
|
| + m_type = SpecificTypeString;
|
| }
|
|
|
| -UnrestrictedDoubleOrString UnrestrictedDoubleOrString::fromUnrestrictedDouble(double value) {
|
| +UnrestrictedDoubleOrString UnrestrictedDoubleOrString::fromString(String value) {
|
| UnrestrictedDoubleOrString container;
|
| - container.setUnrestrictedDouble(value);
|
| + container.setString(value);
|
| return container;
|
| }
|
|
|
| -String UnrestrictedDoubleOrString::getAsString() const {
|
| - DCHECK(isString());
|
| - return m_string;
|
| +double UnrestrictedDoubleOrString::getAsUnrestrictedDouble() const {
|
| + DCHECK(isUnrestrictedDouble());
|
| + return m_unrestrictedDouble;
|
| }
|
|
|
| -void UnrestrictedDoubleOrString::setString(String value) {
|
| +void UnrestrictedDoubleOrString::setUnrestrictedDouble(double value) {
|
| DCHECK(isNull());
|
| - m_string = value;
|
| - m_type = SpecificTypeString;
|
| + m_unrestrictedDouble = value;
|
| + m_type = SpecificTypeUnrestrictedDouble;
|
| }
|
|
|
| -UnrestrictedDoubleOrString UnrestrictedDoubleOrString::fromString(String value) {
|
| +UnrestrictedDoubleOrString UnrestrictedDoubleOrString::fromUnrestrictedDouble(double value) {
|
| UnrestrictedDoubleOrString container;
|
| - container.setString(value);
|
| + container.setUnrestrictedDouble(value);
|
| return container;
|
| }
|
|
|
| @@ -88,10 +88,10 @@ v8::Local<v8::Value> ToV8(const UnrestrictedDoubleOrString& impl, v8::Local<v8::
|
| switch (impl.m_type) {
|
| case UnrestrictedDoubleOrString::SpecificTypeNone:
|
| return v8::Null(isolate);
|
| - case UnrestrictedDoubleOrString::SpecificTypeUnrestrictedDouble:
|
| - return v8::Number::New(isolate, impl.getAsUnrestrictedDouble());
|
| case UnrestrictedDoubleOrString::SpecificTypeString:
|
| return v8String(isolate, impl.getAsString());
|
| + case UnrestrictedDoubleOrString::SpecificTypeUnrestrictedDouble:
|
| + return v8::Number::New(isolate, impl.getAsUnrestrictedDouble());
|
| default:
|
| NOTREACHED();
|
| }
|
|
|