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 "RuntimeEnabledFeatures.h" | 10 #include "RuntimeEnabledFeatures.h" |
(...skipping 30 matching lines...) Expand all Loading... |
41 namespace WebCore { | 41 namespace WebCore { |
42 const WrapperTypeInfo V8TestInterfaceConstructor2::wrapperTypeInfo = { gin::kEmb
edderBlink, V8TestInterfaceConstructor2::domTemplate, V8TestInterfaceConstructor
2::derefObject, 0, 0, 0, V8TestInterfaceConstructor2::installPerContextEnabledMe
thods, 0, WrapperTypeObjectPrototype, RefCountedObject }; | 42 const WrapperTypeInfo V8TestInterfaceConstructor2::wrapperTypeInfo = { gin::kEmb
edderBlink, V8TestInterfaceConstructor2::domTemplate, V8TestInterfaceConstructor
2::derefObject, 0, 0, 0, V8TestInterfaceConstructor2::installPerContextEnabledMe
thods, 0, WrapperTypeObjectPrototype, RefCountedObject }; |
43 | 43 |
44 namespace TestInterfaceConstructor2V8Internal { | 44 namespace TestInterfaceConstructor2V8Internal { |
45 | 45 |
46 template <typename T> void V8_USE(T) { } | 46 template <typename T> void V8_USE(T) { } |
47 | 47 |
48 static void constructor1(const v8::FunctionCallbackInfo<v8::Value>& info) | 48 static void constructor1(const v8::FunctionCallbackInfo<v8::Value>& info) |
49 { | 49 { |
50 v8::Isolate* isolate = info.GetIsolate(); | 50 v8::Isolate* isolate = info.GetIsolate(); |
51 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, stringArg, info[0])
; | 51 V8STRINGRESOURCE_PREPARE_VOID(V8StringResource<>, stringArg, info[0]); |
52 RefPtr<TestInterfaceConstructor2> impl = TestInterfaceConstructor2::create(s
tringArg); | 52 RefPtr<TestInterfaceConstructor2> impl = TestInterfaceConstructor2::create(s
tringArg); |
53 | 53 |
54 v8::Handle<v8::Object> wrapper = info.Holder(); | 54 v8::Handle<v8::Object> wrapper = info.Holder(); |
55 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceConstructor2>(impl.r
elease(), &V8TestInterfaceConstructor2::wrapperTypeInfo, wrapper, isolate, Wrapp
erConfiguration::Independent); | 55 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceConstructor2>(impl.r
elease(), &V8TestInterfaceConstructor2::wrapperTypeInfo, wrapper, isolate, Wrapp
erConfiguration::Independent); |
56 v8SetReturnValue(info, wrapper); | 56 v8SetReturnValue(info, wrapper); |
57 } | 57 } |
58 | 58 |
59 static void constructor2(const v8::FunctionCallbackInfo<v8::Value>& info) | 59 static void constructor2(const v8::FunctionCallbackInfo<v8::Value>& info) |
60 { | 60 { |
61 v8::Isolate* isolate = info.GetIsolate(); | 61 v8::Isolate* isolate = info.GetIsolate(); |
62 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte
rfaceConstructor2", info.Holder(), isolate); | 62 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte
rfaceConstructor2", info.Holder(), isolate); |
63 V8TRYCATCH_VOID(TestInterfaceEmpty*, testInterfaceEmptyArg, V8TestInterfaceE
mpty::toNativeWithTypeCheck(info.GetIsolate(), info[0])); | 63 V8TRYCATCH_VOID(TestInterfaceEmpty*, testInterfaceEmptyArg, V8TestInterfaceE
mpty::toNativeWithTypeCheck(info.GetIsolate(), info[0])); |
64 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[1], exceptionState), ex
ceptionState); | 64 V8TRYCATCH_VOID_EXCEPTION(int, longArg, toInt32(info[1], exceptionState), ex
ceptionState); |
65 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, defaultUndefinedOpt
ionalStringArg, info[2]); | 65 V8STRINGRESOURCE_PREPARE_VOID(V8StringResource<>, defaultUndefinedOptionalSt
ringArg, info[2]); |
66 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, defaultNullStringOp
tionalStringArg, argumentOrNull(info, 3)); | 66 V8STRINGRESOURCE_PREPARE_VOID(V8StringResource<>, defaultNullStringOptionalS
tringArg, argumentOrNull(info, 3)); |
67 V8TRYCATCH_VOID(Dictionary, defaultUndefinedOptionalDictionaryArg, Dictionar
y(info[4], info.GetIsolate())); | 67 V8TRYCATCH_VOID(Dictionary, defaultUndefinedOptionalDictionaryArg, Dictionar
y(info[4], info.GetIsolate())); |
68 if (!defaultUndefinedOptionalDictionaryArg.isUndefinedOrNull() && !defaultUn
definedOptionalDictionaryArg.isObject()) { | 68 if (!defaultUndefinedOptionalDictionaryArg.isUndefinedOrNull() && !defaultUn
definedOptionalDictionaryArg.isObject()) { |
69 exceptionState.throwTypeError("parameter 5 ('defaultUndefinedOptionalDic
tionaryArg') is not an object."); | 69 exceptionState.throwTypeError("parameter 5 ('defaultUndefinedOptionalDic
tionaryArg') is not an object."); |
70 exceptionState.throwIfNeeded(); | 70 exceptionState.throwIfNeeded(); |
71 return; | 71 return; |
72 } | 72 } |
73 if (UNLIKELY(info.Length() <= 5)) { | 73 if (UNLIKELY(info.Length() <= 5)) { |
74 RefPtr<TestInterfaceConstructor2> impl = TestInterfaceConstructor2::crea
te(testInterfaceEmptyArg, longArg, defaultUndefinedOptionalStringArg, defaultNul
lStringOptionalStringArg, defaultUndefinedOptionalDictionaryArg); | 74 RefPtr<TestInterfaceConstructor2> impl = TestInterfaceConstructor2::crea
te(testInterfaceEmptyArg, longArg, defaultUndefinedOptionalStringArg, defaultNul
lStringOptionalStringArg, defaultUndefinedOptionalDictionaryArg); |
75 v8::Handle<v8::Object> wrapper = info.Holder(); | 75 v8::Handle<v8::Object> wrapper = info.Holder(); |
76 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceConstructor2>(im
pl.release(), &V8TestInterfaceConstructor2::wrapperTypeInfo, wrapper, isolate, W
rapperConfiguration::Independent); | 76 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceConstructor2>(im
pl.release(), &V8TestInterfaceConstructor2::wrapperTypeInfo, wrapper, isolate, W
rapperConfiguration::Independent); |
77 v8SetReturnValue(info, wrapper); | 77 v8SetReturnValue(info, wrapper); |
78 return; | 78 return; |
79 } | 79 } |
80 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, optionalStringArg,
info[5]); | 80 V8STRINGRESOURCE_PREPARE_VOID(V8StringResource<>, optionalStringArg, info[5]
); |
81 RefPtr<TestInterfaceConstructor2> impl = TestInterfaceConstructor2::create(t
estInterfaceEmptyArg, longArg, defaultUndefinedOptionalStringArg, defaultNullStr
ingOptionalStringArg, defaultUndefinedOptionalDictionaryArg, optionalStringArg); | 81 RefPtr<TestInterfaceConstructor2> impl = TestInterfaceConstructor2::create(t
estInterfaceEmptyArg, longArg, defaultUndefinedOptionalStringArg, defaultNullStr
ingOptionalStringArg, defaultUndefinedOptionalDictionaryArg, optionalStringArg); |
82 | 82 |
83 v8::Handle<v8::Object> wrapper = info.Holder(); | 83 v8::Handle<v8::Object> wrapper = info.Holder(); |
84 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceConstructor2>(impl.r
elease(), &V8TestInterfaceConstructor2::wrapperTypeInfo, wrapper, isolate, Wrapp
erConfiguration::Independent); | 84 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceConstructor2>(impl.r
elease(), &V8TestInterfaceConstructor2::wrapperTypeInfo, wrapper, isolate, Wrapp
erConfiguration::Independent); |
85 v8SetReturnValue(info, wrapper); | 85 v8SetReturnValue(info, wrapper); |
86 } | 86 } |
87 | 87 |
88 static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info) | 88 static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info) |
89 { | 89 { |
90 if (((info.Length() == 1))) { | 90 if (((info.Length() == 1))) { |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
196 fromInternalPointer(object)->deref(); | 196 fromInternalPointer(object)->deref(); |
197 } | 197 } |
198 | 198 |
199 template<> | 199 template<> |
200 v8::Handle<v8::Value> toV8NoInline(TestInterfaceConstructor2* impl, v8::Handle<v
8::Object> creationContext, v8::Isolate* isolate) | 200 v8::Handle<v8::Value> toV8NoInline(TestInterfaceConstructor2* impl, v8::Handle<v
8::Object> creationContext, v8::Isolate* isolate) |
201 { | 201 { |
202 return toV8(impl, creationContext, isolate); | 202 return toV8(impl, creationContext, isolate); |
203 } | 203 } |
204 | 204 |
205 } // namespace WebCore | 205 } // namespace WebCore |
OLD | NEW |