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 TestInterfaceOrTestInterfaceEmpty_h | 12 #ifndef TestInterfaceOrTestInterfaceEmpty_h |
13 #define TestInterfaceOrTestInterfaceEmpty_h | 13 #define TestInterfaceOrTestInterfaceEmpty_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 TestInterfaceEmpty; | 24 class TestInterfaceEmpty; |
24 class TestInterfaceImplementation; | 25 class TestInterfaceImplementation; |
25 | 26 |
26 class CORE_EXPORT TestInterfaceOrTestInterfaceEmpty final { | 27 class CORE_EXPORT TestInterfaceOrTestInterfaceEmpty final { |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 v8SetReturnValue(callbackInfo, ToV8(impl, callbackInfo.Holder(), callbackInfo.
GetIsolate())); | 71 v8SetReturnValue(callbackInfo, ToV8(impl, callbackInfo.Holder(), callbackInfo.
GetIsolate())); |
71 } | 72 } |
72 | 73 |
73 template <class CallbackInfo> | 74 template <class CallbackInfo> |
74 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, TestInterfaceOrTe
stInterfaceEmpty& impl, v8::Local<v8::Object> creationContext) { | 75 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, TestInterfaceOrTe
stInterfaceEmpty& impl, v8::Local<v8::Object> creationContext) { |
75 v8SetReturnValue(callbackInfo, ToV8(impl, creationContext, callbackInfo.GetIso
late())); | 76 v8SetReturnValue(callbackInfo, ToV8(impl, creationContext, callbackInfo.GetIso
late())); |
76 } | 77 } |
77 | 78 |
78 template <> | 79 template <> |
79 struct NativeValueTraits<TestInterfaceOrTestInterfaceEmpty> { | 80 struct NativeValueTraits<TestInterfaceOrTestInterfaceEmpty> { |
| 81 using ImplType = TestInterfaceOrTestInterfaceEmpty; |
80 CORE_EXPORT static TestInterfaceOrTestInterfaceEmpty nativeValue(v8::Isolate*,
v8::Local<v8::Value>, ExceptionState&); | 82 CORE_EXPORT static TestInterfaceOrTestInterfaceEmpty nativeValue(v8::Isolate*,
v8::Local<v8::Value>, ExceptionState&); |
81 }; | 83 }; |
82 | 84 |
| 85 template <> |
| 86 struct V8TypeOf<TestInterfaceOrTestInterfaceEmpty> { |
| 87 typedef V8TestInterfaceOrTestInterfaceEmpty Type; |
| 88 }; |
| 89 |
83 } // namespace blink | 90 } // namespace blink |
84 | 91 |
85 // We need to set canInitializeWithMemset=true because HeapVector supports | 92 // We need to set canInitializeWithMemset=true because HeapVector supports |
86 // items that can initialize with memset or have a vtable. It is safe to | 93 // items that can initialize with memset or have a vtable. It is safe to |
87 // set canInitializeWithMemset=true for a union type object in practice. | 94 // set canInitializeWithMemset=true for a union type object in practice. |
88 // See https://codereview.chromium.org/1118993002/#msg5 for more details. | 95 // See https://codereview.chromium.org/1118993002/#msg5 for more details. |
89 WTF_ALLOW_MOVE_AND_INIT_WITH_MEM_FUNCTIONS(blink::TestInterfaceOrTestInterfaceEm
pty); | 96 WTF_ALLOW_MOVE_AND_INIT_WITH_MEM_FUNCTIONS(blink::TestInterfaceOrTestInterfaceEm
pty); |
90 | 97 |
91 #endif // TestInterfaceOrTestInterfaceEmpty_h | 98 #endif // TestInterfaceOrTestInterfaceEmpty_h |
OLD | NEW |