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

Side by Side Diff: Source/bindings/tests/results/modules/V8TestInterface5.cpp

Issue 1193793003: bindings: Makes almost all attributes accessor-type properties. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Synced. Created 5 years, 5 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
« no previous file with comments | « Source/bindings/tests/results/core/V8TestTypedefs.cpp ('k') | Source/core/dom/Document.idl » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "V8TestInterface5.h" 9 #include "V8TestInterface5.h"
10 10
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 } 242 }
243 243
244 static void unrestrictedFloatAttributeAttributeSetterCallback(const v8::Function CallbackInfo<v8::Value>& info) 244 static void unrestrictedFloatAttributeAttributeSetterCallback(const v8::Function CallbackInfo<v8::Value>& info)
245 { 245 {
246 v8::Local<v8::Value> v8Value = info[0]; 246 v8::Local<v8::Value> v8Value = info[0];
247 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); 247 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
248 TestInterface5ImplementationV8Internal::unrestrictedFloatAttributeAttributeS etter(v8Value, info); 248 TestInterface5ImplementationV8Internal::unrestrictedFloatAttributeAttributeS etter(v8Value, info);
249 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 249 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
250 } 250 }
251 251
252 static void staticStringAttributeAttributeGetter(const v8::PropertyCallbackInfo< v8::Value>& info) 252 static void staticStringAttributeAttributeGetter(const v8::FunctionCallbackInfo< v8::Value>& info)
253 { 253 {
254 v8SetReturnValueString(info, TestInterface5Implementation::staticStringAttri bute(), info.GetIsolate()); 254 v8SetReturnValueString(info, TestInterface5Implementation::staticStringAttri bute(), info.GetIsolate());
255 } 255 }
256 256
257 static void staticStringAttributeAttributeGetterCallback(v8::Local<v8::Name>, co nst v8::PropertyCallbackInfo<v8::Value>& info) 257 static void staticStringAttributeAttributeGetterCallback(const v8::FunctionCallb ackInfo<v8::Value>& info)
258 { 258 {
259 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); 259 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
260 TestInterface5ImplementationV8Internal::staticStringAttributeAttributeGetter (info); 260 TestInterface5ImplementationV8Internal::staticStringAttributeAttributeGetter (info);
261 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 261 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
262 } 262 }
263 263
264 static void staticStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c onst v8::PropertyCallbackInfo<void>& info) 264 static void staticStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c onst v8::FunctionCallbackInfo<v8::Value>& info)
265 { 265 {
266 V8StringResource<> cppValue = v8Value; 266 V8StringResource<> cppValue = v8Value;
267 if (!cppValue.prepare()) 267 if (!cppValue.prepare())
268 return; 268 return;
269 TestInterface5Implementation::setStaticStringAttribute(cppValue); 269 TestInterface5Implementation::setStaticStringAttribute(cppValue);
270 } 270 }
271 271
272 static void staticStringAttributeAttributeSetterCallback(v8::Local<v8::Name>, v8 ::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) 272 static void staticStringAttributeAttributeSetterCallback(const v8::FunctionCallb ackInfo<v8::Value>& info)
273 { 273 {
274 v8::Local<v8::Value> v8Value = info[0];
274 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); 275 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
275 TestInterface5ImplementationV8Internal::staticStringAttributeAttributeSetter (v8Value, info); 276 TestInterface5ImplementationV8Internal::staticStringAttributeAttributeSetter (v8Value, info);
276 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 277 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
277 } 278 }
278 279
279 static void alwaysExposedAttributeAttributeGetter(const v8::FunctionCallbackInfo <v8::Value>& info) 280 static void alwaysExposedAttributeAttributeGetter(const v8::FunctionCallbackInfo <v8::Value>& info)
280 { 281 {
281 v8::Local<v8::Object> holder = info.Holder(); 282 v8::Local<v8::Object> holder = info.Holder();
282 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); 283 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder);
283 v8SetReturnValueInt(info, impl->alwaysExposedAttribute()); 284 v8SetReturnValueInt(info, impl->alwaysExposedAttribute());
(...skipping 638 matching lines...) Expand 10 before | Expand all | Expand 10 after
922 #pragma clang diagnostic ignored "-Wglobal-constructors" 923 #pragma clang diagnostic ignored "-Wglobal-constructors"
923 #endif 924 #endif
924 static const V8DOMConfiguration::AttributeConfiguration V8TestInterface5Attribut es[] = { 925 static const V8DOMConfiguration::AttributeConfiguration V8TestInterface5Attribut es[] = {
925 {"testInterfaceConstructorAttribute", v8ConstructorAttributeGetter, TestInte rface5ImplementationV8Internal::testInterfaceConstructorAttributeAttributeSetter Callback, 0, 0, const_cast<WrapperTypeInfo*>(&V8TestInterface5::wrapperTypeInfo) , static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute >(v8::DontEnum), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::On Instance, V8DOMConfiguration::CheckHolder}, 926 {"testInterfaceConstructorAttribute", v8ConstructorAttributeGetter, TestInte rface5ImplementationV8Internal::testInterfaceConstructorAttributeAttributeSetter Callback, 0, 0, const_cast<WrapperTypeInfo*>(&V8TestInterface5::wrapperTypeInfo) , static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute >(v8::DontEnum), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::On Instance, V8DOMConfiguration::CheckHolder},
926 }; 927 };
927 #if defined(COMPONENT_BUILD) && defined(WIN32) && COMPILER(CLANG) 928 #if defined(COMPONENT_BUILD) && defined(WIN32) && COMPILER(CLANG)
928 #pragma clang diagnostic pop 929 #pragma clang diagnostic pop
929 #endif 930 #endif
930 931
931 static const V8DOMConfiguration::AccessorConfiguration V8TestInterface5Accessors [] = { 932 static const V8DOMConfiguration::AccessorConfiguration V8TestInterface5Accessors [] = {
932 {"testInterfaceAttribute", TestInterface5ImplementationV8Internal::testInter faceAttributeAttributeGetterCallback, TestInterface5ImplementationV8Internal::te stInterfaceAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessCont rol>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfigurat ion::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::C heckHolder}, 933 {"testInterfaceAttribute", TestInterface5ImplementationV8Internal::testInter faceAttributeAttributeGetterCallback, TestInterface5ImplementationV8Internal::te stInterfaceAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v 8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMC onfiguration::OnPrototype, V8DOMConfiguration::CheckHolder},
933 {"doubleAttribute", TestInterface5ImplementationV8Internal::doubleAttributeA ttributeGetterCallback, TestInterface5ImplementationV8Internal::doubleAttributeA ttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), st atic_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScri pts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, 934 {"doubleAttribute", TestInterface5ImplementationV8Internal::doubleAttributeA ttributeGetterCallback, TestInterface5ImplementationV8Internal::doubleAttributeA ttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute> (v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnProto type, V8DOMConfiguration::CheckHolder},
934 {"floatAttribute", TestInterface5ImplementationV8Internal::floatAttributeAtt ributeGetterCallback, TestInterface5ImplementationV8Internal::floatAttributeAttr ibuteSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), stati c_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts , V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, 935 {"floatAttribute", TestInterface5ImplementationV8Internal::floatAttributeAtt ributeGetterCallback, TestInterface5ImplementationV8Internal::floatAttributeAttr ibuteSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8 ::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototyp e, V8DOMConfiguration::CheckHolder},
935 {"unrestrictedDoubleAttribute", TestInterface5ImplementationV8Internal::unre strictedDoubleAttributeAttributeGetterCallback, TestInterface5ImplementationV8In ternal::unrestrictedDoubleAttributeAttributeSetterCallback, 0, 0, 0, static_cast <v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMC onfiguration::CheckHolder}, 936 {"unrestrictedDoubleAttribute", TestInterface5ImplementationV8Internal::unre strictedDoubleAttributeAttributeGetterCallback, TestInterface5ImplementationV8In ternal::unrestrictedDoubleAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT , static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAll Scripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder},
936 {"unrestrictedFloatAttribute", TestInterface5ImplementationV8Internal::unres trictedFloatAttributeAttributeGetterCallback, TestInterface5ImplementationV8Inte rnal::unrestrictedFloatAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8 ::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8D OMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConf iguration::CheckHolder}, 937 {"unrestrictedFloatAttribute", TestInterface5ImplementationV8Internal::unres trictedFloatAttributeAttributeGetterCallback, TestInterface5ImplementationV8Inte rnal::unrestrictedFloatAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, s tatic_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScr ipts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder},
937 {"alwaysExposedAttribute", TestInterface5ImplementationV8Internal::alwaysExp osedAttributeAttributeGetterCallback, TestInterface5ImplementationV8Internal::al waysExposedAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessCont rol>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfigurat ion::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::C heckHolder}, 938 {"staticStringAttribute", TestInterface5ImplementationV8Internal::staticStri ngAttributeAttributeGetterCallback, TestInterface5ImplementationV8Internal::stat icStringAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8:: PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConf iguration::OnInterface, V8DOMConfiguration::CheckHolder},
939 {"alwaysExposedAttribute", TestInterface5ImplementationV8Internal::alwaysExp osedAttributeAttributeGetterCallback, TestInterface5ImplementationV8Internal::al waysExposedAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v 8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMC onfiguration::OnPrototype, V8DOMConfiguration::CheckHolder},
938 }; 940 };
939 941
940 static const V8DOMConfiguration::MethodConfiguration V8TestInterface5Methods[] = { 942 static const V8DOMConfiguration::MethodConfiguration V8TestInterface5Methods[] = {
941 {"voidMethodTestInterfaceEmptyArg", TestInterface5ImplementationV8Internal:: voidMethodTestInterfaceEmptyArgMethodCallback, 0, 1, V8DOMConfiguration::Exposed ToAllScripts}, 943 {"voidMethodTestInterfaceEmptyArg", TestInterface5ImplementationV8Internal:: voidMethodTestInterfaceEmptyArgMethodCallback, 0, 1, V8DOMConfiguration::Exposed ToAllScripts},
942 {"voidMethodDoubleArgFloatArg", TestInterface5ImplementationV8Internal::void MethodDoubleArgFloatArgMethodCallback, 0, 2, V8DOMConfiguration::ExposedToAllScr ipts}, 944 {"voidMethodDoubleArgFloatArg", TestInterface5ImplementationV8Internal::void MethodDoubleArgFloatArgMethodCallback, 0, 2, V8DOMConfiguration::ExposedToAllScr ipts},
943 {"voidMethodUnrestrictedDoubleArgUnrestrictedFloatArg", TestInterface5Implem entationV8Internal::voidMethodUnrestrictedDoubleArgUnrestrictedFloatArgMethodCal lback, 0, 2, V8DOMConfiguration::ExposedToAllScripts}, 945 {"voidMethodUnrestrictedDoubleArgUnrestrictedFloatArg", TestInterface5Implem entationV8Internal::voidMethodUnrestrictedDoubleArgUnrestrictedFloatArgMethodCal lback, 0, 2, V8DOMConfiguration::ExposedToAllScripts},
944 {"voidMethod", TestInterface5ImplementationV8Internal::voidMethodMethodCallb ack, TestInterface5ImplementationV8Internal::voidMethodMethodCallbackForMainWorl d, 0, V8DOMConfiguration::ExposedToAllScripts}, 946 {"voidMethod", TestInterface5ImplementationV8Internal::voidMethodMethodCallb ack, TestInterface5ImplementationV8Internal::voidMethodMethodCallbackForMainWorl d, 0, V8DOMConfiguration::ExposedToAllScripts},
945 {"alwaysExposedMethod", TestInterface5ImplementationV8Internal::alwaysExpose dMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, 947 {"alwaysExposedMethod", TestInterface5ImplementationV8Internal::alwaysExpose dMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts},
946 {"voidMethodBooleanOrDOMStringArg", TestInterface5ImplementationV8Internal:: voidMethodBooleanOrDOMStringArgMethodCallback, 0, 1, V8DOMConfiguration::Exposed ToAllScripts}, 948 {"voidMethodBooleanOrDOMStringArg", TestInterface5ImplementationV8Internal:: voidMethodBooleanOrDOMStringArgMethodCallback, 0, 1, V8DOMConfiguration::Exposed ToAllScripts},
947 {"voidMethodDoubleOrDOMStringArg", TestInterface5ImplementationV8Internal::v oidMethodDoubleOrDOMStringArgMethodCallback, 0, 1, V8DOMConfiguration::ExposedTo AllScripts}, 949 {"voidMethodDoubleOrDOMStringArg", TestInterface5ImplementationV8Internal::v oidMethodDoubleOrDOMStringArgMethodCallback, 0, 1, V8DOMConfiguration::ExposedTo AllScripts},
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
998 if (context && (context->isDocument())) { 1000 if (context && (context->isDocument())) {
999 const V8DOMConfiguration::MethodConfiguration windowExposedStaticMethodM ethodConfiguration = { 1001 const V8DOMConfiguration::MethodConfiguration windowExposedStaticMethodM ethodConfiguration = {
1000 "windowExposedStaticMethod", TestInterface5ImplementationV8Internal: :windowExposedStaticMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAll Scripts, 1002 "windowExposedStaticMethod", TestInterface5ImplementationV8Internal: :windowExposedStaticMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAll Scripts,
1001 }; 1003 };
1002 V8DOMConfiguration::installMethod(isolate, functionTemplate, v8::Local<v 8::Signature>(), v8::None, windowExposedStaticMethodMethodConfiguration); 1004 V8DOMConfiguration::installMethod(isolate, functionTemplate, v8::Local<v 8::Signature>(), v8::None, windowExposedStaticMethodMethodConfiguration);
1003 } 1005 }
1004 const V8DOMConfiguration::MethodConfiguration toStringMethodConfiguration = { 1006 const V8DOMConfiguration::MethodConfiguration toStringMethodConfiguration = {
1005 "toString", TestInterface5ImplementationV8Internal::toStringMethodCallba ck, 0, 0, V8DOMConfiguration::ExposedToAllScripts, 1007 "toString", TestInterface5ImplementationV8Internal::toStringMethodCallba ck, 0, 0, V8DOMConfiguration::ExposedToAllScripts,
1006 }; 1008 };
1007 V8DOMConfiguration::installMethod(isolate, prototypeTemplate, defaultSignatu re, static_cast<v8::PropertyAttribute>(v8::DontDelete | v8::DontEnum), toStringM ethodConfiguration); 1009 V8DOMConfiguration::installMethod(isolate, prototypeTemplate, defaultSignatu re, static_cast<v8::PropertyAttribute>(v8::DontDelete | v8::DontEnum), toStringM ethodConfiguration);
1008 functionTemplate->SetNativeDataProperty(v8AtomicString(isolate, "staticStrin gAttribute"), TestInterface5ImplementationV8Internal::staticStringAttributeAttri buteGetterCallback, TestInterface5ImplementationV8Internal::staticStringAttribut eAttributeSetterCallback, v8::External::New(isolate, 0), static_cast<v8::Propert yAttribute>(v8::None), v8::Local<v8::AccessorSignature>(), static_cast<v8::Acces sControl>(v8::DEFAULT));
1009 1010
1010 // Custom toString template 1011 // Custom toString template
1011 functionTemplate->Set(v8AtomicString(isolate, "toString"), V8PerIsolateData: :from(isolate)->toStringTemplate()); 1012 functionTemplate->Set(v8AtomicString(isolate, "toString"), V8PerIsolateData: :from(isolate)->toStringTemplate());
1012 } 1013 }
1013 1014
1014 v8::Local<v8::FunctionTemplate> V8TestInterface5::domTemplate(v8::Isolate* isola te) 1015 v8::Local<v8::FunctionTemplate> V8TestInterface5::domTemplate(v8::Isolate* isola te)
1015 { 1016 {
1016 return V8DOMConfiguration::domClassTemplate(isolate, const_cast<WrapperTypeI nfo*>(&wrapperTypeInfo), installV8TestInterface5Template); 1017 return V8DOMConfiguration::domClassTemplate(isolate, const_cast<WrapperTypeI nfo*>(&wrapperTypeInfo), installV8TestInterface5Template);
1017 } 1018 }
1018 1019
(...skipping 10 matching lines...) Expand all
1029 TestInterface5Implementation* V8TestInterface5::toImplWithTypeCheck(v8::Isolate* isolate, v8::Local<v8::Value> value) 1030 TestInterface5Implementation* V8TestInterface5::toImplWithTypeCheck(v8::Isolate* isolate, v8::Local<v8::Value> value)
1030 { 1031 {
1031 return hasInstance(value, isolate) ? toImpl(v8::Local<v8::Object>::Cast(valu e)) : 0; 1032 return hasInstance(value, isolate) ? toImpl(v8::Local<v8::Object>::Cast(valu e)) : 0;
1032 } 1033 }
1033 1034
1034 void V8TestInterface5::preparePrototypeObject(v8::Isolate* isolate, v8::Local<v8 ::Object> prototypeObject, v8::Local<v8::FunctionTemplate> interfaceTemplate) 1035 void V8TestInterface5::preparePrototypeObject(v8::Isolate* isolate, v8::Local<v8 ::Object> prototypeObject, v8::Local<v8::FunctionTemplate> interfaceTemplate)
1035 { 1036 {
1036 ExecutionContext* context = toExecutionContext(prototypeObject->CreationCont ext()); 1037 ExecutionContext* context = toExecutionContext(prototypeObject->CreationCont ext());
1037 v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interfaceTe mplate); 1038 v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interfaceTe mplate);
1038 if (context && (context->isWorkerGlobalScope())) { 1039 if (context && (context->isWorkerGlobalScope())) {
1039 static const V8DOMConfiguration::AccessorConfiguration accessorConfigura tion = {"workerExposedAttribute", TestInterface5ImplementationV8Internal::worker ExposedAttributeAttributeGetterCallback, TestInterface5ImplementationV8Internal: :workerExposedAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessC ontrol>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfigu ration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration ::CheckHolder}; 1040 static const V8DOMConfiguration::AccessorConfiguration accessorConfigura tion = {"workerExposedAttribute", TestInterface5ImplementationV8Internal::worker ExposedAttributeAttributeGetterCallback, TestInterface5ImplementationV8Internal: :workerExposedAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cas t<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8D OMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder};
1040 V8DOMConfiguration::installAccessor(isolate, v8::Local<v8::Object>(), pr ototypeObject, v8::Local<v8::Function>(), signature, accessorConfiguration); 1041 V8DOMConfiguration::installAccessor(isolate, v8::Local<v8::Object>(), pr ototypeObject, v8::Local<v8::Function>(), signature, accessorConfiguration);
1041 } 1042 }
1042 if (context && (context->isDocument())) { 1043 if (context && (context->isDocument())) {
1043 static const V8DOMConfiguration::AccessorConfiguration accessorConfigura tion = {"windowExposedAttribute", TestInterface5ImplementationV8Internal::window ExposedAttributeAttributeGetterCallback, TestInterface5ImplementationV8Internal: :windowExposedAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessC ontrol>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfigu ration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration ::CheckHolder}; 1044 static const V8DOMConfiguration::AccessorConfiguration accessorConfigura tion = {"windowExposedAttribute", TestInterface5ImplementationV8Internal::window ExposedAttributeAttributeGetterCallback, TestInterface5ImplementationV8Internal: :windowExposedAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cas t<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8D OMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder};
1044 V8DOMConfiguration::installAccessor(isolate, v8::Local<v8::Object>(), pr ototypeObject, v8::Local<v8::Function>(), signature, accessorConfiguration); 1045 V8DOMConfiguration::installAccessor(isolate, v8::Local<v8::Object>(), pr ototypeObject, v8::Local<v8::Function>(), signature, accessorConfiguration);
1045 } 1046 }
1046 v8::Local<v8::Signature> defaultSignature = v8::Signature::New(isolate, domT emplate(isolate)); 1047 v8::Local<v8::Signature> defaultSignature = v8::Signature::New(isolate, domT emplate(isolate));
1047 ExecutionContext* context = toExecutionContext(prototypeObject->CreationCont ext()); 1048 ExecutionContext* context = toExecutionContext(prototypeObject->CreationCont ext());
1048 ASSERT(context); 1049 ASSERT(context);
1049 if (context && (context->isWorkerGlobalScope())) { 1050 if (context && (context->isWorkerGlobalScope())) {
1050 v8::Local<v8::FunctionTemplate> functionTemplate = v8::FunctionTemplate: :New(isolate, TestInterface5ImplementationV8Internal::workerExposedMethodMethodC allback, v8Undefined(), defaultSignature, 0); 1051 v8::Local<v8::FunctionTemplate> functionTemplate = v8::FunctionTemplate: :New(isolate, TestInterface5ImplementationV8Internal::workerExposedMethodMethodC allback, v8Undefined(), defaultSignature, 0);
1051 v8::Local<v8::Function> function = ->GetFunction(isolate->GetCurrentCont ext())).ToLocalChecked(); 1052 v8::Local<v8::Function> function = ->GetFunction(isolate->GetCurrentCont ext())).ToLocalChecked();
1052 v8CallOrCrash(prototypeObject->Set(isolate->GetCurrentContext(), v8Atomi cString(isolate, "workerExposedMethod"), function)); 1053 v8CallOrCrash(prototypeObject->Set(isolate->GetCurrentContext(), v8Atomi cString(isolate, "workerExposedMethod"), function));
1053 } 1054 }
(...skipping 19 matching lines...) Expand all
1073 scriptWrappable->toImpl<TestInterface5Implementation>()->ref(); 1074 scriptWrappable->toImpl<TestInterface5Implementation>()->ref();
1074 } 1075 }
1075 1076
1076 void V8TestInterface5::derefObject(ScriptWrappable* scriptWrappable) 1077 void V8TestInterface5::derefObject(ScriptWrappable* scriptWrappable)
1077 { 1078 {
1078 scriptWrappable->toImpl<TestInterface5Implementation>()->deref(); 1079 scriptWrappable->toImpl<TestInterface5Implementation>()->deref();
1079 } 1080 }
1080 1081
1081 } // namespace blink 1082 } // namespace blink
1082 #endif // ENABLE(CONDITION) 1083 #endif // ENABLE(CONDITION)
OLDNEW
« no previous file with comments | « Source/bindings/tests/results/core/V8TestTypedefs.cpp ('k') | Source/core/dom/Document.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698