| 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 TestInterface2OrUint8Array_h | 12 #ifndef TestInterface2OrUint8Array_h |
| 13 #define TestInterface2OrUint8Array_h | 13 #define TestInterface2OrUint8Array_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/V8ArrayBufferView.h" | 18 #include "bindings/core/v8/V8ArrayBufferView.h" |
| 18 #include "bindings/core/v8/V8Binding.h" | 19 #include "bindings/core/v8/V8Binding.h" |
| 19 #include "bindings/core/v8/V8Uint8Array.h" | 20 #include "bindings/core/v8/V8Uint8Array.h" |
| 20 #include "core/CoreExport.h" | 21 #include "core/CoreExport.h" |
| 21 #include "core/dom/FlexibleArrayBufferView.h" | 22 #include "core/dom/FlexibleArrayBufferView.h" |
| 22 #include "platform/heap/Handle.h" | 23 #include "platform/heap/Handle.h" |
| 23 | 24 |
| 24 namespace blink { | 25 namespace blink { |
| 25 | 26 |
| 26 class TestInterface2; | 27 class TestInterface2; |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 v8SetReturnValue(callbackInfo, ToV8(impl, callbackInfo.Holder(), callbackInfo.
GetIsolate())); | 73 v8SetReturnValue(callbackInfo, ToV8(impl, callbackInfo.Holder(), callbackInfo.
GetIsolate())); |
| 73 } | 74 } |
| 74 | 75 |
| 75 template <class CallbackInfo> | 76 template <class CallbackInfo> |
| 76 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, TestInterface2OrU
int8Array& impl, v8::Local<v8::Object> creationContext) { | 77 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, TestInterface2OrU
int8Array& impl, v8::Local<v8::Object> creationContext) { |
| 77 v8SetReturnValue(callbackInfo, ToV8(impl, creationContext, callbackInfo.GetIso
late())); | 78 v8SetReturnValue(callbackInfo, ToV8(impl, creationContext, callbackInfo.GetIso
late())); |
| 78 } | 79 } |
| 79 | 80 |
| 80 template <> | 81 template <> |
| 81 struct NativeValueTraits<TestInterface2OrUint8Array> { | 82 struct NativeValueTraits<TestInterface2OrUint8Array> { |
| 83 using ImplType = TestInterface2OrUint8Array; |
| 82 CORE_EXPORT static TestInterface2OrUint8Array nativeValue(v8::Isolate*, v8::Lo
cal<v8::Value>, ExceptionState&); | 84 CORE_EXPORT static TestInterface2OrUint8Array nativeValue(v8::Isolate*, v8::Lo
cal<v8::Value>, ExceptionState&); |
| 83 }; | 85 }; |
| 84 | 86 |
| 87 template <> |
| 88 struct V8TypeOf<TestInterface2OrUint8Array> { |
| 89 typedef V8TestInterface2OrUint8Array Type; |
| 90 }; |
| 91 |
| 85 } // namespace blink | 92 } // namespace blink |
| 86 | 93 |
| 87 // We need to set canInitializeWithMemset=true because HeapVector supports | 94 // We need to set canInitializeWithMemset=true because HeapVector supports |
| 88 // items that can initialize with memset or have a vtable. It is safe to | 95 // items that can initialize with memset or have a vtable. It is safe to |
| 89 // set canInitializeWithMemset=true for a union type object in practice. | 96 // set canInitializeWithMemset=true for a union type object in practice. |
| 90 // See https://codereview.chromium.org/1118993002/#msg5 for more details. | 97 // See https://codereview.chromium.org/1118993002/#msg5 for more details. |
| 91 WTF_ALLOW_MOVE_AND_INIT_WITH_MEM_FUNCTIONS(blink::TestInterface2OrUint8Array); | 98 WTF_ALLOW_MOVE_AND_INIT_WITH_MEM_FUNCTIONS(blink::TestInterface2OrUint8Array); |
| 92 | 99 |
| 93 #endif // TestInterface2OrUint8Array_h | 100 #endif // TestInterface2OrUint8Array_h |
| OLD | NEW |