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 "V8TestTypedefs.h" | 8 #include "V8TestTypedefs.h" |
9 | 9 |
10 #include "bindings/core/v8/ExceptionState.h" | 10 #include "bindings/core/v8/ExceptionState.h" |
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
189 static void uLongLongMethodTestInterfaceEmptyTypeSequenceArgMethodCallback(const
v8::FunctionCallbackInfo<v8::Value>& info) | 189 static void uLongLongMethodTestInterfaceEmptyTypeSequenceArgMethodCallback(const
v8::FunctionCallbackInfo<v8::Value>& info) |
190 { | 190 { |
191 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 191 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
192 TestTypedefsV8Internal::uLongLongMethodTestInterfaceEmptyTypeSequenceArgMeth
od(info); | 192 TestTypedefsV8Internal::uLongLongMethodTestInterfaceEmptyTypeSequenceArgMeth
od(info); |
193 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 193 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
194 } | 194 } |
195 | 195 |
196 static void testInterfaceOrTestInterfaceEmptyMethodMethod(const v8::FunctionCall
backInfo<v8::Value>& info) | 196 static void testInterfaceOrTestInterfaceEmptyMethodMethod(const v8::FunctionCall
backInfo<v8::Value>& info) |
197 { | 197 { |
198 TestTypedefs* impl = V8TestTypedefs::toNative(info.Holder()); | 198 TestTypedefs* impl = V8TestTypedefs::toNative(info.Holder()); |
199 bool result0Enabled = false; | |
200 RefPtr<TestInterfaceImplementation> result0; | 199 RefPtr<TestInterfaceImplementation> result0; |
201 bool result1Enabled = false; | |
202 RefPtr<TestInterfaceEmpty> result1; | 200 RefPtr<TestInterfaceEmpty> result1; |
203 impl->testInterfaceOrTestInterfaceEmptyMethod(result0Enabled, result0, resul
t1Enabled, result1); | 201 impl->testInterfaceOrTestInterfaceEmptyMethod(result0, result1); |
204 if (result0Enabled) { | 202 if (result0) { |
205 v8SetReturnValue(info, result0.release()); | 203 v8SetReturnValue(info, result0.release()); |
206 return; | 204 return; |
207 } | 205 } |
208 if (result1Enabled) { | 206 if (result1) { |
209 v8SetReturnValue(info, result1.release()); | 207 v8SetReturnValue(info, result1.release()); |
210 return; | 208 return; |
211 } | 209 } |
212 v8SetReturnValueNull(info); | 210 v8SetReturnValueNull(info); |
213 } | 211 } |
214 | 212 |
215 static void testInterfaceOrTestInterfaceEmptyMethodMethodCallback(const v8::Func
tionCallbackInfo<v8::Value>& info) | 213 static void testInterfaceOrTestInterfaceEmptyMethodMethodCallback(const v8::Func
tionCallbackInfo<v8::Value>& info) |
216 { | 214 { |
217 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 215 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
218 TestTypedefsV8Internal::testInterfaceOrTestInterfaceEmptyMethodMethod(info); | 216 TestTypedefsV8Internal::testInterfaceOrTestInterfaceEmptyMethodMethod(info); |
219 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 217 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
220 } | 218 } |
221 | 219 |
| 220 static void domStringOrDoubleMethodMethod(const v8::FunctionCallbackInfo<v8::Val
ue>& info) |
| 221 { |
| 222 TestTypedefs* impl = V8TestTypedefs::toNative(info.Holder()); |
| 223 String result0; |
| 224 Nullable<double> result1; |
| 225 impl->domStringOrDoubleMethod(result0, result1); |
| 226 if (!result0.isNull()) { |
| 227 v8SetReturnValueString(info, result0, info.GetIsolate()); |
| 228 return; |
| 229 } |
| 230 if (result1) { |
| 231 v8SetReturnValue(info, result1.get()); |
| 232 return; |
| 233 } |
| 234 v8SetReturnValueNull(info); |
| 235 } |
| 236 |
| 237 static void domStringOrDoubleMethodMethodCallback(const v8::FunctionCallbackInfo
<v8::Value>& info) |
| 238 { |
| 239 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 240 TestTypedefsV8Internal::domStringOrDoubleMethodMethod(info); |
| 241 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 242 } |
| 243 |
222 static void arrayOfStringsMethodArrayOfStringsArgMethod(const v8::FunctionCallba
ckInfo<v8::Value>& info) | 244 static void arrayOfStringsMethodArrayOfStringsArgMethod(const v8::FunctionCallba
ckInfo<v8::Value>& info) |
223 { | 245 { |
224 if (UNLIKELY(info.Length() < 1)) { | 246 if (UNLIKELY(info.Length() < 1)) { |
225 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("a
rrayOfStringsMethodArrayOfStringsArg", "TestTypedefs", 1, info.Length(), info.Ge
tIsolate()), info.GetIsolate()); | 247 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("a
rrayOfStringsMethodArrayOfStringsArg", "TestTypedefs", 1, info.Length(), info.Ge
tIsolate()), info.GetIsolate()); |
226 return; | 248 return; |
227 } | 249 } |
228 TestTypedefs* impl = V8TestTypedefs::toNative(info.Holder()); | 250 TestTypedefs* impl = V8TestTypedefs::toNative(info.Holder()); |
229 Vector<String> arrayOfStringsArg; | 251 Vector<String> arrayOfStringsArg; |
230 { | 252 { |
231 v8::TryCatch block; | 253 v8::TryCatch block; |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
287 {"uLongLongAttribute", TestTypedefsV8Internal::uLongLongAttributeAttributeGe
tterCallback, TestTypedefsV8Internal::uLongLongAttributeAttributeSetterCallback,
0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyA
ttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration
::OnInstance}, | 309 {"uLongLongAttribute", TestTypedefsV8Internal::uLongLongAttributeAttributeGe
tterCallback, TestTypedefsV8Internal::uLongLongAttributeAttributeSetterCallback,
0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyA
ttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration
::OnInstance}, |
288 {"tAttribute", TestTypedefsV8Internal::TestTypedefsConstructorGetter, TestTy
pedefsV8Internal::TestTypedefsForceSetAttributeOnThisCallback, 0, 0, const_cast<
WrapperTypeInfo*>(&V8TestInterface::wrapperTypeInfo), static_cast<v8::AccessCont
rol>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::DontEnum), V8DOMConfig
uration::ExposedToAllScripts, V8DOMConfiguration::OnInstance}, | 310 {"tAttribute", TestTypedefsV8Internal::TestTypedefsConstructorGetter, TestTy
pedefsV8Internal::TestTypedefsForceSetAttributeOnThisCallback, 0, 0, const_cast<
WrapperTypeInfo*>(&V8TestInterface::wrapperTypeInfo), static_cast<v8::AccessCont
rol>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::DontEnum), V8DOMConfig
uration::ExposedToAllScripts, V8DOMConfiguration::OnInstance}, |
289 }; | 311 }; |
290 | 312 |
291 static const V8DOMConfiguration::MethodConfiguration V8TestTypedefsMethods[] = { | 313 static const V8DOMConfiguration::MethodConfiguration V8TestTypedefsMethods[] = { |
292 {"voidMethodArrayOfLongsArg", TestTypedefsV8Internal::voidMethodArrayOfLongs
ArgMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, | 314 {"voidMethodArrayOfLongsArg", TestTypedefsV8Internal::voidMethodArrayOfLongs
ArgMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, |
293 {"voidMethodFloatArgStringArg", TestTypedefsV8Internal::voidMethodFloatArgSt
ringArgMethodCallback, 0, 2, V8DOMConfiguration::ExposedToAllScripts}, | 315 {"voidMethodFloatArgStringArg", TestTypedefsV8Internal::voidMethodFloatArgSt
ringArgMethodCallback, 0, 2, V8DOMConfiguration::ExposedToAllScripts}, |
294 {"voidMethodTestCallbackInterfaceTypeArg", TestTypedefsV8Internal::voidMetho
dTestCallbackInterfaceTypeArgMethodCallback, 0, 1, V8DOMConfiguration::ExposedTo
AllScripts}, | 316 {"voidMethodTestCallbackInterfaceTypeArg", TestTypedefsV8Internal::voidMetho
dTestCallbackInterfaceTypeArgMethodCallback, 0, 1, V8DOMConfiguration::ExposedTo
AllScripts}, |
295 {"uLongLongMethodTestInterfaceEmptyTypeSequenceArg", TestTypedefsV8Internal:
:uLongLongMethodTestInterfaceEmptyTypeSequenceArgMethodCallback, 0, 1, V8DOMConf
iguration::ExposedToAllScripts}, | 317 {"uLongLongMethodTestInterfaceEmptyTypeSequenceArg", TestTypedefsV8Internal:
:uLongLongMethodTestInterfaceEmptyTypeSequenceArgMethodCallback, 0, 1, V8DOMConf
iguration::ExposedToAllScripts}, |
296 {"testInterfaceOrTestInterfaceEmptyMethod", TestTypedefsV8Internal::testInte
rfaceOrTestInterfaceEmptyMethodMethodCallback, 0, 0, V8DOMConfiguration::Exposed
ToAllScripts}, | 318 {"testInterfaceOrTestInterfaceEmptyMethod", TestTypedefsV8Internal::testInte
rfaceOrTestInterfaceEmptyMethodMethodCallback, 0, 0, V8DOMConfiguration::Exposed
ToAllScripts}, |
| 319 {"domStringOrDoubleMethod", TestTypedefsV8Internal::domStringOrDoubleMethodM
ethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, |
297 {"arrayOfStringsMethodArrayOfStringsArg", TestTypedefsV8Internal::arrayOfStr
ingsMethodArrayOfStringsArgMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAl
lScripts}, | 320 {"arrayOfStringsMethodArrayOfStringsArg", TestTypedefsV8Internal::arrayOfStr
ingsMethodArrayOfStringsArgMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAl
lScripts}, |
298 {"stringArrayMethodStringArrayArg", TestTypedefsV8Internal::stringArrayMetho
dStringArrayArgMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts}, | 321 {"stringArrayMethodStringArrayArg", TestTypedefsV8Internal::stringArrayMetho
dStringArrayArgMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts}, |
299 }; | 322 }; |
300 | 323 |
301 void V8TestTypedefs::constructorCallback(const v8::FunctionCallbackInfo<v8::Valu
e>& info) | 324 void V8TestTypedefs::constructorCallback(const v8::FunctionCallbackInfo<v8::Valu
e>& info) |
302 { | 325 { |
303 TRACE_EVENT_SCOPED_SAMPLING_STATE("blink", "DOMConstructor"); | 326 TRACE_EVENT_SCOPED_SAMPLING_STATE("blink", "DOMConstructor"); |
304 if (!info.IsConstructCall()) { | 327 if (!info.IsConstructCall()) { |
305 V8ThrowException::throwTypeError(ExceptionMessages::constructorNotCallab
leAsFunction("TestTypedefs"), info.GetIsolate()); | 328 V8ThrowException::throwTypeError(ExceptionMessages::constructorNotCallab
leAsFunction("TestTypedefs"), info.GetIsolate()); |
306 return; | 329 return; |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
385 fromInternalPointer(internalPointer)->deref(); | 408 fromInternalPointer(internalPointer)->deref(); |
386 } | 409 } |
387 | 410 |
388 template<> | 411 template<> |
389 v8::Handle<v8::Value> toV8NoInline(TestTypedefs* impl, v8::Handle<v8::Object> cr
eationContext, v8::Isolate* isolate) | 412 v8::Handle<v8::Value> toV8NoInline(TestTypedefs* impl, v8::Handle<v8::Object> cr
eationContext, v8::Isolate* isolate) |
390 { | 413 { |
391 return toV8(impl, creationContext, isolate); | 414 return toV8(impl, creationContext, isolate); |
392 } | 415 } |
393 | 416 |
394 } // namespace blink | 417 } // namespace blink |
OLD | NEW |