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 "V8TestInterfaceNamedConstructor.h" | 8 #include "V8TestInterfaceNamedConstructor.h" |
9 | 9 |
10 #include "RuntimeEnabledFeatures.h" | 10 #include "RuntimeEnabledFeatures.h" |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 | 90 |
91 // Make sure the document is added to the DOM Node map. Otherwise, the TestI
nterfaceNamedConstructor instance | 91 // Make sure the document is added to the DOM Node map. Otherwise, the TestI
nterfaceNamedConstructor instance |
92 // may end up being the only node in the map and get garbage-collected prema
turely. | 92 // may end up being the only node in the map and get garbage-collected prema
turely. |
93 toV8(document, info.Holder(), isolate); | 93 toV8(document, info.Holder(), isolate); |
94 | 94 |
95 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte
rfaceNamedConstructor", info.Holder(), isolate); | 95 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte
rfaceNamedConstructor", info.Holder(), isolate); |
96 if (UNLIKELY(info.Length() < 1)) { | 96 if (UNLIKELY(info.Length() < 1)) { |
97 throwArityTypeError(exceptionState, 1, info.Length()); | 97 throwArityTypeError(exceptionState, 1, info.Length()); |
98 return; | 98 return; |
99 } | 99 } |
100 TOSTRING_VOID(V8StringResource<>, stringArg, info[0]); | 100 V8StringResource<> stringArg; |
101 TONATIVE_VOID(bool, defaultUndefinedOptionalBooleanArg, info[1]->BooleanValu
e()); | 101 bool defaultUndefinedOptionalBooleanArg; |
102 TONATIVE_VOID_EXCEPTIONSTATE(int, defaultUndefinedOptionalLongArg, toInt32(i
nfo[2], exceptionState), exceptionState); | 102 int defaultUndefinedOptionalLongArg; |
103 TOSTRING_VOID(V8StringResource<>, defaultUndefinedOptionalStringArg, info[3]
); | 103 V8StringResource<> defaultUndefinedOptionalStringArg; |
104 TOSTRING_VOID(V8StringResource<>, defaultNullStringOptionalstringArg, argume
ntOrNull(info, 4)); | 104 V8StringResource<> defaultNullStringOptionalstringArg; |
105 if (UNLIKELY(info.Length() <= 5)) { | 105 V8StringResource<> optionalStringArg; |
106 RefPtr<TestInterfaceNamedConstructor> impl = TestInterfaceNamedConstruct
or::createForJSConstructor(stringArg, defaultUndefinedOptionalBooleanArg, defaul
tUndefinedOptionalLongArg, defaultUndefinedOptionalStringArg, defaultNullStringO
ptionalstringArg); | 106 { |
107 v8::Handle<v8::Object> wrapper = info.Holder(); | 107 v8::TryCatch block; |
108 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceNamedConstructor
>(impl.release(), &V8TestInterfaceNamedConstructorConstructor::wrapperTypeInfo,
wrapper, isolate, WrapperConfiguration::Dependent); | 108 TOSTRING_VOID_NO_DECL(stringArg, info[0]); |
109 v8SetReturnValue(info, wrapper); | 109 TONATIVE_VOID_NO_DECL(defaultUndefinedOptionalBooleanArg, info[1]->Boole
anValue()); |
110 return; | 110 TONATIVE_VOID_EXCEPTIONSTATE_NO_DECL(defaultUndefinedOptionalLongArg, to
Int32(info[2], exceptionState), exceptionState); |
| 111 TOSTRING_VOID_NO_DECL(defaultUndefinedOptionalStringArg, info[3]); |
| 112 TOSTRING_VOID_NO_DECL(defaultNullStringOptionalstringArg, argumentOrNull
(info, 4)); |
| 113 if (UNLIKELY(info.Length() <= 5)) { |
| 114 RefPtr<TestInterfaceNamedConstructor> impl = TestInterfaceNamedConst
ructor::createForJSConstructor(stringArg, defaultUndefinedOptionalBooleanArg, de
faultUndefinedOptionalLongArg, defaultUndefinedOptionalStringArg, defaultNullStr
ingOptionalstringArg); |
| 115 v8::Handle<v8::Object> wrapper = info.Holder(); |
| 116 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceNamedConstru
ctor>(impl.release(), &V8TestInterfaceNamedConstructorConstructor::wrapperTypeIn
fo, wrapper, isolate, WrapperConfiguration::Dependent); |
| 117 v8SetReturnValue(info, wrapper); |
| 118 return; |
| 119 } |
| 120 TOSTRING_VOID_NO_DECL(optionalStringArg, info[5]); |
111 } | 121 } |
112 TOSTRING_VOID(V8StringResource<>, optionalStringArg, info[5]); | |
113 RefPtr<TestInterfaceNamedConstructor> impl = TestInterfaceNamedConstructor::
createForJSConstructor(*document, stringArg, defaultUndefinedOptionalBooleanArg,
defaultUndefinedOptionalLongArg, defaultUndefinedOptionalStringArg, defaultNull
StringOptionalstringArg, optionalStringArg, exceptionState); | 122 RefPtr<TestInterfaceNamedConstructor> impl = TestInterfaceNamedConstructor::
createForJSConstructor(*document, stringArg, defaultUndefinedOptionalBooleanArg,
defaultUndefinedOptionalLongArg, defaultUndefinedOptionalStringArg, defaultNull
StringOptionalstringArg, optionalStringArg, exceptionState); |
114 if (exceptionState.throwIfNeeded()) | 123 if (exceptionState.throwIfNeeded()) |
115 return; | 124 return; |
116 | 125 |
117 v8::Handle<v8::Object> wrapper = info.Holder(); | 126 v8::Handle<v8::Object> wrapper = info.Holder(); |
118 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceNamedConstructor>(im
pl.release(), &V8TestInterfaceNamedConstructorConstructor::wrapperTypeInfo, wrap
per, isolate, WrapperConfiguration::Dependent); | 127 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceNamedConstructor>(im
pl.release(), &V8TestInterfaceNamedConstructorConstructor::wrapperTypeInfo, wrap
per, isolate, WrapperConfiguration::Dependent); |
119 v8SetReturnValue(info, wrapper); | 128 v8SetReturnValue(info, wrapper); |
120 } | 129 } |
121 | 130 |
122 v8::Handle<v8::FunctionTemplate> V8TestInterfaceNamedConstructorConstructor::dom
Template(v8::Isolate* isolate) | 131 v8::Handle<v8::FunctionTemplate> V8TestInterfaceNamedConstructorConstructor::dom
Template(v8::Isolate* isolate) |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 fromInternalPointer(object)->deref(); | 222 fromInternalPointer(object)->deref(); |
214 } | 223 } |
215 | 224 |
216 template<> | 225 template<> |
217 v8::Handle<v8::Value> toV8NoInline(TestInterfaceNamedConstructor* impl, v8::Hand
le<v8::Object> creationContext, v8::Isolate* isolate) | 226 v8::Handle<v8::Value> toV8NoInline(TestInterfaceNamedConstructor* impl, v8::Hand
le<v8::Object> creationContext, v8::Isolate* isolate) |
218 { | 227 { |
219 return toV8(impl, creationContext, isolate); | 228 return toV8(impl, creationContext, isolate); |
220 } | 229 } |
221 | 230 |
222 } // namespace WebCore | 231 } // namespace WebCore |
OLD | NEW |