OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // This file has been auto-generated by code_generator_v8.py. | 5 // This file has been auto-generated by code_generator_v8.py. |
6 // DO NOT MODIFY! | 6 // DO NOT MODIFY! |
7 | 7 |
8 // This file has been generated from the Jinja2 template in | 8 // This file has been generated from the Jinja2 template in |
9 // third_party/WebKit/Source/bindings/templates/union_container.h.tmpl | 9 // third_party/WebKit/Source/bindings/templates/union_container.h.tmpl |
10 | 10 |
11 // clang-format off | 11 // clang-format off |
12 #ifndef BooleanOrStringOrUnrestrictedDouble_h | 12 #ifndef BooleanOrStringOrUnrestrictedDouble_h |
13 #define BooleanOrStringOrUnrestrictedDouble_h | 13 #define BooleanOrStringOrUnrestrictedDouble_h |
14 | 14 |
15 #include "bindings/core/v8/Dictionary.h" | 15 #include "bindings/core/v8/Dictionary.h" |
16 #include "bindings/core/v8/ExceptionState.h" | 16 #include "bindings/core/v8/ExceptionState.h" |
| 17 #include "bindings/core/v8/NativeValueTraits.h" |
17 #include "bindings/core/v8/V8Binding.h" | 18 #include "bindings/core/v8/V8Binding.h" |
18 #include "core/CoreExport.h" | 19 #include "core/CoreExport.h" |
19 #include "platform/heap/Handle.h" | 20 #include "platform/heap/Handle.h" |
20 | 21 |
21 namespace blink { | 22 namespace blink { |
22 | 23 |
23 class CORE_EXPORT BooleanOrStringOrUnrestrictedDouble final { | 24 class CORE_EXPORT BooleanOrStringOrUnrestrictedDouble final { |
24 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW(); | 25 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW(); |
25 public: | 26 public: |
26 BooleanOrStringOrUnrestrictedDouble(); | 27 BooleanOrStringOrUnrestrictedDouble(); |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 v8SetReturnValue(callbackInfo, ToV8(impl, callbackInfo.Holder(), callbackInfo.
GetIsolate())); | 75 v8SetReturnValue(callbackInfo, ToV8(impl, callbackInfo.Holder(), callbackInfo.
GetIsolate())); |
75 } | 76 } |
76 | 77 |
77 template <class CallbackInfo> | 78 template <class CallbackInfo> |
78 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, BooleanOrStringOr
UnrestrictedDouble& impl, v8::Local<v8::Object> creationContext) { | 79 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, BooleanOrStringOr
UnrestrictedDouble& impl, v8::Local<v8::Object> creationContext) { |
79 v8SetReturnValue(callbackInfo, ToV8(impl, creationContext, callbackInfo.GetIso
late())); | 80 v8SetReturnValue(callbackInfo, ToV8(impl, creationContext, callbackInfo.GetIso
late())); |
80 } | 81 } |
81 | 82 |
82 template <> | 83 template <> |
83 struct NativeValueTraits<BooleanOrStringOrUnrestrictedDouble> { | 84 struct NativeValueTraits<BooleanOrStringOrUnrestrictedDouble> { |
| 85 using ImplType = BooleanOrStringOrUnrestrictedDouble; |
84 CORE_EXPORT static BooleanOrStringOrUnrestrictedDouble nativeValue(v8::Isolate
*, v8::Local<v8::Value>, ExceptionState&); | 86 CORE_EXPORT static BooleanOrStringOrUnrestrictedDouble nativeValue(v8::Isolate
*, v8::Local<v8::Value>, ExceptionState&); |
85 }; | 87 }; |
86 | 88 |
| 89 template <> |
| 90 struct V8TypeOf<BooleanOrStringOrUnrestrictedDouble> { |
| 91 typedef V8BooleanOrStringOrUnrestrictedDouble Type; |
| 92 }; |
| 93 |
87 } // namespace blink | 94 } // namespace blink |
88 | 95 |
89 // We need to set canInitializeWithMemset=true because HeapVector supports | 96 // We need to set canInitializeWithMemset=true because HeapVector supports |
90 // items that can initialize with memset or have a vtable. It is safe to | 97 // items that can initialize with memset or have a vtable. It is safe to |
91 // set canInitializeWithMemset=true for a union type object in practice. | 98 // set canInitializeWithMemset=true for a union type object in practice. |
92 // See https://codereview.chromium.org/1118993002/#msg5 for more details. | 99 // See https://codereview.chromium.org/1118993002/#msg5 for more details. |
93 WTF_ALLOW_MOVE_AND_INIT_WITH_MEM_FUNCTIONS(blink::BooleanOrStringOrUnrestrictedD
ouble); | 100 WTF_ALLOW_MOVE_AND_INIT_WITH_MEM_FUNCTIONS(blink::BooleanOrStringOrUnrestrictedD
ouble); |
94 | 101 |
95 #endif // BooleanOrStringOrUnrestrictedDouble_h | 102 #endif // BooleanOrStringOrUnrestrictedDouble_h |
OLD | NEW |