| 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 #include "config.h" | 7 #include "config.h" |
| 8 #include "V8TestInterfaceConstructor2.h" | 8 #include "V8TestInterfaceConstructor2.h" |
| 9 | 9 |
| 10 #include "bindings/core/v8/Dictionary.h" | 10 #include "bindings/core/v8/Dictionary.h" |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 // For details, see the comment of DEFINE_WRAPPERTYPEINFO in | 29 // For details, see the comment of DEFINE_WRAPPERTYPEINFO in |
| 30 // bindings/core/v8/ScriptWrappable.h. | 30 // bindings/core/v8/ScriptWrappable.h. |
| 31 const WrapperTypeInfo& TestInterfaceConstructor2::s_wrapperTypeInfo = V8TestInte
rfaceConstructor2::wrapperTypeInfo; | 31 const WrapperTypeInfo& TestInterfaceConstructor2::s_wrapperTypeInfo = V8TestInte
rfaceConstructor2::wrapperTypeInfo; |
| 32 | 32 |
| 33 namespace TestInterfaceConstructor2V8Internal { | 33 namespace TestInterfaceConstructor2V8Internal { |
| 34 | 34 |
| 35 static void constructor1(const v8::FunctionCallbackInfo<v8::Value>& info) | 35 static void constructor1(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 36 { | 36 { |
| 37 V8StringResource<> stringArg; | 37 V8StringResource<> stringArg; |
| 38 { | 38 { |
| 39 TOSTRING_VOID_INTERNAL(stringArg, info[0]); | 39 stringArg = info[0]; |
| 40 if (!stringArg.prepare()) |
| 41 return; |
| 40 } | 42 } |
| 41 RefPtr<TestInterfaceConstructor2> impl = TestInterfaceConstructor2::create(s
tringArg); | 43 RefPtr<TestInterfaceConstructor2> impl = TestInterfaceConstructor2::create(s
tringArg); |
| 42 v8::Local<v8::Object> wrapper = info.Holder(); | 44 v8::Local<v8::Object> wrapper = info.Holder(); |
| 43 impl->associateWithWrapper(info.GetIsolate(), &V8TestInterfaceConstructor2::
wrapperTypeInfo, wrapper); | 45 impl->associateWithWrapper(info.GetIsolate(), &V8TestInterfaceConstructor2::
wrapperTypeInfo, wrapper); |
| 44 v8SetReturnValue(info, wrapper); | 46 v8SetReturnValue(info, wrapper); |
| 45 } | 47 } |
| 46 | 48 |
| 47 static void constructor2(const v8::FunctionCallbackInfo<v8::Value>& info) | 49 static void constructor2(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 48 { | 50 { |
| 49 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte
rfaceConstructor2", info.Holder(), info.GetIsolate()); | 51 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte
rfaceConstructor2", info.Holder(), info.GetIsolate()); |
| 50 Dictionary dictionaryArg; | 52 Dictionary dictionaryArg; |
| 51 { | 53 { |
| 52 if (!isUndefinedOrNull(info[0]) && !info[0]->IsObject()) { | 54 if (!isUndefinedOrNull(info[0]) && !info[0]->IsObject()) { |
| 53 exceptionState.throwTypeError("parameter 1 ('dictionaryArg') is not
an object."); | 55 exceptionState.throwTypeError("parameter 1 ('dictionaryArg') is not
an object."); |
| 54 exceptionState.throwIfNeeded(); | 56 exceptionState.throwIfNeeded(); |
| 55 return; | 57 return; |
| 56 } | 58 } |
| 57 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(dictionaryArg, Dictionary(info[0],
info.GetIsolate(), exceptionState), exceptionState); | 59 dictionaryArg = Dictionary(info[0], info.GetIsolate(), exceptionState); |
| 60 if (exceptionState.throwIfNeeded()) |
| 61 return; |
| 58 } | 62 } |
| 59 RefPtr<TestInterfaceConstructor2> impl = TestInterfaceConstructor2::create(d
ictionaryArg); | 63 RefPtr<TestInterfaceConstructor2> impl = TestInterfaceConstructor2::create(d
ictionaryArg); |
| 60 v8::Local<v8::Object> wrapper = info.Holder(); | 64 v8::Local<v8::Object> wrapper = info.Holder(); |
| 61 impl->associateWithWrapper(info.GetIsolate(), &V8TestInterfaceConstructor2::
wrapperTypeInfo, wrapper); | 65 impl->associateWithWrapper(info.GetIsolate(), &V8TestInterfaceConstructor2::
wrapperTypeInfo, wrapper); |
| 62 v8SetReturnValue(info, wrapper); | 66 v8SetReturnValue(info, wrapper); |
| 63 } | 67 } |
| 64 | 68 |
| 65 static void constructor3(const v8::FunctionCallbackInfo<v8::Value>& info) | 69 static void constructor3(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 66 { | 70 { |
| 67 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte
rfaceConstructor2", info.Holder(), info.GetIsolate()); | 71 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte
rfaceConstructor2", info.Holder(), info.GetIsolate()); |
| 68 Vector<Vector<String>> stringSequenceSequenceArg; | 72 Vector<Vector<String>> stringSequenceSequenceArg; |
| 69 { | 73 { |
| 70 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(stringSequenceSequenceArg, toImplA
rray<Vector<String>>(info[0], 1, info.GetIsolate(), exceptionState), exceptionSt
ate); | 74 stringSequenceSequenceArg = toImplArray<Vector<String>>(info[0], 1, info
.GetIsolate(), exceptionState); |
| 75 if (exceptionState.throwIfNeeded()) |
| 76 return; |
| 71 } | 77 } |
| 72 RefPtr<TestInterfaceConstructor2> impl = TestInterfaceConstructor2::create(s
tringSequenceSequenceArg); | 78 RefPtr<TestInterfaceConstructor2> impl = TestInterfaceConstructor2::create(s
tringSequenceSequenceArg); |
| 73 v8::Local<v8::Object> wrapper = info.Holder(); | 79 v8::Local<v8::Object> wrapper = info.Holder(); |
| 74 impl->associateWithWrapper(info.GetIsolate(), &V8TestInterfaceConstructor2::
wrapperTypeInfo, wrapper); | 80 impl->associateWithWrapper(info.GetIsolate(), &V8TestInterfaceConstructor2::
wrapperTypeInfo, wrapper); |
| 75 v8SetReturnValue(info, wrapper); | 81 v8SetReturnValue(info, wrapper); |
| 76 } | 82 } |
| 77 | 83 |
| 78 static void constructor4(const v8::FunctionCallbackInfo<v8::Value>& info) | 84 static void constructor4(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 79 { | 85 { |
| 80 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte
rfaceConstructor2", info.Holder(), info.GetIsolate()); | 86 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte
rfaceConstructor2", info.Holder(), info.GetIsolate()); |
| 81 TestInterfaceEmpty* testInterfaceEmptyArg; | 87 TestInterfaceEmpty* testInterfaceEmptyArg; |
| 82 int longArg; | 88 int longArg; |
| 83 V8StringResource<> defaultUndefinedOptionalStringArg; | 89 V8StringResource<> defaultUndefinedOptionalStringArg; |
| 84 V8StringResource<> defaultNullStringOptionalStringArg; | 90 V8StringResource<> defaultNullStringOptionalStringArg; |
| 85 Dictionary defaultUndefinedOptionalDictionaryArg; | 91 Dictionary defaultUndefinedOptionalDictionaryArg; |
| 86 V8StringResource<> optionalStringArg; | 92 V8StringResource<> optionalStringArg; |
| 87 { | 93 { |
| 88 testInterfaceEmptyArg = V8TestInterfaceEmpty::toImplWithTypeCheck(info.G
etIsolate(), info[0]); | 94 testInterfaceEmptyArg = V8TestInterfaceEmpty::toImplWithTypeCheck(info.G
etIsolate(), info[0]); |
| 89 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(longArg, toInt32(info[1], exceptio
nState), exceptionState); | 95 longArg = toInt32(info[1], exceptionState); |
| 90 TOSTRING_VOID_INTERNAL(defaultUndefinedOptionalStringArg, info[2]); | 96 if (exceptionState.throwIfNeeded()) |
| 97 return; |
| 98 defaultUndefinedOptionalStringArg = info[2]; |
| 99 if (!defaultUndefinedOptionalStringArg.prepare()) |
| 100 return; |
| 91 if (!info[3]->IsUndefined()) { | 101 if (!info[3]->IsUndefined()) { |
| 92 TOSTRING_VOID_INTERNAL(defaultNullStringOptionalStringArg, info[3]); | 102 defaultNullStringOptionalStringArg = info[3]; |
| 103 if (!defaultNullStringOptionalStringArg.prepare()) |
| 104 return; |
| 93 } else { | 105 } else { |
| 94 defaultNullStringOptionalStringArg = nullptr; | 106 defaultNullStringOptionalStringArg = nullptr; |
| 95 } | 107 } |
| 96 if (!isUndefinedOrNull(info[4]) && !info[4]->IsObject()) { | 108 if (!isUndefinedOrNull(info[4]) && !info[4]->IsObject()) { |
| 97 exceptionState.throwTypeError("parameter 5 ('defaultUndefinedOptiona
lDictionaryArg') is not an object."); | 109 exceptionState.throwTypeError("parameter 5 ('defaultUndefinedOptiona
lDictionaryArg') is not an object."); |
| 98 exceptionState.throwIfNeeded(); | 110 exceptionState.throwIfNeeded(); |
| 99 return; | 111 return; |
| 100 } | 112 } |
| 101 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(defaultUndefinedOptionalDictionary
Arg, Dictionary(info[4], info.GetIsolate(), exceptionState), exceptionState); | 113 defaultUndefinedOptionalDictionaryArg = Dictionary(info[4], info.GetIsol
ate(), exceptionState); |
| 114 if (exceptionState.throwIfNeeded()) |
| 115 return; |
| 102 if (UNLIKELY(info.Length() <= 5)) { | 116 if (UNLIKELY(info.Length() <= 5)) { |
| 103 RefPtr<TestInterfaceConstructor2> impl = TestInterfaceConstructor2::
create(testInterfaceEmptyArg, longArg, defaultUndefinedOptionalStringArg, defaul
tNullStringOptionalStringArg, defaultUndefinedOptionalDictionaryArg); | 117 RefPtr<TestInterfaceConstructor2> impl = TestInterfaceConstructor2::
create(testInterfaceEmptyArg, longArg, defaultUndefinedOptionalStringArg, defaul
tNullStringOptionalStringArg, defaultUndefinedOptionalDictionaryArg); |
| 104 v8::Local<v8::Object> wrapper = info.Holder(); | 118 v8::Local<v8::Object> wrapper = info.Holder(); |
| 105 impl->associateWithWrapper(info.GetIsolate(), &V8TestInterfaceConstr
uctor2::wrapperTypeInfo, wrapper); | 119 impl->associateWithWrapper(info.GetIsolate(), &V8TestInterfaceConstr
uctor2::wrapperTypeInfo, wrapper); |
| 106 v8SetReturnValue(info, wrapper); | 120 v8SetReturnValue(info, wrapper); |
| 107 return; | 121 return; |
| 108 } | 122 } |
| 109 TOSTRING_VOID_INTERNAL(optionalStringArg, info[5]); | 123 optionalStringArg = info[5]; |
| 124 if (!optionalStringArg.prepare()) |
| 125 return; |
| 110 } | 126 } |
| 111 RefPtr<TestInterfaceConstructor2> impl = TestInterfaceConstructor2::create(t
estInterfaceEmptyArg, longArg, defaultUndefinedOptionalStringArg, defaultNullStr
ingOptionalStringArg, defaultUndefinedOptionalDictionaryArg, optionalStringArg); | 127 RefPtr<TestInterfaceConstructor2> impl = TestInterfaceConstructor2::create(t
estInterfaceEmptyArg, longArg, defaultUndefinedOptionalStringArg, defaultNullStr
ingOptionalStringArg, defaultUndefinedOptionalDictionaryArg, optionalStringArg); |
| 112 v8::Local<v8::Object> wrapper = info.Holder(); | 128 v8::Local<v8::Object> wrapper = info.Holder(); |
| 113 impl->associateWithWrapper(info.GetIsolate(), &V8TestInterfaceConstructor2::
wrapperTypeInfo, wrapper); | 129 impl->associateWithWrapper(info.GetIsolate(), &V8TestInterfaceConstructor2::
wrapperTypeInfo, wrapper); |
| 114 v8SetReturnValue(info, wrapper); | 130 v8SetReturnValue(info, wrapper); |
| 115 } | 131 } |
| 116 | 132 |
| 117 static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info) | 133 static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 118 { | 134 { |
| 119 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte
rfaceConstructor2", info.Holder(), info.GetIsolate()); | 135 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte
rfaceConstructor2", info.Holder(), info.GetIsolate()); |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 233 { | 249 { |
| 234 scriptWrappable->toImpl<TestInterfaceConstructor2>()->ref(); | 250 scriptWrappable->toImpl<TestInterfaceConstructor2>()->ref(); |
| 235 } | 251 } |
| 236 | 252 |
| 237 void V8TestInterfaceConstructor2::derefObject(ScriptWrappable* scriptWrappable) | 253 void V8TestInterfaceConstructor2::derefObject(ScriptWrappable* scriptWrappable) |
| 238 { | 254 { |
| 239 scriptWrappable->toImpl<TestInterfaceConstructor2>()->deref(); | 255 scriptWrappable->toImpl<TestInterfaceConstructor2>()->deref(); |
| 240 } | 256 } |
| 241 | 257 |
| 242 } // namespace blink | 258 } // namespace blink |
| OLD | NEW |