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

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

Issue 424163002: Enable the WebIDL [Exposed] annotation on an interface's members. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: missed renames Created 6 years, 4 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 } 43 }
44 44
45 } // namespace blink 45 } // namespace blink
46 46
47 void webCoreInitializeScriptWrappableForInterface(blink::TestInterfaceImplementa tion* object) 47 void webCoreInitializeScriptWrappableForInterface(blink::TestInterfaceImplementa tion* object)
48 { 48 {
49 blink::initializeScriptWrappableForInterface(object); 49 blink::initializeScriptWrappableForInterface(object);
50 } 50 }
51 51
52 namespace blink { 52 namespace blink {
53 const WrapperTypeInfo V8TestInterface::wrapperTypeInfo = { gin::kEmbedderBlink, V8TestInterface::domTemplate, V8TestInterface::derefObject, V8TestInterface::toA ctiveDOMObject, 0, V8TestInterface::visitDOMWrapper, V8TestInterface::installPer ContextEnabledMethods, &V8TestInterfaceEmpty::wrapperTypeInfo, WrapperTypeObject Prototype, RefCountedObject }; 53 const WrapperTypeInfo V8TestInterface::wrapperTypeInfo = { gin::kEmbedderBlink, V8TestInterface::domTemplate, V8TestInterface::derefObject, V8TestInterface::toA ctiveDOMObject, 0, V8TestInterface::visitDOMWrapper, V8TestInterface::installCon ditionallyEnabledMethods, &V8TestInterfaceEmpty::wrapperTypeInfo, WrapperTypeObj ectPrototype, RefCountedObject };
54 54
55 namespace TestInterfaceImplementationV8Internal { 55 namespace TestInterfaceImplementationV8Internal {
56 56
57 template <typename T> void V8_USE(T) { } 57 template <typename T> void V8_USE(T) { }
58 58
59 static void testInterfaceAttributeAttributeGetter(const v8::PropertyCallbackInfo <v8::Value>& info) 59 static void testInterfaceAttributeAttributeGetter(const v8::PropertyCallbackInfo <v8::Value>& info)
60 { 60 {
61 v8::Handle<v8::Object> holder = info.Holder(); 61 v8::Handle<v8::Object> holder = info.Holder();
62 TestInterfaceImplementation* impl = V8TestInterface::toNative(holder); 62 TestInterfaceImplementation* impl = V8TestInterface::toNative(holder);
63 v8SetReturnValueFast(info, WTF::getPtr(impl->testInterfaceAttribute()), impl ); 63 v8SetReturnValueFast(info, WTF::getPtr(impl->testInterfaceAttribute()), impl );
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 TestInterfaceImplementation::setStaticStringAttribute(cppValue); 237 TestInterfaceImplementation::setStaticStringAttribute(cppValue);
238 } 238 }
239 239
240 static void staticStringAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) 240 static void staticStringAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
241 { 241 {
242 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); 242 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
243 TestInterfaceImplementationV8Internal::staticStringAttributeAttributeSetter( v8Value, info); 243 TestInterfaceImplementationV8Internal::staticStringAttributeAttributeSetter( v8Value, info);
244 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 244 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
245 } 245 }
246 246
247 static void alwaysExposedAttributeAttributeGetter(const v8::PropertyCallbackInfo <v8::Value>& info)
248 {
249 v8::Handle<v8::Object> holder = info.Holder();
250 TestInterfaceImplementation* impl = V8TestInterface::toNative(holder);
251 v8SetReturnValueInt(info, impl->alwaysExposedAttribute());
252 }
253
254 static void alwaysExposedAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
255 {
256 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
257 TestInterfaceImplementationV8Internal::alwaysExposedAttributeAttributeGetter (info);
258 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
259 }
260
261 static void alwaysExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
262 {
263 v8::Handle<v8::Object> holder = info.Holder();
264 ExceptionState exceptionState(ExceptionState::SetterContext, "alwaysExposedA ttribute", "TestInterface", holder, info.GetIsolate());
265 TestInterfaceImplementation* impl = V8TestInterface::toNative(holder);
266 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState) , exceptionState);
267 impl->setAlwaysExposedAttribute(cppValue);
268 }
269
270 static void alwaysExposedAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
271 {
272 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
273 TestInterfaceImplementationV8Internal::alwaysExposedAttributeAttributeSetter (v8Value, info);
274 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
275 }
276
277 static void workerExposedAttributeAttributeGetter(const v8::PropertyCallbackInfo <v8::Value>& info)
278 {
279 v8::Handle<v8::Object> holder = info.Holder();
280 TestInterfaceImplementation* impl = V8TestInterface::toNative(holder);
281 v8SetReturnValueInt(info, impl->workerExposedAttribute());
282 }
283
284 static void workerExposedAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
285 {
286 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
287 TestInterfaceImplementationV8Internal::workerExposedAttributeAttributeGetter (info);
288 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
289 }
290
291 static void workerExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
292 {
293 v8::Handle<v8::Object> holder = info.Holder();
294 ExceptionState exceptionState(ExceptionState::SetterContext, "workerExposedA ttribute", "TestInterface", holder, info.GetIsolate());
295 TestInterfaceImplementation* impl = V8TestInterface::toNative(holder);
296 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState) , exceptionState);
297 impl->setWorkerExposedAttribute(cppValue);
298 }
299
300 static void workerExposedAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
301 {
302 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
303 TestInterfaceImplementationV8Internal::workerExposedAttributeAttributeSetter (v8Value, info);
304 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
305 }
306
307 static void windowExposedAttributeAttributeGetter(const v8::PropertyCallbackInfo <v8::Value>& info)
308 {
309 v8::Handle<v8::Object> holder = info.Holder();
310 TestInterfaceImplementation* impl = V8TestInterface::toNative(holder);
311 v8SetReturnValueInt(info, impl->windowExposedAttribute());
312 }
313
314 static void windowExposedAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
315 {
316 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
317 TestInterfaceImplementationV8Internal::windowExposedAttributeAttributeGetter (info);
318 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
319 }
320
321 static void windowExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
322 {
323 v8::Handle<v8::Object> holder = info.Holder();
324 ExceptionState exceptionState(ExceptionState::SetterContext, "windowExposedA ttribute", "TestInterface", holder, info.GetIsolate());
325 TestInterfaceImplementation* impl = V8TestInterface::toNative(holder);
326 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState) , exceptionState);
327 impl->setWindowExposedAttribute(cppValue);
328 }
329
330 static void windowExposedAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
331 {
332 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
333 TestInterfaceImplementationV8Internal::windowExposedAttributeAttributeSetter (v8Value, info);
334 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
335 }
336
247 static void implementsStaticReadOnlyLongAttributeAttributeGetter(const v8::Prope rtyCallbackInfo<v8::Value>& info) 337 static void implementsStaticReadOnlyLongAttributeAttributeGetter(const v8::Prope rtyCallbackInfo<v8::Value>& info)
248 { 338 {
249 v8SetReturnValueInt(info, TestInterfaceImplementation::implementsStaticReadO nlyLongAttribute()); 339 v8SetReturnValueInt(info, TestInterfaceImplementation::implementsStaticReadO nlyLongAttribute());
250 } 340 }
251 341
252 static void implementsStaticReadOnlyLongAttributeAttributeGetterCallback(v8::Loc al<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) 342 static void implementsStaticReadOnlyLongAttributeAttributeGetterCallback(v8::Loc al<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
253 { 343 {
254 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); 344 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
255 TestInterfaceImplementationV8Internal::implementsStaticReadOnlyLongAttribute AttributeGetter(info); 345 TestInterfaceImplementationV8Internal::implementsStaticReadOnlyLongAttribute AttributeGetter(info);
256 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 346 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
(...skipping 683 matching lines...) Expand 10 before | Expand all | Expand 10 after
940 impl->voidMethod(); 1030 impl->voidMethod();
941 } 1031 }
942 1032
943 static void voidMethodMethodCallbackForMainWorld(const v8::FunctionCallbackInfo< v8::Value>& info) 1033 static void voidMethodMethodCallbackForMainWorld(const v8::FunctionCallbackInfo< v8::Value>& info)
944 { 1034 {
945 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 1035 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
946 TestInterfaceImplementationV8Internal::voidMethodMethodForMainWorld(info); 1036 TestInterfaceImplementationV8Internal::voidMethodMethodForMainWorld(info);
947 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 1037 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
948 } 1038 }
949 1039
1040 static void alwaysExposedMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
1041 {
1042 TestInterfaceImplementation* impl = V8TestInterface::toNative(info.Holder()) ;
1043 impl->alwaysExposedMethod();
1044 }
1045
1046 static void alwaysExposedMethodMethodCallback(const v8::FunctionCallbackInfo<v8: :Value>& info)
1047 {
1048 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
1049 TestInterfaceImplementationV8Internal::alwaysExposedMethodMethod(info);
1050 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
1051 }
1052
1053 static void workerExposedMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
1054 {
1055 TestInterfaceImplementation* impl = V8TestInterface::toNative(info.Holder()) ;
1056 impl->workerExposedMethod();
1057 }
1058
1059 static void workerExposedMethodMethodCallback(const v8::FunctionCallbackInfo<v8: :Value>& info)
1060 {
1061 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
1062 TestInterfaceImplementationV8Internal::workerExposedMethodMethod(info);
1063 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
1064 }
1065
1066 static void windowExposedMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
1067 {
1068 TestInterfaceImplementation* impl = V8TestInterface::toNative(info.Holder()) ;
1069 impl->windowExposedMethod();
1070 }
1071
1072 static void windowExposedMethodMethodCallback(const v8::FunctionCallbackInfo<v8: :Value>& info)
1073 {
1074 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
1075 TestInterfaceImplementationV8Internal::windowExposedMethodMethod(info);
1076 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
1077 }
1078
1079 static void alwaysExposedStaticMethodMethod(const v8::FunctionCallbackInfo<v8::V alue>& info)
1080 {
1081 TestInterfaceImplementation::alwaysExposedStaticMethod();
1082 }
1083
1084 static void alwaysExposedStaticMethodMethodCallback(const v8::FunctionCallbackIn fo<v8::Value>& info)
1085 {
1086 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
1087 TestInterfaceImplementationV8Internal::alwaysExposedStaticMethodMethod(info) ;
1088 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
1089 }
1090
1091 static void workerExposedStaticMethodMethod(const v8::FunctionCallbackInfo<v8::V alue>& info)
1092 {
1093 TestInterfaceImplementation::workerExposedStaticMethod();
1094 }
1095
1096 static void workerExposedStaticMethodMethodCallback(const v8::FunctionCallbackIn fo<v8::Value>& info)
1097 {
1098 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
1099 TestInterfaceImplementationV8Internal::workerExposedStaticMethodMethod(info) ;
1100 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
1101 }
1102
1103 static void windowExposedStaticMethodMethod(const v8::FunctionCallbackInfo<v8::V alue>& info)
1104 {
1105 TestInterfaceImplementation::windowExposedStaticMethod();
1106 }
1107
1108 static void windowExposedStaticMethodMethodCallback(const v8::FunctionCallbackIn fo<v8::Value>& info)
1109 {
1110 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
1111 TestInterfaceImplementationV8Internal::windowExposedStaticMethodMethod(info) ;
1112 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
1113 }
1114
1115 static void windowAndServiceWorkerExposedMethodMethod(const v8::FunctionCallback Info<v8::Value>& info)
1116 {
1117 TestInterfaceImplementation* impl = V8TestInterface::toNative(info.Holder()) ;
1118 impl->windowAndServiceWorkerExposedMethod();
1119 }
1120
1121 static void windowAndServiceWorkerExposedMethodMethodCallback(const v8::Function CallbackInfo<v8::Value>& info)
1122 {
1123 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
1124 TestInterfaceImplementationV8Internal::windowAndServiceWorkerExposedMethodMe thod(info);
1125 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
1126 }
1127
950 static void implementsVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value> & info) 1128 static void implementsVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value> & info)
951 { 1129 {
952 TestInterfaceImplementation* impl = V8TestInterface::toNative(info.Holder()) ; 1130 TestInterfaceImplementation* impl = V8TestInterface::toNative(info.Holder()) ;
953 impl->implementsVoidMethod(); 1131 impl->implementsVoidMethod();
954 } 1132 }
955 1133
956 static void implementsVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8 ::Value>& info) 1134 static void implementsVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8 ::Value>& info)
957 { 1135 {
958 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 1136 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
959 TestInterfaceImplementationV8Internal::implementsVoidMethodMethod(info); 1137 TestInterfaceImplementationV8Internal::implementsVoidMethodMethod(info);
(...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after
1401 setObjectGroup(internalPointer, wrapper, isolate); 1579 setObjectGroup(internalPointer, wrapper, isolate);
1402 } 1580 }
1403 1581
1404 static const V8DOMConfiguration::AttributeConfiguration V8TestInterfaceAttribute s[] = { 1582 static const V8DOMConfiguration::AttributeConfiguration V8TestInterfaceAttribute s[] = {
1405 {"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::OnInstance}, 1583 {"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::OnInstance},
1406 {"testInterfaceConstructorAttribute", TestInterfaceImplementationV8Internal: :TestInterfaceImplementationConstructorGetter, TestInterfaceImplementationV8Inte rnal::TestInterfaceImplementationForceSetAttributeOnThisCallback, 0, 0, const_ca st<WrapperTypeInfo*>(&V8TestInterface::wrapperTypeInfo), static_cast<v8::AccessC ontrol>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::DontEnum), V8DOMCon figuration::ExposedToAllScripts, V8DOMConfiguration::OnInstance}, 1584 {"testInterfaceConstructorAttribute", TestInterfaceImplementationV8Internal: :TestInterfaceImplementationConstructorGetter, TestInterfaceImplementationV8Inte rnal::TestInterfaceImplementationForceSetAttributeOnThisCallback, 0, 0, const_ca st<WrapperTypeInfo*>(&V8TestInterface::wrapperTypeInfo), static_cast<v8::AccessC ontrol>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::DontEnum), V8DOMCon figuration::ExposedToAllScripts, V8DOMConfiguration::OnInstance},
1407 {"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::OnInstance}, 1585 {"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::OnInstance},
1408 {"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::OnInstance}, 1586 {"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::OnInstance},
1409 {"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::OnInstance}, 1587 {"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::OnInstance},
1410 {"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::OnInstance}, 1588 {"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::OnInstance},
1589 {"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::OnInstance},
1411 {"implementsReadonlyStringAttribute", TestInterfaceImplementationV8Internal: :implementsReadonlyStringAttributeAttributeGetterCallback, 0, 0, 0, 0, static_ca st<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None) , V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance}, 1590 {"implementsReadonlyStringAttribute", TestInterfaceImplementationV8Internal: :implementsReadonlyStringAttributeAttributeGetterCallback, 0, 0, 0, 0, static_ca st<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None) , V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance},
1412 {"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::OnInstance}, 1591 {"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::OnInstance},
1413 {"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::OnInstance}, 1592 {"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::OnInstance},
1414 {"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::OnInstanc e}, 1593 {"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::OnInstanc e},
1415 {"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::OnInstance}, 1594 {"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::OnInstance},
1416 }; 1595 };
1417 1596
1418 static const V8DOMConfiguration::MethodConfiguration V8TestInterfaceMethods[] = { 1597 static const V8DOMConfiguration::MethodConfiguration V8TestInterfaceMethods[] = {
1419 {"voidMethodTestInterfaceEmptyArg", TestInterfaceImplementationV8Internal::v oidMethodTestInterfaceEmptyArgMethodCallback, 0, 1, V8DOMConfiguration::ExposedT oAllScripts}, 1598 {"voidMethodTestInterfaceEmptyArg", TestInterfaceImplementationV8Internal::v oidMethodTestInterfaceEmptyArgMethodCallback, 0, 1, V8DOMConfiguration::ExposedT oAllScripts},
1420 {"voidMethodDoubleArgFloatArg", TestInterfaceImplementationV8Internal::voidM ethodDoubleArgFloatArgMethodCallback, 0, 2, V8DOMConfiguration::ExposedToAllScri pts}, 1599 {"voidMethodDoubleArgFloatArg", TestInterfaceImplementationV8Internal::voidM ethodDoubleArgFloatArgMethodCallback, 0, 2, V8DOMConfiguration::ExposedToAllScri pts},
1421 {"voidMethodUnrestrictedDoubleArgUnrestrictedFloatArg", TestInterfaceImpleme ntationV8Internal::voidMethodUnrestrictedDoubleArgUnrestrictedFloatArgMethodCall back, 0, 2, V8DOMConfiguration::ExposedToAllScripts}, 1600 {"voidMethodUnrestrictedDoubleArgUnrestrictedFloatArg", TestInterfaceImpleme ntationV8Internal::voidMethodUnrestrictedDoubleArgUnrestrictedFloatArgMethodCall back, 0, 2, V8DOMConfiguration::ExposedToAllScripts},
1422 {"voidMethod", TestInterfaceImplementationV8Internal::voidMethodMethodCallba ck, TestInterfaceImplementationV8Internal::voidMethodMethodCallbackForMainWorld, 0, V8DOMConfiguration::ExposedToAllScripts}, 1601 {"voidMethod", TestInterfaceImplementationV8Internal::voidMethodMethodCallba ck, TestInterfaceImplementationV8Internal::voidMethodMethodCallbackForMainWorld, 0, V8DOMConfiguration::ExposedToAllScripts},
1602 {"alwaysExposedMethod", TestInterfaceImplementationV8Internal::alwaysExposed MethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts},
1423 {"implementsVoidMethod", TestInterfaceImplementationV8Internal::implementsVo idMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, 1603 {"implementsVoidMethod", TestInterfaceImplementationV8Internal::implementsVo idMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts},
1424 {"implementsComplexMethod", TestInterfaceImplementationV8Internal::implement sComplexMethodMethodCallback, 0, 2, V8DOMConfiguration::ExposedToAllScripts}, 1604 {"implementsComplexMethod", TestInterfaceImplementationV8Internal::implement sComplexMethodMethodCallback, 0, 2, V8DOMConfiguration::ExposedToAllScripts},
1425 {"implementsCustomVoidMethod", TestInterfaceImplementationV8Internal::implem entsCustomVoidMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScript s}, 1605 {"implementsCustomVoidMethod", TestInterfaceImplementationV8Internal::implem entsCustomVoidMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScript s},
1426 {"implements3VoidMethod", TestInterfaceImplementationV8Internal::implements3 VoidMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, 1606 {"implements3VoidMethod", TestInterfaceImplementationV8Internal::implements3 VoidMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts},
1427 }; 1607 };
1428 1608
1429 static void installV8TestInterfaceTemplate(v8::Handle<v8::FunctionTemplate> func tionTemplate, v8::Isolate* isolate) 1609 static void installV8TestInterfaceTemplate(v8::Handle<v8::FunctionTemplate> func tionTemplate, v8::Isolate* isolate)
1430 { 1610 {
1431 functionTemplate->ReadOnlyPrototype(); 1611 functionTemplate->ReadOnlyPrototype();
1432 1612
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
1487 {"PARTIAL2_UNSIGNED_SHORT", 0, 0, 0, V8DOMConfiguration::ConstantTypeUns ignedShort}, 1667 {"PARTIAL2_UNSIGNED_SHORT", 0, 0, 0, V8DOMConfiguration::ConstantTypeUns ignedShort},
1488 }; 1668 };
1489 V8DOMConfiguration::installConstants(functionTemplate, prototypeTemplate, V8 TestInterfaceConstants, WTF_ARRAY_LENGTH(V8TestInterfaceConstants), isolate); 1669 V8DOMConfiguration::installConstants(functionTemplate, prototypeTemplate, V8 TestInterfaceConstants, WTF_ARRAY_LENGTH(V8TestInterfaceConstants), isolate);
1490 if (RuntimeEnabledFeatures::partialFeatureNameEnabled()) { 1670 if (RuntimeEnabledFeatures::partialFeatureNameEnabled()) {
1491 static const V8DOMConfiguration::ConstantConfiguration constantConfigura tion = {"PARTIAL_UNSIGNED_SHORT", 0, 0, 0, V8DOMConfiguration::ConstantTypeUnsig nedShort}; 1671 static const V8DOMConfiguration::ConstantConfiguration constantConfigura tion = {"PARTIAL_UNSIGNED_SHORT", 0, 0, 0, V8DOMConfiguration::ConstantTypeUnsig nedShort};
1492 V8DOMConfiguration::installConstants(functionTemplate, prototypeTemplate , &constantConfiguration, 1, isolate); 1672 V8DOMConfiguration::installConstants(functionTemplate, prototypeTemplate , &constantConfiguration, 1, isolate);
1493 } 1673 }
1494 functionTemplate->InstanceTemplate()->SetIndexedPropertyHandler(TestInterfac eImplementationV8Internal::indexedPropertyGetterCallback, TestInterfaceImplement ationV8Internal::indexedPropertySetterCallback, 0, TestInterfaceImplementationV8 Internal::indexedPropertyDeleterCallback, indexedPropertyEnumerator<TestInterfac eImplementation>); 1674 functionTemplate->InstanceTemplate()->SetIndexedPropertyHandler(TestInterfac eImplementationV8Internal::indexedPropertyGetterCallback, TestInterfaceImplement ationV8Internal::indexedPropertySetterCallback, 0, TestInterfaceImplementationV8 Internal::indexedPropertyDeleterCallback, indexedPropertyEnumerator<TestInterfac eImplementation>);
1495 functionTemplate->InstanceTemplate()->SetNamedPropertyHandler(TestInterfaceI mplementationV8Internal::namedPropertyGetterCallback, TestInterfaceImplementatio nV8Internal::namedPropertySetterCallback, TestInterfaceImplementationV8Internal: :namedPropertyQueryCallback, TestInterfaceImplementationV8Internal::namedPropert yDeleterCallback, TestInterfaceImplementationV8Internal::namedPropertyEnumerator Callback); 1675 functionTemplate->InstanceTemplate()->SetNamedPropertyHandler(TestInterfaceI mplementationV8Internal::namedPropertyGetterCallback, TestInterfaceImplementatio nV8Internal::namedPropertySetterCallback, TestInterfaceImplementationV8Internal: :namedPropertyQueryCallback, TestInterfaceImplementationV8Internal::namedPropert yDeleterCallback, TestInterfaceImplementationV8Internal::namedPropertyEnumerator Callback);
1496 functionTemplate->InstanceTemplate()->SetCallAsFunctionHandler(V8TestInterfa ce::legacyCallCustom); 1676 functionTemplate->InstanceTemplate()->SetCallAsFunctionHandler(V8TestInterfa ce::legacyCallCustom);
1677 static const V8DOMConfiguration::MethodConfiguration alwaysExposedStaticMeth odMethodConfiguration = {
1678 "alwaysExposedStaticMethod", TestInterfaceImplementationV8Internal::alwa ysExposedStaticMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScrip ts,
1679 };
1680 V8DOMConfiguration::installMethod(functionTemplate, v8::Local<v8::Signature> (), v8::None, alwaysExposedStaticMethodMethodConfiguration, isolate);
1497 static const V8DOMConfiguration::MethodConfiguration implementsStaticVoidMet hodMethodConfiguration = { 1681 static const V8DOMConfiguration::MethodConfiguration implementsStaticVoidMet hodMethodConfiguration = {
1498 "implementsStaticVoidMethod", TestInterfaceImplementationV8Internal::imp lementsStaticVoidMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScr ipts, 1682 "implementsStaticVoidMethod", TestInterfaceImplementationV8Internal::imp lementsStaticVoidMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScr ipts,
1499 }; 1683 };
1500 V8DOMConfiguration::installMethod(functionTemplate, v8::Local<v8::Signature> (), v8::None, implementsStaticVoidMethodMethodConfiguration, isolate); 1684 V8DOMConfiguration::installMethod(functionTemplate, v8::Local<v8::Signature> (), v8::None, implementsStaticVoidMethodMethodConfiguration, isolate);
1501 if (RuntimeEnabledFeatures::implements2FeatureNameEnabled()) { 1685 if (RuntimeEnabledFeatures::implements2FeatureNameEnabled()) {
1502 static const V8DOMConfiguration::MethodConfiguration implements2VoidMeth odMethodConfiguration = { 1686 static const V8DOMConfiguration::MethodConfiguration implements2VoidMeth odMethodConfiguration = {
1503 "implements2VoidMethod", TestInterfaceImplementationV8Internal::impl ements2VoidMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts, 1687 "implements2VoidMethod", TestInterfaceImplementationV8Internal::impl ements2VoidMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts,
1504 }; 1688 };
1505 V8DOMConfiguration::installMethod(prototypeTemplate, defaultSignature, v 8::None, implements2VoidMethodMethodConfiguration, isolate); 1689 V8DOMConfiguration::installMethod(prototypeTemplate, defaultSignature, v 8::None, implements2VoidMethodMethodConfiguration, isolate);
1506 } 1690 }
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
1587 v8::Handle<v8::Object> V8TestInterface::findInstanceInPrototypeChain(v8::Handle< v8::Value> v8Value, v8::Isolate* isolate) 1771 v8::Handle<v8::Object> V8TestInterface::findInstanceInPrototypeChain(v8::Handle< v8::Value> v8Value, v8::Isolate* isolate)
1588 { 1772 {
1589 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe rTypeInfo, v8Value); 1773 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe rTypeInfo, v8Value);
1590 } 1774 }
1591 1775
1592 TestInterfaceImplementation* V8TestInterface::toNativeWithTypeCheck(v8::Isolate* isolate, v8::Handle<v8::Value> value) 1776 TestInterfaceImplementation* V8TestInterface::toNativeWithTypeCheck(v8::Isolate* isolate, v8::Handle<v8::Value> value)
1593 { 1777 {
1594 return hasInstance(value, isolate) ? fromInternalPointer(blink::toInternalPo inter(v8::Handle<v8::Object>::Cast(value))) : 0; 1778 return hasInstance(value, isolate) ? fromInternalPointer(blink::toInternalPo inter(v8::Handle<v8::Object>::Cast(value))) : 0;
1595 } 1779 }
1596 1780
1597 void V8TestInterface::installPerContextEnabledProperties(v8::Handle<v8::Object> instanceObject, TestInterfaceImplementation* impl, v8::Isolate* isolate) 1781 void V8TestInterface::installConditionallyEnabledProperties(v8::Handle<v8::Objec t> instanceObject, v8::Isolate* isolate)
1598 { 1782 {
1599 v8::Local<v8::Object> prototypeObject = v8::Local<v8::Object>::Cast(instance Object->GetPrototype()); 1783 v8::Local<v8::Object> prototypeObject = v8::Local<v8::Object>::Cast(instance Object->GetPrototype());
1600 if (ContextFeatures::implementsContextNameEnabled(impl->document())) { 1784 ExecutionContext* context = toExecutionContext(prototypeObject->CreationCont ext());
1785
1786 if (context && (context->isWorkerGlobalScope())) {
1787 static const V8DOMConfiguration::AttributeConfiguration attributeConfigu ration =\
1788 {"workerExposedAttribute", TestInterfaceImplementationV8Internal::worker ExposedAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal:: workerExposedAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessCo ntrol>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfigur ation::ExposedToAllScripts, V8DOMConfiguration::OnInstance};
1789 V8DOMConfiguration::installAttribute(instanceObject, prototypeObject, at tributeConfiguration, isolate);
1790 }
1791 if (context && (context->isDocument())) {
1792 static const V8DOMConfiguration::AttributeConfiguration attributeConfigu ration =\
1793 {"windowExposedAttribute", TestInterfaceImplementationV8Internal::window ExposedAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal:: windowExposedAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessCo ntrol>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfigur ation::ExposedToAllScripts, V8DOMConfiguration::OnInstance};
1794 V8DOMConfiguration::installAttribute(instanceObject, prototypeObject, at tributeConfiguration, isolate);
1795 }
1796 if (context && context->isDocument() && ContextFeatures::implementsContextNa meEnabled(toDocument(context))) {
1601 static const V8DOMConfiguration::AttributeConfiguration attributeConfigu ration =\ 1797 static const V8DOMConfiguration::AttributeConfiguration attributeConfigu ration =\
1602 {"implementsPerContextEnabledNodeAttribute", TestInterfaceImplementation V8Internal::implementsPerContextEnabledNodeAttributeAttributeGetterCallback, Tes tInterfaceImplementationV8Internal::implementsPerContextEnabledNodeAttributeAttr ibuteSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), stati c_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts , V8DOMConfiguration::OnInstance}; 1798 {"implementsPerContextEnabledNodeAttribute", TestInterfaceImplementation V8Internal::implementsPerContextEnabledNodeAttributeAttributeGetterCallback, Tes tInterfaceImplementationV8Internal::implementsPerContextEnabledNodeAttributeAttr ibuteSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), stati c_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts , V8DOMConfiguration::OnInstance};
1603 V8DOMConfiguration::installAttribute(instanceObject, prototypeObject, at tributeConfiguration, isolate); 1799 V8DOMConfiguration::installAttribute(instanceObject, prototypeObject, at tributeConfiguration, isolate);
1604 } 1800 }
1605 if (ContextFeatures::partialContextNameEnabled(impl->document())) { 1801 if (context && context->isDocument() && ContextFeatures::partialContextNameE nabled(toDocument(context))) {
1606 static const V8DOMConfiguration::AttributeConfiguration attributeConfigu ration =\ 1802 static const V8DOMConfiguration::AttributeConfiguration attributeConfigu ration =\
1607 {"partial2LongAttribute", TestInterfaceImplementationV8Internal::partial 2LongAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::pa rtial2LongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessContr ol>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfigurati on::ExposedToAllScripts, V8DOMConfiguration::OnInstance}; 1803 {"partial2LongAttribute", TestInterfaceImplementationV8Internal::partial 2LongAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::pa rtial2LongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessContr ol>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfigurati on::ExposedToAllScripts, V8DOMConfiguration::OnInstance};
1608 V8DOMConfiguration::installAttribute(instanceObject, prototypeObject, at tributeConfiguration, isolate); 1804 V8DOMConfiguration::installAttribute(instanceObject, prototypeObject, at tributeConfiguration, isolate);
1609 } 1805 }
1610 if (ContextFeatures::partialContextNameEnabled(impl->document())) { 1806 if (context && context->isDocument() && ContextFeatures::partialContextNameE nabled(toDocument(context))) {
1611 static const V8DOMConfiguration::AttributeConfiguration attributeConfigu ration =\ 1807 static const V8DOMConfiguration::AttributeConfiguration attributeConfigu ration =\
1612 {"partial2StaticLongAttribute", TestInterfaceImplementationV8Internal::p artial2StaticLongAttributeAttributeGetterCallback, TestInterfaceImplementationV8 Internal::partial2StaticLongAttributeAttributeSetterCallback, 0, 0, 0, static_ca st<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None) , V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance}; 1808 {"partial2StaticLongAttribute", TestInterfaceImplementationV8Internal::p artial2StaticLongAttributeAttributeGetterCallback, TestInterfaceImplementationV8 Internal::partial2StaticLongAttributeAttributeSetterCallback, 0, 0, 0, static_ca st<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None) , V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance};
1613 V8DOMConfiguration::installAttribute(instanceObject, prototypeObject, at tributeConfiguration, isolate); 1809 V8DOMConfiguration::installAttribute(instanceObject, prototypeObject, at tributeConfiguration, isolate);
1614 } 1810 }
1615 } 1811 }
1616 1812
1617 void V8TestInterface::installPerContextEnabledMethods(v8::Handle<v8::Object> pro totypeObject, v8::Isolate* isolate) 1813 void V8TestInterface::installConditionallyEnabledMethods(v8::Handle<v8::Object> prototypeObject, v8::Isolate* isolate)
1618 { 1814 {
1619 v8::Local<v8::Signature> defaultSignature = v8::Signature::New(isolate, domT emplate(isolate)); 1815 v8::Local<v8::Signature> defaultSignature = v8::Signature::New(isolate, domT emplate(isolate));
1620
1621 ExecutionContext* context = toExecutionContext(prototypeObject->CreationCont ext()); 1816 ExecutionContext* context = toExecutionContext(prototypeObject->CreationCont ext());
1622 ASSERT(context); 1817 ASSERT(context);
1623 if (context->isDocument() && ContextFeatures::partialContextNameEnabled(toDo cument(context))) { 1818
1624 static const V8DOMConfiguration::MethodConfiguration methodConfiguration = {"partial2VoidMethod", TestInterfaceImplementationV8Internal::partial2VoidMet hodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}; 1819 if (context && (context->isWorkerGlobalScope())) {
1625 V8DOMConfiguration::installMethod(prototypeObject, defaultSignature, v8: :None, methodConfiguration, isolate); 1820 prototypeObject->Set(v8AtomicString(isolate, "workerExposedMethod"), v8: :FunctionTemplate::New(isolate, TestInterfaceImplementationV8Internal::workerExp osedMethodMethodCallback, v8Undefined(), defaultSignature, 0)->GetFunction());
1626 } 1821 }
1627 if (context->isDocument() && ContextFeatures::partialContextNameEnabled(toDo cument(context))) { 1822 if (context && (context->isDocument())) {
1628 static const V8DOMConfiguration::MethodConfiguration methodConfiguration = {"partial2StaticVoidMethod", TestInterfaceImplementationV8Internal::partial2S taticVoidMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}; 1823 prototypeObject->Set(v8AtomicString(isolate, "windowExposedMethod"), v8: :FunctionTemplate::New(isolate, TestInterfaceImplementationV8Internal::windowExp osedMethodMethodCallback, v8Undefined(), defaultSignature, 0)->GetFunction());
1629 V8DOMConfiguration::installMethod(prototypeObject, defaultSignature, v8: :None, methodConfiguration, isolate); 1824 }
1825 if (context && (context->isWorkerGlobalScope())) {
1826 prototypeObject->Set(v8AtomicString(isolate, "workerExposedStaticMethod" ), v8::FunctionTemplate::New(isolate, TestInterfaceImplementationV8Internal::wor kerExposedStaticMethodMethodCallback, v8Undefined(), defaultSignature, 0)->GetFu nction());
1827 }
1828 if (context && (context->isDocument())) {
1829 prototypeObject->Set(v8AtomicString(isolate, "windowExposedStaticMethod" ), v8::FunctionTemplate::New(isolate, TestInterfaceImplementationV8Internal::win dowExposedStaticMethodMethodCallback, v8Undefined(), defaultSignature, 0)->GetFu nction());
1830 }
1831 if (context && (context->isServiceWorkerGlobalScope() || context->isDocument ())) {
1832 prototypeObject->Set(v8AtomicString(isolate, "windowAndServiceWorkerExpo sedMethod"), v8::FunctionTemplate::New(isolate, TestInterfaceImplementationV8Int ernal::windowAndServiceWorkerExposedMethodMethodCallback, v8Undefined(), default Signature, 0)->GetFunction());
1833 }
1834 if (context && context->isDocument() && ContextFeatures::partialContextNameE nabled(toDocument(context))) {
1835 prototypeObject->Set(v8AtomicString(isolate, "partial2VoidMethod"), v8:: FunctionTemplate::New(isolate, TestInterfaceImplementationV8Internal::partial2Vo idMethodMethodCallback, v8Undefined(), defaultSignature, 0)->GetFunction());
1836 }
1837 if (context && context->isDocument() && ContextFeatures::partialContextNameE nabled(toDocument(context))) {
1838 prototypeObject->Set(v8AtomicString(isolate, "partial2StaticVoidMethod") , v8::FunctionTemplate::New(isolate, TestInterfaceImplementationV8Internal::part ial2StaticVoidMethodMethodCallback, v8Undefined(), defaultSignature, 0)->GetFunc tion());
1630 } 1839 }
1631 } 1840 }
1632 1841
1633 ActiveDOMObject* V8TestInterface::toActiveDOMObject(v8::Handle<v8::Object> wrapp er) 1842 ActiveDOMObject* V8TestInterface::toActiveDOMObject(v8::Handle<v8::Object> wrapp er)
1634 { 1843 {
1635 return toNative(wrapper); 1844 return toNative(wrapper);
1636 } 1845 }
1637 1846
1638 void V8TestInterface::derefObject(ScriptWrappableBase* internalPointer) 1847 void V8TestInterface::derefObject(ScriptWrappableBase* internalPointer)
1639 { 1848 {
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
1739 // FIXME: We should support exceptions other than DOM exceptions. 1948 // FIXME: We should support exceptions other than DOM exceptions.
1740 RELEASE_ASSERT_NOT_REACHED(); 1949 RELEASE_ASSERT_NOT_REACHED();
1741 } 1950 }
1742 return false; 1951 return false;
1743 } 1952 }
1744 return true; 1953 return true;
1745 } 1954 }
1746 1955
1747 } // namespace blink 1956 } // namespace blink
1748 #endif // ENABLE(CONDITION) 1957 #endif // ENABLE(CONDITION)
OLDNEW
« no previous file with comments | « Source/bindings/tests/results/V8TestInterface.h ('k') | Source/bindings/tests/results/V8TestInterface2.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698