| OLD | NEW |
| 1 /* | 1 /* |
| 2 This file is part of the Blink open source project. | 2 This file is part of the Blink open source project. |
| 3 This file has been auto-generated by CodeGeneratorV8.pm. DO NOT MODIFY! | 3 This file has been auto-generated by CodeGeneratorV8.pm. DO NOT MODIFY! |
| 4 | 4 |
| 5 This library is free software; you can redistribute it and/or | 5 This library is free software; you can redistribute it and/or |
| 6 modify it under the terms of the GNU Library General Public | 6 modify it under the terms of the GNU Library General Public |
| 7 License as published by the Free Software Foundation; either | 7 License as published by the Free Software Foundation; either |
| 8 version 2 of the License, or (at your option) any later version. | 8 version 2 of the License, or (at your option) any later version. |
| 9 | 9 |
| 10 This library is distributed in the hope that it will be useful, | 10 This library is distributed in the hope that it will be useful, |
| (...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 237 } | 237 } |
| 238 | 238 |
| 239 static void TestTypedefsReplaceableAttrSetterCallback(v8::Local<v8::String> name
, v8::Local<v8::Value> value, const v8::AccessorInfo& info) | 239 static void TestTypedefsReplaceableAttrSetterCallback(v8::Local<v8::String> name
, v8::Local<v8::Value> value, const v8::AccessorInfo& info) |
| 240 { | 240 { |
| 241 return TestTypedefsV8Internal::TestTypedefsReplaceableAttrSetter(name, value
, info); | 241 return TestTypedefsV8Internal::TestTypedefsReplaceableAttrSetter(name, value
, info); |
| 242 } | 242 } |
| 243 | 243 |
| 244 static v8::Handle<v8::Value> funcMethod(const v8::Arguments& args) | 244 static v8::Handle<v8::Value> funcMethod(const v8::Arguments& args) |
| 245 { | 245 { |
| 246 TestTypedefs* imp = V8TestTypedefs::toNative(args.Holder()); | 246 TestTypedefs* imp = V8TestTypedefs::toNative(args.Holder()); |
| 247 ExceptionCode ec = 0; | |
| 248 if (args.Length() <= 0) { | 247 if (args.Length() <= 0) { |
| 249 imp->func(); | 248 imp->func(); |
| 250 return v8Undefined(); | 249 return v8Undefined(); |
| 251 } | 250 } |
| 252 V8TRYCATCH(Vector<int>, x, toNativeArray<int>(args[0])); | 251 V8TRYCATCH(Vector<int>, x, toNativeArray<int>(args[0])); |
| 253 imp->func(x); | 252 imp->func(x); |
| 254 return v8Undefined(); | 253 return v8Undefined(); |
| 255 } | 254 } |
| 256 | 255 |
| 257 static v8::Handle<v8::Value> funcMethodCallback(const v8::Arguments& args) | 256 static v8::Handle<v8::Value> funcMethodCallback(const v8::Arguments& args) |
| 258 { | 257 { |
| 259 return TestTypedefsV8Internal::funcMethod(args); | 258 return TestTypedefsV8Internal::funcMethod(args); |
| 260 } | 259 } |
| 261 | 260 |
| 262 static v8::Handle<v8::Value> setShadowMethod(const v8::Arguments& args) | 261 static v8::Handle<v8::Value> setShadowMethod(const v8::Arguments& args) |
| 263 { | 262 { |
| 264 if (args.Length() < 3) | 263 if (args.Length() < 3) |
| 265 return throwNotEnoughArgumentsError(args.GetIsolate()); | 264 return throwNotEnoughArgumentsError(args.GetIsolate()); |
| 266 TestTypedefs* imp = V8TestTypedefs::toNative(args.Holder()); | 265 TestTypedefs* imp = V8TestTypedefs::toNative(args.Holder()); |
| 267 ExceptionCode ec = 0; | |
| 268 V8TRYCATCH(float, width, static_cast<float>(args[0]->NumberValue())); | 266 V8TRYCATCH(float, width, static_cast<float>(args[0]->NumberValue())); |
| 269 V8TRYCATCH(float, height, static_cast<float>(args[1]->NumberValue())); | 267 V8TRYCATCH(float, height, static_cast<float>(args[1]->NumberValue())); |
| 270 V8TRYCATCH(float, blur, static_cast<float>(args[2]->NumberValue())); | 268 V8TRYCATCH(float, blur, static_cast<float>(args[2]->NumberValue())); |
| 271 if (args.Length() <= 3) { | 269 if (args.Length() <= 3) { |
| 272 imp->setShadow(width, height, blur); | 270 imp->setShadow(width, height, blur); |
| 273 return v8Undefined(); | 271 return v8Undefined(); |
| 274 } | 272 } |
| 275 V8TRYCATCH_FOR_V8STRINGRESOURCE(V8StringResource<>, color, args[3]); | 273 V8TRYCATCH_FOR_V8STRINGRESOURCE(V8StringResource<>, color, args[3]); |
| 276 if (args.Length() <= 4) { | 274 if (args.Length() <= 4) { |
| 277 imp->setShadow(width, height, blur, color); | 275 imp->setShadow(width, height, blur, color); |
| 278 return v8Undefined(); | 276 return v8Undefined(); |
| 279 } | 277 } |
| 280 V8TRYCATCH(float, alpha, static_cast<float>(args[4]->NumberValue())); | 278 V8TRYCATCH(float, alpha, static_cast<float>(args[4]->NumberValue())); |
| 281 imp->setShadow(width, height, blur, color, alpha); | 279 imp->setShadow(width, height, blur, color, alpha); |
| 282 return v8Undefined(); | 280 return v8Undefined(); |
| 283 } | 281 } |
| 284 | 282 |
| 285 static v8::Handle<v8::Value> setShadowMethodCallback(const v8::Arguments& args) | 283 static v8::Handle<v8::Value> setShadowMethodCallback(const v8::Arguments& args) |
| 286 { | 284 { |
| 287 return TestTypedefsV8Internal::setShadowMethod(args); | 285 return TestTypedefsV8Internal::setShadowMethod(args); |
| 288 } | 286 } |
| 289 | 287 |
| 290 static v8::Handle<v8::Value> methodWithSequenceArgMethod(const v8::Arguments& ar
gs) | 288 static v8::Handle<v8::Value> methodWithSequenceArgMethod(const v8::Arguments& ar
gs) |
| 291 { | 289 { |
| 292 if (args.Length() < 1) | 290 if (args.Length() < 1) |
| 293 return throwNotEnoughArgumentsError(args.GetIsolate()); | 291 return throwNotEnoughArgumentsError(args.GetIsolate()); |
| 294 TestTypedefs* imp = V8TestTypedefs::toNative(args.Holder()); | 292 TestTypedefs* imp = V8TestTypedefs::toNative(args.Holder()); |
| 295 ExceptionCode ec = 0; | |
| 296 V8TRYCATCH(Vector<RefPtr<SerializedScriptValue> >, sequenceArg, (toRefPtrNat
iveArray<SerializedScriptValue, V8SerializedScriptValue>(args[0], args.GetIsolat
e()))); | 293 V8TRYCATCH(Vector<RefPtr<SerializedScriptValue> >, sequenceArg, (toRefPtrNat
iveArray<SerializedScriptValue, V8SerializedScriptValue>(args[0], args.GetIsolat
e()))); |
| 297 return v8::Number::New(static_cast<double>(imp->methodWithSequenceArg(sequen
ceArg))); | 294 return v8::Number::New(static_cast<double>(imp->methodWithSequenceArg(sequen
ceArg))); |
| 298 } | 295 } |
| 299 | 296 |
| 300 static v8::Handle<v8::Value> methodWithSequenceArgMethodCallback(const v8::Argum
ents& args) | 297 static v8::Handle<v8::Value> methodWithSequenceArgMethodCallback(const v8::Argum
ents& args) |
| 301 { | 298 { |
| 302 return TestTypedefsV8Internal::methodWithSequenceArgMethod(args); | 299 return TestTypedefsV8Internal::methodWithSequenceArgMethod(args); |
| 303 } | 300 } |
| 304 | 301 |
| 305 static v8::Handle<v8::Value> nullableArrayArgMethod(const v8::Arguments& args) | 302 static v8::Handle<v8::Value> nullableArrayArgMethod(const v8::Arguments& args) |
| 306 { | 303 { |
| 307 if (args.Length() < 1) | 304 if (args.Length() < 1) |
| 308 return throwNotEnoughArgumentsError(args.GetIsolate()); | 305 return throwNotEnoughArgumentsError(args.GetIsolate()); |
| 309 TestTypedefs* imp = V8TestTypedefs::toNative(args.Holder()); | 306 TestTypedefs* imp = V8TestTypedefs::toNative(args.Holder()); |
| 310 ExceptionCode ec = 0; | |
| 311 V8TRYCATCH(Vector<String>, arrayArg, toNativeArray<String>(args[0])); | 307 V8TRYCATCH(Vector<String>, arrayArg, toNativeArray<String>(args[0])); |
| 312 imp->nullableArrayArg(arrayArg); | 308 imp->nullableArrayArg(arrayArg); |
| 313 return v8Undefined(); | 309 return v8Undefined(); |
| 314 } | 310 } |
| 315 | 311 |
| 316 static v8::Handle<v8::Value> nullableArrayArgMethodCallback(const v8::Arguments&
args) | 312 static v8::Handle<v8::Value> nullableArrayArgMethodCallback(const v8::Arguments&
args) |
| 317 { | 313 { |
| 318 return TestTypedefsV8Internal::nullableArrayArgMethod(args); | 314 return TestTypedefsV8Internal::nullableArrayArgMethod(args); |
| 319 } | 315 } |
| 320 | 316 |
| 321 static v8::Handle<v8::Value> funcWithClampMethod(const v8::Arguments& args) | 317 static v8::Handle<v8::Value> funcWithClampMethod(const v8::Arguments& args) |
| 322 { | 318 { |
| 323 if (args.Length() < 1) | 319 if (args.Length() < 1) |
| 324 return throwNotEnoughArgumentsError(args.GetIsolate()); | 320 return throwNotEnoughArgumentsError(args.GetIsolate()); |
| 325 TestTypedefs* imp = V8TestTypedefs::toNative(args.Holder()); | 321 TestTypedefs* imp = V8TestTypedefs::toNative(args.Holder()); |
| 326 ExceptionCode ec = 0; | |
| 327 unsigned long long arg1 = 0; | 322 unsigned long long arg1 = 0; |
| 328 V8TRYCATCH(double, arg1NativeValue, args[0]->NumberValue()); | 323 V8TRYCATCH(double, arg1NativeValue, args[0]->NumberValue()); |
| 329 if (!std::isnan(arg1NativeValue)) | 324 if (!std::isnan(arg1NativeValue)) |
| 330 arg1 = clampTo<unsigned long long>(arg1NativeValue); | 325 arg1 = clampTo<unsigned long long>(arg1NativeValue); |
| 331 if (args.Length() <= 1) { | 326 if (args.Length() <= 1) { |
| 332 imp->funcWithClamp(arg1); | 327 imp->funcWithClamp(arg1); |
| 333 return v8Undefined(); | 328 return v8Undefined(); |
| 334 } | 329 } |
| 335 unsigned long long arg2 = 0; | 330 unsigned long long arg2 = 0; |
| 336 V8TRYCATCH(double, arg2NativeValue, args[1]->NumberValue()); | 331 V8TRYCATCH(double, arg2NativeValue, args[1]->NumberValue()); |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 404 | 399 |
| 405 static v8::Handle<v8::Value> methodWithExceptionMethodCallback(const v8::Argumen
ts& args) | 400 static v8::Handle<v8::Value> methodWithExceptionMethodCallback(const v8::Argumen
ts& args) |
| 406 { | 401 { |
| 407 return TestTypedefsV8Internal::methodWithExceptionMethod(args); | 402 return TestTypedefsV8Internal::methodWithExceptionMethod(args); |
| 408 } | 403 } |
| 409 | 404 |
| 410 static v8::Handle<v8::Value> constructor(const v8::Arguments& args) | 405 static v8::Handle<v8::Value> constructor(const v8::Arguments& args) |
| 411 { | 406 { |
| 412 if (args.Length() < 2) | 407 if (args.Length() < 2) |
| 413 return throwNotEnoughArgumentsError(args.GetIsolate()); | 408 return throwNotEnoughArgumentsError(args.GetIsolate()); |
| 414 | |
| 415 ExceptionCode ec = 0; | |
| 416 V8TRYCATCH_FOR_V8STRINGRESOURCE(V8StringResource<>, hello, args[0]); | 409 V8TRYCATCH_FOR_V8STRINGRESOURCE(V8StringResource<>, hello, args[0]); |
| 417 if (args.Length() <= 1 || !args[1]->IsFunction()) | 410 if (args.Length() <= 1 || !args[1]->IsFunction()) |
| 418 return throwTypeError(0, args.GetIsolate()); | 411 return throwTypeError(0, args.GetIsolate()); |
| 419 RefPtr<TestCallback> testCallback = V8TestCallback::create(args[1], getScrip
tExecutionContext()); | 412 RefPtr<TestCallback> testCallback = V8TestCallback::create(args[1], getScrip
tExecutionContext()); |
| 420 | 413 |
| 421 RefPtr<TestTypedefs> impl = TestTypedefs::create(hello, testCallback); | 414 RefPtr<TestTypedefs> impl = TestTypedefs::create(hello, testCallback); |
| 422 v8::Handle<v8::Object> wrapper = args.Holder(); | 415 v8::Handle<v8::Object> wrapper = args.Holder(); |
| 423 | 416 |
| 424 V8DOMWrapper::associateObjectWithWrapper(impl.release(), &V8TestTypedefs::in
fo, wrapper, args.GetIsolate(), WrapperConfiguration::Dependent); | 417 V8DOMWrapper::associateObjectWithWrapper(impl.release(), &V8TestTypedefs::in
fo, wrapper, args.GetIsolate(), WrapperConfiguration::Dependent); |
| 425 return wrapper; | 418 return wrapper; |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 527 installPerContextProperties(wrapper, impl.get(), isolate); | 520 installPerContextProperties(wrapper, impl.get(), isolate); |
| 528 V8DOMWrapper::associateObjectWithWrapper(impl, &info, wrapper, isolate, Wrap
perConfiguration::Independent); | 521 V8DOMWrapper::associateObjectWithWrapper(impl, &info, wrapper, isolate, Wrap
perConfiguration::Independent); |
| 529 return wrapper; | 522 return wrapper; |
| 530 } | 523 } |
| 531 void V8TestTypedefs::derefObject(void* object) | 524 void V8TestTypedefs::derefObject(void* object) |
| 532 { | 525 { |
| 533 static_cast<TestTypedefs*>(object)->deref(); | 526 static_cast<TestTypedefs*>(object)->deref(); |
| 534 } | 527 } |
| 535 | 528 |
| 536 } // namespace WebCore | 529 } // namespace WebCore |
| OLD | NEW |