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