Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(487)

Side by Side Diff: Source/bindings/tests/results/V8TestObjectPython.cpp

Issue 94833002: Remove usage of deprecated V8 APIs from bindings code generator (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 1467 matching lines...) Expand 10 before | Expand all | Expand 10 after
1478 if (contextData && contextData->activityLogger()) { 1478 if (contextData && contextData->activityLogger()) {
1479 v8::Handle<v8::Value> loggerArg[] = { jsValue }; 1479 v8::Handle<v8::Value> loggerArg[] = { jsValue };
1480 contextData->activityLogger()->log("TestObjectPython.activityLoggingSett erForAllWorldsLongAttribute", 1, &loggerArg[0], "Setter"); 1480 contextData->activityLogger()->log("TestObjectPython.activityLoggingSett erForAllWorldsLongAttribute", 1, &loggerArg[0], "Setter");
1481 } 1481 }
1482 TestObjectPythonV8Internal::activityLoggingSetterForAllWorldsLongAttributeAt tributeSetter(jsValue, info); 1482 TestObjectPythonV8Internal::activityLoggingSetterForAllWorldsLongAttributeAt tributeSetter(jsValue, info);
1483 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 1483 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
1484 } 1484 }
1485 1485
1486 static void cachedAttributeAnyAttributeAttributeGetter(const v8::PropertyCallbac kInfo<v8::Value>& info) 1486 static void cachedAttributeAnyAttributeAttributeGetter(const v8::PropertyCallbac kInfo<v8::Value>& info)
1487 { 1487 {
1488 v8::Handle<v8::String> propertyName = v8::String::NewSymbol("cachedAttribute AnyAttribute"); 1488 v8::Handle<v8::String> propertyName = v8::String::NewFromUtf8(info.GetIsolat e(), "cachedAttributeAnyAttribute", v8::String::kInternalizedString);
1489 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); 1489 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
1490 if (!imp->isValueDirty()) { 1490 if (!imp->isValueDirty()) {
1491 v8::Handle<v8::Value> jsValue = info.Holder()->GetHiddenValue(propertyNa me); 1491 v8::Handle<v8::Value> jsValue = info.Holder()->GetHiddenValue(propertyNa me);
1492 if (!jsValue.IsEmpty()) { 1492 if (!jsValue.IsEmpty()) {
1493 v8SetReturnValue(info, jsValue); 1493 v8SetReturnValue(info, jsValue);
1494 return; 1494 return;
1495 } 1495 }
1496 } 1496 }
1497 ScriptValue jsValue = imp->cachedAttributeAnyAttribute(); 1497 ScriptValue jsValue = imp->cachedAttributeAnyAttribute();
1498 info.Holder()->SetHiddenValue(propertyName, jsValue.v8Value()); 1498 info.Holder()->SetHiddenValue(propertyName, jsValue.v8Value());
1499 v8SetReturnValue(info, jsValue.v8Value()); 1499 v8SetReturnValue(info, jsValue.v8Value());
1500 } 1500 }
1501 1501
1502 static void cachedAttributeAnyAttributeAttributeGetterCallback(v8::Local<v8::Str ing>, const v8::PropertyCallbackInfo<v8::Value>& info) 1502 static void cachedAttributeAnyAttributeAttributeGetterCallback(v8::Local<v8::Str ing>, const v8::PropertyCallbackInfo<v8::Value>& info)
1503 { 1503 {
1504 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 1504 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1505 TestObjectPythonV8Internal::cachedAttributeAnyAttributeAttributeGetter(info) ; 1505 TestObjectPythonV8Internal::cachedAttributeAnyAttributeAttributeGetter(info) ;
1506 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 1506 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
1507 } 1507 }
1508 1508
1509 static void cachedAttributeAnyAttributeAttributeSetter(v8::Local<v8::Value> jsVa lue, const v8::PropertyCallbackInfo<void>& info) 1509 static void cachedAttributeAnyAttributeAttributeSetter(v8::Local<v8::Value> jsVa lue, const v8::PropertyCallbackInfo<void>& info)
1510 { 1510 {
1511 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); 1511 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
1512 V8TRYCATCH_VOID(ScriptValue, cppValue, ScriptValue(jsValue, info.GetIsolate( ))); 1512 V8TRYCATCH_VOID(ScriptValue, cppValue, ScriptValue(jsValue, info.GetIsolate( )));
1513 imp->setCachedAttributeAnyAttribute(cppValue); 1513 imp->setCachedAttributeAnyAttribute(cppValue);
1514 info.Holder()->DeleteHiddenValue(v8::String::NewSymbol("cachedAttributeAnyAt tribute")); // Invalidate the cached value. 1514 info.Holder()->DeleteHiddenValue(v8::String::NewFromUtf8(info.GetIsolate(), "cachedAttributeAnyAttribute", v8::String::kInternalizedString)); // Invalidate the cached value.
1515 } 1515 }
1516 1516
1517 static void cachedAttributeAnyAttributeAttributeSetterCallback(v8::Local<v8::Str ing>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 1517 static void cachedAttributeAnyAttributeAttributeSetterCallback(v8::Local<v8::Str ing>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1518 { 1518 {
1519 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 1519 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1520 TestObjectPythonV8Internal::cachedAttributeAnyAttributeAttributeSetter(jsVal ue, info); 1520 TestObjectPythonV8Internal::cachedAttributeAnyAttributeAttributeSetter(jsVal ue, info);
1521 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 1521 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
1522 } 1522 }
1523 1523
1524 static void callWithExecutionContextAnyAttributeAttributeGetter(const v8::Proper tyCallbackInfo<v8::Value>& info) 1524 static void callWithExecutionContextAnyAttributeAttributeGetter(const v8::Proper tyCallbackInfo<v8::Value>& info)
(...skipping 4753 matching lines...) Expand 10 before | Expand all | Expand 10 after
6278 {"runtimeEnabledLongAttribute", TestObjectPythonV8Internal::runtimeEnabl edLongAttributeAttributeGetterCallback, TestObjectPythonV8Internal::runtimeEnabl edLongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>( v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */} ; 6278 {"runtimeEnabledLongAttribute", TestObjectPythonV8Internal::runtimeEnabl edLongAttributeAttributeGetterCallback, TestObjectPythonV8Internal::runtimeEnabl edLongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>( v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */} ;
6279 V8DOMConfiguration::installAttribute(instanceTemplate, prototypeTemplate , attributeConfiguration, isolate, currentWorldType); 6279 V8DOMConfiguration::installAttribute(instanceTemplate, prototypeTemplate , attributeConfiguration, isolate, currentWorldType);
6280 } 6280 }
6281 #if ENABLE(CONDITION) 6281 #if ENABLE(CONDITION)
6282 if (RuntimeEnabledFeatures::featureNameEnabled()) { 6282 if (RuntimeEnabledFeatures::featureNameEnabled()) {
6283 static const V8DOMConfiguration::AttributeConfiguration attributeConfigu ration =\ 6283 static const V8DOMConfiguration::AttributeConfiguration attributeConfigu ration =\
6284 {"conditionalRuntimeEnabledLongAttribute", TestObjectPythonV8Internal::c onditionalRuntimeEnabledLongAttributeAttributeGetterCallback, TestObjectPythonV8 Internal::conditionalRuntimeEnabledLongAttributeAttributeSetterCallback, 0, 0, 0 , static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute >(v8::None), 0 /* on instance */}; 6284 {"conditionalRuntimeEnabledLongAttribute", TestObjectPythonV8Internal::c onditionalRuntimeEnabledLongAttributeAttributeGetterCallback, TestObjectPythonV8 Internal::conditionalRuntimeEnabledLongAttributeAttributeSetterCallback, 0, 0, 0 , static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute >(v8::None), 0 /* on instance */};
6285 V8DOMConfiguration::installAttribute(instanceTemplate, prototypeTemplate , attributeConfiguration, isolate, currentWorldType); 6285 V8DOMConfiguration::installAttribute(instanceTemplate, prototypeTemplate , attributeConfiguration, isolate, currentWorldType);
6286 } 6286 }
6287 #endif // ENABLE(CONDITION) 6287 #endif // ENABLE(CONDITION)
6288 functionTemplate->Set(v8::String::NewSymbol("staticVoidMethod"), v8::Functio nTemplate::New(TestObjectPythonV8Internal::staticVoidMethodMethodCallback, v8Und efined(), v8::Local<v8::Signature>(), 0)); 6288 functionTemplate->Set(v8::String::NewFromUtf8(isolate, "staticVoidMethod", v 8::String::kInternalizedString), v8::FunctionTemplate::New(isolate, TestObjectPy thonV8Internal::staticVoidMethodMethodCallback, v8Undefined(), v8::Local<v8::Sig nature>(), 0));
6289 6289
6290 // Custom Signature 'voidMethodTestInterfaceEmptyArg' 6290 // Custom Signature 'voidMethodTestInterfaceEmptyArg'
6291 const int voidMethodTestInterfaceEmptyArgArgc = 1; 6291 const int voidMethodTestInterfaceEmptyArgArgc = 1;
6292 v8::Handle<v8::FunctionTemplate> voidMethodTestInterfaceEmptyArgArgv[voidMet hodTestInterfaceEmptyArgArgc] = { V8PerIsolateData::from(isolate)->rawTemplate(& V8TestInterfaceEmpty::wrapperTypeInfo, currentWorldType) }; 6292 v8::Handle<v8::FunctionTemplate> voidMethodTestInterfaceEmptyArgArgv[voidMet hodTestInterfaceEmptyArgArgc] = { V8PerIsolateData::from(isolate)->rawTemplate(& V8TestInterfaceEmpty::wrapperTypeInfo, currentWorldType) };
6293 v8::Handle<v8::Signature> voidMethodTestInterfaceEmptyArgSignature = v8::Sig nature::New(functionTemplate, voidMethodTestInterfaceEmptyArgArgc, voidMethodTes tInterfaceEmptyArgArgv); 6293 v8::Handle<v8::Signature> voidMethodTestInterfaceEmptyArgSignature = v8::Sig nature::New(isolate, functionTemplate, voidMethodTestInterfaceEmptyArgArgc, void MethodTestInterfaceEmptyArgArgv);
6294 prototypeTemplate->Set(v8::String::NewSymbol("voidMethodTestInterfaceEmptyAr g"), v8::FunctionTemplate::New(TestObjectPythonV8Internal::voidMethodTestInterfa ceEmptyArgMethodCallback, v8Undefined(), voidMethodTestInterfaceEmptyArgSignatur e, 1)); 6294 prototypeTemplate->Set(v8::String::NewFromUtf8(isolate, "voidMethodTestInter faceEmptyArg", v8::String::kInternalizedString), v8::FunctionTemplate::New(isola te, TestObjectPythonV8Internal::voidMethodTestInterfaceEmptyArgMethodCallback, v 8Undefined(), voidMethodTestInterfaceEmptyArgSignature, 1));
6295 6295
6296 // Custom Signature 'voidMethodLongArgTestInterfaceEmptyArg' 6296 // Custom Signature 'voidMethodLongArgTestInterfaceEmptyArg'
6297 const int voidMethodLongArgTestInterfaceEmptyArgArgc = 2; 6297 const int voidMethodLongArgTestInterfaceEmptyArgArgc = 2;
6298 v8::Handle<v8::FunctionTemplate> voidMethodLongArgTestInterfaceEmptyArgArgv[ voidMethodLongArgTestInterfaceEmptyArgArgc] = { v8::Handle<v8::FunctionTemplate> (), V8PerIsolateData::from(isolate)->rawTemplate(&V8TestInterfaceEmpty::wrapperT ypeInfo, currentWorldType) }; 6298 v8::Handle<v8::FunctionTemplate> voidMethodLongArgTestInterfaceEmptyArgArgv[ voidMethodLongArgTestInterfaceEmptyArgArgc] = { v8::Handle<v8::FunctionTemplate> (), V8PerIsolateData::from(isolate)->rawTemplate(&V8TestInterfaceEmpty::wrapperT ypeInfo, currentWorldType) };
6299 v8::Handle<v8::Signature> voidMethodLongArgTestInterfaceEmptyArgSignature = v8::Signature::New(functionTemplate, voidMethodLongArgTestInterfaceEmptyArgArgc, voidMethodLongArgTestInterfaceEmptyArgArgv); 6299 v8::Handle<v8::Signature> voidMethodLongArgTestInterfaceEmptyArgSignature = v8::Signature::New(isolate, functionTemplate, voidMethodLongArgTestInterfaceEmpt yArgArgc, voidMethodLongArgTestInterfaceEmptyArgArgv);
6300 prototypeTemplate->Set(v8::String::NewSymbol("voidMethodLongArgTestInterface EmptyArg"), v8::FunctionTemplate::New(TestObjectPythonV8Internal::voidMethodLong ArgTestInterfaceEmptyArgMethodCallback, v8Undefined(), voidMethodLongArgTestInte rfaceEmptyArgSignature, 2)); 6300 prototypeTemplate->Set(v8::String::NewFromUtf8(isolate, "voidMethodLongArgTe stInterfaceEmptyArg", v8::String::kInternalizedString), v8::FunctionTemplate::Ne w(isolate, TestObjectPythonV8Internal::voidMethodLongArgTestInterfaceEmptyArgMet hodCallback, v8Undefined(), voidMethodLongArgTestInterfaceEmptyArgSignature, 2)) ;
6301 6301
6302 // Custom Signature 'voidMethodAttrArg' 6302 // Custom Signature 'voidMethodAttrArg'
6303 const int voidMethodAttrArgArgc = 1; 6303 const int voidMethodAttrArgArgc = 1;
6304 v8::Handle<v8::FunctionTemplate> voidMethodAttrArgArgv[voidMethodAttrArgArgc ] = { V8PerIsolateData::from(isolate)->rawTemplate(&V8Attr::wrapperTypeInfo, cur rentWorldType) }; 6304 v8::Handle<v8::FunctionTemplate> voidMethodAttrArgArgv[voidMethodAttrArgArgc ] = { V8PerIsolateData::from(isolate)->rawTemplate(&V8Attr::wrapperTypeInfo, cur rentWorldType) };
6305 v8::Handle<v8::Signature> voidMethodAttrArgSignature = v8::Signature::New(fu nctionTemplate, voidMethodAttrArgArgc, voidMethodAttrArgArgv); 6305 v8::Handle<v8::Signature> voidMethodAttrArgSignature = v8::Signature::New(is olate, functionTemplate, voidMethodAttrArgArgc, voidMethodAttrArgArgv);
6306 prototypeTemplate->Set(v8::String::NewSymbol("voidMethodAttrArg"), v8::Funct ionTemplate::New(TestObjectPythonV8Internal::voidMethodAttrArgMethodCallback, v8 Undefined(), voidMethodAttrArgSignature, 1)); 6306 prototypeTemplate->Set(v8::String::NewFromUtf8(isolate, "voidMethodAttrArg", v8::String::kInternalizedString), v8::FunctionTemplate::New(isolate, TestObject PythonV8Internal::voidMethodAttrArgMethodCallback, v8Undefined(), voidMethodAttr ArgSignature, 1));
6307 6307
6308 // Custom Signature 'voidMethodDocumentArg' 6308 // Custom Signature 'voidMethodDocumentArg'
6309 const int voidMethodDocumentArgArgc = 1; 6309 const int voidMethodDocumentArgArgc = 1;
6310 v8::Handle<v8::FunctionTemplate> voidMethodDocumentArgArgv[voidMethodDocumen tArgArgc] = { V8PerIsolateData::from(isolate)->rawTemplate(&V8Document::wrapperT ypeInfo, currentWorldType) }; 6310 v8::Handle<v8::FunctionTemplate> voidMethodDocumentArgArgv[voidMethodDocumen tArgArgc] = { V8PerIsolateData::from(isolate)->rawTemplate(&V8Document::wrapperT ypeInfo, currentWorldType) };
6311 v8::Handle<v8::Signature> voidMethodDocumentArgSignature = v8::Signature::Ne w(functionTemplate, voidMethodDocumentArgArgc, voidMethodDocumentArgArgv); 6311 v8::Handle<v8::Signature> voidMethodDocumentArgSignature = v8::Signature::Ne w(isolate, functionTemplate, voidMethodDocumentArgArgc, voidMethodDocumentArgArg v);
6312 prototypeTemplate->Set(v8::String::NewSymbol("voidMethodDocumentArg"), v8::F unctionTemplate::New(TestObjectPythonV8Internal::voidMethodDocumentArgMethodCall back, v8Undefined(), voidMethodDocumentArgSignature, 1)); 6312 prototypeTemplate->Set(v8::String::NewFromUtf8(isolate, "voidMethodDocumentA rg", v8::String::kInternalizedString), v8::FunctionTemplate::New(isolate, TestOb jectPythonV8Internal::voidMethodDocumentArgMethodCallback, v8Undefined(), voidMe thodDocumentArgSignature, 1));
6313 6313
6314 // Custom Signature 'voidMethodDocumentTypeArg' 6314 // Custom Signature 'voidMethodDocumentTypeArg'
6315 const int voidMethodDocumentTypeArgArgc = 1; 6315 const int voidMethodDocumentTypeArgArgc = 1;
6316 v8::Handle<v8::FunctionTemplate> voidMethodDocumentTypeArgArgv[voidMethodDoc umentTypeArgArgc] = { V8PerIsolateData::from(isolate)->rawTemplate(&V8DocumentTy pe::wrapperTypeInfo, currentWorldType) }; 6316 v8::Handle<v8::FunctionTemplate> voidMethodDocumentTypeArgArgv[voidMethodDoc umentTypeArgArgc] = { V8PerIsolateData::from(isolate)->rawTemplate(&V8DocumentTy pe::wrapperTypeInfo, currentWorldType) };
6317 v8::Handle<v8::Signature> voidMethodDocumentTypeArgSignature = v8::Signature ::New(functionTemplate, voidMethodDocumentTypeArgArgc, voidMethodDocumentTypeArg Argv); 6317 v8::Handle<v8::Signature> voidMethodDocumentTypeArgSignature = v8::Signature ::New(isolate, functionTemplate, voidMethodDocumentTypeArgArgc, voidMethodDocume ntTypeArgArgv);
6318 prototypeTemplate->Set(v8::String::NewSymbol("voidMethodDocumentTypeArg"), v 8::FunctionTemplate::New(TestObjectPythonV8Internal::voidMethodDocumentTypeArgMe thodCallback, v8Undefined(), voidMethodDocumentTypeArgSignature, 1)); 6318 prototypeTemplate->Set(v8::String::NewFromUtf8(isolate, "voidMethodDocumentT ypeArg", v8::String::kInternalizedString), v8::FunctionTemplate::New(isolate, Te stObjectPythonV8Internal::voidMethodDocumentTypeArgMethodCallback, v8Undefined() , voidMethodDocumentTypeArgSignature, 1));
6319 6319
6320 // Custom Signature 'voidMethodElementArg' 6320 // Custom Signature 'voidMethodElementArg'
6321 const int voidMethodElementArgArgc = 1; 6321 const int voidMethodElementArgArgc = 1;
6322 v8::Handle<v8::FunctionTemplate> voidMethodElementArgArgv[voidMethodElementA rgArgc] = { V8PerIsolateData::from(isolate)->rawTemplate(&V8Element::wrapperType Info, currentWorldType) }; 6322 v8::Handle<v8::FunctionTemplate> voidMethodElementArgArgv[voidMethodElementA rgArgc] = { V8PerIsolateData::from(isolate)->rawTemplate(&V8Element::wrapperType Info, currentWorldType) };
6323 v8::Handle<v8::Signature> voidMethodElementArgSignature = v8::Signature::New (functionTemplate, voidMethodElementArgArgc, voidMethodElementArgArgv); 6323 v8::Handle<v8::Signature> voidMethodElementArgSignature = v8::Signature::New (isolate, functionTemplate, voidMethodElementArgArgc, voidMethodElementArgArgv);
6324 prototypeTemplate->Set(v8::String::NewSymbol("voidMethodElementArg"), v8::Fu nctionTemplate::New(TestObjectPythonV8Internal::voidMethodElementArgMethodCallba ck, v8Undefined(), voidMethodElementArgSignature, 1)); 6324 prototypeTemplate->Set(v8::String::NewFromUtf8(isolate, "voidMethodElementAr g", v8::String::kInternalizedString), v8::FunctionTemplate::New(isolate, TestObj ectPythonV8Internal::voidMethodElementArgMethodCallback, v8Undefined(), voidMeth odElementArgSignature, 1));
6325 6325
6326 // Custom Signature 'voidMethodNodeArg' 6326 // Custom Signature 'voidMethodNodeArg'
6327 const int voidMethodNodeArgArgc = 1; 6327 const int voidMethodNodeArgArgc = 1;
6328 v8::Handle<v8::FunctionTemplate> voidMethodNodeArgArgv[voidMethodNodeArgArgc ] = { V8PerIsolateData::from(isolate)->rawTemplate(&V8Node::wrapperTypeInfo, cur rentWorldType) }; 6328 v8::Handle<v8::FunctionTemplate> voidMethodNodeArgArgv[voidMethodNodeArgArgc ] = { V8PerIsolateData::from(isolate)->rawTemplate(&V8Node::wrapperTypeInfo, cur rentWorldType) };
6329 v8::Handle<v8::Signature> voidMethodNodeArgSignature = v8::Signature::New(fu nctionTemplate, voidMethodNodeArgArgc, voidMethodNodeArgArgv); 6329 v8::Handle<v8::Signature> voidMethodNodeArgSignature = v8::Signature::New(is olate, functionTemplate, voidMethodNodeArgArgc, voidMethodNodeArgArgv);
6330 prototypeTemplate->Set(v8::String::NewSymbol("voidMethodNodeArg"), v8::Funct ionTemplate::New(TestObjectPythonV8Internal::voidMethodNodeArgMethodCallback, v8 Undefined(), voidMethodNodeArgSignature, 1)); 6330 prototypeTemplate->Set(v8::String::NewFromUtf8(isolate, "voidMethodNodeArg", v8::String::kInternalizedString), v8::FunctionTemplate::New(isolate, TestObject PythonV8Internal::voidMethodNodeArgMethodCallback, v8Undefined(), voidMethodNode ArgSignature, 1));
6331 6331
6332 // Custom Signature 'voidMethodArrayBufferArg' 6332 // Custom Signature 'voidMethodArrayBufferArg'
6333 const int voidMethodArrayBufferArgArgc = 1; 6333 const int voidMethodArrayBufferArgArgc = 1;
6334 v8::Handle<v8::FunctionTemplate> voidMethodArrayBufferArgArgv[voidMethodArra yBufferArgArgc] = { v8::Handle<v8::FunctionTemplate>() }; 6334 v8::Handle<v8::FunctionTemplate> voidMethodArrayBufferArgArgv[voidMethodArra yBufferArgArgc] = { v8::Handle<v8::FunctionTemplate>() };
6335 v8::Handle<v8::Signature> voidMethodArrayBufferArgSignature = v8::Signature: :New(functionTemplate, voidMethodArrayBufferArgArgc, voidMethodArrayBufferArgArg v); 6335 v8::Handle<v8::Signature> voidMethodArrayBufferArgSignature = v8::Signature: :New(isolate, functionTemplate, voidMethodArrayBufferArgArgc, voidMethodArrayBuf ferArgArgv);
6336 prototypeTemplate->Set(v8::String::NewSymbol("voidMethodArrayBufferArg"), v8 ::FunctionTemplate::New(TestObjectPythonV8Internal::voidMethodArrayBufferArgMeth odCallback, v8Undefined(), voidMethodArrayBufferArgSignature, 1)); 6336 prototypeTemplate->Set(v8::String::NewFromUtf8(isolate, "voidMethodArrayBuff erArg", v8::String::kInternalizedString), v8::FunctionTemplate::New(isolate, Tes tObjectPythonV8Internal::voidMethodArrayBufferArgMethodCallback, v8Undefined(), voidMethodArrayBufferArgSignature, 1));
6337 6337
6338 // Custom Signature 'voidMethodArrayBufferViewArg' 6338 // Custom Signature 'voidMethodArrayBufferViewArg'
6339 const int voidMethodArrayBufferViewArgArgc = 1; 6339 const int voidMethodArrayBufferViewArgArgc = 1;
6340 v8::Handle<v8::FunctionTemplate> voidMethodArrayBufferViewArgArgv[voidMethod ArrayBufferViewArgArgc] = { v8::Handle<v8::FunctionTemplate>() }; 6340 v8::Handle<v8::FunctionTemplate> voidMethodArrayBufferViewArgArgv[voidMethod ArrayBufferViewArgArgc] = { v8::Handle<v8::FunctionTemplate>() };
6341 v8::Handle<v8::Signature> voidMethodArrayBufferViewArgSignature = v8::Signat ure::New(functionTemplate, voidMethodArrayBufferViewArgArgc, voidMethodArrayBuff erViewArgArgv); 6341 v8::Handle<v8::Signature> voidMethodArrayBufferViewArgSignature = v8::Signat ure::New(isolate, functionTemplate, voidMethodArrayBufferViewArgArgc, voidMethod ArrayBufferViewArgArgv);
6342 prototypeTemplate->Set(v8::String::NewSymbol("voidMethodArrayBufferViewArg") , v8::FunctionTemplate::New(TestObjectPythonV8Internal::voidMethodArrayBufferVie wArgMethodCallback, v8Undefined(), voidMethodArrayBufferViewArgSignature, 1)); 6342 prototypeTemplate->Set(v8::String::NewFromUtf8(isolate, "voidMethodArrayBuff erViewArg", v8::String::kInternalizedString), v8::FunctionTemplate::New(isolate, TestObjectPythonV8Internal::voidMethodArrayBufferViewArgMethodCallback, v8Undef ined(), voidMethodArrayBufferViewArgSignature, 1));
6343 6343
6344 // Custom Signature 'voidMethodFloat32ArrayArg' 6344 // Custom Signature 'voidMethodFloat32ArrayArg'
6345 const int voidMethodFloat32ArrayArgArgc = 1; 6345 const int voidMethodFloat32ArrayArgArgc = 1;
6346 v8::Handle<v8::FunctionTemplate> voidMethodFloat32ArrayArgArgv[voidMethodFlo at32ArrayArgArgc] = { v8::Handle<v8::FunctionTemplate>() }; 6346 v8::Handle<v8::FunctionTemplate> voidMethodFloat32ArrayArgArgv[voidMethodFlo at32ArrayArgArgc] = { v8::Handle<v8::FunctionTemplate>() };
6347 v8::Handle<v8::Signature> voidMethodFloat32ArrayArgSignature = v8::Signature ::New(functionTemplate, voidMethodFloat32ArrayArgArgc, voidMethodFloat32ArrayArg Argv); 6347 v8::Handle<v8::Signature> voidMethodFloat32ArrayArgSignature = v8::Signature ::New(isolate, functionTemplate, voidMethodFloat32ArrayArgArgc, voidMethodFloat3 2ArrayArgArgv);
6348 prototypeTemplate->Set(v8::String::NewSymbol("voidMethodFloat32ArrayArg"), v 8::FunctionTemplate::New(TestObjectPythonV8Internal::voidMethodFloat32ArrayArgMe thodCallback, v8Undefined(), voidMethodFloat32ArrayArgSignature, 1)); 6348 prototypeTemplate->Set(v8::String::NewFromUtf8(isolate, "voidMethodFloat32Ar rayArg", v8::String::kInternalizedString), v8::FunctionTemplate::New(isolate, Te stObjectPythonV8Internal::voidMethodFloat32ArrayArgMethodCallback, v8Undefined() , voidMethodFloat32ArrayArgSignature, 1));
6349 6349
6350 // Custom Signature 'voidMethodInt32ArrayArg' 6350 // Custom Signature 'voidMethodInt32ArrayArg'
6351 const int voidMethodInt32ArrayArgArgc = 1; 6351 const int voidMethodInt32ArrayArgArgc = 1;
6352 v8::Handle<v8::FunctionTemplate> voidMethodInt32ArrayArgArgv[voidMethodInt32 ArrayArgArgc] = { v8::Handle<v8::FunctionTemplate>() }; 6352 v8::Handle<v8::FunctionTemplate> voidMethodInt32ArrayArgArgv[voidMethodInt32 ArrayArgArgc] = { v8::Handle<v8::FunctionTemplate>() };
6353 v8::Handle<v8::Signature> voidMethodInt32ArrayArgSignature = v8::Signature:: New(functionTemplate, voidMethodInt32ArrayArgArgc, voidMethodInt32ArrayArgArgv); 6353 v8::Handle<v8::Signature> voidMethodInt32ArrayArgSignature = v8::Signature:: New(isolate, functionTemplate, voidMethodInt32ArrayArgArgc, voidMethodInt32Array ArgArgv);
6354 prototypeTemplate->Set(v8::String::NewSymbol("voidMethodInt32ArrayArg"), v8: :FunctionTemplate::New(TestObjectPythonV8Internal::voidMethodInt32ArrayArgMethod Callback, v8Undefined(), voidMethodInt32ArrayArgSignature, 1)); 6354 prototypeTemplate->Set(v8::String::NewFromUtf8(isolate, "voidMethodInt32Arra yArg", v8::String::kInternalizedString), v8::FunctionTemplate::New(isolate, Test ObjectPythonV8Internal::voidMethodInt32ArrayArgMethodCallback, v8Undefined(), vo idMethodInt32ArrayArgSignature, 1));
6355 6355
6356 // Custom Signature 'voidMethodUint8ArrayArg' 6356 // Custom Signature 'voidMethodUint8ArrayArg'
6357 const int voidMethodUint8ArrayArgArgc = 1; 6357 const int voidMethodUint8ArrayArgArgc = 1;
6358 v8::Handle<v8::FunctionTemplate> voidMethodUint8ArrayArgArgv[voidMethodUint8 ArrayArgArgc] = { v8::Handle<v8::FunctionTemplate>() }; 6358 v8::Handle<v8::FunctionTemplate> voidMethodUint8ArrayArgArgv[voidMethodUint8 ArrayArgArgc] = { v8::Handle<v8::FunctionTemplate>() };
6359 v8::Handle<v8::Signature> voidMethodUint8ArrayArgSignature = v8::Signature:: New(functionTemplate, voidMethodUint8ArrayArgArgc, voidMethodUint8ArrayArgArgv); 6359 v8::Handle<v8::Signature> voidMethodUint8ArrayArgSignature = v8::Signature:: New(isolate, functionTemplate, voidMethodUint8ArrayArgArgc, voidMethodUint8Array ArgArgv);
6360 prototypeTemplate->Set(v8::String::NewSymbol("voidMethodUint8ArrayArg"), v8: :FunctionTemplate::New(TestObjectPythonV8Internal::voidMethodUint8ArrayArgMethod Callback, v8Undefined(), voidMethodUint8ArrayArgSignature, 1)); 6360 prototypeTemplate->Set(v8::String::NewFromUtf8(isolate, "voidMethodUint8Arra yArg", v8::String::kInternalizedString), v8::FunctionTemplate::New(isolate, Test ObjectPythonV8Internal::voidMethodUint8ArrayArgMethodCallback, v8Undefined(), vo idMethodUint8ArrayArgSignature, 1));
6361 6361
6362 // Custom Signature 'voidMethodNullableStringArg' 6362 // Custom Signature 'voidMethodNullableStringArg'
6363 const int voidMethodNullableStringArgArgc = 1; 6363 const int voidMethodNullableStringArgArgc = 1;
6364 v8::Handle<v8::FunctionTemplate> voidMethodNullableStringArgArgv[voidMethodN ullableStringArgArgc] = { V8PerIsolateData::from(isolate)->rawTemplate(&V8TestIn terfaceEmpty::wrapperTypeInfo, currentWorldType) }; 6364 v8::Handle<v8::FunctionTemplate> voidMethodNullableStringArgArgv[voidMethodN ullableStringArgArgc] = { V8PerIsolateData::from(isolate)->rawTemplate(&V8TestIn terfaceEmpty::wrapperTypeInfo, currentWorldType) };
6365 v8::Handle<v8::Signature> voidMethodNullableStringArgSignature = v8::Signatu re::New(functionTemplate, voidMethodNullableStringArgArgc, voidMethodNullableStr ingArgArgv); 6365 v8::Handle<v8::Signature> voidMethodNullableStringArgSignature = v8::Signatu re::New(isolate, functionTemplate, voidMethodNullableStringArgArgc, voidMethodNu llableStringArgArgv);
6366 prototypeTemplate->Set(v8::String::NewSymbol("voidMethodNullableStringArg"), v8::FunctionTemplate::New(TestObjectPythonV8Internal::voidMethodNullableStringA rgMethodCallback, v8Undefined(), voidMethodNullableStringArgSignature, 1)); 6366 prototypeTemplate->Set(v8::String::NewFromUtf8(isolate, "voidMethodNullableS tringArg", v8::String::kInternalizedString), v8::FunctionTemplate::New(isolate, TestObjectPythonV8Internal::voidMethodNullableStringArgMethodCallback, v8Undefin ed(), voidMethodNullableStringArgSignature, 1));
6367 6367
6368 // Custom Signature 'voidMethodXPathNSResolverArg' 6368 // Custom Signature 'voidMethodXPathNSResolverArg'
6369 const int voidMethodXPathNSResolverArgArgc = 1; 6369 const int voidMethodXPathNSResolverArgArgc = 1;
6370 v8::Handle<v8::FunctionTemplate> voidMethodXPathNSResolverArgArgv[voidMethod XPathNSResolverArgArgc] = { v8::Handle<v8::FunctionTemplate>() }; 6370 v8::Handle<v8::FunctionTemplate> voidMethodXPathNSResolverArgArgv[voidMethod XPathNSResolverArgArgc] = { v8::Handle<v8::FunctionTemplate>() };
6371 v8::Handle<v8::Signature> voidMethodXPathNSResolverArgSignature = v8::Signat ure::New(functionTemplate, voidMethodXPathNSResolverArgArgc, voidMethodXPathNSRe solverArgArgv); 6371 v8::Handle<v8::Signature> voidMethodXPathNSResolverArgSignature = v8::Signat ure::New(isolate, functionTemplate, voidMethodXPathNSResolverArgArgc, voidMethod XPathNSResolverArgArgv);
6372 prototypeTemplate->Set(v8::String::NewSymbol("voidMethodXPathNSResolverArg") , v8::FunctionTemplate::New(TestObjectPythonV8Internal::voidMethodXPathNSResolve rArgMethodCallback, v8Undefined(), voidMethodXPathNSResolverArgSignature, 1)); 6372 prototypeTemplate->Set(v8::String::NewFromUtf8(isolate, "voidMethodXPathNSRe solverArg", v8::String::kInternalizedString), v8::FunctionTemplate::New(isolate, TestObjectPythonV8Internal::voidMethodXPathNSResolverArgMethodCallback, v8Undef ined(), voidMethodXPathNSResolverArgSignature, 1));
6373 6373
6374 // Custom Signature 'voidMethodVariadicTestInterfaceEmptyArg' 6374 // Custom Signature 'voidMethodVariadicTestInterfaceEmptyArg'
6375 const int voidMethodVariadicTestInterfaceEmptyArgArgc = 1; 6375 const int voidMethodVariadicTestInterfaceEmptyArgArgc = 1;
6376 v8::Handle<v8::FunctionTemplate> voidMethodVariadicTestInterfaceEmptyArgArgv [voidMethodVariadicTestInterfaceEmptyArgArgc] = { V8PerIsolateData::from(isolate )->rawTemplate(&V8TestInterfaceEmpty::wrapperTypeInfo, currentWorldType) }; 6376 v8::Handle<v8::FunctionTemplate> voidMethodVariadicTestInterfaceEmptyArgArgv [voidMethodVariadicTestInterfaceEmptyArgArgc] = { V8PerIsolateData::from(isolate )->rawTemplate(&V8TestInterfaceEmpty::wrapperTypeInfo, currentWorldType) };
6377 v8::Handle<v8::Signature> voidMethodVariadicTestInterfaceEmptyArgSignature = v8::Signature::New(functionTemplate, voidMethodVariadicTestInterfaceEmptyArgArg c, voidMethodVariadicTestInterfaceEmptyArgArgv); 6377 v8::Handle<v8::Signature> voidMethodVariadicTestInterfaceEmptyArgSignature = v8::Signature::New(isolate, functionTemplate, voidMethodVariadicTestInterfaceEm ptyArgArgc, voidMethodVariadicTestInterfaceEmptyArgArgv);
6378 prototypeTemplate->Set(v8::String::NewSymbol("voidMethodVariadicTestInterfac eEmptyArg"), v8::FunctionTemplate::New(TestObjectPythonV8Internal::voidMethodVar iadicTestInterfaceEmptyArgMethodCallback, v8Undefined(), voidMethodVariadicTestI nterfaceEmptyArgSignature, 1)); 6378 prototypeTemplate->Set(v8::String::NewFromUtf8(isolate, "voidMethodVariadicT estInterfaceEmptyArg", v8::String::kInternalizedString), v8::FunctionTemplate::N ew(isolate, TestObjectPythonV8Internal::voidMethodVariadicTestInterfaceEmptyArgM ethodCallback, v8Undefined(), voidMethodVariadicTestInterfaceEmptyArgSignature, 1));
6379 6379
6380 // Custom Signature 'voidMethodTestInterfaceEmptyArgVariadicTestInterfaceEmp tyArg' 6380 // Custom Signature 'voidMethodTestInterfaceEmptyArgVariadicTestInterfaceEmp tyArg'
6381 const int voidMethodTestInterfaceEmptyArgVariadicTestInterfaceEmptyArgArgc = 2; 6381 const int voidMethodTestInterfaceEmptyArgVariadicTestInterfaceEmptyArgArgc = 2;
6382 v8::Handle<v8::FunctionTemplate> voidMethodTestInterfaceEmptyArgVariadicTest InterfaceEmptyArgArgv[voidMethodTestInterfaceEmptyArgVariadicTestInterfaceEmptyA rgArgc] = { V8PerIsolateData::from(isolate)->rawTemplate(&V8TestInterfaceEmpty:: wrapperTypeInfo, currentWorldType), V8PerIsolateData::from(isolate)->rawTemplate (&V8TestInterfaceEmpty::wrapperTypeInfo, currentWorldType) }; 6382 v8::Handle<v8::FunctionTemplate> voidMethodTestInterfaceEmptyArgVariadicTest InterfaceEmptyArgArgv[voidMethodTestInterfaceEmptyArgVariadicTestInterfaceEmptyA rgArgc] = { V8PerIsolateData::from(isolate)->rawTemplate(&V8TestInterfaceEmpty:: wrapperTypeInfo, currentWorldType), V8PerIsolateData::from(isolate)->rawTemplate (&V8TestInterfaceEmpty::wrapperTypeInfo, currentWorldType) };
6383 v8::Handle<v8::Signature> voidMethodTestInterfaceEmptyArgVariadicTestInterfa ceEmptyArgSignature = v8::Signature::New(functionTemplate, voidMethodTestInterfa ceEmptyArgVariadicTestInterfaceEmptyArgArgc, voidMethodTestInterfaceEmptyArgVari adicTestInterfaceEmptyArgArgv); 6383 v8::Handle<v8::Signature> voidMethodTestInterfaceEmptyArgVariadicTestInterfa ceEmptyArgSignature = v8::Signature::New(isolate, functionTemplate, voidMethodTe stInterfaceEmptyArgVariadicTestInterfaceEmptyArgArgc, voidMethodTestInterfaceEmp tyArgVariadicTestInterfaceEmptyArgArgv);
6384 prototypeTemplate->Set(v8::String::NewSymbol("voidMethodTestInterfaceEmptyAr gVariadicTestInterfaceEmptyArg"), v8::FunctionTemplate::New(TestObjectPythonV8In ternal::voidMethodTestInterfaceEmptyArgVariadicTestInterfaceEmptyArgMethodCallba ck, v8Undefined(), voidMethodTestInterfaceEmptyArgVariadicTestInterfaceEmptyArgS ignature, 2)); 6384 prototypeTemplate->Set(v8::String::NewFromUtf8(isolate, "voidMethodTestInter faceEmptyArgVariadicTestInterfaceEmptyArg", v8::String::kInternalizedString), v8 ::FunctionTemplate::New(isolate, TestObjectPythonV8Internal::voidMethodTestInter faceEmptyArgVariadicTestInterfaceEmptyArgMethodCallback, v8Undefined(), voidMeth odTestInterfaceEmptyArgVariadicTestInterfaceEmptyArgSignature, 2));
6385 functionTemplate->Set(v8::String::NewSymbol("overloadedStaticMethod"), v8::F unctionTemplate::New(TestObjectPythonV8Internal::overloadedStaticMethodMethodCal lback, v8Undefined(), v8::Local<v8::Signature>(), 1)); 6385 functionTemplate->Set(v8::String::NewFromUtf8(isolate, "overloadedStaticMeth od", v8::String::kInternalizedString), v8::FunctionTemplate::New(isolate, TestOb jectPythonV8Internal::overloadedStaticMethodMethodCallback, v8Undefined(), v8::L ocal<v8::Signature>(), 1));
6386 6386
6387 // Custom Signature 'voidMethodDefaultUndefinedTestInterfaceEmptyArg' 6387 // Custom Signature 'voidMethodDefaultUndefinedTestInterfaceEmptyArg'
6388 const int voidMethodDefaultUndefinedTestInterfaceEmptyArgArgc = 1; 6388 const int voidMethodDefaultUndefinedTestInterfaceEmptyArgArgc = 1;
6389 v8::Handle<v8::FunctionTemplate> voidMethodDefaultUndefinedTestInterfaceEmpt yArgArgv[voidMethodDefaultUndefinedTestInterfaceEmptyArgArgc] = { V8PerIsolateDa ta::from(isolate)->rawTemplate(&V8TestInterfaceEmpty::wrapperTypeInfo, currentWo rldType) }; 6389 v8::Handle<v8::FunctionTemplate> voidMethodDefaultUndefinedTestInterfaceEmpt yArgArgv[voidMethodDefaultUndefinedTestInterfaceEmptyArgArgc] = { V8PerIsolateDa ta::from(isolate)->rawTemplate(&V8TestInterfaceEmpty::wrapperTypeInfo, currentWo rldType) };
6390 v8::Handle<v8::Signature> voidMethodDefaultUndefinedTestInterfaceEmptyArgSig nature = v8::Signature::New(functionTemplate, voidMethodDefaultUndefinedTestInte rfaceEmptyArgArgc, voidMethodDefaultUndefinedTestInterfaceEmptyArgArgv); 6390 v8::Handle<v8::Signature> voidMethodDefaultUndefinedTestInterfaceEmptyArgSig nature = v8::Signature::New(isolate, functionTemplate, voidMethodDefaultUndefine dTestInterfaceEmptyArgArgc, voidMethodDefaultUndefinedTestInterfaceEmptyArgArgv) ;
6391 prototypeTemplate->Set(v8::String::NewSymbol("voidMethodDefaultUndefinedTest InterfaceEmptyArg"), v8::FunctionTemplate::New(TestObjectPythonV8Internal::voidM ethodDefaultUndefinedTestInterfaceEmptyArgMethodCallback, v8Undefined(), voidMet hodDefaultUndefinedTestInterfaceEmptyArgSignature, 0)); 6391 prototypeTemplate->Set(v8::String::NewFromUtf8(isolate, "voidMethodDefaultUn definedTestInterfaceEmptyArg", v8::String::kInternalizedString), v8::FunctionTem plate::New(isolate, TestObjectPythonV8Internal::voidMethodDefaultUndefinedTestIn terfaceEmptyArgMethodCallback, v8Undefined(), voidMethodDefaultUndefinedTestInte rfaceEmptyArgSignature, 0));
6392 #if ENABLE(CONDITION) 6392 #if ENABLE(CONDITION)
6393 functionTemplate->Set(v8::String::NewSymbol("conditionalConditionStaticVoidM ethod"), v8::FunctionTemplate::New(TestObjectPythonV8Internal::conditionalCondit ionStaticVoidMethodMethodCallback, v8Undefined(), v8::Local<v8::Signature>(), 0) ); 6393 functionTemplate->Set(v8::String::NewFromUtf8(isolate, "conditionalCondition StaticVoidMethod", v8::String::kInternalizedString), v8::FunctionTemplate::New(i solate, TestObjectPythonV8Internal::conditionalConditionStaticVoidMethodMethodCa llback, v8Undefined(), v8::Local<v8::Signature>(), 0));
6394 #endif // ENABLE(CONDITION) 6394 #endif // ENABLE(CONDITION)
6395 prototypeTemplate->Set(v8::String::NewSymbol("doNotCheckSignatureVoidMethod" ), v8::FunctionTemplate::New(TestObjectPythonV8Internal::doNotCheckSignatureVoid MethodMethodCallback, v8Undefined(), v8::Local<v8::Signature>(), 0)); 6395 prototypeTemplate->Set(v8::String::NewFromUtf8(isolate, "doNotCheckSignature VoidMethod", v8::String::kInternalizedString), v8::FunctionTemplate::New(isolate , TestObjectPythonV8Internal::doNotCheckSignatureVoidMethodMethodCallback, v8Und efined(), v8::Local<v8::Signature>(), 0));
6396 prototypeTemplate->Set(v8::String::NewSymbol("notEnumerableVoidMethod"), v8: :FunctionTemplate::New(TestObjectPythonV8Internal::notEnumerableVoidMethodMethod Callback, v8Undefined(), defaultSignature, 0), static_cast<v8::PropertyAttribute >(v8::DontDelete | v8::DontEnum)); 6396 prototypeTemplate->Set(v8::String::NewFromUtf8(isolate, "notEnumerableVoidMe thod", v8::String::kInternalizedString), v8::FunctionTemplate::New(isolate, Test ObjectPythonV8Internal::notEnumerableVoidMethodMethodCallback, v8Undefined(), de faultSignature, 0), static_cast<v8::PropertyAttribute>(v8::DontDelete | v8::Dont Enum));
6397 6397
6398 // Custom Signature 'perWorldBindingsVoidMethodTestInterfaceEmptyArg' 6398 // Custom Signature 'perWorldBindingsVoidMethodTestInterfaceEmptyArg'
6399 const int perWorldBindingsVoidMethodTestInterfaceEmptyArgArgc = 1; 6399 const int perWorldBindingsVoidMethodTestInterfaceEmptyArgArgc = 1;
6400 v8::Handle<v8::FunctionTemplate> perWorldBindingsVoidMethodTestInterfaceEmpt yArgArgv[perWorldBindingsVoidMethodTestInterfaceEmptyArgArgc] = { V8PerIsolateDa ta::from(isolate)->rawTemplate(&V8TestInterfaceEmpty::wrapperTypeInfo, currentWo rldType) }; 6400 v8::Handle<v8::FunctionTemplate> perWorldBindingsVoidMethodTestInterfaceEmpt yArgArgv[perWorldBindingsVoidMethodTestInterfaceEmptyArgArgc] = { V8PerIsolateDa ta::from(isolate)->rawTemplate(&V8TestInterfaceEmpty::wrapperTypeInfo, currentWo rldType) };
6401 v8::Handle<v8::Signature> perWorldBindingsVoidMethodTestInterfaceEmptyArgSig nature = v8::Signature::New(functionTemplate, perWorldBindingsVoidMethodTestInte rfaceEmptyArgArgc, perWorldBindingsVoidMethodTestInterfaceEmptyArgArgv); 6401 v8::Handle<v8::Signature> perWorldBindingsVoidMethodTestInterfaceEmptyArgSig nature = v8::Signature::New(isolate, functionTemplate, perWorldBindingsVoidMetho dTestInterfaceEmptyArgArgc, perWorldBindingsVoidMethodTestInterfaceEmptyArgArgv) ;
6402 if (currentWorldType == MainWorld) { 6402 if (currentWorldType == MainWorld) {
6403 prototypeTemplate->Set(v8::String::NewSymbol("perWorldBindingsVoidMethod TestInterfaceEmptyArg"), v8::FunctionTemplate::New(TestObjectPythonV8Internal::p erWorldBindingsVoidMethodTestInterfaceEmptyArgMethodCallbackForMainWorld, v8Unde fined(), perWorldBindingsVoidMethodTestInterfaceEmptyArgSignature, 1)); 6403 prototypeTemplate->Set(v8::String::NewFromUtf8(isolate, "perWorldBinding sVoidMethodTestInterfaceEmptyArg", v8::String::kInternalizedString), v8::Functio nTemplate::New(isolate, TestObjectPythonV8Internal::perWorldBindingsVoidMethodTe stInterfaceEmptyArgMethodCallbackForMainWorld, v8Undefined(), perWorldBindingsVo idMethodTestInterfaceEmptyArgSignature, 1));
6404 } else { 6404 } else {
6405 prototypeTemplate->Set(v8::String::NewSymbol("perWorldBindingsVoidMethod TestInterfaceEmptyArg"), v8::FunctionTemplate::New(TestObjectPythonV8Internal::p erWorldBindingsVoidMethodTestInterfaceEmptyArgMethodCallback, v8Undefined(), per WorldBindingsVoidMethodTestInterfaceEmptyArgSignature, 1)); 6405 prototypeTemplate->Set(v8::String::NewFromUtf8(isolate, "perWorldBinding sVoidMethodTestInterfaceEmptyArg", v8::String::kInternalizedString), v8::Functio nTemplate::New(isolate, TestObjectPythonV8Internal::perWorldBindingsVoidMethodTe stInterfaceEmptyArgMethodCallback, v8Undefined(), perWorldBindingsVoidMethodTest InterfaceEmptyArgSignature, 1));
6406 } 6406 }
6407 prototypeTemplate->Set(v8::String::NewSymbol("readOnlyVoidMethod"), v8::Func tionTemplate::New(TestObjectPythonV8Internal::readOnlyVoidMethodMethodCallback, v8Undefined(), defaultSignature, 0), static_cast<v8::PropertyAttribute>(v8::Dont Delete | v8::ReadOnly)); 6407 prototypeTemplate->Set(v8::String::NewFromUtf8(isolate, "readOnlyVoidMethod" , v8::String::kInternalizedString), v8::FunctionTemplate::New(isolate, TestObjec tPythonV8Internal::readOnlyVoidMethodMethodCallback, v8Undefined(), defaultSigna ture, 0), static_cast<v8::PropertyAttribute>(v8::DontDelete | v8::ReadOnly));
6408 prototypeTemplate->Set(v8::String::NewSymbol("notEnumerableReadOnlyVoidMetho d"), v8::FunctionTemplate::New(TestObjectPythonV8Internal::notEnumerableReadOnly VoidMethodMethodCallback, v8Undefined(), defaultSignature, 0), static_cast<v8::P ropertyAttribute>(v8::DontDelete | v8::DontEnum | v8::ReadOnly)); 6408 prototypeTemplate->Set(v8::String::NewFromUtf8(isolate, "notEnumerableReadOn lyVoidMethod", v8::String::kInternalizedString), v8::FunctionTemplate::New(isola te, TestObjectPythonV8Internal::notEnumerableReadOnlyVoidMethodMethodCallback, v 8Undefined(), defaultSignature, 0), static_cast<v8::PropertyAttribute>(v8::DontD elete | v8::DontEnum | v8::ReadOnly));
6409 if (RuntimeEnabledFeatures::featureNameEnabled()) 6409 if (RuntimeEnabledFeatures::featureNameEnabled())
6410 prototypeTemplate->Set(v8::String::NewSymbol("runtimeEnabledVoidMethod") , v8::FunctionTemplate::New(TestObjectPythonV8Internal::runtimeEnabledVoidMethod MethodCallback, v8Undefined(), defaultSignature, 0)); 6410 prototypeTemplate->Set(v8::String::NewFromUtf8(isolate, "runtimeEnabledV oidMethod", v8::String::kInternalizedString), v8::FunctionTemplate::New(isolate, TestObjectPythonV8Internal::runtimeEnabledVoidMethodMethodCallback, v8Undefined (), defaultSignature, 0));
6411 if (currentWorldType == MainWorld) { 6411 if (currentWorldType == MainWorld) {
6412 if (RuntimeEnabledFeatures::featureNameEnabled()) 6412 if (RuntimeEnabledFeatures::featureNameEnabled())
6413 prototypeTemplate->Set(v8::String::NewSymbol("perWorldBindingsRuntim eEnabledVoidMethod"), v8::FunctionTemplate::New(TestObjectPythonV8Internal::perW orldBindingsRuntimeEnabledVoidMethodMethodCallbackForMainWorld, v8Undefined(), d efaultSignature, 0)); 6413 prototypeTemplate->Set(v8::String::NewFromUtf8(isolate, "perWorldBin dingsRuntimeEnabledVoidMethod", v8::String::kInternalizedString), v8::FunctionTe mplate::New(isolate, TestObjectPythonV8Internal::perWorldBindingsRuntimeEnabledV oidMethodMethodCallbackForMainWorld, v8Undefined(), defaultSignature, 0));
6414 } else { 6414 } else {
6415 if (RuntimeEnabledFeatures::featureNameEnabled()) 6415 if (RuntimeEnabledFeatures::featureNameEnabled())
6416 prototypeTemplate->Set(v8::String::NewSymbol("perWorldBindingsRuntim eEnabledVoidMethod"), v8::FunctionTemplate::New(TestObjectPythonV8Internal::perW orldBindingsRuntimeEnabledVoidMethodMethodCallback, v8Undefined(), defaultSignat ure, 0)); 6416 prototypeTemplate->Set(v8::String::NewFromUtf8(isolate, "perWorldBin dingsRuntimeEnabledVoidMethod", v8::String::kInternalizedString), v8::FunctionTe mplate::New(isolate, TestObjectPythonV8Internal::perWorldBindingsRuntimeEnabledV oidMethodMethodCallback, v8Undefined(), defaultSignature, 0));
6417 } 6417 }
6418 instanceTemplate->Set(v8::String::NewSymbol("unforgeableVoidMethod"), v8::Fu nctionTemplate::New(TestObjectPythonV8Internal::unforgeableVoidMethodMethodCallb ack, v8Undefined(), defaultSignature, 0)); 6418 instanceTemplate->Set(v8::String::NewFromUtf8(isolate, "unforgeableVoidMetho d", v8::String::kInternalizedString), v8::FunctionTemplate::New(isolate, TestObj ectPythonV8Internal::unforgeableVoidMethodMethodCallback, v8Undefined(), default Signature, 0));
6419 functionTemplate->SetNativeDataProperty(v8::String::NewSymbol("staticStringA ttribute"), TestObjectPythonV8Internal::staticStringAttributeAttributeGetterCall back, TestObjectPythonV8Internal::staticStringAttributeAttributeSetterCallback, v8::External::New(isolate, 0), static_cast<v8::PropertyAttribute>(v8::None), v8: :Handle<v8::AccessorSignature>(), static_cast<v8::AccessControl>(v8::DEFAULT)); 6419 functionTemplate->SetNativeDataProperty(v8::String::NewFromUtf8(isolate, "st aticStringAttribute", v8::String::kInternalizedString), TestObjectPythonV8Intern al::staticStringAttributeAttributeGetterCallback, TestObjectPythonV8Internal::st aticStringAttributeAttributeSetterCallback, v8::External::New(isolate, 0), stati c_cast<v8::PropertyAttribute>(v8::None), v8::Handle<v8::AccessorSignature>(), st atic_cast<v8::AccessControl>(v8::DEFAULT));
6420 functionTemplate->SetNativeDataProperty(v8::String::NewSymbol("staticLongAtt ribute"), TestObjectPythonV8Internal::staticLongAttributeAttributeGetterCallback , TestObjectPythonV8Internal::staticLongAttributeAttributeSetterCallback, v8::Ex ternal::New(isolate, 0), static_cast<v8::PropertyAttribute>(v8::None), v8::Handl e<v8::AccessorSignature>(), static_cast<v8::AccessControl>(v8::DEFAULT)); 6420 functionTemplate->SetNativeDataProperty(v8::String::NewFromUtf8(isolate, "st aticLongAttribute", v8::String::kInternalizedString), TestObjectPythonV8Internal ::staticLongAttributeAttributeGetterCallback, TestObjectPythonV8Internal::static LongAttributeAttributeSetterCallback, v8::External::New(isolate, 0), static_cast <v8::PropertyAttribute>(v8::None), v8::Handle<v8::AccessorSignature>(), static_c ast<v8::AccessControl>(v8::DEFAULT));
6421 6421
6422 // Custom toString template 6422 // Custom toString template
6423 functionTemplate->Set(v8::String::NewSymbol("toString"), V8PerIsolateData::c urrent()->toStringTemplate()); 6423 functionTemplate->Set(v8::String::NewFromUtf8(isolate, "toString", v8::Strin g::kInternalizedString), V8PerIsolateData::current()->toStringTemplate());
6424 return functionTemplate; 6424 return functionTemplate;
6425 } 6425 }
6426 6426
6427 v8::Handle<v8::FunctionTemplate> V8TestObjectPython::GetTemplate(v8::Isolate* is olate, WrapperWorldType currentWorldType) 6427 v8::Handle<v8::FunctionTemplate> V8TestObjectPython::GetTemplate(v8::Isolate* is olate, WrapperWorldType currentWorldType)
6428 { 6428 {
6429 V8PerIsolateData* data = V8PerIsolateData::from(isolate); 6429 V8PerIsolateData* data = V8PerIsolateData::from(isolate);
6430 V8PerIsolateData::TemplateMap::iterator result = data->templateMap(currentWo rldType).find(&wrapperTypeInfo); 6430 V8PerIsolateData::TemplateMap::iterator result = data->templateMap(currentWo rldType).find(&wrapperTypeInfo);
6431 if (result != data->templateMap(currentWorldType).end()) 6431 if (result != data->templateMap(currentWorldType).end())
6432 return result->value.newLocal(isolate); 6432 return result->value.newLocal(isolate);
6433 6433
6434 TRACE_EVENT_SCOPED_SAMPLING_STATE("Blink", "BuildDOMTemplate"); 6434 TRACE_EVENT_SCOPED_SAMPLING_STATE("Blink", "BuildDOMTemplate");
6435 v8::HandleScope handleScope(isolate); 6435 v8::EscapableHandleScope handleScope(isolate);
6436 v8::Handle<v8::FunctionTemplate> templ = 6436 v8::Local<v8::FunctionTemplate> templ =
6437 ConfigureV8TestObjectPythonTemplate(data->rawTemplate(&wrapperTypeInfo, currentWorldType), isolate, currentWorldType); 6437 ConfigureV8TestObjectPythonTemplate(data->rawTemplate(&wrapperTypeInfo, currentWorldType), isolate, currentWorldType);
6438 data->templateMap(currentWorldType).add(&wrapperTypeInfo, UnsafePersistent<v 8::FunctionTemplate>(isolate, templ)); 6438 data->templateMap(currentWorldType).add(&wrapperTypeInfo, UnsafePersistent<v 8::FunctionTemplate>(isolate, templ));
6439 return handleScope.Close(templ); 6439 return handleScope.Escape(templ);
6440 } 6440 }
6441 6441
6442 bool V8TestObjectPython::hasInstance(v8::Handle<v8::Value> jsValue, v8::Isolate* isolate, WrapperWorldType currentWorldType) 6442 bool V8TestObjectPython::hasInstance(v8::Handle<v8::Value> jsValue, v8::Isolate* isolate, WrapperWorldType currentWorldType)
6443 { 6443 {
6444 return V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, jsValu e, currentWorldType); 6444 return V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, jsValu e, currentWorldType);
6445 } 6445 }
6446 6446
6447 bool V8TestObjectPython::hasInstanceInAnyWorld(v8::Handle<v8::Value> jsValue, v8 ::Isolate* isolate) 6447 bool V8TestObjectPython::hasInstanceInAnyWorld(v8::Handle<v8::Value> jsValue, v8 ::Isolate* isolate)
6448 { 6448 {
6449 return V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, jsValu e, MainWorld) 6449 return V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, jsValu e, MainWorld)
6450 || V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, jsValu e, IsolatedWorld) 6450 || V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, jsValu e, IsolatedWorld)
6451 || V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, jsValu e, WorkerWorld); 6451 || V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, jsValu e, WorkerWorld);
6452 } 6452 }
6453 6453
6454 void V8TestObjectPython::installPerContextEnabledProperties(v8::Handle<v8::Objec t> instanceTemplate, TestObjectPython* impl, v8::Isolate* isolate) 6454 void V8TestObjectPython::installPerContextEnabledProperties(v8::Handle<v8::Objec t> instanceTemplate, TestObjectPython* impl, v8::Isolate* isolate)
6455 { 6455 {
6456 v8::Local<v8::Object> prototypeTemplate = v8::Local<v8::Object>::Cast(instan ceTemplate->GetPrototype()); 6456 v8::Local<v8::Object> prototypeTemplate = v8::Local<v8::Object>::Cast(instan ceTemplate->GetPrototype());
6457 if (ContextFeatures::featureNameEnabled(impl->document())) { 6457 if (ContextFeatures::featureNameEnabled(impl->document())) {
6458 static const V8DOMConfiguration::AttributeConfiguration attributeConfigu ration =\ 6458 static const V8DOMConfiguration::AttributeConfiguration attributeConfigu ration =\
6459 {"perContextEnabledLongAttribute", TestObjectPythonV8Internal::perContex tEnabledLongAttributeAttributeGetterCallback, TestObjectPythonV8Internal::perCon textEnabledLongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::Access Control>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on ins tance */}; 6459 {"perContextEnabledLongAttribute", TestObjectPythonV8Internal::perContex tEnabledLongAttributeAttributeGetterCallback, TestObjectPythonV8Internal::perCon textEnabledLongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::Access Control>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on ins tance */};
6460 V8DOMConfiguration::installAttribute(instanceTemplate, prototypeTemplate , attributeConfiguration, isolate); 6460 V8DOMConfiguration::installAttribute(instanceTemplate, prototypeTemplate , attributeConfiguration, isolate);
6461 } 6461 }
6462 } 6462 }
6463 6463
6464 void V8TestObjectPython::installPerContextEnabledMethods(v8::Handle<v8::Object> prototypeTemplate, v8::Isolate* isolate) 6464 void V8TestObjectPython::installPerContextEnabledMethods(v8::Handle<v8::Object> prototypeTemplate, v8::Isolate* isolate)
6465 { 6465 {
6466 UNUSED_PARAM(prototypeTemplate); 6466 UNUSED_PARAM(prototypeTemplate);
6467 v8::Local<v8::Signature> defaultSignature = v8::Signature::New(GetTemplate(i solate, worldType(isolate))); 6467 v8::Local<v8::Signature> defaultSignature = v8::Signature::New(isolate, GetT emplate(isolate, worldType(isolate)));
6468 UNUSED_PARAM(defaultSignature); 6468 UNUSED_PARAM(defaultSignature);
6469 6469
6470 ExecutionContext* context = toExecutionContext(prototypeTemplate->CreationCo ntext()); 6470 ExecutionContext* context = toExecutionContext(prototypeTemplate->CreationCo ntext());
6471 if (context && context->isDocument() && ContextFeatures::featureNameEnabled( toDocument(context))) 6471 if (context && context->isDocument() && ContextFeatures::featureNameEnabled( toDocument(context)))
6472 prototypeTemplate->Set(v8::String::NewSymbol("perContextEnabledVoidMetho d"), v8::FunctionTemplate::New(TestObjectPythonV8Internal::perContextEnabledVoid MethodMethodCallback, v8Undefined(), defaultSignature, 0)->GetFunction()); 6472 prototypeTemplate->Set(v8::String::NewFromUtf8(isolate, "perContextEnabl edVoidMethod", v8::String::kInternalizedString), v8::FunctionTemplate::New(isola te, TestObjectPythonV8Internal::perContextEnabledVoidMethodMethodCallback, v8Und efined(), defaultSignature, 0)->GetFunction());
6473 } 6473 }
6474 6474
6475 v8::Handle<v8::Object> V8TestObjectPython::createWrapper(PassRefPtr<TestObjectPy thon> impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate) 6475 v8::Handle<v8::Object> V8TestObjectPython::createWrapper(PassRefPtr<TestObjectPy thon> impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
6476 { 6476 {
6477 ASSERT(impl); 6477 ASSERT(impl);
6478 ASSERT(!DOMDataStore::containsWrapper<V8TestObjectPython>(impl.get(), isolat e)); 6478 ASSERT(!DOMDataStore::containsWrapper<V8TestObjectPython>(impl.get(), isolat e));
6479 if (ScriptWrappable::wrapperCanBeStoredInObject(impl.get())) { 6479 if (ScriptWrappable::wrapperCanBeStoredInObject(impl.get())) {
6480 const WrapperTypeInfo* actualInfo = ScriptWrappable::getTypeInfoFromObje ct(impl.get()); 6480 const WrapperTypeInfo* actualInfo = ScriptWrappable::getTypeInfoFromObje ct(impl.get());
6481 // Might be a XXXConstructor::wrapperTypeInfo instead of an XXX::wrapper TypeInfo. These will both have 6481 // Might be a XXXConstructor::wrapperTypeInfo instead of an XXX::wrapper TypeInfo. These will both have
6482 // the same object de-ref functions, though, so use that as the basis of the check. 6482 // the same object de-ref functions, though, so use that as the basis of the check.
(...skipping 14 matching lines...) Expand all
6497 fromInternalPointer(object)->deref(); 6497 fromInternalPointer(object)->deref();
6498 } 6498 }
6499 6499
6500 template<> 6500 template<>
6501 v8::Handle<v8::Value> toV8NoInline(TestObjectPython* impl, v8::Handle<v8::Object > creationContext, v8::Isolate* isolate) 6501 v8::Handle<v8::Value> toV8NoInline(TestObjectPython* impl, v8::Handle<v8::Object > creationContext, v8::Isolate* isolate)
6502 { 6502 {
6503 return toV8(impl, creationContext, isolate); 6503 return toV8(impl, creationContext, isolate);
6504 } 6504 }
6505 6505
6506 } // namespace WebCore 6506 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/bindings/tests/results/V8TestObject.cpp ('k') | Source/bindings/tests/results/V8TestOverloadedConstructors.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698