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

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

Issue 176963017: Remove WrapperWorldType from V8 binding (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 months 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 7595 matching lines...) Expand 10 before | Expand all | Expand 10 after
7606 {"raisesExceptionVoidMethodOptionalTestCallbackInterfaceArg", TestObjectPyth onV8Internal::raisesExceptionVoidMethodOptionalTestCallbackInterfaceArgMethodCal lback, 0, 0}, 7606 {"raisesExceptionVoidMethodOptionalTestCallbackInterfaceArg", TestObjectPyth onV8Internal::raisesExceptionVoidMethodOptionalTestCallbackInterfaceArgMethodCal lback, 0, 0},
7607 {"raisesExceptionTestInterfaceEmptyVoidMethod", TestObjectPythonV8Internal:: raisesExceptionTestInterfaceEmptyVoidMethodMethodCallback, 0, 0}, 7607 {"raisesExceptionTestInterfaceEmptyVoidMethod", TestObjectPythonV8Internal:: raisesExceptionTestInterfaceEmptyVoidMethodMethodCallback, 0, 0},
7608 {"strictTypeCheckingVoidMethodTestInterfaceEmptyArg", TestObjectPythonV8Inte rnal::strictTypeCheckingVoidMethodTestInterfaceEmptyArgMethodCallback, 0, 1}, 7608 {"strictTypeCheckingVoidMethodTestInterfaceEmptyArg", TestObjectPythonV8Inte rnal::strictTypeCheckingVoidMethodTestInterfaceEmptyArgMethodCallback, 0, 1},
7609 {"strictTypeCheckingVoidMethodNullableTestInterfaceEmptyArg", TestObjectPyth onV8Internal::strictTypeCheckingVoidMethodNullableTestInterfaceEmptyArgMethodCal lback, 0, 1}, 7609 {"strictTypeCheckingVoidMethodNullableTestInterfaceEmptyArg", TestObjectPyth onV8Internal::strictTypeCheckingVoidMethodNullableTestInterfaceEmptyArgMethodCal lback, 0, 1},
7610 {"treatReturnedNullStringAsNullStringMethod", TestObjectPythonV8Internal::tr eatReturnedNullStringAsNullStringMethodMethodCallback, 0, 0}, 7610 {"treatReturnedNullStringAsNullStringMethod", TestObjectPythonV8Internal::tr eatReturnedNullStringAsNullStringMethodMethodCallback, 0, 0},
7611 {"treatReturnedNullStringAsUndefinedStringMethod", TestObjectPythonV8Interna l::treatReturnedNullStringAsUndefinedStringMethodMethodCallback, 0, 0}, 7611 {"treatReturnedNullStringAsUndefinedStringMethod", TestObjectPythonV8Interna l::treatReturnedNullStringAsUndefinedStringMethodMethodCallback, 0, 0},
7612 {"voidMethodSequenceTestInterfaceWillBeGarbageCollectedArg", TestObjectPytho nV8Internal::voidMethodSequenceTestInterfaceWillBeGarbageCollectedArgMethodCallb ack, 0, 1}, 7612 {"voidMethodSequenceTestInterfaceWillBeGarbageCollectedArg", TestObjectPytho nV8Internal::voidMethodSequenceTestInterfaceWillBeGarbageCollectedArgMethodCallb ack, 0, 1},
7613 {"voidMethodArrayTestInterfaceWillBeGarbageCollectedArg", TestObjectPythonV8 Internal::voidMethodArrayTestInterfaceWillBeGarbageCollectedArgMethodCallback, 0 , 1}, 7613 {"voidMethodArrayTestInterfaceWillBeGarbageCollectedArg", TestObjectPythonV8 Internal::voidMethodArrayTestInterfaceWillBeGarbageCollectedArgMethodCallback, 0 , 1},
7614 }; 7614 };
7615 7615
7616 static void configureV8TestObjectPythonTemplate(v8::Handle<v8::FunctionTemplate> functionTemplate, v8::Isolate* isolate, WrapperWorldType currentWorldType) 7616 static void configureV8TestObjectPythonTemplate(v8::Handle<v8::FunctionTemplate> functionTemplate, v8::Isolate* isolate)
7617 { 7617 {
7618 functionTemplate->ReadOnlyPrototype(); 7618 functionTemplate->ReadOnlyPrototype();
7619 7619
7620 v8::Local<v8::Signature> defaultSignature; 7620 v8::Local<v8::Signature> defaultSignature;
7621 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(functionTempl ate, "TestObjectPython", v8::Local<v8::FunctionTemplate>(), V8TestObjectPython:: internalFieldCount, 7621 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(functionTempl ate, "TestObjectPython", v8::Local<v8::FunctionTemplate>(), V8TestObjectPython:: internalFieldCount,
7622 V8TestObjectPythonAttributes, WTF_ARRAY_LENGTH(V8TestObjectPythonAttribu tes), 7622 V8TestObjectPythonAttributes, WTF_ARRAY_LENGTH(V8TestObjectPythonAttribu tes),
7623 V8TestObjectPythonAccessors, WTF_ARRAY_LENGTH(V8TestObjectPythonAccessor s), 7623 V8TestObjectPythonAccessors, WTF_ARRAY_LENGTH(V8TestObjectPythonAccessor s),
7624 V8TestObjectPythonMethods, WTF_ARRAY_LENGTH(V8TestObjectPythonMethods), 7624 V8TestObjectPythonMethods, WTF_ARRAY_LENGTH(V8TestObjectPythonMethods),
7625 isolate, currentWorldType); 7625 isolate);
7626 v8::Local<v8::ObjectTemplate> ALLOW_UNUSED instanceTemplate = functionTempla te->InstanceTemplate(); 7626 v8::Local<v8::ObjectTemplate> ALLOW_UNUSED instanceTemplate = functionTempla te->InstanceTemplate();
7627 v8::Local<v8::ObjectTemplate> ALLOW_UNUSED prototypeTemplate = functionTempl ate->PrototypeTemplate(); 7627 v8::Local<v8::ObjectTemplate> ALLOW_UNUSED prototypeTemplate = functionTempl ate->PrototypeTemplate();
7628 if (RuntimeEnabledFeatures::featureNameEnabled()) { 7628 if (RuntimeEnabledFeatures::featureNameEnabled()) {
7629 static const V8DOMConfiguration::AttributeConfiguration attributeConfigu ration =\ 7629 static const V8DOMConfiguration::AttributeConfiguration attributeConfigu ration =\
7630 {"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 */} ; 7630 {"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 */} ;
7631 V8DOMConfiguration::installAttribute(instanceTemplate, prototypeTemplate , attributeConfiguration, isolate, currentWorldType); 7631 V8DOMConfiguration::installAttribute(instanceTemplate, prototypeTemplate , attributeConfiguration, isolate);
7632 } 7632 }
7633 #if ENABLE(CONDITION) 7633 #if ENABLE(CONDITION)
7634 if (RuntimeEnabledFeatures::featureNameEnabled()) { 7634 if (RuntimeEnabledFeatures::featureNameEnabled()) {
7635 static const V8DOMConfiguration::AttributeConfiguration attributeConfigu ration =\ 7635 static const V8DOMConfiguration::AttributeConfiguration attributeConfigu ration =\
7636 {"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 */}; 7636 {"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 */};
7637 V8DOMConfiguration::installAttribute(instanceTemplate, prototypeTemplate , attributeConfiguration, isolate, currentWorldType); 7637 V8DOMConfiguration::installAttribute(instanceTemplate, prototypeTemplate , attributeConfiguration, isolate);
7638 } 7638 }
7639 #endif // ENABLE(CONDITION) 7639 #endif // ENABLE(CONDITION)
7640 static const V8DOMConfiguration::ConstantConfiguration V8TestObjectPythonCon stants[] = { 7640 static const V8DOMConfiguration::ConstantConfiguration V8TestObjectPythonCon stants[] = {
7641 {"CONST_VALUE_0", 0}, 7641 {"CONST_VALUE_0", 0},
7642 {"CONST_VALUE_1", 1}, 7642 {"CONST_VALUE_1", 1},
7643 {"CONST_VALUE_2", 2}, 7643 {"CONST_VALUE_2", 2},
7644 {"CONST_VALUE_4", 4}, 7644 {"CONST_VALUE_4", 4},
7645 {"CONST_VALUE_8", 8}, 7645 {"CONST_VALUE_8", 8},
7646 {"CONST_VALUE_9", -1}, 7646 {"CONST_VALUE_9", -1},
7647 {"CONST_VALUE_10", "my constant string"}, 7647 {"CONST_VALUE_10", "my constant string"},
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
7683 functionTemplate->Set(v8AtomicString(isolate, "overloadedStaticMethod"), v8: :FunctionTemplate::New(isolate, TestObjectPythonV8Internal::overloadedStaticMeth odMethodCallback, v8Undefined(), v8::Local<v8::Signature>(), 1)); 7683 functionTemplate->Set(v8AtomicString(isolate, "overloadedStaticMethod"), v8: :FunctionTemplate::New(isolate, TestObjectPythonV8Internal::overloadedStaticMeth odMethodCallback, v8Undefined(), v8::Local<v8::Signature>(), 1));
7684 #if ENABLE(CONDITION) 7684 #if ENABLE(CONDITION)
7685 functionTemplate->Set(v8AtomicString(isolate, "conditionalConditionStaticVoi dMethod"), v8::FunctionTemplate::New(isolate, TestObjectPythonV8Internal::condit ionalConditionStaticVoidMethodMethodCallback, v8Undefined(), v8::Local<v8::Signa ture>(), 0)); 7685 functionTemplate->Set(v8AtomicString(isolate, "conditionalConditionStaticVoi dMethod"), v8::FunctionTemplate::New(isolate, TestObjectPythonV8Internal::condit ionalConditionStaticVoidMethodMethodCallback, v8Undefined(), v8::Local<v8::Signa ture>(), 0));
7686 #endif // ENABLE(CONDITION) 7686 #endif // ENABLE(CONDITION)
7687 prototypeTemplate->Set(v8AtomicString(isolate, "doNotCheckSignatureVoidMetho d"), v8::FunctionTemplate::New(isolate, TestObjectPythonV8Internal::doNotCheckSi gnatureVoidMethodMethodCallback, v8Undefined(), v8::Local<v8::Signature>(), 0)); 7687 prototypeTemplate->Set(v8AtomicString(isolate, "doNotCheckSignatureVoidMetho d"), v8::FunctionTemplate::New(isolate, TestObjectPythonV8Internal::doNotCheckSi gnatureVoidMethodMethodCallback, v8Undefined(), v8::Local<v8::Signature>(), 0));
7688 prototypeTemplate->Set(v8AtomicString(isolate, "notEnumerableVoidMethod"), v 8::FunctionTemplate::New(isolate, TestObjectPythonV8Internal::notEnumerableVoidM ethodMethodCallback, v8Undefined(), defaultSignature, 0), static_cast<v8::Proper tyAttribute>(v8::DontDelete | v8::DontEnum)); 7688 prototypeTemplate->Set(v8AtomicString(isolate, "notEnumerableVoidMethod"), v 8::FunctionTemplate::New(isolate, TestObjectPythonV8Internal::notEnumerableVoidM ethodMethodCallback, v8Undefined(), defaultSignature, 0), static_cast<v8::Proper tyAttribute>(v8::DontDelete | v8::DontEnum));
7689 prototypeTemplate->Set(v8AtomicString(isolate, "readOnlyVoidMethod"), v8::Fu nctionTemplate::New(isolate, TestObjectPythonV8Internal::readOnlyVoidMethodMetho dCallback, v8Undefined(), defaultSignature, 0), static_cast<v8::PropertyAttribut e>(v8::DontDelete | v8::ReadOnly)); 7689 prototypeTemplate->Set(v8AtomicString(isolate, "readOnlyVoidMethod"), v8::Fu nctionTemplate::New(isolate, TestObjectPythonV8Internal::readOnlyVoidMethodMetho dCallback, v8Undefined(), defaultSignature, 0), static_cast<v8::PropertyAttribut e>(v8::DontDelete | v8::ReadOnly));
7690 prototypeTemplate->Set(v8AtomicString(isolate, "notEnumerableReadOnlyVoidMet hod"), v8::FunctionTemplate::New(isolate, TestObjectPythonV8Internal::notEnumera bleReadOnlyVoidMethodMethodCallback, v8Undefined(), defaultSignature, 0), static _cast<v8::PropertyAttribute>(v8::DontDelete | v8::DontEnum | v8::ReadOnly)); 7690 prototypeTemplate->Set(v8AtomicString(isolate, "notEnumerableReadOnlyVoidMet hod"), v8::FunctionTemplate::New(isolate, TestObjectPythonV8Internal::notEnumera bleReadOnlyVoidMethodMethodCallback, v8Undefined(), defaultSignature, 0), static _cast<v8::PropertyAttribute>(v8::DontDelete | v8::DontEnum | v8::ReadOnly));
7691 if (RuntimeEnabledFeatures::featureNameEnabled()) 7691 if (RuntimeEnabledFeatures::featureNameEnabled())
7692 prototypeTemplate->Set(v8AtomicString(isolate, "runtimeEnabledVoidMethod "), v8::FunctionTemplate::New(isolate, TestObjectPythonV8Internal::runtimeEnable dVoidMethodMethodCallback, v8Undefined(), defaultSignature, 0)); 7692 prototypeTemplate->Set(v8AtomicString(isolate, "runtimeEnabledVoidMethod "), v8::FunctionTemplate::New(isolate, TestObjectPythonV8Internal::runtimeEnable dVoidMethodMethodCallback, v8Undefined(), defaultSignature, 0));
7693 if (currentWorldType == MainWorld) { 7693 if (DOMWrapperWorld::current(isolate)->isMainWorld()) {
7694 if (RuntimeEnabledFeatures::featureNameEnabled()) 7694 if (RuntimeEnabledFeatures::featureNameEnabled())
7695 prototypeTemplate->Set(v8AtomicString(isolate, "perWorldBindingsRunt imeEnabledVoidMethod"), v8::FunctionTemplate::New(isolate, TestObjectPythonV8Int ernal::perWorldBindingsRuntimeEnabledVoidMethodMethodCallbackForMainWorld, v8Und efined(), defaultSignature, 0)); 7695 prototypeTemplate->Set(v8AtomicString(isolate, "perWorldBindingsRunt imeEnabledVoidMethod"), v8::FunctionTemplate::New(isolate, TestObjectPythonV8Int ernal::perWorldBindingsRuntimeEnabledVoidMethodMethodCallbackForMainWorld, v8Und efined(), defaultSignature, 0));
7696 } else { 7696 } else {
7697 if (RuntimeEnabledFeatures::featureNameEnabled()) 7697 if (RuntimeEnabledFeatures::featureNameEnabled())
7698 prototypeTemplate->Set(v8AtomicString(isolate, "perWorldBindingsRunt imeEnabledVoidMethod"), v8::FunctionTemplate::New(isolate, TestObjectPythonV8Int ernal::perWorldBindingsRuntimeEnabledVoidMethodMethodCallback, v8Undefined(), de faultSignature, 0)); 7698 prototypeTemplate->Set(v8AtomicString(isolate, "perWorldBindingsRunt imeEnabledVoidMethod"), v8::FunctionTemplate::New(isolate, TestObjectPythonV8Int ernal::perWorldBindingsRuntimeEnabledVoidMethodMethodCallback, v8Undefined(), de faultSignature, 0));
7699 } 7699 }
7700 instanceTemplate->Set(v8AtomicString(isolate, "unforgeableVoidMethod"), v8:: FunctionTemplate::New(isolate, TestObjectPythonV8Internal::unforgeableVoidMethod MethodCallback, v8Undefined(), defaultSignature, 0)); 7700 instanceTemplate->Set(v8AtomicString(isolate, "unforgeableVoidMethod"), v8:: FunctionTemplate::New(isolate, TestObjectPythonV8Internal::unforgeableVoidMethod MethodCallback, v8Undefined(), defaultSignature, 0));
7701 functionTemplate->SetNativeDataProperty(v8AtomicString(isolate, "staticStrin gAttribute"), TestObjectPythonV8Internal::staticStringAttributeAttributeGetterCa llback, TestObjectPythonV8Internal::staticStringAttributeAttributeSetterCallback , v8::External::New(isolate, 0), static_cast<v8::PropertyAttribute>(v8::None), v 8::Handle<v8::AccessorSignature>(), static_cast<v8::AccessControl>(v8::DEFAULT)) ; 7701 functionTemplate->SetNativeDataProperty(v8AtomicString(isolate, "staticStrin gAttribute"), TestObjectPythonV8Internal::staticStringAttributeAttributeGetterCa llback, TestObjectPythonV8Internal::staticStringAttributeAttributeSetterCallback , v8::External::New(isolate, 0), static_cast<v8::PropertyAttribute>(v8::None), v 8::Handle<v8::AccessorSignature>(), static_cast<v8::AccessControl>(v8::DEFAULT)) ;
7702 functionTemplate->SetNativeDataProperty(v8AtomicString(isolate, "staticLongA ttribute"), TestObjectPythonV8Internal::staticLongAttributeAttributeGetterCallba ck, TestObjectPythonV8Internal::staticLongAttributeAttributeSetterCallback, v8:: External::New(isolate, 0), static_cast<v8::PropertyAttribute>(v8::None), v8::Han dle<v8::AccessorSignature>(), static_cast<v8::AccessControl>(v8::DEFAULT)); 7702 functionTemplate->SetNativeDataProperty(v8AtomicString(isolate, "staticLongA ttribute"), TestObjectPythonV8Internal::staticLongAttributeAttributeGetterCallba ck, TestObjectPythonV8Internal::staticLongAttributeAttributeSetterCallback, v8:: External::New(isolate, 0), static_cast<v8::PropertyAttribute>(v8::None), v8::Han dle<v8::AccessorSignature>(), static_cast<v8::AccessControl>(v8::DEFAULT));
7703 7703
7704 // Custom toString template 7704 // Custom toString template
7705 functionTemplate->Set(v8AtomicString(isolate, "toString"), V8PerIsolateData: :current()->toStringTemplate()); 7705 functionTemplate->Set(v8AtomicString(isolate, "toString"), V8PerIsolateData: :current()->toStringTemplate());
7706 } 7706 }
7707 7707
7708 v8::Handle<v8::FunctionTemplate> V8TestObjectPython::domTemplate(v8::Isolate* is olate, WrapperWorldType currentWorldType) 7708 v8::Handle<v8::FunctionTemplate> V8TestObjectPython::domTemplate(v8::Isolate* is olate)
7709 { 7709 {
7710 V8PerIsolateData* data = V8PerIsolateData::from(isolate); 7710 V8PerIsolateData* data = V8PerIsolateData::from(isolate);
7711 V8PerIsolateData::TemplateMap::iterator result = data->templateMap(currentWo rldType).find(&wrapperTypeInfo); 7711 V8PerIsolateData::TemplateMap::iterator result = data->templateMap().find(&w rapperTypeInfo);
7712 if (result != data->templateMap(currentWorldType).end()) 7712 if (result != data->templateMap().end())
7713 return result->value.newLocal(isolate); 7713 return result->value.newLocal(isolate);
7714 7714
7715 TRACE_EVENT_SCOPED_SAMPLING_STATE("Blink", "BuildDOMTemplate"); 7715 TRACE_EVENT_SCOPED_SAMPLING_STATE("Blink", "BuildDOMTemplate");
7716 v8::Local<v8::FunctionTemplate> templ = v8::FunctionTemplate::New(isolate, V 8ObjectConstructor::isValidConstructorMode); 7716 v8::Local<v8::FunctionTemplate> templ = v8::FunctionTemplate::New(isolate, V 8ObjectConstructor::isValidConstructorMode);
7717 configureV8TestObjectPythonTemplate(templ, isolate, currentWorldType); 7717 configureV8TestObjectPythonTemplate(templ, isolate);
7718 data->templateMap(currentWorldType).add(&wrapperTypeInfo, UnsafePersistent<v 8::FunctionTemplate>(isolate, templ)); 7718 data->templateMap().add(&wrapperTypeInfo, UnsafePersistent<v8::FunctionTempl ate>(isolate, templ));
7719 return templ; 7719 return templ;
7720 } 7720 }
7721 7721
7722 bool V8TestObjectPython::hasInstance(v8::Handle<v8::Value> jsValue, v8::Isolate* isolate) 7722 bool V8TestObjectPython::hasInstance(v8::Handle<v8::Value> jsValue, v8::Isolate* isolate)
7723 { 7723 {
7724 return V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, jsValu e); 7724 return V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, jsValu e);
7725 } 7725 }
7726 7726
7727 v8::Handle<v8::Object> V8TestObjectPython::findInstanceInPrototypeChain(v8::Hand le<v8::Value> jsValue, v8::Isolate* isolate) 7727 v8::Handle<v8::Object> V8TestObjectPython::findInstanceInPrototypeChain(v8::Hand le<v8::Value> jsValue, v8::Isolate* isolate)
7728 { 7728 {
(...skipping 15 matching lines...) Expand all
7744 } 7744 }
7745 if (ContextFeatures::featureNameEnabled(impl->document())) { 7745 if (ContextFeatures::featureNameEnabled(impl->document())) {
7746 static const V8DOMConfiguration::AttributeConfiguration attributeConfigu ration =\ 7746 static const V8DOMConfiguration::AttributeConfiguration attributeConfigu ration =\
7747 {"perContextEnabledRuntimeEnabledLongAttribute", TestObjectPythonV8Inter nal::perContextEnabledRuntimeEnabledLongAttributeAttributeGetterCallback, TestOb jectPythonV8Internal::perContextEnabledRuntimeEnabledLongAttributeAttributeSette rCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8: :PropertyAttribute>(v8::None), 0 /* on instance */}; 7747 {"perContextEnabledRuntimeEnabledLongAttribute", TestObjectPythonV8Inter nal::perContextEnabledRuntimeEnabledLongAttributeAttributeGetterCallback, TestOb jectPythonV8Internal::perContextEnabledRuntimeEnabledLongAttributeAttributeSette rCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8: :PropertyAttribute>(v8::None), 0 /* on instance */};
7748 V8DOMConfiguration::installAttribute(instanceTemplate, prototypeTemplate , attributeConfiguration, isolate); 7748 V8DOMConfiguration::installAttribute(instanceTemplate, prototypeTemplate , attributeConfiguration, isolate);
7749 } 7749 }
7750 } 7750 }
7751 7751
7752 void V8TestObjectPython::installPerContextEnabledMethods(v8::Handle<v8::Object> prototypeTemplate, v8::Isolate* isolate) 7752 void V8TestObjectPython::installPerContextEnabledMethods(v8::Handle<v8::Object> prototypeTemplate, v8::Isolate* isolate)
7753 { 7753 {
7754 v8::Local<v8::Signature> defaultSignature = v8::Signature::New(isolate, domT emplate(isolate, worldType(isolate))); 7754 v8::Local<v8::Signature> defaultSignature = v8::Signature::New(isolate, domT emplate(isolate));
7755 7755
7756 ExecutionContext* context = toExecutionContext(prototypeTemplate->CreationCo ntext()); 7756 ExecutionContext* context = toExecutionContext(prototypeTemplate->CreationCo ntext());
7757 if (context && context->isDocument() && ContextFeatures::featureNameEnabled( toDocument(context))) 7757 if (context && context->isDocument() && ContextFeatures::featureNameEnabled( toDocument(context)))
7758 prototypeTemplate->Set(v8AtomicString(isolate, "perContextEnabledVoidMet hod"), v8::FunctionTemplate::New(isolate, TestObjectPythonV8Internal::perContext EnabledVoidMethodMethodCallback, v8Undefined(), defaultSignature, 0)->GetFunctio n()); 7758 prototypeTemplate->Set(v8AtomicString(isolate, "perContextEnabledVoidMet hod"), v8::FunctionTemplate::New(isolate, TestObjectPythonV8Internal::perContext EnabledVoidMethodMethodCallback, v8Undefined(), defaultSignature, 0)->GetFunctio n());
7759 } 7759 }
7760 7760
7761 v8::Handle<v8::Object> V8TestObjectPython::createWrapper(PassRefPtr<TestObjectPy thon> impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate) 7761 v8::Handle<v8::Object> V8TestObjectPython::createWrapper(PassRefPtr<TestObjectPy thon> impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
7762 { 7762 {
7763 ASSERT(impl); 7763 ASSERT(impl);
7764 ASSERT(!DOMDataStore::containsWrapper<V8TestObjectPython>(impl.get(), isolat e)); 7764 ASSERT(!DOMDataStore::containsWrapper<V8TestObjectPython>(impl.get(), isolat e));
(...skipping 18 matching lines...) Expand all
7783 fromInternalPointer(object)->deref(); 7783 fromInternalPointer(object)->deref();
7784 } 7784 }
7785 7785
7786 template<> 7786 template<>
7787 v8::Handle<v8::Value> toV8NoInline(TestObjectPython* impl, v8::Handle<v8::Object > creationContext, v8::Isolate* isolate) 7787 v8::Handle<v8::Value> toV8NoInline(TestObjectPython* impl, v8::Handle<v8::Object > creationContext, v8::Isolate* isolate)
7788 { 7788 {
7789 return toV8(impl, creationContext, isolate); 7789 return toV8(impl, creationContext, isolate);
7790 } 7790 }
7791 7791
7792 } // namespace WebCore 7792 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/bindings/tests/results/V8TestObjectPython.h ('k') | Source/bindings/tests/results/V8TestSpecialOperationsAnonymous.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698