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

Side by Side Diff: Source/bindings/tests/results/core/V8TestInterface.cpp

Issue 1161463009: bindings: Supports [LenientThis] extended attributes. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Added a layout test for [LenientThis]. Created 5 years, 6 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 // 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 #if ENABLE(CONDITION) 8 #if ENABLE(CONDITION)
9 #include "V8TestInterface.h" 9 #include "V8TestInterface.h"
10 10
(...skipping 512 matching lines...) Expand 10 before | Expand all | Expand 10 after
523 } 523 }
524 524
525 static void windowExposedAttributeAttributeSetterCallback(const v8::FunctionCall backInfo<v8::Value>& info) 525 static void windowExposedAttributeAttributeSetterCallback(const v8::FunctionCall backInfo<v8::Value>& info)
526 { 526 {
527 v8::Local<v8::Value> v8Value = info[0]; 527 v8::Local<v8::Value> v8Value = info[0];
528 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); 528 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
529 TestInterfaceImplementationV8Internal::windowExposedAttributeAttributeSetter (v8Value, info); 529 TestInterfaceImplementationV8Internal::windowExposedAttributeAttributeSetter (v8Value, info);
530 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 530 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
531 } 531 }
532 532
533 static void lenientThisAttributeAttributeGetter(const v8::FunctionCallbackInfo<v 8::Value>& info)
534 {
535 v8::Local<v8::Object> holder = V8TestInterface::findInstanceInPrototypeChain (info.This(), info.GetIsolate());
536 if (holder.IsEmpty())
537 return; // Return silently because of [LenientThis].
538 // Note that it's okay to use |holder|, but |info.Holder()| is still unsafe
539 // and must not be used.
540 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
541 v8SetReturnValue(info, impl->lenientThisAttribute().v8Value());
542 }
543
544 static void lenientThisAttributeAttributeGetterCallback(const v8::FunctionCallba ckInfo<v8::Value>& info)
545 {
546 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
547 TestInterfaceImplementationV8Internal::lenientThisAttributeAttributeGetter(i nfo);
548 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
549 }
550
551 static void lenientThisAttributeAttributeSetter(v8::Local<v8::Value> v8Value, co nst v8::FunctionCallbackInfo<v8::Value>& info)
552 {
553 v8::Local<v8::Object> holder = V8TestInterface::findInstanceInPrototypeChain (info.This(), info.GetIsolate());
554 if (holder.IsEmpty())
555 return; // Return silently because of [LenientThis].
556 // Note that it's okay to use |holder|, but |info.Holder()| is still unsafe
557 // and must not be used.
558 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
559 ScriptValue cppValue = ScriptValue(ScriptState::current(info.GetIsolate()), v8Value);
560 impl->setLenientThisAttribute(cppValue);
561 }
562
563 static void lenientThisAttributeAttributeSetterCallback(const v8::FunctionCallba ckInfo<v8::Value>& info)
564 {
565 v8::Local<v8::Value> v8Value = info[0];
566 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
567 TestInterfaceImplementationV8Internal::lenientThisAttributeAttributeSetter(v 8Value, info);
568 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
569 }
570
533 static void implementsStaticReadOnlyLongAttributeAttributeGetter(const v8::Prope rtyCallbackInfo<v8::Value>& info) 571 static void implementsStaticReadOnlyLongAttributeAttributeGetter(const v8::Prope rtyCallbackInfo<v8::Value>& info)
534 { 572 {
535 v8SetReturnValueInt(info, TestInterfaceImplementation::implementsStaticReadO nlyLongAttribute()); 573 v8SetReturnValueInt(info, TestInterfaceImplementation::implementsStaticReadO nlyLongAttribute());
536 } 574 }
537 575
538 static void implementsStaticReadOnlyLongAttributeAttributeGetterCallback(v8::Loc al<v8::Name>, const v8::PropertyCallbackInfo<v8::Value>& info) 576 static void implementsStaticReadOnlyLongAttributeAttributeGetterCallback(v8::Loc al<v8::Name>, const v8::PropertyCallbackInfo<v8::Value>& info)
539 { 577 {
540 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); 578 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
541 TestInterfaceImplementationV8Internal::implementsStaticReadOnlyLongAttribute AttributeGetter(info); 579 TestInterfaceImplementationV8Internal::implementsStaticReadOnlyLongAttribute AttributeGetter(info);
542 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 580 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
(...skipping 1634 matching lines...) Expand 10 before | Expand all | Expand 10 after
2177 setObjectGroup(isolate, scriptWrappable, wrapper); 2215 setObjectGroup(isolate, scriptWrappable, wrapper);
2178 } 2216 }
2179 2217
2180 static const V8DOMConfiguration::AttributeConfiguration V8TestInterfaceAttribute s[] = { 2218 static const V8DOMConfiguration::AttributeConfiguration V8TestInterfaceAttribute s[] = {
2181 {"testInterfaceConstructorAttribute", v8ConstructorAttributeGetter, TestInte rfaceImplementationV8Internal::testInterfaceConstructorAttributeAttributeSetterC allback, 0, 0, const_cast<WrapperTypeInfo*>(&V8TestInterface::wrapperTypeInfo), static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>( v8::DontEnum), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnIn stance}, 2219 {"testInterfaceConstructorAttribute", v8ConstructorAttributeGetter, TestInte rfaceImplementationV8Internal::testInterfaceConstructorAttributeAttributeSetterC allback, 0, 0, const_cast<WrapperTypeInfo*>(&V8TestInterface::wrapperTypeInfo), static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>( v8::DontEnum), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnIn stance},
2182 {"TestInterface", v8ConstructorAttributeGetter, TestInterfaceImplementationV 8Internal::TestInterfaceImplementationConstructorAttributeSetterCallback, 0, 0, const_cast<WrapperTypeInfo*>(&V8TestInterface::wrapperTypeInfo), static_cast<v8: :AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::DontEnum), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance}, 2220 {"TestInterface", v8ConstructorAttributeGetter, TestInterfaceImplementationV 8Internal::TestInterfaceImplementationConstructorAttributeSetterCallback, 0, 0, const_cast<WrapperTypeInfo*>(&V8TestInterface::wrapperTypeInfo), static_cast<v8: :AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::DontEnum), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance},
2183 {"TestInterface2", v8ConstructorAttributeGetter, TestInterfaceImplementation V8Internal::TestInterfaceImplementationConstructorAttributeSetterCallback, 0, 0, const_cast<WrapperTypeInfo*>(&V8TestInterface2::wrapperTypeInfo), static_cast<v 8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::DontEnum) , V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance}, 2221 {"TestInterface2", v8ConstructorAttributeGetter, TestInterfaceImplementation V8Internal::TestInterfaceImplementationConstructorAttributeSetterCallback, 0, 0, const_cast<WrapperTypeInfo*>(&V8TestInterface2::wrapperTypeInfo), static_cast<v 8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::DontEnum) , V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance},
2184 }; 2222 };
2185 2223
2186 static const V8DOMConfiguration::AccessorConfiguration V8TestInterfaceAccessors[ ] = { 2224 static const V8DOMConfiguration::AccessorConfiguration V8TestInterfaceAccessors[ ] = {
2187 {"testInterfaceAttribute", TestInterfaceImplementationV8Internal::testInterf aceAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::test InterfaceAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessContro l>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguratio n::ExposedToAllScripts}, 2225 {"testInterfaceAttribute", TestInterfaceImplementationV8Internal::testInterf aceAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::test InterfaceAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessContro l>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguratio n::ExposedToAllScripts, V8DOMConfiguration::CheckHolder},
2188 {"doubleAttribute", TestInterfaceImplementationV8Internal::doubleAttributeAt tributeGetterCallback, TestInterfaceImplementationV8Internal::doubleAttributeAtt ributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), stat ic_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScript s}, 2226 {"doubleAttribute", TestInterfaceImplementationV8Internal::doubleAttributeAt tributeGetterCallback, TestInterfaceImplementationV8Internal::doubleAttributeAtt ributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), stat ic_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScript s, V8DOMConfiguration::CheckHolder},
2189 {"floatAttribute", TestInterfaceImplementationV8Internal::floatAttributeAttr ibuteGetterCallback, TestInterfaceImplementationV8Internal::floatAttributeAttrib uteSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_ cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts}, 2227 {"floatAttribute", TestInterfaceImplementationV8Internal::floatAttributeAttr ibuteGetterCallback, TestInterfaceImplementationV8Internal::floatAttributeAttrib uteSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_ cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::CheckHolder},
2190 {"unrestrictedDoubleAttribute", TestInterfaceImplementationV8Internal::unres trictedDoubleAttributeAttributeGetterCallback, TestInterfaceImplementationV8Inte rnal::unrestrictedDoubleAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v 8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8 DOMConfiguration::ExposedToAllScripts}, 2228 {"unrestrictedDoubleAttribute", TestInterfaceImplementationV8Internal::unres trictedDoubleAttributeAttributeGetterCallback, TestInterfaceImplementationV8Inte rnal::unrestrictedDoubleAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v 8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8 DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::CheckHolder},
2191 {"unrestrictedFloatAttribute", TestInterfaceImplementationV8Internal::unrest rictedFloatAttributeAttributeGetterCallback, TestInterfaceImplementationV8Intern al::unrestrictedFloatAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8:: AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOM Configuration::ExposedToAllScripts}, 2229 {"unrestrictedFloatAttribute", TestInterfaceImplementationV8Internal::unrest rictedFloatAttributeAttributeGetterCallback, TestInterfaceImplementationV8Intern al::unrestrictedFloatAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8:: AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOM Configuration::ExposedToAllScripts, V8DOMConfiguration::CheckHolder},
2192 {"testEnumAttribute", TestInterfaceImplementationV8Internal::testEnumAttribu teAttributeGetterCallback, TestInterfaceImplementationV8Internal::testEnumAttrib uteAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT) , static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAll Scripts}, 2230 {"testEnumAttribute", TestInterfaceImplementationV8Internal::testEnumAttribu teAttributeGetterCallback, TestInterfaceImplementationV8Internal::testEnumAttrib uteAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT) , static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAll Scripts, V8DOMConfiguration::CheckHolder},
2193 {"stringOrDoubleAttribute", TestInterfaceImplementationV8Internal::stringOrD oubleAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::st ringOrDoubleAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessCon trol>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfigura tion::ExposedToAllScripts}, 2231 {"stringOrDoubleAttribute", TestInterfaceImplementationV8Internal::stringOrD oubleAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::st ringOrDoubleAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessCon trol>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfigura tion::ExposedToAllScripts, V8DOMConfiguration::CheckHolder},
2194 {"legacyInterfaceTypeCheckingAttribute", TestInterfaceImplementationV8Intern al::legacyInterfaceTypeCheckingAttributeAttributeGetterCallback, TestInterfaceIm plementationV8Internal::legacyInterfaceTypeCheckingAttributeAttributeSetterCallb ack, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::Prope rtyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts}, 2232 {"legacyInterfaceTypeCheckingAttribute", TestInterfaceImplementationV8Intern al::legacyInterfaceTypeCheckingAttributeAttributeGetterCallback, TestInterfaceIm plementationV8Internal::legacyInterfaceTypeCheckingAttributeAttributeSetterCallb ack, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::Prope rtyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfigura tion::CheckHolder},
2195 {"alwaysExposedAttribute", TestInterfaceImplementationV8Internal::alwaysExpo sedAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::alwa ysExposedAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessContro l>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguratio n::ExposedToAllScripts}, 2233 {"alwaysExposedAttribute", TestInterfaceImplementationV8Internal::alwaysExpo sedAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::alwa ysExposedAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessContro l>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguratio n::ExposedToAllScripts, V8DOMConfiguration::CheckHolder},
2196 {"implementsReadonlyStringAttribute", TestInterfaceImplementationV8Internal: :implementsReadonlyStringAttributeAttributeGetterCallback, 0, 0, 0, 0, static_ca st<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None) , V8DOMConfiguration::ExposedToAllScripts}, 2234 {"lenientThisAttribute", TestInterfaceImplementationV8Internal::lenientThisA ttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::lenientT hisAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8: :DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::Exp osedToAllScripts, V8DOMConfiguration::DoNotCheckHolder},
2197 {"implementsStringAttribute", TestInterfaceImplementationV8Internal::impleme ntsStringAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal ::implementsStringAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::Acc essControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMCon figuration::ExposedToAllScripts}, 2235 {"implementsReadonlyStringAttribute", TestInterfaceImplementationV8Internal: :implementsReadonlyStringAttributeAttributeGetterCallback, 0, 0, 0, 0, static_ca st<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None) , V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::CheckHolder},
2198 {"implementsNodeAttribute", TestInterfaceImplementationV8Internal::implement sNodeAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::im plementsNodeAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessCon trol>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfigura tion::ExposedToAllScripts}, 2236 {"implementsStringAttribute", TestInterfaceImplementationV8Internal::impleme ntsStringAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal ::implementsStringAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::Acc essControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMCon figuration::ExposedToAllScripts, V8DOMConfiguration::CheckHolder},
2199 {"implementsEventHandlerAttribute", TestInterfaceImplementationV8Internal::i mplementsEventHandlerAttributeAttributeGetterCallback, TestInterfaceImplementati onV8Internal::implementsEventHandlerAttributeAttributeSetterCallback, 0, 0, 0, s tatic_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v 8::None), V8DOMConfiguration::ExposedToAllScripts}, 2237 {"implementsNodeAttribute", TestInterfaceImplementationV8Internal::implement sNodeAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::im plementsNodeAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessCon trol>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfigura tion::ExposedToAllScripts, V8DOMConfiguration::CheckHolder},
2200 {"implements3StringAttribute", TestInterfaceImplementationV8Internal::implem ents3StringAttributeAttributeGetterCallback, TestInterfaceImplementationV8Intern al::implements3StringAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8:: AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOM Configuration::ExposedToAllScripts}, 2238 {"implementsEventHandlerAttribute", TestInterfaceImplementationV8Internal::i mplementsEventHandlerAttributeAttributeGetterCallback, TestInterfaceImplementati onV8Internal::implementsEventHandlerAttributeAttributeSetterCallback, 0, 0, 0, s tatic_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v 8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::CheckHold er},
2201 {"partial2LongAttribute", TestInterfaceImplementationV8Internal::partial2Lon gAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::partia l2LongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>( v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration:: ExposedToAllScripts}, 2239 {"implements3StringAttribute", TestInterfaceImplementationV8Internal::implem ents3StringAttributeAttributeGetterCallback, TestInterfaceImplementationV8Intern al::implements3StringAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8:: AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOM Configuration::ExposedToAllScripts, V8DOMConfiguration::CheckHolder},
2240 {"partial2LongAttribute", TestInterfaceImplementationV8Internal::partial2Lon gAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::partia l2LongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>( v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration:: ExposedToAllScripts, V8DOMConfiguration::CheckHolder},
2202 }; 2241 };
2203 2242
2204 static const V8DOMConfiguration::MethodConfiguration V8TestInterfaceMethods[] = { 2243 static const V8DOMConfiguration::MethodConfiguration V8TestInterfaceMethods[] = {
2205 {"voidMethodTestInterfaceEmptyArg", TestInterfaceImplementationV8Internal::v oidMethodTestInterfaceEmptyArgMethodCallback, 0, 1, V8DOMConfiguration::ExposedT oAllScripts}, 2244 {"voidMethodTestInterfaceEmptyArg", TestInterfaceImplementationV8Internal::v oidMethodTestInterfaceEmptyArgMethodCallback, 0, 1, V8DOMConfiguration::ExposedT oAllScripts},
2206 {"voidMethodDoubleArgFloatArg", TestInterfaceImplementationV8Internal::voidM ethodDoubleArgFloatArgMethodCallback, 0, 2, V8DOMConfiguration::ExposedToAllScri pts}, 2245 {"voidMethodDoubleArgFloatArg", TestInterfaceImplementationV8Internal::voidM ethodDoubleArgFloatArgMethodCallback, 0, 2, V8DOMConfiguration::ExposedToAllScri pts},
2207 {"voidMethodUnrestrictedDoubleArgUnrestrictedFloatArg", TestInterfaceImpleme ntationV8Internal::voidMethodUnrestrictedDoubleArgUnrestrictedFloatArgMethodCall back, 0, 2, V8DOMConfiguration::ExposedToAllScripts}, 2246 {"voidMethodUnrestrictedDoubleArgUnrestrictedFloatArg", TestInterfaceImpleme ntationV8Internal::voidMethodUnrestrictedDoubleArgUnrestrictedFloatArgMethodCall back, 0, 2, V8DOMConfiguration::ExposedToAllScripts},
2208 {"voidMethodTestEnumArg", TestInterfaceImplementationV8Internal::voidMethodT estEnumArgMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts}, 2247 {"voidMethodTestEnumArg", TestInterfaceImplementationV8Internal::voidMethodT estEnumArgMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts},
2209 {"voidMethod", TestInterfaceImplementationV8Internal::voidMethodMethodCallba ck, TestInterfaceImplementationV8Internal::voidMethodMethodCallbackForMainWorld, 0, V8DOMConfiguration::ExposedToAllScripts}, 2248 {"voidMethod", TestInterfaceImplementationV8Internal::voidMethodMethodCallba ck, TestInterfaceImplementationV8Internal::voidMethodMethodCallbackForMainWorld, 0, V8DOMConfiguration::ExposedToAllScripts},
2210 {"alwaysExposedMethod", TestInterfaceImplementationV8Internal::alwaysExposed MethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, 2249 {"alwaysExposedMethod", TestInterfaceImplementationV8Internal::alwaysExposed MethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts},
2211 {"legacyInterfaceTypeCheckingMethod", TestInterfaceImplementationV8Internal: :legacyInterfaceTypeCheckingMethodMethodCallback, 0, 1, V8DOMConfiguration::Expo sedToAllScripts}, 2250 {"legacyInterfaceTypeCheckingMethod", TestInterfaceImplementationV8Internal: :legacyInterfaceTypeCheckingMethodMethodCallback, 0, 1, V8DOMConfiguration::Expo sedToAllScripts},
(...skipping 17 matching lines...) Expand all
2229 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(isolate, functionTemplate, "TestInterface", V8TestInterfaceEmpty::domTemplate(isolate), V 8TestInterface::internalFieldCount, 2268 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(isolate, functionTemplate, "TestInterface", V8TestInterfaceEmpty::domTemplate(isolate), V 8TestInterface::internalFieldCount,
2230 V8TestInterfaceAttributes, WTF_ARRAY_LENGTH(V8TestInterfaceAttribute s), 2269 V8TestInterfaceAttributes, WTF_ARRAY_LENGTH(V8TestInterfaceAttribute s),
2231 V8TestInterfaceAccessors, WTF_ARRAY_LENGTH(V8TestInterfaceAccessors) , 2270 V8TestInterfaceAccessors, WTF_ARRAY_LENGTH(V8TestInterfaceAccessors) ,
2232 V8TestInterfaceMethods, WTF_ARRAY_LENGTH(V8TestInterfaceMethods)); 2271 V8TestInterfaceMethods, WTF_ARRAY_LENGTH(V8TestInterfaceMethods));
2233 v8::Local<v8::ObjectTemplate> instanceTemplate = functionTemplate->InstanceT emplate(); 2272 v8::Local<v8::ObjectTemplate> instanceTemplate = functionTemplate->InstanceT emplate();
2234 ALLOW_UNUSED_LOCAL(instanceTemplate); 2273 ALLOW_UNUSED_LOCAL(instanceTemplate);
2235 v8::Local<v8::ObjectTemplate> prototypeTemplate = functionTemplate->Prototyp eTemplate(); 2274 v8::Local<v8::ObjectTemplate> prototypeTemplate = functionTemplate->Prototyp eTemplate();
2236 ALLOW_UNUSED_LOCAL(prototypeTemplate); 2275 ALLOW_UNUSED_LOCAL(prototypeTemplate);
2237 if (RuntimeEnabledFeatures::implementsFeatureNameEnabled()) { 2276 if (RuntimeEnabledFeatures::implementsFeatureNameEnabled()) {
2238 static const V8DOMConfiguration::AccessorConfiguration accessorConfigura tion =\ 2277 static const V8DOMConfiguration::AccessorConfiguration accessorConfigura tion =\
2239 {"implementsRuntimeEnabledNodeAttribute", TestInterfaceImplementationV8I nternal::implementsRuntimeEnabledNodeAttributeAttributeGetterCallback, TestInter faceImplementationV8Internal::implementsRuntimeEnabledNodeAttributeAttributeSett erCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8 ::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts}; 2278 {"implementsRuntimeEnabledNodeAttribute", TestInterfaceImplementationV8I nternal::implementsRuntimeEnabledNodeAttributeAttributeGetterCallback, TestInter faceImplementationV8Internal::implementsRuntimeEnabledNodeAttributeAttributeSett erCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8 ::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMCo nfiguration::CheckHolder};
2240 V8DOMConfiguration::installAccessor(isolate, prototypeTemplate, defaultS ignature, accessorConfiguration); 2279 V8DOMConfiguration::installAccessor(isolate, prototypeTemplate, defaultS ignature, accessorConfiguration);
2241 } 2280 }
2242 if (RuntimeEnabledFeatures::implements2FeatureNameEnabled()) { 2281 if (RuntimeEnabledFeatures::implements2FeatureNameEnabled()) {
2243 static const V8DOMConfiguration::AccessorConfiguration accessorConfigura tion =\ 2282 static const V8DOMConfiguration::AccessorConfiguration accessorConfigura tion =\
2244 {"implements2StringAttribute", TestInterfaceImplementationV8Internal::im plements2StringAttributeAttributeGetterCallback, TestInterfaceImplementationV8In ternal::implements2StringAttributeAttributeSetterCallback, 0, 0, 0, static_cast< v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V 8DOMConfiguration::ExposedToAllScripts}; 2283 {"implements2StringAttribute", TestInterfaceImplementationV8Internal::im plements2StringAttributeAttributeGetterCallback, TestInterfaceImplementationV8In ternal::implements2StringAttributeAttributeSetterCallback, 0, 0, 0, static_cast< v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V 8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::CheckHolder};
2245 V8DOMConfiguration::installAccessor(isolate, prototypeTemplate, defaultS ignature, accessorConfiguration); 2284 V8DOMConfiguration::installAccessor(isolate, prototypeTemplate, defaultS ignature, accessorConfiguration);
2246 } 2285 }
2247 #if ENABLE(PARTIAL_CONDITION) 2286 #if ENABLE(PARTIAL_CONDITION)
2248 if (RuntimeEnabledFeatures::partialFeatureNameEnabled()) { 2287 if (RuntimeEnabledFeatures::partialFeatureNameEnabled()) {
2249 static const V8DOMConfiguration::AccessorConfiguration accessorConfigura tion =\ 2288 static const V8DOMConfiguration::AccessorConfiguration accessorConfigura tion =\
2250 {"partialLongAttribute", TestInterfaceImplementationV8Internal::partialL ongAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::part ialLongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl> (v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration: :ExposedToAllScripts}; 2289 {"partialLongAttribute", TestInterfaceImplementationV8Internal::partialL ongAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::part ialLongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl> (v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration: :ExposedToAllScripts, V8DOMConfiguration::CheckHolder};
2251 V8DOMConfiguration::installAccessor(isolate, prototypeTemplate, defaultS ignature, accessorConfiguration); 2290 V8DOMConfiguration::installAccessor(isolate, prototypeTemplate, defaultS ignature, accessorConfiguration);
2252 } 2291 }
2253 #endif // ENABLE(PARTIAL_CONDITION) 2292 #endif // ENABLE(PARTIAL_CONDITION)
2254 #if ENABLE(PARTIAL_CONDITION) 2293 #if ENABLE(PARTIAL_CONDITION)
2255 if (RuntimeEnabledFeatures::partialFeatureNameEnabled()) { 2294 if (RuntimeEnabledFeatures::partialFeatureNameEnabled()) {
2256 static const V8DOMConfiguration::AccessorConfiguration accessorConfigura tion =\ 2295 static const V8DOMConfiguration::AccessorConfiguration accessorConfigura tion =\
2257 {"partialCallWithExecutionContextLongAttribute", TestInterfaceImplementa tionV8Internal::partialCallWithExecutionContextLongAttributeAttributeGetterCallb ack, TestInterfaceImplementationV8Internal::partialCallWithExecutionContextLongA ttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEF AULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::Exposed ToAllScripts}; 2296 {"partialCallWithExecutionContextLongAttribute", TestInterfaceImplementa tionV8Internal::partialCallWithExecutionContextLongAttributeAttributeGetterCallb ack, TestInterfaceImplementationV8Internal::partialCallWithExecutionContextLongA ttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEF AULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::Exposed ToAllScripts, V8DOMConfiguration::CheckHolder};
2258 V8DOMConfiguration::installAccessor(isolate, prototypeTemplate, defaultS ignature, accessorConfiguration); 2297 V8DOMConfiguration::installAccessor(isolate, prototypeTemplate, defaultS ignature, accessorConfiguration);
2259 } 2298 }
2260 #endif // ENABLE(PARTIAL_CONDITION) 2299 #endif // ENABLE(PARTIAL_CONDITION)
2261 #if ENABLE(PARTIAL_CONDITION) 2300 #if ENABLE(PARTIAL_CONDITION)
2262 if (RuntimeEnabledFeatures::partialFeatureNameEnabled()) { 2301 if (RuntimeEnabledFeatures::partialFeatureNameEnabled()) {
2263 static const V8DOMConfiguration::AccessorConfiguration accessorConfigura tion =\ 2302 static const V8DOMConfiguration::AccessorConfiguration accessorConfigura tion =\
2264 {"partialPartialEnumTypeAttribute", TestInterfaceImplementationV8Interna l::partialPartialEnumTypeAttributeAttributeGetterCallback, TestInterfaceImplemen tationV8Internal::partialPartialEnumTypeAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribut e>(v8::None), V8DOMConfiguration::ExposedToAllScripts}; 2303 {"partialPartialEnumTypeAttribute", TestInterfaceImplementationV8Interna l::partialPartialEnumTypeAttributeAttributeGetterCallback, TestInterfaceImplemen tationV8Internal::partialPartialEnumTypeAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribut e>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::Check Holder};
2265 V8DOMConfiguration::installAccessor(isolate, prototypeTemplate, defaultS ignature, accessorConfiguration); 2304 V8DOMConfiguration::installAccessor(isolate, prototypeTemplate, defaultS ignature, accessorConfiguration);
2266 } 2305 }
2267 #endif // ENABLE(PARTIAL_CONDITION) 2306 #endif // ENABLE(PARTIAL_CONDITION)
2268 #if ENABLE(PARTIAL_CONDITION) 2307 #if ENABLE(PARTIAL_CONDITION)
2269 if (RuntimeEnabledFeatures::partialFeatureNameEnabled()) { 2308 if (RuntimeEnabledFeatures::partialFeatureNameEnabled()) {
2270 static const V8DOMConfiguration::AccessorConfiguration accessorConfigura tion =\ 2309 static const V8DOMConfiguration::AccessorConfiguration accessorConfigura tion =\
2271 {"stringAttribute", TestInterfaceImplementationV8Internal::stringAttribu teAttributeGetterCallback, TestInterfaceImplementationV8Internal::stringAttribut eAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllSc ripts}; 2310 {"stringAttribute", TestInterfaceImplementationV8Internal::stringAttribu teAttributeGetterCallback, TestInterfaceImplementationV8Internal::stringAttribut eAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllSc ripts, V8DOMConfiguration::CheckHolder};
2272 V8DOMConfiguration::installAccessor(isolate, prototypeTemplate, defaultS ignature, accessorConfiguration); 2311 V8DOMConfiguration::installAccessor(isolate, prototypeTemplate, defaultS ignature, accessorConfiguration);
2273 } 2312 }
2274 #endif // ENABLE(PARTIAL_CONDITION) 2313 #endif // ENABLE(PARTIAL_CONDITION)
2275 static const V8DOMConfiguration::ConstantConfiguration V8TestInterfaceConsta nts[] = { 2314 static const V8DOMConfiguration::ConstantConfiguration V8TestInterfaceConsta nts[] = {
2276 {"UNSIGNED_LONG", 0, 0, 0, V8DOMConfiguration::ConstantTypeUnsignedLong} , 2315 {"UNSIGNED_LONG", 0, 0, 0, V8DOMConfiguration::ConstantTypeUnsignedLong} ,
2277 {"CONST_JAVASCRIPT", 1, 0, 0, V8DOMConfiguration::ConstantTypeShort}, 2316 {"CONST_JAVASCRIPT", 1, 0, 0, V8DOMConfiguration::ConstantTypeShort},
2278 {"IMPLEMENTS_CONSTANT_1", 1, 0, 0, V8DOMConfiguration::ConstantTypeUnsig nedShort}, 2317 {"IMPLEMENTS_CONSTANT_1", 1, 0, 0, V8DOMConfiguration::ConstantTypeUnsig nedShort},
2279 {"IMPLEMENTS_CONSTANT_2", 2, 0, 0, V8DOMConfiguration::ConstantTypeUnsig nedShort}, 2318 {"IMPLEMENTS_CONSTANT_2", 2, 0, 0, V8DOMConfiguration::ConstantTypeUnsig nedShort},
2280 {"PARTIAL2_UNSIGNED_SHORT", 0, 0, 0, V8DOMConfiguration::ConstantTypeUns ignedShort}, 2319 {"PARTIAL2_UNSIGNED_SHORT", 0, 0, 0, V8DOMConfiguration::ConstantTypeUns ignedShort},
2281 }; 2320 };
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
2436 { 2475 {
2437 return hasInstance(value, isolate) ? toImpl(v8::Local<v8::Object>::Cast(valu e)) : 0; 2476 return hasInstance(value, isolate) ? toImpl(v8::Local<v8::Object>::Cast(valu e)) : 0;
2438 } 2477 }
2439 2478
2440 void V8TestInterface::installConditionallyEnabledProperties(v8::Local<v8::Object > instanceObject, v8::Isolate* isolate) 2479 void V8TestInterface::installConditionallyEnabledProperties(v8::Local<v8::Object > instanceObject, v8::Isolate* isolate)
2441 { 2480 {
2442 v8::Local<v8::Object> prototypeObject = v8::Local<v8::Object>::Cast(instance Object->GetPrototype()); 2481 v8::Local<v8::Object> prototypeObject = v8::Local<v8::Object>::Cast(instance Object->GetPrototype());
2443 ExecutionContext* context = toExecutionContext(prototypeObject->CreationCont ext()); 2482 ExecutionContext* context = toExecutionContext(prototypeObject->CreationCont ext());
2444 2483
2445 if (context && (context->isWorkerGlobalScope())) { 2484 if (context && (context->isWorkerGlobalScope())) {
2446 static const V8DOMConfiguration::AccessorConfiguration accessorConfigura tion = {"workerExposedAttribute", TestInterfaceImplementationV8Internal::workerE xposedAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::w orkerExposedAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessCon trol>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfigura tion::ExposedToAllScripts}; 2485 static const V8DOMConfiguration::AccessorConfiguration accessorConfigura tion = {"workerExposedAttribute", TestInterfaceImplementationV8Internal::workerE xposedAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::w orkerExposedAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessCon trol>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfigura tion::ExposedToAllScripts, V8DOMConfiguration::CheckHolder};
2447 V8DOMConfiguration::installAccessor(isolate, prototypeObject, accessorCo nfiguration); 2486 V8DOMConfiguration::installAccessor(isolate, prototypeObject, accessorCo nfiguration);
2448 } 2487 }
2449 if (context && (context->isDocument())) { 2488 if (context && (context->isDocument())) {
2450 static const V8DOMConfiguration::AccessorConfiguration accessorConfigura tion = {"windowExposedAttribute", TestInterfaceImplementationV8Internal::windowE xposedAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::w indowExposedAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessCon trol>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfigura tion::ExposedToAllScripts}; 2489 static const V8DOMConfiguration::AccessorConfiguration accessorConfigura tion = {"windowExposedAttribute", TestInterfaceImplementationV8Internal::windowE xposedAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::w indowExposedAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessCon trol>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfigura tion::ExposedToAllScripts, V8DOMConfiguration::CheckHolder};
2451 V8DOMConfiguration::installAccessor(isolate, prototypeObject, accessorCo nfiguration); 2490 V8DOMConfiguration::installAccessor(isolate, prototypeObject, accessorCo nfiguration);
2452 } 2491 }
2453 } 2492 }
2454 2493
2455 void V8TestInterface::preparePrototypeObject(v8::Isolate* isolate, v8::Local<v8: :Object> prototypeObject) 2494 void V8TestInterface::preparePrototypeObject(v8::Isolate* isolate, v8::Local<v8: :Object> prototypeObject)
2456 { 2495 {
2457 v8::Local<v8::Signature> defaultSignature = v8::Signature::New(isolate, domT emplate(isolate)); 2496 v8::Local<v8::Signature> defaultSignature = v8::Signature::New(isolate, domT emplate(isolate));
2458 ExecutionContext* context = toExecutionContext(prototypeObject->CreationCont ext()); 2497 ExecutionContext* context = toExecutionContext(prototypeObject->CreationCont ext());
2459 ASSERT(context); 2498 ASSERT(context);
2460 if (context && (context->isWorkerGlobalScope())) { 2499 if (context && (context->isWorkerGlobalScope())) {
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
2621 void V8TestInterface::registerPartial2VoidMethodMethodForPartialInterface(void ( *method)(const v8::FunctionCallbackInfo<v8::Value>&)) 2660 void V8TestInterface::registerPartial2VoidMethodMethodForPartialInterface(void ( *method)(const v8::FunctionCallbackInfo<v8::Value>&))
2622 { 2661 {
2623 TestInterfaceImplementationV8Internal::partial2VoidMethodMethodForPartialInt erface = method; 2662 TestInterfaceImplementationV8Internal::partial2VoidMethodMethodForPartialInt erface = method;
2624 } 2663 }
2625 void V8TestInterface::registerPartial2StaticVoidMethodMethodForPartialInterface( void (*method)(const v8::FunctionCallbackInfo<v8::Value>&)) 2664 void V8TestInterface::registerPartial2StaticVoidMethodMethodForPartialInterface( void (*method)(const v8::FunctionCallbackInfo<v8::Value>&))
2626 { 2665 {
2627 TestInterfaceImplementationV8Internal::partial2StaticVoidMethodMethodForPart ialInterface = method; 2666 TestInterfaceImplementationV8Internal::partial2StaticVoidMethodMethodForPart ialInterface = method;
2628 } 2667 }
2629 } // namespace blink 2668 } // namespace blink
2630 #endif // ENABLE(CONDITION) 2669 #endif // ENABLE(CONDITION)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698