| 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. DO NOT MODIFY! | 5 // This file has been auto-generated by code_generator_v8.py. DO NOT MODIFY! |
| 6 | 6 |
| 7 // clang-format off | 7 // clang-format off |
| 8 #include "V8TestInterface2Partial.h" | 8 #include "V8TestInterface2Partial.h" |
| 9 | 9 |
| 10 #include "bindings/core/v8/ExceptionState.h" | 10 #include "bindings/core/v8/ExceptionState.h" |
| 11 #include "bindings/core/v8/GeneratedCodeHelper.h" | 11 #include "bindings/core/v8/GeneratedCodeHelper.h" |
| 12 #include "bindings/core/v8/V8DOMConfiguration.h" | 12 #include "bindings/core/v8/V8DOMConfiguration.h" |
| 13 #include "bindings/core/v8/V8GCController.h" | 13 #include "bindings/core/v8/V8GCController.h" |
| 14 #include "bindings/core/v8/V8ObjectConstructor.h" | 14 #include "bindings/core/v8/V8ObjectConstructor.h" |
| 15 #include "bindings/core/v8/V8TestInterface2.h" | 15 #include "bindings/core/v8/V8TestInterface2.h" |
| 16 #include "bindings/tests/idls/modules/TestInterface2Partial.h" | 16 #include "bindings/tests/idls/modules/TestInterface2Partial.h" |
| 17 #include "bindings/tests/idls/modules/TestInterface2Partial2.h" | 17 #include "bindings/tests/idls/modules/TestInterface2Partial2.h" |
| 18 #include "core/dom/Document.h" | 18 #include "core/dom/Document.h" |
| 19 #include "core/dom/Element.h" | 19 #include "core/dom/Element.h" |
| 20 #include "platform/RuntimeEnabledFeatures.h" | 20 #include "platform/RuntimeEnabledFeatures.h" |
| 21 #include "wtf/GetPtr.h" | 21 #include "wtf/GetPtr.h" |
| 22 #include "wtf/RefPtr.h" | 22 #include "wtf/RefPtr.h" |
| 23 | 23 |
| 24 namespace blink { | 24 namespace blink { |
| 25 | 25 |
| 26 namespace TestInterface2PartialV8Internal { | 26 namespace TestInterface2PartialV8Internal { |
| 27 | 27 |
| 28 static void voidMethodPartial1Method(const v8::FunctionCallbackInfo<v8::Value>&
info) | 28 static void voidMethodPartial1Method(const v8::FunctionCallbackInfo<v8::Value>&
info) { |
| 29 { | 29 TestInterface2* impl = V8TestInterface2::toImpl(info.Holder()); |
| 30 TestInterface2* impl = V8TestInterface2::toImpl(info.Holder()); | |
| 31 | 30 |
| 32 if (UNLIKELY(info.Length() < 1)) { | 31 if (UNLIKELY(info.Length() < 1)) { |
| 33 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::f
ailedToExecute("voidMethodPartial1", "TestInterface2", ExceptionMessages::notEno
ughArguments(1, info.Length()))); | 32 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::faile
dToExecute("voidMethodPartial1", "TestInterface2", ExceptionMessages::notEnoughA
rguments(1, info.Length()))); |
| 34 return; | 33 return; |
| 35 } | 34 } |
| 36 | 35 |
| 37 V8StringResource<> value; | 36 V8StringResource<> value; |
| 38 value = info[0]; | 37 value = info[0]; |
| 39 if (!value.prepare()) | 38 if (!value.prepare()) |
| 40 return; | 39 return; |
| 41 | 40 |
| 42 TestInterface2Partial::voidMethodPartial1(*impl, value); | 41 TestInterface2Partial::voidMethodPartial1(*impl, value); |
| 43 } | 42 } |
| 44 | 43 |
| 45 void voidMethodPartial1MethodCallback(const v8::FunctionCallbackInfo<v8::Value>&
info) | 44 void voidMethodPartial1MethodCallback(const v8::FunctionCallbackInfo<v8::Value>&
info) { |
| 46 { | 45 TestInterface2PartialV8Internal::voidMethodPartial1Method(info); |
| 47 TestInterface2PartialV8Internal::voidMethodPartial1Method(info); | |
| 48 } | 46 } |
| 49 | 47 |
| 50 static void voidMethodPartial2Method(const v8::FunctionCallbackInfo<v8::Value>&
info) | 48 static void voidMethodPartial2Method(const v8::FunctionCallbackInfo<v8::Value>&
info) { |
| 51 { | 49 TestInterface2* impl = V8TestInterface2::toImpl(info.Holder()); |
| 52 TestInterface2* impl = V8TestInterface2::toImpl(info.Holder()); | |
| 53 | 50 |
| 54 if (UNLIKELY(info.Length() < 1)) { | 51 if (UNLIKELY(info.Length() < 1)) { |
| 55 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::f
ailedToExecute("voidMethodPartial2", "TestInterface2", ExceptionMessages::notEno
ughArguments(1, info.Length()))); | 52 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::faile
dToExecute("voidMethodPartial2", "TestInterface2", ExceptionMessages::notEnoughA
rguments(1, info.Length()))); |
| 56 return; | 53 return; |
| 57 } | 54 } |
| 58 | 55 |
| 59 V8StringResource<> value; | 56 V8StringResource<> value; |
| 60 value = info[0]; | 57 value = info[0]; |
| 61 if (!value.prepare()) | 58 if (!value.prepare()) |
| 62 return; | 59 return; |
| 63 | 60 |
| 64 TestInterface2Partial2::voidMethodPartial2(*impl, value); | 61 TestInterface2Partial2::voidMethodPartial2(*impl, value); |
| 65 } | 62 } |
| 66 | 63 |
| 67 void voidMethodPartial2MethodCallback(const v8::FunctionCallbackInfo<v8::Value>&
info) | 64 void voidMethodPartial2MethodCallback(const v8::FunctionCallbackInfo<v8::Value>&
info) { |
| 68 { | 65 TestInterface2PartialV8Internal::voidMethodPartial2Method(info); |
| 69 TestInterface2PartialV8Internal::voidMethodPartial2Method(info); | |
| 70 } | 66 } |
| 71 | 67 |
| 72 } // namespace TestInterface2PartialV8Internal | 68 } // namespace TestInterface2PartialV8Internal |
| 73 | 69 |
| 74 const V8DOMConfiguration::MethodConfiguration V8TestInterface2Methods[] = { | 70 const V8DOMConfiguration::MethodConfiguration V8TestInterface2Methods[] = { |
| 75 {"voidMethodPartial2", TestInterface2PartialV8Internal::voidMethodPartial2Me
thodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConf
iguration::OnPrototype}, | 71 {"voidMethodPartial2", TestInterface2PartialV8Internal::voidMethodPartial2Me
thodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConf
iguration::OnPrototype}, |
| 76 }; | 72 }; |
| 77 | 73 |
| 78 void V8TestInterface2Partial::installV8TestInterface2Template(v8::Isolate* isola
te, const DOMWrapperWorld& world, v8::Local<v8::FunctionTemplate> interfaceTempl
ate) { | 74 void V8TestInterface2Partial::installV8TestInterface2Template(v8::Isolate* isola
te, const DOMWrapperWorld& world, v8::Local<v8::FunctionTemplate> interfaceTempl
ate) { |
| 79 // Initialize the interface object's template. | 75 // Initialize the interface object's template. |
| (...skipping 14 matching lines...) Expand all Loading... |
| 94 } | 90 } |
| 95 | 91 |
| 96 void V8TestInterface2Partial::initialize() { | 92 void V8TestInterface2Partial::initialize() { |
| 97 // Should be invoked from ModulesInitializer. | 93 // Should be invoked from ModulesInitializer. |
| 98 V8TestInterface2::updateWrapperTypeInfo( | 94 V8TestInterface2::updateWrapperTypeInfo( |
| 99 &V8TestInterface2Partial::installV8TestInterface2Template, | 95 &V8TestInterface2Partial::installV8TestInterface2Template, |
| 100 nullptr); | 96 nullptr); |
| 101 } | 97 } |
| 102 | 98 |
| 103 } // namespace blink | 99 } // namespace blink |
| OLD | NEW |