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

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

Issue 1085453003: IDL: Add support for [Unscopeable] on attributes and methods (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: fixes Created 5 years, 8 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
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 #include "V8TestObject.h" 8 #include "V8TestObject.h"
9 9
10 #include "bindings/core/v8/BindingSecurity.h" 10 #include "bindings/core/v8/BindingSecurity.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 #include "core/inspector/ConsoleMessage.h" 66 #include "core/inspector/ConsoleMessage.h"
67 #include "core/inspector/ScriptArguments.h" 67 #include "core/inspector/ScriptArguments.h"
68 #include "platform/RuntimeEnabledFeatures.h" 68 #include "platform/RuntimeEnabledFeatures.h"
69 #include "platform/ScriptForbiddenScope.h" 69 #include "platform/ScriptForbiddenScope.h"
70 #include "platform/TraceEvent.h" 70 #include "platform/TraceEvent.h"
71 #include "wtf/GetPtr.h" 71 #include "wtf/GetPtr.h"
72 #include "wtf/RefPtr.h" 72 #include "wtf/RefPtr.h"
73 73
74 namespace blink { 74 namespace blink {
75 75
76 const WrapperTypeInfo V8TestObject::wrapperTypeInfo = { gin::kEmbedderBlink, V8T estObject::domTemplate, V8TestObject::refObject, V8TestObject::derefObject, V8Te stObject::trace, 0, 0, V8TestObject::installConditionallyEnabledMethods, V8TestO bject::installConditionallyEnabledProperties, "TestObject", 0, WrapperTypeInfo:: WrapperTypeObjectPrototype, WrapperTypeInfo::ObjectClassId, WrapperTypeInfo::Not InheritFromEventTarget, WrapperTypeInfo::Independent, WrapperTypeInfo::RefCounte dObject }; 76 const WrapperTypeInfo V8TestObject::wrapperTypeInfo = { gin::kEmbedderBlink, V8T estObject::domTemplate, V8TestObject::refObject, V8TestObject::derefObject, V8Te stObject::trace, 0, 0, V8TestObject::preparePrototypeObject, V8TestObject::insta llConditionallyEnabledProperties, "TestObject", 0, WrapperTypeInfo::WrapperTypeO bjectPrototype, WrapperTypeInfo::ObjectClassId, WrapperTypeInfo::NotInheritFromE ventTarget, WrapperTypeInfo::Independent, WrapperTypeInfo::RefCountedObject };
77 77
78 // This static member must be declared by DEFINE_WRAPPERTYPEINFO in TestObject.h . 78 // This static member must be declared by DEFINE_WRAPPERTYPEINFO in TestObject.h .
79 // For details, see the comment of DEFINE_WRAPPERTYPEINFO in 79 // For details, see the comment of DEFINE_WRAPPERTYPEINFO in
80 // bindings/core/v8/ScriptWrappable.h. 80 // bindings/core/v8/ScriptWrappable.h.
81 const WrapperTypeInfo& TestObject::s_wrapperTypeInfo = V8TestObject::wrapperType Info; 81 const WrapperTypeInfo& TestObject::s_wrapperTypeInfo = V8TestObject::wrapperType Info;
82 82
83 namespace TestObjectV8Internal { 83 namespace TestObjectV8Internal {
84 84
85 static void DEPRECATED_CONSTANTConstantGetterCallback(v8::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Value>& info) 85 static void DEPRECATED_CONSTANTConstantGetterCallback(v8::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Value>& info)
86 { 86 {
(...skipping 5142 matching lines...) Expand 10 before | Expand all | Expand 10 after
5229 impl->setSameObjectAttribute(WTF::getPtr(cppValue)); 5229 impl->setSameObjectAttribute(WTF::getPtr(cppValue));
5230 } 5230 }
5231 5231
5232 static void sameObjectAttributeAttributeSetterCallback(v8::Local<v8::Name>, v8:: Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) 5232 static void sameObjectAttributeAttributeSetterCallback(v8::Local<v8::Name>, v8:: Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
5233 { 5233 {
5234 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); 5234 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
5235 TestObjectV8Internal::sameObjectAttributeAttributeSetter(v8Value, info); 5235 TestObjectV8Internal::sameObjectAttributeAttributeSetter(v8Value, info);
5236 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 5236 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
5237 } 5237 }
5238 5238
5239 static void unscopeableLongAttributeAttributeGetter(const v8::PropertyCallbackIn fo<v8::Value>& info)
5240 {
5241 v8::Local<v8::Object> holder = info.Holder();
5242 TestObject* impl = V8TestObject::toImpl(holder);
5243 v8SetReturnValueInt(info, impl->unscopeableLongAttribute());
5244 }
5245
5246 static void unscopeableLongAttributeAttributeGetterCallback(v8::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Value>& info)
5247 {
5248 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
5249 TestObjectV8Internal::unscopeableLongAttributeAttributeGetter(info);
5250 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
5251 }
5252
5253 static void unscopeableLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value , const v8::PropertyCallbackInfo<void>& info)
5254 {
5255 v8::Local<v8::Object> holder = info.Holder();
5256 ExceptionState exceptionState(ExceptionState::SetterContext, "unscopeableLon gAttribute", "TestObject", holder, info.GetIsolate());
5257 TestObject* impl = V8TestObject::toImpl(holder);
5258 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti onState);
5259 if (exceptionState.throwIfNeeded())
5260 return;
5261 impl->setUnscopeableLongAttribute(cppValue);
5262 }
5263
5264 static void unscopeableLongAttributeAttributeSetterCallback(v8::Local<v8::Name>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
5265 {
5266 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
5267 TestObjectV8Internal::unscopeableLongAttributeAttributeSetter(v8Value, info) ;
5268 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
5269 }
5270
5239 static void testInterfaceAttributeAttributeGetter(const v8::PropertyCallbackInfo <v8::Value>& info) 5271 static void testInterfaceAttributeAttributeGetter(const v8::PropertyCallbackInfo <v8::Value>& info)
5240 { 5272 {
5241 v8::Local<v8::Object> holder = info.Holder(); 5273 v8::Local<v8::Object> holder = info.Holder();
5242 TestObject* impl = V8TestObject::toImpl(holder); 5274 TestObject* impl = V8TestObject::toImpl(holder);
5243 v8SetReturnValueFast(info, WTF::getPtr(impl->testInterfaceAttribute()), impl ); 5275 v8SetReturnValueFast(info, WTF::getPtr(impl->testInterfaceAttribute()), impl );
5244 } 5276 }
5245 5277
5246 static void testInterfaceAttributeAttributeGetterCallback(v8::Local<v8::Name>, c onst v8::PropertyCallbackInfo<v8::Value>& info) 5278 static void testInterfaceAttributeAttributeGetterCallback(v8::Local<v8::Name>, c onst v8::PropertyCallbackInfo<v8::Value>& info)
5247 { 5279 {
5248 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); 5280 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after
5584 } 5616 }
5585 5617
5586 static void measureAsFeatureNameTestInterfaceEmptyConstructorAttributeConstructo rGetterCallback(v8::Local<v8::Name> property, const v8::PropertyCallbackInfo<v8: :Value>& info) 5618 static void measureAsFeatureNameTestInterfaceEmptyConstructorAttributeConstructo rGetterCallback(v8::Local<v8::Name> property, const v8::PropertyCallbackInfo<v8: :Value>& info)
5587 { 5619 {
5588 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); 5620 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
5589 UseCounter::countIfNotPrivateScript(info.GetIsolate(), callingExecutionConte xt(info.GetIsolate()), UseCounter::FeatureName); 5621 UseCounter::countIfNotPrivateScript(info.GetIsolate(), callingExecutionConte xt(info.GetIsolate()), UseCounter::FeatureName);
5590 v8ConstructorAttributeGetter(property, info); 5622 v8ConstructorAttributeGetter(property, info);
5591 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 5623 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
5592 } 5624 }
5593 5625
5626 static void unscopeableVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value >& info)
5627 {
5628 TestObject* impl = V8TestObject::toImpl(info.Holder());
5629 impl->unscopeableVoidMethod();
5630 }
5631
5632 static void unscopeableVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v 8::Value>& info)
5633 {
5634 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
5635 TestObjectV8Internal::unscopeableVoidMethodMethod(info);
5636 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
5637 }
5638
5594 static void voidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 5639 static void voidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5595 { 5640 {
5596 TestObject* impl = V8TestObject::toImpl(info.Holder()); 5641 TestObject* impl = V8TestObject::toImpl(info.Holder());
5597 impl->voidMethod(); 5642 impl->voidMethod();
5598 } 5643 }
5599 5644
5600 static void voidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) 5645 static void voidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5601 { 5646 {
5602 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 5647 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
5603 TestObjectV8Internal::voidMethodMethod(info); 5648 TestObjectV8Internal::voidMethodMethod(info);
(...skipping 6715 matching lines...) Expand 10 before | Expand all | Expand 10 after
12319 {"treatReturnedNullStringAsNullUSVStringAttribute", TestObjectV8Internal::tr eatReturnedNullStringAsNullUSVStringAttributeAttributeGetterCallback, TestObject V8Internal::treatReturnedNullStringAsNullUSVStringAttributeAttributeSetterCallba ck, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::Proper tyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfigurat ion::OnInstance}, 12364 {"treatReturnedNullStringAsNullUSVStringAttribute", TestObjectV8Internal::tr eatReturnedNullStringAsNullUSVStringAttributeAttributeGetterCallback, TestObject V8Internal::treatReturnedNullStringAsNullUSVStringAttributeAttributeSetterCallba ck, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::Proper tyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfigurat ion::OnInstance},
12320 {"treatReturnedNullStringAsUndefinedUSVStringAttribute", TestObjectV8Interna l::treatReturnedNullStringAsUndefinedUSVStringAttributeAttributeGetterCallback, TestObjectV8Internal::treatReturnedNullStringAsUndefinedUSVStringAttributeAttrib uteSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_ cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance}, 12365 {"treatReturnedNullStringAsUndefinedUSVStringAttribute", TestObjectV8Interna l::treatReturnedNullStringAsUndefinedUSVStringAttributeAttributeGetterCallback, TestObjectV8Internal::treatReturnedNullStringAsUndefinedUSVStringAttributeAttrib uteSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_ cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance},
12321 {"typeCheckingInterfaceFloatAttribute", TestObjectV8Internal::typeCheckingIn terfaceFloatAttributeAttributeGetterCallback, TestObjectV8Internal::typeChecking InterfaceFloatAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessC ontrol>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfigu ration::ExposedToAllScripts, V8DOMConfiguration::OnInstance}, 12366 {"typeCheckingInterfaceFloatAttribute", TestObjectV8Internal::typeCheckingIn terfaceFloatAttributeAttributeGetterCallback, TestObjectV8Internal::typeChecking InterfaceFloatAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessC ontrol>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfigu ration::ExposedToAllScripts, V8DOMConfiguration::OnInstance},
12322 {"typeCheckingInterfaceTestInterfaceAttribute", TestObjectV8Internal::typeCh eckingInterfaceTestInterfaceAttributeAttributeGetterCallback, TestObjectV8Intern al::typeCheckingInterfaceTestInterfaceAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute> (v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInsta nce}, 12367 {"typeCheckingInterfaceTestInterfaceAttribute", TestObjectV8Internal::typeCh eckingInterfaceTestInterfaceAttributeAttributeGetterCallback, TestObjectV8Intern al::typeCheckingInterfaceTestInterfaceAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute> (v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInsta nce},
12323 {"typeCheckingInterfaceTestInterfaceOrNullAttribute", TestObjectV8Internal:: typeCheckingInterfaceTestInterfaceOrNullAttributeAttributeGetterCallback, TestOb jectV8Internal::typeCheckingInterfaceTestInterfaceOrNullAttributeAttributeSetter Callback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8:: PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConf iguration::OnInstance}, 12368 {"typeCheckingInterfaceTestInterfaceOrNullAttribute", TestObjectV8Internal:: typeCheckingInterfaceTestInterfaceOrNullAttributeAttributeGetterCallback, TestOb jectV8Internal::typeCheckingInterfaceTestInterfaceOrNullAttributeAttributeSetter Callback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8:: PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConf iguration::OnInstance},
12324 {"urlStringAttribute", TestObjectV8Internal::urlStringAttributeAttributeGett erCallback, TestObjectV8Internal::urlStringAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttri bute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::On Instance}, 12369 {"urlStringAttribute", TestObjectV8Internal::urlStringAttributeAttributeGett erCallback, TestObjectV8Internal::urlStringAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttri bute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::On Instance},
12325 {"urlStringAttribute", TestObjectV8Internal::urlStringAttributeAttributeGett erCallback, TestObjectV8Internal::urlStringAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttri bute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::On Instance}, 12370 {"urlStringAttribute", TestObjectV8Internal::urlStringAttributeAttributeGett erCallback, TestObjectV8Internal::urlStringAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttri bute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::On Instance},
12326 {"unforgeableLongAttribute", TestObjectV8Internal::unforgeableLongAttributeA ttributeGetterCallback, TestObjectV8Internal::unforgeableLongAttributeAttributeS etterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::PROHIBITS_OVERWRITING ), static_cast<v8::PropertyAttribute>(v8::DontDelete), V8DOMConfiguration::Expos edToAllScripts, V8DOMConfiguration::OnInstance}, 12371 {"unforgeableLongAttribute", TestObjectV8Internal::unforgeableLongAttributeA ttributeGetterCallback, TestObjectV8Internal::unforgeableLongAttributeAttributeS etterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::PROHIBITS_OVERWRITING ), static_cast<v8::PropertyAttribute>(v8::DontDelete), V8DOMConfiguration::Expos edToAllScripts, V8DOMConfiguration::OnInstance},
12327 {"measuredLongAttribute", TestObjectV8Internal::measuredLongAttributeAttribu teGetterCallback, TestObjectV8Internal::measuredLongAttributeAttributeSetterCall back, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::Prop ertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfigur ation::OnInstance}, 12372 {"measuredLongAttribute", TestObjectV8Internal::measuredLongAttributeAttribu teGetterCallback, TestObjectV8Internal::measuredLongAttributeAttributeSetterCall back, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::Prop ertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfigur ation::OnInstance},
12328 {"sameObjectAttribute", TestObjectV8Internal::sameObjectAttributeAttributeGe tterCallback, TestObjectV8Internal::sameObjectAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAt tribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration: :OnInstance}, 12373 {"sameObjectAttribute", TestObjectV8Internal::sameObjectAttributeAttributeGe tterCallback, TestObjectV8Internal::sameObjectAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAt tribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration: :OnInstance},
12374 {"unscopeableLongAttribute", TestObjectV8Internal::unscopeableLongAttributeA ttributeGetterCallback, TestObjectV8Internal::unscopeableLongAttributeAttributeS etterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast <v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DO MConfiguration::OnInstance},
12329 {"testInterfaceAttribute", TestObjectV8Internal::testInterfaceAttributeAttri buteGetterCallback, TestObjectV8Internal::testInterfaceAttributeAttributeSetterC allback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::P ropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfi guration::OnInstance}, 12375 {"testInterfaceAttribute", TestObjectV8Internal::testInterfaceAttributeAttri buteGetterCallback, TestObjectV8Internal::testInterfaceAttributeAttributeSetterC allback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::P ropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfi guration::OnInstance},
12330 {"testInterfaceGarbageCollectedAttribute", TestObjectV8Internal::testInterfa ceGarbageCollectedAttributeAttributeGetterCallback, TestObjectV8Internal::testIn terfaceGarbageCollectedAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8 ::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8D OMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance}, 12376 {"testInterfaceGarbageCollectedAttribute", TestObjectV8Internal::testInterfa ceGarbageCollectedAttributeAttributeGetterCallback, TestObjectV8Internal::testIn terfaceGarbageCollectedAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8 ::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8D OMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance},
12331 {"testInterfaceGarbageCollectedOrNullAttribute", TestObjectV8Internal::testI nterfaceGarbageCollectedOrNullAttributeAttributeGetterCallback, TestObjectV8Inte rnal::testInterfaceGarbageCollectedOrNullAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribu te>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnIn stance}, 12377 {"testInterfaceGarbageCollectedOrNullAttribute", TestObjectV8Internal::testI nterfaceGarbageCollectedOrNullAttributeAttributeGetterCallback, TestObjectV8Inte rnal::testInterfaceGarbageCollectedOrNullAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribu te>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnIn stance},
12332 {"testInterfaceWillBeGarbageCollectedAttribute", TestObjectV8Internal::testI nterfaceWillBeGarbageCollectedAttributeAttributeGetterCallback, TestObjectV8Inte rnal::testInterfaceWillBeGarbageCollectedAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribu te>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnIn stance}, 12378 {"testInterfaceWillBeGarbageCollectedAttribute", TestObjectV8Internal::testI nterfaceWillBeGarbageCollectedAttributeAttributeGetterCallback, TestObjectV8Inte rnal::testInterfaceWillBeGarbageCollectedAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribu te>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnIn stance},
12333 {"testInterfaceWillBeGarbageCollectedOrNullAttribute", TestObjectV8Internal: :testInterfaceWillBeGarbageCollectedOrNullAttributeAttributeGetterCallback, Test ObjectV8Internal::testInterfaceWillBeGarbageCollectedOrNullAttributeAttributeSet terCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v 8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMC onfiguration::OnInstance}, 12379 {"testInterfaceWillBeGarbageCollectedOrNullAttribute", TestObjectV8Internal: :testInterfaceWillBeGarbageCollectedOrNullAttributeAttributeGetterCallback, Test ObjectV8Internal::testInterfaceWillBeGarbageCollectedOrNullAttributeAttributeSet terCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v 8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMC onfiguration::OnInstance},
12334 {"readonlyShortAttribute", TestObjectV8Internal::readonlyShortAttributeAttri buteGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), sta tic_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScrip ts, V8DOMConfiguration::OnInstance}, 12380 {"readonlyShortAttribute", TestObjectV8Internal::readonlyShortAttributeAttri buteGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), sta tic_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScrip ts, V8DOMConfiguration::OnInstance},
12335 {"shortAttribute", TestObjectV8Internal::shortAttributeAttributeGetterCallba ck, TestObjectV8Internal::shortAttributeAttributeSetterCallback, 0, 0, 0, static _cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::No ne), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance}, 12381 {"shortAttribute", TestObjectV8Internal::shortAttributeAttributeGetterCallba ck, TestObjectV8Internal::shortAttributeAttributeSetterCallback, 0, 0, 0, static _cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::No ne), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance},
12336 {"stringAttribute", TestObjectV8Internal::stringAttributeAttributeGetterCall back, TestObjectV8Internal::stringAttributeAttributeSetterCallback, 0, 0, 0, sta tic_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8: :None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance} , 12382 {"stringAttribute", TestObjectV8Internal::stringAttributeAttributeGetterCall back, TestObjectV8Internal::stringAttributeAttributeSetterCallback, 0, 0, 0, sta tic_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8: :None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance} ,
12337 {"nodeAttribute", TestObjectV8Internal::nodeAttributeAttributeGetterCallback , TestObjectV8Internal::nodeAttributeAttributeSetterCallback, 0, 0, 0, static_ca st<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None) , V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance}, 12383 {"nodeAttribute", TestObjectV8Internal::nodeAttributeAttributeGetterCallback , TestObjectV8Internal::nodeAttributeAttributeSetterCallback, 0, 0, 0, static_ca st<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None) , V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance},
12338 {"attributeImplementedInCPPForPrivateScriptOnly", TestObjectV8Internal::attr ibuteImplementedInCPPForPrivateScriptOnlyAttributeGetterCallback, TestObjectV8In ternal::attributeImplementedInCPPForPrivateScriptOnlyAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttr ibute>(v8::None), V8DOMConfiguration::OnlyExposedToPrivateScript, V8DOMConfigura tion::OnInstance}, 12384 {"attributeImplementedInCPPForPrivateScriptOnly", TestObjectV8Internal::attr ibuteImplementedInCPPForPrivateScriptOnlyAttributeGetterCallback, TestObjectV8In ternal::attributeImplementedInCPPForPrivateScriptOnlyAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttr ibute>(v8::None), V8DOMConfiguration::OnlyExposedToPrivateScript, V8DOMConfigura tion::OnInstance},
12339 {"enumForPrivateScript", TestObjectV8Internal::enumForPrivateScriptAttribute GetterCallback, TestObjectV8Internal::enumForPrivateScriptAttributeSetterCallbac k, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::Propert yAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfigurati on::OnInstance}, 12385 {"enumForPrivateScript", TestObjectV8Internal::enumForPrivateScriptAttribute GetterCallback, TestObjectV8Internal::enumForPrivateScriptAttributeSetterCallbac k, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::Propert yAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfigurati on::OnInstance},
12340 }; 12386 };
12341 12387
12342 static const V8DOMConfiguration::AccessorConfiguration V8TestObjectAccessors[] = { 12388 static const V8DOMConfiguration::AccessorConfiguration V8TestObjectAccessors[] = {
12343 {"exposeJSAccessorsLongAttribute", TestObjectV8Internal::exposeJSAccessorsLo ngAttributeAttributeGetterCallback, TestObjectV8Internal::exposeJSAccessorsLongA ttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEF AULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::Exposed ToAllScripts}, 12389 {"exposeJSAccessorsLongAttribute", TestObjectV8Internal::exposeJSAccessorsLo ngAttributeAttributeGetterCallback, TestObjectV8Internal::exposeJSAccessorsLongA ttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEF AULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::Exposed ToAllScripts},
12344 {"replaceableReadonlyLongAccessor", TestObjectV8Internal::replaceableReadonl yLongAccessorAttributeGetterCallback, TestObjectV8Internal::replaceableReadonlyL ongAccessorAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8:: DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::Expo sedToAllScripts}, 12390 {"replaceableReadonlyLongAccessor", TestObjectV8Internal::replaceableReadonl yLongAccessorAttributeGetterCallback, TestObjectV8Internal::replaceableReadonlyL ongAccessorAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8:: DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::Expo sedToAllScripts},
12345 }; 12391 };
12346 12392
12347 static const V8DOMConfiguration::MethodConfiguration V8TestObjectMethods[] = { 12393 static const V8DOMConfiguration::MethodConfiguration V8TestObjectMethods[] = {
12394 {"unscopeableVoidMethod", TestObjectV8Internal::unscopeableVoidMethodMethodC allback, 0, 0, V8DOMConfiguration::ExposedToAllScripts},
12348 {"voidMethod", TestObjectV8Internal::voidMethodMethodCallback, 0, 0, V8DOMCo nfiguration::ExposedToAllScripts}, 12395 {"voidMethod", TestObjectV8Internal::voidMethodMethodCallback, 0, 0, V8DOMCo nfiguration::ExposedToAllScripts},
12349 {"dateMethod", TestObjectV8Internal::dateMethodMethodCallback, 0, 0, V8DOMCo nfiguration::ExposedToAllScripts}, 12396 {"dateMethod", TestObjectV8Internal::dateMethodMethodCallback, 0, 0, V8DOMCo nfiguration::ExposedToAllScripts},
12350 {"stringMethod", TestObjectV8Internal::stringMethodMethodCallback, 0, 0, V8D OMConfiguration::ExposedToAllScripts}, 12397 {"stringMethod", TestObjectV8Internal::stringMethodMethodCallback, 0, 0, V8D OMConfiguration::ExposedToAllScripts},
12351 {"byteStringMethod", TestObjectV8Internal::byteStringMethodMethodCallback, 0 , 0, V8DOMConfiguration::ExposedToAllScripts}, 12398 {"byteStringMethod", TestObjectV8Internal::byteStringMethodMethodCallback, 0 , 0, V8DOMConfiguration::ExposedToAllScripts},
12352 {"usvStringMethod", TestObjectV8Internal::usvStringMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, 12399 {"usvStringMethod", TestObjectV8Internal::usvStringMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts},
12353 {"readonlyDOMTimeStampMethod", TestObjectV8Internal::readonlyDOMTimeStampMet hodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, 12400 {"readonlyDOMTimeStampMethod", TestObjectV8Internal::readonlyDOMTimeStampMet hodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts},
12354 {"booleanMethod", TestObjectV8Internal::booleanMethodMethodCallback, 0, 0, V 8DOMConfiguration::ExposedToAllScripts}, 12401 {"booleanMethod", TestObjectV8Internal::booleanMethodMethodCallback, 0, 0, V 8DOMConfiguration::ExposedToAllScripts},
12355 {"byteMethod", TestObjectV8Internal::byteMethodMethodCallback, 0, 0, V8DOMCo nfiguration::ExposedToAllScripts}, 12402 {"byteMethod", TestObjectV8Internal::byteMethodMethodCallback, 0, 0, V8DOMCo nfiguration::ExposedToAllScripts},
12356 {"doubleMethod", TestObjectV8Internal::doubleMethodMethodCallback, 0, 0, V8D OMConfiguration::ExposedToAllScripts}, 12403 {"doubleMethod", TestObjectV8Internal::doubleMethodMethodCallback, 0, 0, V8D OMConfiguration::ExposedToAllScripts},
12357 {"floatMethod", TestObjectV8Internal::floatMethodMethodCallback, 0, 0, V8DOM Configuration::ExposedToAllScripts}, 12404 {"floatMethod", TestObjectV8Internal::floatMethodMethodCallback, 0, 0, V8DOM Configuration::ExposedToAllScripts},
(...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after
12761 if (context && context->isDocument() && ContextFeatures::featureNameEnabled( toDocument(context))) { 12808 if (context && context->isDocument() && ContextFeatures::featureNameEnabled( toDocument(context))) {
12762 static const V8DOMConfiguration::AttributeConfiguration attributeConfigu ration = {"perContextEnabledLongAttribute", TestObjectV8Internal::perContextEnab ledLongAttributeAttributeGetterCallback, TestObjectV8Internal::perContextEnabled LongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8 ::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::Ex posedToAllScripts, V8DOMConfiguration::OnInstance}; 12809 static const V8DOMConfiguration::AttributeConfiguration attributeConfigu ration = {"perContextEnabledLongAttribute", TestObjectV8Internal::perContextEnab ledLongAttributeAttributeGetterCallback, TestObjectV8Internal::perContextEnabled LongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8 ::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::Ex posedToAllScripts, V8DOMConfiguration::OnInstance};
12763 V8DOMConfiguration::installAttribute(isolate, instanceObject, prototypeO bject, attributeConfiguration); 12810 V8DOMConfiguration::installAttribute(isolate, instanceObject, prototypeO bject, attributeConfiguration);
12764 } 12811 }
12765 if (context && context->isDocument() && ContextFeatures::featureNameEnabled( toDocument(context))) { 12812 if (context && context->isDocument() && ContextFeatures::featureNameEnabled( toDocument(context))) {
12766 static const V8DOMConfiguration::AttributeConfiguration attributeConfigu ration = {"perContextEnabledRuntimeEnabledLongAttribute", TestObjectV8Internal:: perContextEnabledRuntimeEnabledLongAttributeAttributeGetterCallback, TestObjectV 8Internal::perContextEnabledRuntimeEnabledLongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAt tribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration: :OnInstance}; 12813 static const V8DOMConfiguration::AttributeConfiguration attributeConfigu ration = {"perContextEnabledRuntimeEnabledLongAttribute", TestObjectV8Internal:: perContextEnabledRuntimeEnabledLongAttributeAttributeGetterCallback, TestObjectV 8Internal::perContextEnabledRuntimeEnabledLongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAt tribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration: :OnInstance};
12767 V8DOMConfiguration::installAttribute(isolate, instanceObject, prototypeO bject, attributeConfiguration); 12814 V8DOMConfiguration::installAttribute(isolate, instanceObject, prototypeO bject, attributeConfiguration);
12768 } 12815 }
12769 } 12816 }
12770 12817
12771 void V8TestObject::installConditionallyEnabledMethods(v8::Local<v8::Object> prot otypeObject, v8::Isolate* isolate) 12818 void V8TestObject::preparePrototypeObject(v8::Isolate* isolate, v8::Local<v8::Ob ject> prototypeObject)
12772 { 12819 {
12820 v8::Local<v8::Context> v8Context(prototypeObject->CreationContext());
12821 v8::Local<v8::Name> unscopablesSymbol(v8::Symbol::GetUnscopables(isolate));
12822 v8::Local<v8::Object> unscopeables;
12823 if (v8CallBoolean(prototypeObject->HasOwnProperty(v8Context, unscopablesSymb ol)))
12824 unscopeables = prototypeObject->Get(v8Context, unscopablesSymbol).ToLoca lChecked().As<v8::Object>();
12825 else
12826 unscopeables = v8::Object::New(isolate);
12827 unscopeables->ForceSet(v8Context, v8AtomicString(isolate, "unscopeableLongAt tribute"), v8::True(isolate)).FromJust();
12828 unscopeables->ForceSet(v8Context, v8AtomicString(isolate, "unscopeableVoidMe thod"), v8::True(isolate)).FromJust();
12829 prototypeObject->ForceSet(v8Context, unscopablesSymbol, unscopeables).FromJu st();
12773 v8::Local<v8::Signature> defaultSignature = v8::Signature::New(isolate, domT emplate(isolate)); 12830 v8::Local<v8::Signature> defaultSignature = v8::Signature::New(isolate, domT emplate(isolate));
12774 ExecutionContext* context = toExecutionContext(prototypeObject->CreationCont ext()); 12831 ExecutionContext* context = toExecutionContext(prototypeObject->CreationCont ext());
12775 ASSERT(context); 12832 ASSERT(context);
12776
12777 if (context && context->isDocument() && ContextFeatures::featureNameEnabled( toDocument(context))) { 12833 if (context && context->isDocument() && ContextFeatures::featureNameEnabled( toDocument(context))) {
12778 prototypeObject->Set(v8AtomicString(isolate, "perContextEnabledVoidMetho d"), v8::FunctionTemplate::New(isolate, TestObjectV8Internal::perContextEnabledV oidMethodMethodCallback, v8Undefined(), defaultSignature, 0)->GetFunction(isolat e->GetCurrentContext()).ToLocalChecked()); 12834 prototypeObject->Set(v8AtomicString(isolate, "perContextEnabledVoidMetho d"), v8::FunctionTemplate::New(isolate, TestObjectV8Internal::perContextEnabledV oidMethodMethodCallback, v8Undefined(), defaultSignature, 0)->GetFunction(isolat e->GetCurrentContext()).ToLocalChecked());
12779 } 12835 }
12780 } 12836 }
12781 12837
12782 void V8TestObject::refObject(ScriptWrappable* scriptWrappable) 12838 void V8TestObject::refObject(ScriptWrappable* scriptWrappable)
12783 { 12839 {
12784 scriptWrappable->toImpl<TestObject>()->ref(); 12840 scriptWrappable->toImpl<TestObject>()->ref();
12785 } 12841 }
12786 12842
(...skipping 485 matching lines...) Expand 10 before | Expand all | Expand 10 after
13272 return false; 13328 return false;
13273 13329
13274 ScriptState::Scope scope(scriptState); 13330 ScriptState::Scope scope(scriptState);
13275 v8::Local<v8::Value> holder = toV8(holderImpl, scriptState->context()->Globa l(), scriptState->isolate()); 13331 v8::Local<v8::Value> holder = toV8(holderImpl, scriptState->context()->Globa l(), scriptState->isolate());
13276 13332
13277 ExceptionState exceptionState(ExceptionState::SetterContext, "enumForPrivate Script", "TestObject", scriptState->context()->Global(), scriptState->isolate()) ; 13333 ExceptionState exceptionState(ExceptionState::SetterContext, "enumForPrivate Script", "TestObject", scriptState->context()->Global(), scriptState->isolate()) ;
13278 return PrivateScriptRunner::runDOMAttributeSetter(scriptState, scriptStateIn UserScript, "TestObject", "enumForPrivateScript", holder, v8String(scriptState-> isolate(), cppValue)); 13334 return PrivateScriptRunner::runDOMAttributeSetter(scriptState, scriptStateIn UserScript, "TestObject", "enumForPrivateScript", holder, v8String(scriptState-> isolate(), cppValue));
13279 } 13335 }
13280 13336
13281 } // namespace blink 13337 } // namespace blink
OLDNEW
« no previous file with comments | « Source/bindings/tests/results/core/V8TestObject.h ('k') | Source/bindings/tests/results/core/V8TestSpecialOperations.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698