Index: third_party/WebKit/Source/bindings/tests/results/core/StringOrDouble.h |
diff --git a/third_party/WebKit/Source/bindings/tests/results/modules/UnionTypesModules.h b/third_party/WebKit/Source/bindings/tests/results/core/StringOrDouble.h |
similarity index 50% |
copy from third_party/WebKit/Source/bindings/tests/results/modules/UnionTypesModules.h |
copy to third_party/WebKit/Source/bindings/tests/results/core/StringOrDouble.h |
index 519ceb52991b0436ebf42dc608ec719596b0871d..130ab13a19b53a26855169827e69ca21f7b8b2f5 100644 |
--- a/third_party/WebKit/Source/bindings/tests/results/modules/UnionTypesModules.h |
+++ b/third_party/WebKit/Source/bindings/tests/results/core/StringOrDouble.h |
@@ -4,70 +4,69 @@ |
// This file has been auto-generated by code_generator_v8.py. DO NOT MODIFY! |
-#ifndef UnionTypeModules_h |
-#define UnionTypeModules_h |
+#ifndef StringOrDouble_h |
+#define StringOrDouble_h |
#include "bindings/core/v8/Dictionary.h" |
#include "bindings/core/v8/ExceptionState.h" |
-#include "bindings/core/v8/UnionTypesCore.h" |
#include "bindings/core/v8/V8Binding.h" |
-#include "modules/ModulesExport.h" |
+#include "core/CoreExport.h" |
#include "platform/heap/Handle.h" |
namespace blink { |
-class MODULES_EXPORT BooleanOrString final { |
+class CORE_EXPORT StringOrDouble final { |
DISALLOW_NEW_EXCEPT_PLACEMENT_NEW(); |
public: |
- BooleanOrString(); |
+ StringOrDouble(); |
bool isNull() const { return m_type == SpecificTypeNone; } |
- bool isBoolean() const { return m_type == SpecificTypeBoolean; } |
- bool getAsBoolean() const; |
- void setBoolean(bool); |
- static BooleanOrString fromBoolean(bool); |
- |
bool isString() const { return m_type == SpecificTypeString; } |
String getAsString() const; |
void setString(String); |
- static BooleanOrString fromString(String); |
+ static StringOrDouble fromString(String); |
+ |
+ bool isDouble() const { return m_type == SpecificTypeDouble; } |
+ double getAsDouble() const; |
+ void setDouble(double); |
+ static StringOrDouble fromDouble(double); |
- BooleanOrString(const BooleanOrString&); |
- ~BooleanOrString(); |
- BooleanOrString& operator=(const BooleanOrString&); |
+ StringOrDouble(const StringOrDouble&); |
+ ~StringOrDouble(); |
+ StringOrDouble& operator=(const StringOrDouble&); |
DECLARE_TRACE(); |
private: |
enum SpecificTypes { |
SpecificTypeNone, |
- SpecificTypeBoolean, |
SpecificTypeString, |
+ SpecificTypeDouble, |
}; |
SpecificTypes m_type; |
- bool m_boolean; |
String m_string; |
+ double m_double; |
- friend MODULES_EXPORT v8::Local<v8::Value> toV8(const BooleanOrString&, v8::Local<v8::Object>, v8::Isolate*); |
+ friend CORE_EXPORT v8::Local<v8::Value> toV8(const StringOrDouble&, v8::Local<v8::Object>, v8::Isolate*); |
}; |
-class V8BooleanOrString final { |
+class V8StringOrDouble final { |
public: |
- MODULES_EXPORT static void toImpl(v8::Isolate*, v8::Local<v8::Value>, BooleanOrString&, UnionTypeConversionMode, ExceptionState&); |
+ CORE_EXPORT static void toImpl(v8::Isolate*, v8::Local<v8::Value>, StringOrDouble&, UnionTypeConversionMode, ExceptionState&); |
}; |
-MODULES_EXPORT v8::Local<v8::Value> toV8(const BooleanOrString&, v8::Local<v8::Object>, v8::Isolate*); |
+CORE_EXPORT v8::Local<v8::Value> toV8(const StringOrDouble&, v8::Local<v8::Object>, v8::Isolate*); |
template <class CallbackInfo> |
-inline void v8SetReturnValue(const CallbackInfo& callbackInfo, BooleanOrString& impl) |
+inline void v8SetReturnValue(const CallbackInfo& callbackInfo, StringOrDouble& impl) |
{ |
v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackInfo.GetIsolate())); |
} |
template <> |
-struct NativeValueTraits<BooleanOrString> { |
- MODULES_EXPORT static BooleanOrString nativeValue(v8::Isolate*, v8::Local<v8::Value>, ExceptionState&); |
+struct NativeValueTraits<StringOrDouble> { |
+ CORE_EXPORT static StringOrDouble nativeValue(v8::Isolate*, v8::Local<v8::Value>, ExceptionState&); |
}; |
} // namespace blink |
@@ -76,6 +75,6 @@ struct NativeValueTraits<BooleanOrString> { |
// items that can initialize with memset or have a vtable. It is safe to |
// set canInitializeWithMemset=true for a union type object in practice. |
// See https://codereview.chromium.org/1118993002/#msg5 for more details. |
-WTF_ALLOW_MOVE_AND_INIT_WITH_MEM_FUNCTIONS(blink::BooleanOrString); |
+WTF_ALLOW_MOVE_AND_INIT_WITH_MEM_FUNCTIONS(blink::StringOrDouble); |
-#endif // UnionTypeModules_h |
+#endif // StringOrDouble_h |