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

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

Issue 618373003: [bindings] partial interfaces should not violate componentization (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fixed patch conflict Created 6 years, 2 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
11 #include "bindings/core/v8/ExceptionState.h" 11 #include "bindings/core/v8/ExceptionState.h"
12 #include "bindings/core/v8/PrivateScriptRunner.h" 12 #include "bindings/core/v8/PrivateScriptRunner.h"
13 #include "bindings/core/v8/ScriptState.h" 13 #include "bindings/core/v8/ScriptState.h"
14 #include "bindings/core/v8/ScriptValue.h" 14 #include "bindings/core/v8/ScriptValue.h"
15 #include "bindings/core/v8/V8AbstractEventListener.h" 15 #include "bindings/core/v8/V8AbstractEventListener.h"
16 #include "bindings/core/v8/V8DOMConfiguration.h" 16 #include "bindings/core/v8/V8DOMConfiguration.h"
17 #include "bindings/core/v8/V8EventListenerList.h" 17 #include "bindings/core/v8/V8EventListenerList.h"
18 #include "bindings/core/v8/V8HiddenValue.h" 18 #include "bindings/core/v8/V8HiddenValue.h"
19 #include "bindings/core/v8/V8Iterator.h" 19 #include "bindings/core/v8/V8Iterator.h"
20 #include "bindings/core/v8/V8Node.h" 20 #include "bindings/core/v8/V8Node.h"
21 #include "bindings/core/v8/V8ObjectConstructor.h" 21 #include "bindings/core/v8/V8ObjectConstructor.h"
22 #include "bindings/core/v8/V8TestInterface.h" 22 #include "bindings/core/v8/V8TestInterface.h"
23 #include "bindings/core/v8/V8TestInterfaceEmpty.h" 23 #include "bindings/core/v8/V8TestInterfaceEmpty.h"
24 #include "bindings/tests/idls/core/TestImplements2.h" 24 #include "bindings/tests/idls/core/TestImplements2.h"
25 #include "bindings/tests/idls/core/TestImplements3Implementation.h" 25 #include "bindings/tests/idls/core/TestImplements3Implementation.h"
26 #include "bindings/tests/idls/core/TestPartialInterface.h" 26 #include "bindings/tests/idls/core/TestPartialInterface.h"
27 #include "bindings/tests/idls/core/TestPartialInterfaceImplementation.h" 27 #include "bindings/tests/idls/core/TestPartialInterfaceImplementation.h"
28 #include "bindings/tests/idls/modules/TestPartialInterfaceImplementation3.h"
29 #include "core/dom/ContextFeatures.h" 28 #include "core/dom/ContextFeatures.h"
30 #include "core/dom/Document.h" 29 #include "core/dom/Document.h"
31 #include "core/frame/LocalFrame.h" 30 #include "core/frame/LocalFrame.h"
32 #include "platform/RuntimeEnabledFeatures.h" 31 #include "platform/RuntimeEnabledFeatures.h"
33 #include "platform/ScriptForbiddenScope.h" 32 #include "platform/ScriptForbiddenScope.h"
34 #include "platform/TraceEvent.h" 33 #include "platform/TraceEvent.h"
35 #include "wtf/GetPtr.h" 34 #include "wtf/GetPtr.h"
36 #include "wtf/RefPtr.h" 35 #include "wtf/RefPtr.h"
37 36
38 namespace blink { 37 namespace blink {
39 38
40 const WrapperTypeInfo V8TestInterface::wrapperTypeInfo = { gin::kEmbedderBlink, V8TestInterface::domTemplate, V8TestInterface::refObject, V8TestInterface::deref Object, V8TestInterface::trace, V8TestInterface::toActiveDOMObject, 0, V8TestInt erface::visitDOMWrapper, V8TestInterface::installConditionallyEnabledMethods, V8 TestInterface::installConditionallyEnabledProperties, &V8TestInterfaceEmpty::wra pperTypeInfo, WrapperTypeInfo::WrapperTypeObjectPrototype, WrapperTypeInfo::Obje ctClassId, WrapperTypeInfo::Dependent, WrapperTypeInfo::RefCountedObject }; 39 WrapperTypeInfo V8TestInterface::wrapperTypeInfo = { gin::kEmbedderBlink, V8Test Interface::domTemplate, V8TestInterface::refObject, V8TestInterface::derefObject , V8TestInterface::trace, V8TestInterface::toActiveDOMObject, 0, V8TestInterface ::visitDOMWrapper, V8TestInterface::installConditionallyEnabledMethods, V8TestIn terface::installConditionallyEnabledProperties, &V8TestInterfaceEmpty::wrapperTy peInfo, WrapperTypeInfo::WrapperTypeObjectPrototype, WrapperTypeInfo::ObjectClas sId, WrapperTypeInfo::Dependent, WrapperTypeInfo::RefCountedObject };
41 40
42 // This static member must be declared by DEFINE_WRAPPERTYPEINFO in TestInterfac eImplementation.h. 41 // This static member must be declared by DEFINE_WRAPPERTYPEINFO in TestInterfac eImplementation.h.
43 // For details, see the comment of DEFINE_WRAPPERTYPEINFO in 42 // For details, see the comment of DEFINE_WRAPPERTYPEINFO in
44 // bindings/core/v8/ScriptWrappable.h. 43 // bindings/core/v8/ScriptWrappable.h.
45 const WrapperTypeInfo& TestInterfaceImplementation::s_wrapperTypeInfo = V8TestIn terface::wrapperTypeInfo; 44 const WrapperTypeInfo& TestInterfaceImplementation::s_wrapperTypeInfo = V8TestIn terface::wrapperTypeInfo;
46 45
47 namespace TestInterfaceImplementationV8Internal { 46 namespace TestInterfaceImplementationV8Internal {
47 static void (*voidMethodPartialOverloadMethodForPartialInterface)(const v8::Func tionCallbackInfo<v8::Value>&) = 0;
48 static void (*staticVoidMethodPartialOverloadMethodForPartialInterface)(const v8 ::FunctionCallbackInfo<v8::Value>&) = 0;
49 static void (*partial2VoidMethodMethodForPartialInterface)(const v8::FunctionCal lbackInfo<v8::Value>&) = 0;
50 static void (*partial2StaticVoidMethodMethodForPartialInterface)(const v8::Funct ionCallbackInfo<v8::Value>&) = 0;
48 51
49 static void testInterfaceAttributeAttributeGetter(const v8::PropertyCallbackInfo <v8::Value>& info) 52 static void testInterfaceAttributeAttributeGetter(const v8::PropertyCallbackInfo <v8::Value>& info)
50 { 53 {
51 v8::Handle<v8::Object> holder = info.Holder(); 54 v8::Handle<v8::Object> holder = info.Holder();
52 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 55 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
53 v8SetReturnValueFast(info, WTF::getPtr(impl->testInterfaceAttribute()), impl ); 56 v8SetReturnValueFast(info, WTF::getPtr(impl->testInterfaceAttribute()), impl );
54 } 57 }
55 58
56 static void testInterfaceAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) 59 static void testInterfaceAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
57 { 60 {
(...skipping 832 matching lines...) Expand 10 before | Expand all | Expand 10 after
890 TestPartialInterfaceImplementation::setPartial2StaticLongAttribute(cppValue) ; 893 TestPartialInterfaceImplementation::setPartial2StaticLongAttribute(cppValue) ;
891 } 894 }
892 895
893 static void partial2StaticLongAttributeAttributeSetterCallback(v8::Local<v8::Str ing>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) 896 static void partial2StaticLongAttributeAttributeSetterCallback(v8::Local<v8::Str ing>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
894 { 897 {
895 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); 898 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
896 TestInterfaceImplementationV8Internal::partial2StaticLongAttributeAttributeS etter(v8Value, info); 899 TestInterfaceImplementationV8Internal::partial2StaticLongAttributeAttributeS etter(v8Value, info);
897 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 900 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
898 } 901 }
899 902
900 static void partial3LongAttributeAttributeGetter(const v8::PropertyCallbackInfo< v8::Value>& info)
901 {
902 v8::Handle<v8::Object> holder = info.Holder();
903 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
904 v8SetReturnValueInt(info, TestPartialInterfaceImplementation3::partial3LongA ttribute(*impl));
905 }
906
907 static void partial3LongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
908 {
909 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
910 TestInterfaceImplementationV8Internal::partial3LongAttributeAttributeGetter( info);
911 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
912 }
913
914 static void partial3LongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c onst v8::PropertyCallbackInfo<void>& info)
915 {
916 v8::Handle<v8::Object> holder = info.Holder();
917 ExceptionState exceptionState(ExceptionState::SetterContext, "partial3LongAt tribute", "TestInterface", holder, info.GetIsolate());
918 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
919 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState) , exceptionState);
920 TestPartialInterfaceImplementation3::setPartial3LongAttribute(*impl, cppValu e);
921 }
922
923 static void partial3LongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
924 {
925 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
926 TestInterfaceImplementationV8Internal::partial3LongAttributeAttributeSetter( v8Value, info);
927 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
928 }
929
930 static void partial3StaticLongAttributeAttributeGetter(const v8::PropertyCallbac kInfo<v8::Value>& info)
931 {
932 v8SetReturnValueInt(info, TestPartialInterfaceImplementation3::partial3Stati cLongAttribute());
933 }
934
935 static void partial3StaticLongAttributeAttributeGetterCallback(v8::Local<v8::Str ing>, const v8::PropertyCallbackInfo<v8::Value>& info)
936 {
937 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
938 TestInterfaceImplementationV8Internal::partial3StaticLongAttributeAttributeG etter(info);
939 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
940 }
941
942 static void partial3StaticLongAttributeAttributeSetter(v8::Local<v8::Value> v8Va lue, const v8::PropertyCallbackInfo<void>& info)
943 {
944 ExceptionState exceptionState(ExceptionState::SetterContext, "partial3Static LongAttribute", "TestInterface", holder, info.GetIsolate());
945 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState) , exceptionState);
946 TestPartialInterfaceImplementation3::setPartial3StaticLongAttribute(cppValue );
947 }
948
949 static void partial3StaticLongAttributeAttributeSetterCallback(v8::Local<v8::Str ing>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
950 {
951 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
952 TestInterfaceImplementationV8Internal::partial3StaticLongAttributeAttributeS etter(v8Value, info);
953 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
954 }
955
956 static void TestInterfaceImplementationConstructorGetter(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) 903 static void TestInterfaceImplementationConstructorGetter(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
957 { 904 {
958 v8::Handle<v8::Value> data = info.Data(); 905 v8::Handle<v8::Value> data = info.Data();
959 ASSERT(data->IsExternal()); 906 ASSERT(data->IsExternal());
960 V8PerContextData* perContextData = V8PerContextData::from(info.Holder()->Cre ationContext()); 907 V8PerContextData* perContextData = V8PerContextData::from(info.Holder()->Cre ationContext());
961 if (!perContextData) 908 if (!perContextData)
962 return; 909 return;
963 v8SetReturnValue(info, perContextData->constructorForType(WrapperTypeInfo::u nwrap(data))); 910 v8SetReturnValue(info, perContextData->constructorForType(WrapperTypeInfo::u nwrap(data)));
964 } 911 }
965 912
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
1166 impl->windowAndServiceWorkerExposedMethod(); 1113 impl->windowAndServiceWorkerExposedMethod();
1167 } 1114 }
1168 1115
1169 static void windowAndServiceWorkerExposedMethodMethodCallback(const v8::Function CallbackInfo<v8::Value>& info) 1116 static void windowAndServiceWorkerExposedMethodMethodCallback(const v8::Function CallbackInfo<v8::Value>& info)
1170 { 1117 {
1171 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 1118 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
1172 TestInterfaceImplementationV8Internal::windowAndServiceWorkerExposedMethodMe thod(info); 1119 TestInterfaceImplementationV8Internal::windowAndServiceWorkerExposedMethodMe thod(info);
1173 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 1120 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
1174 } 1121 }
1175 1122
1176 static void voidMethodPartailOverloadMethod(const v8::FunctionCallbackInfo<v8::V alue>& info) 1123 static void voidMethodPartialOverload1Method(const v8::FunctionCallbackInfo<v8:: Value>& info)
1177 { 1124 {
1178 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); 1125 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
1179 impl->voidMethodPartailOverload(); 1126 impl->voidMethodPartialOverload();
1180 } 1127 }
1181 1128
1182 static void voidMethodPartailOverloadMethodCallback(const v8::FunctionCallbackIn fo<v8::Value>& info) 1129 static void voidMethodPartialOverload2Method(const v8::FunctionCallbackInfo<v8:: Value>& info)
1183 { 1130 {
1184 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 1131 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodP artialOverload", "TestInterface", info.Holder(), info.GetIsolate());
1185 TestInterfaceImplementationV8Internal::voidMethodPartailOverloadMethod(info) ; 1132 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
1186 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 1133 double doubleArg;
1134 {
1135 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(doubleArg, toDouble(info[0], excep tionState), exceptionState);
1136 if (!std::isfinite(doubleArg)) {
1137 exceptionState.throwTypeError("double parameter 1 is non-finite.");
1138 exceptionState.throwIfNeeded();
1139 return;
1140 }
1141 }
1142 impl->voidMethodPartialOverload(doubleArg);
1187 } 1143 }
1188 1144
1189 static void voidMethodPartailOverloadMethod(const v8::FunctionCallbackInfo<v8::V alue>& info) 1145 static void staticVoidMethodPartialOverload1Method(const v8::FunctionCallbackInf o<v8::Value>& info)
1190 { 1146 {
1191 TestInterfaceImplementation::voidMethodPartailOverload(); 1147 TestInterfaceImplementation::staticVoidMethodPartialOverload();
1192 }
1193
1194 static void voidMethodPartailOverloadMethodCallback(const v8::FunctionCallbackIn fo<v8::Value>& info)
1195 {
1196 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
1197 TestInterfaceImplementationV8Internal::voidMethodPartailOverloadMethod(info) ;
1198 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
1199 } 1148 }
1200 1149
1201 static void implementsVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value> & info) 1150 static void implementsVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value> & info)
1202 { 1151 {
1203 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); 1152 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
1204 impl->implementsVoidMethod(); 1153 impl->implementsVoidMethod();
1205 } 1154 }
1206 1155
1207 static void implementsVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8 ::Value>& info) 1156 static void implementsVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8 ::Value>& info)
1208 { 1157 {
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
1448 TestPartialInterfaceImplementation::partial2VoidMethod(*impl); 1397 TestPartialInterfaceImplementation::partial2VoidMethod(*impl);
1449 } 1398 }
1450 1399
1451 static void partial2StaticVoidMethod1Method(const v8::FunctionCallbackInfo<v8::V alue>& info) 1400 static void partial2StaticVoidMethod1Method(const v8::FunctionCallbackInfo<v8::V alue>& info)
1452 { 1401 {
1453 TestPartialInterfaceImplementation::partial2StaticVoidMethod(); 1402 TestPartialInterfaceImplementation::partial2StaticVoidMethod();
1454 } 1403 }
1455 1404
1456 static void voidMethodPartialOverloadMethod(const v8::FunctionCallbackInfo<v8::V alue>& info) 1405 static void voidMethodPartialOverloadMethod(const v8::FunctionCallbackInfo<v8::V alue>& info)
1457 { 1406 {
1458 if (UNLIKELY(info.Length() < 1)) { 1407 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodP artialOverload", "TestInterface", info.Holder(), info.GetIsolate());
1459 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v oidMethodPartialOverload", "TestInterface", 1, info.Length(), info.GetIsolate()) , info.GetIsolate()); 1408 switch (std::min(1, info.Length())) {
1460 return; 1409 case 0:
1410 if (true) {
1411 voidMethodPartialOverload1Method(info);
1412 return;
1413 }
1414 break;
1415 case 1:
1416 if (info[0]->IsNumber()) {
1417 voidMethodPartialOverload2Method(info);
1418 return;
1419 }
1420 if (true) {
1421 voidMethodPartialOverload2Method(info);
1422 return;
1423 }
1424 break;
1461 } 1425 }
1462 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); 1426 ASSERT(voidMethodPartialOverloadMethodForPartialInterface);
1463 V8StringResource<> value; 1427 (voidMethodPartialOverloadMethodForPartialInterface)(info);
1464 {
1465 TOSTRING_VOID_INTERNAL(value, info[0]);
1466 }
1467 TestPartialInterfaceImplementation3::voidMethodPartialOverload(*impl, value) ;
1468 } 1428 }
1469 1429
1470 static void voidMethodPartialOverloadMethodCallback(const v8::FunctionCallbackIn fo<v8::Value>& info) 1430 static void voidMethodPartialOverloadMethodCallback(const v8::FunctionCallbackIn fo<v8::Value>& info)
1471 { 1431 {
1472 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 1432 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
1473 TestInterfaceImplementationV8Internal::voidMethodPartialOverloadMethod(info) ; 1433 TestInterfaceImplementationV8Internal::voidMethodPartialOverloadMethod(info) ;
1474 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 1434 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
1475 } 1435 }
1476 1436
1477 static void voidMethodPartialOverloadMethod(const v8::FunctionCallbackInfo<v8::V alue>& info) 1437 static void staticVoidMethodPartialOverloadMethod(const v8::FunctionCallbackInfo <v8::Value>& info)
1478 { 1438 {
1479 if (UNLIKELY(info.Length() < 1)) { 1439 ExceptionState exceptionState(ExceptionState::ExecutionContext, "staticVoidM ethodPartialOverload", "TestInterface", info.Holder(), info.GetIsolate());
1480 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v oidMethodPartialOverload", "TestInterface", 1, info.Length(), info.GetIsolate()) , info.GetIsolate()); 1440 switch (std::min(1, info.Length())) {
1481 return; 1441 case 0:
1442 if (true) {
1443 staticVoidMethodPartialOverload1Method(info);
1444 return;
1445 }
1446 break;
1447 case 1:
1448 break;
1482 } 1449 }
1483 V8StringResource<> value; 1450 ASSERT(staticVoidMethodPartialOverloadMethodForPartialInterface);
1484 { 1451 (staticVoidMethodPartialOverloadMethodForPartialInterface)(info);
1485 TOSTRING_VOID_INTERNAL(value, info[0]);
1486 }
1487 TestPartialInterfaceImplementation3::voidMethodPartialOverload(value);
1488 } 1452 }
1489 1453
1490 static void voidMethodPartialOverloadMethodCallback(const v8::FunctionCallbackIn fo<v8::Value>& info) 1454 static void staticVoidMethodPartialOverloadMethodCallback(const v8::FunctionCall backInfo<v8::Value>& info)
1491 { 1455 {
1492 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 1456 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
1493 TestInterfaceImplementationV8Internal::voidMethodPartialOverloadMethod(info) ; 1457 TestInterfaceImplementationV8Internal::staticVoidMethodPartialOverloadMethod (info);
1494 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 1458 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
1495 } 1459 }
1496 1460
1497 static void partial2VoidMethod2Method(const v8::FunctionCallbackInfo<v8::Value>& info)
1498 {
1499 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
1500 V8StringResource<> value;
1501 {
1502 TOSTRING_VOID_INTERNAL(value, info[0]);
1503 }
1504 TestPartialInterfaceImplementation3::partial2VoidMethod(*impl, value);
1505 }
1506
1507 static void partial2VoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 1461 static void partial2VoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
1508 { 1462 {
1509 ExceptionState exceptionState(ExceptionState::ExecutionContext, "partial2Voi dMethod", "TestInterface", info.Holder(), info.GetIsolate()); 1463 ExceptionState exceptionState(ExceptionState::ExecutionContext, "partial2Voi dMethod", "TestInterface", info.Holder(), info.GetIsolate());
1510 switch (std::min(1, info.Length())) { 1464 switch (std::min(1, info.Length())) {
1511 case 0: 1465 case 0:
1512 if (true) { 1466 if (true) {
1513 partial2VoidMethod1Method(info); 1467 partial2VoidMethod1Method(info);
1514 return; 1468 return;
1515 } 1469 }
1516 break; 1470 break;
1517 case 1: 1471 case 1:
1518 if (true) {
1519 partial2VoidMethod2Method(info);
1520 return;
1521 }
1522 break; 1472 break;
1523 default:
1524 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(0, i nfo.Length()));
1525 exceptionState.throwIfNeeded();
1526 return;
1527 } 1473 }
1528 exceptionState.throwTypeError("No function was found that matched the signat ure provided."); 1474 ASSERT(partial2VoidMethodMethodForPartialInterface);
1529 exceptionState.throwIfNeeded(); 1475 (partial2VoidMethodMethodForPartialInterface)(info);
1530 } 1476 }
1531 1477
1532 static void partial2VoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8:: Value>& info) 1478 static void partial2VoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8:: Value>& info)
1533 { 1479 {
1534 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 1480 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
1535 TestInterfaceImplementationV8Internal::partial2VoidMethodMethod(info); 1481 TestInterfaceImplementationV8Internal::partial2VoidMethodMethod(info);
1536 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 1482 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
1537 } 1483 }
1538 1484
1539 static void partial2StaticVoidMethod2Method(const v8::FunctionCallbackInfo<v8::V alue>& info)
1540 {
1541 V8StringResource<> value;
1542 {
1543 TOSTRING_VOID_INTERNAL(value, info[0]);
1544 }
1545 TestPartialInterfaceImplementation3::partial2StaticVoidMethod(value);
1546 }
1547
1548 static void partial2StaticVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Va lue>& info) 1485 static void partial2StaticVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Va lue>& info)
1549 { 1486 {
1550 ExceptionState exceptionState(ExceptionState::ExecutionContext, "partial2Sta ticVoidMethod", "TestInterface", info.Holder(), info.GetIsolate()); 1487 ExceptionState exceptionState(ExceptionState::ExecutionContext, "partial2Sta ticVoidMethod", "TestInterface", info.Holder(), info.GetIsolate());
1551 switch (std::min(1, info.Length())) { 1488 switch (std::min(1, info.Length())) {
1552 case 0: 1489 case 0:
1553 if (true) { 1490 if (true) {
1554 partial2StaticVoidMethod1Method(info); 1491 partial2StaticVoidMethod1Method(info);
1555 return; 1492 return;
1556 } 1493 }
1557 break; 1494 break;
1558 case 1: 1495 case 1:
1559 if (true) {
1560 partial2StaticVoidMethod2Method(info);
1561 return;
1562 }
1563 break; 1496 break;
1564 default:
1565 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(0, i nfo.Length()));
1566 exceptionState.throwIfNeeded();
1567 return;
1568 } 1497 }
1569 exceptionState.throwTypeError("No function was found that matched the signat ure provided."); 1498 ASSERT(partial2StaticVoidMethodMethodForPartialInterface);
1570 exceptionState.throwIfNeeded(); 1499 (partial2StaticVoidMethodMethodForPartialInterface)(info);
1571 } 1500 }
1572 1501
1573 static void partial2StaticVoidMethodMethodCallback(const v8::FunctionCallbackInf o<v8::Value>& info) 1502 static void partial2StaticVoidMethodMethodCallback(const v8::FunctionCallbackInf o<v8::Value>& info)
1574 { 1503 {
1575 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 1504 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
1576 TestInterfaceImplementationV8Internal::partial2StaticVoidMethodMethod(info); 1505 TestInterfaceImplementationV8Internal::partial2StaticVoidMethodMethod(info);
1577 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 1506 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
1578 } 1507 }
1579 1508
1580 static void toStringMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 1509 static void toStringMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
1791 {"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}, 1720 {"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},
1792 {"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}, 1721 {"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},
1793 }; 1722 };
1794 1723
1795 static const V8DOMConfiguration::MethodConfiguration V8TestInterfaceMethods[] = { 1724 static const V8DOMConfiguration::MethodConfiguration V8TestInterfaceMethods[] = {
1796 {"voidMethodTestInterfaceEmptyArg", TestInterfaceImplementationV8Internal::v oidMethodTestInterfaceEmptyArgMethodCallback, 0, 1, V8DOMConfiguration::ExposedT oAllScripts}, 1725 {"voidMethodTestInterfaceEmptyArg", TestInterfaceImplementationV8Internal::v oidMethodTestInterfaceEmptyArgMethodCallback, 0, 1, V8DOMConfiguration::ExposedT oAllScripts},
1797 {"voidMethodDoubleArgFloatArg", TestInterfaceImplementationV8Internal::voidM ethodDoubleArgFloatArgMethodCallback, 0, 2, V8DOMConfiguration::ExposedToAllScri pts}, 1726 {"voidMethodDoubleArgFloatArg", TestInterfaceImplementationV8Internal::voidM ethodDoubleArgFloatArgMethodCallback, 0, 2, V8DOMConfiguration::ExposedToAllScri pts},
1798 {"voidMethodUnrestrictedDoubleArgUnrestrictedFloatArg", TestInterfaceImpleme ntationV8Internal::voidMethodUnrestrictedDoubleArgUnrestrictedFloatArgMethodCall back, 0, 2, V8DOMConfiguration::ExposedToAllScripts}, 1727 {"voidMethodUnrestrictedDoubleArgUnrestrictedFloatArg", TestInterfaceImpleme ntationV8Internal::voidMethodUnrestrictedDoubleArgUnrestrictedFloatArgMethodCall back, 0, 2, V8DOMConfiguration::ExposedToAllScripts},
1799 {"voidMethod", TestInterfaceImplementationV8Internal::voidMethodMethodCallba ck, TestInterfaceImplementationV8Internal::voidMethodMethodCallbackForMainWorld, 0, V8DOMConfiguration::ExposedToAllScripts}, 1728 {"voidMethod", TestInterfaceImplementationV8Internal::voidMethodMethodCallba ck, TestInterfaceImplementationV8Internal::voidMethodMethodCallbackForMainWorld, 0, V8DOMConfiguration::ExposedToAllScripts},
1800 {"alwaysExposedMethod", TestInterfaceImplementationV8Internal::alwaysExposed MethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, 1729 {"alwaysExposedMethod", TestInterfaceImplementationV8Internal::alwaysExposed MethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts},
1801 {"voidMethodPartailOverload", TestInterfaceImplementationV8Internal::voidMet hodPartailOverloadMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts} ,
1802 {"implementsVoidMethod", TestInterfaceImplementationV8Internal::implementsVo idMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, 1730 {"implementsVoidMethod", TestInterfaceImplementationV8Internal::implementsVo idMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts},
1803 {"implementsComplexMethod", TestInterfaceImplementationV8Internal::implement sComplexMethodMethodCallback, 0, 2, V8DOMConfiguration::ExposedToAllScripts}, 1731 {"implementsComplexMethod", TestInterfaceImplementationV8Internal::implement sComplexMethodMethodCallback, 0, 2, V8DOMConfiguration::ExposedToAllScripts},
1804 {"implementsCustomVoidMethod", TestInterfaceImplementationV8Internal::implem entsCustomVoidMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScript s}, 1732 {"implementsCustomVoidMethod", TestInterfaceImplementationV8Internal::implem entsCustomVoidMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScript s},
1805 {"implements3VoidMethod", TestInterfaceImplementationV8Internal::implements3 VoidMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, 1733 {"implements3VoidMethod", TestInterfaceImplementationV8Internal::implements3 VoidMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts},
1734 {"voidMethodPartialOverload", TestInterfaceImplementationV8Internal::voidMet hodPartialOverloadMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts} ,
1806 {"partial2VoidMethod", TestInterfaceImplementationV8Internal::partial2VoidMe thodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, 1735 {"partial2VoidMethod", TestInterfaceImplementationV8Internal::partial2VoidMe thodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts},
1807 }; 1736 };
1808 1737
1809 static void installV8TestInterfaceTemplate(v8::Handle<v8::FunctionTemplate> func tionTemplate, v8::Isolate* isolate) 1738 void V8TestInterface::installV8TestInterfaceTemplate(v8::Handle<v8::FunctionTemp late> functionTemplate, v8::Isolate* isolate)
1810 { 1739 {
1811 functionTemplate->ReadOnlyPrototype(); 1740 functionTemplate->ReadOnlyPrototype();
1812 1741
1813 v8::Local<v8::Signature> defaultSignature; 1742 v8::Local<v8::Signature> defaultSignature;
1814 if (!RuntimeEnabledFeatures::featureNameEnabled()) 1743 if (!RuntimeEnabledFeatures::featureNameEnabled())
1815 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(functionT emplate, "", V8TestInterfaceEmpty::domTemplate(isolate), V8TestInterface::intern alFieldCount, 0, 0, 0, 0, 0, 0, isolate); 1744 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(functionT emplate, "", V8TestInterfaceEmpty::domTemplate(isolate), V8TestInterface::intern alFieldCount, 0, 0, 0, 0, 0, 0, isolate);
1816 else 1745 else
1817 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(functionT emplate, "TestInterface", V8TestInterfaceEmpty::domTemplate(isolate), V8TestInte rface::internalFieldCount, 1746 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(functionT emplate, "TestInterface", V8TestInterfaceEmpty::domTemplate(isolate), V8TestInte rface::internalFieldCount,
1818 V8TestInterfaceAttributes, WTF_ARRAY_LENGTH(V8TestInterfaceAttribute s), 1747 V8TestInterfaceAttributes, WTF_ARRAY_LENGTH(V8TestInterfaceAttribute s),
1819 0, 0, 1748 0, 0,
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
1860 {"stringAttribute", TestInterfaceImplementationV8Internal::stringAttribu teAttributeGetterCallback, TestInterfaceImplementationV8Internal::stringAttribut eAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllSc ripts, V8DOMConfiguration::OnInstance}; 1789 {"stringAttribute", TestInterfaceImplementationV8Internal::stringAttribu teAttributeGetterCallback, TestInterfaceImplementationV8Internal::stringAttribut eAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllSc ripts, V8DOMConfiguration::OnInstance};
1861 V8DOMConfiguration::installAttribute(instanceTemplate, prototypeTemplate , attributeConfiguration, isolate); 1790 V8DOMConfiguration::installAttribute(instanceTemplate, prototypeTemplate , attributeConfiguration, isolate);
1862 } 1791 }
1863 #endif // ENABLE(PARTIAL_CONDITION) 1792 #endif // ENABLE(PARTIAL_CONDITION)
1864 static const V8DOMConfiguration::ConstantConfiguration V8TestInterfaceConsta nts[] = { 1793 static const V8DOMConfiguration::ConstantConfiguration V8TestInterfaceConsta nts[] = {
1865 {"UNSIGNED_LONG", 0, 0, 0, V8DOMConfiguration::ConstantTypeUnsignedLong} , 1794 {"UNSIGNED_LONG", 0, 0, 0, V8DOMConfiguration::ConstantTypeUnsignedLong} ,
1866 {"CONST_JAVASCRIPT", 1, 0, 0, V8DOMConfiguration::ConstantTypeShort}, 1795 {"CONST_JAVASCRIPT", 1, 0, 0, V8DOMConfiguration::ConstantTypeShort},
1867 {"IMPLEMENTS_CONSTANT_1", 1, 0, 0, V8DOMConfiguration::ConstantTypeUnsig nedShort}, 1796 {"IMPLEMENTS_CONSTANT_1", 1, 0, 0, V8DOMConfiguration::ConstantTypeUnsig nedShort},
1868 {"IMPLEMENTS_CONSTANT_2", 2, 0, 0, V8DOMConfiguration::ConstantTypeUnsig nedShort}, 1797 {"IMPLEMENTS_CONSTANT_2", 2, 0, 0, V8DOMConfiguration::ConstantTypeUnsig nedShort},
1869 {"PARTIAL2_UNSIGNED_SHORT", 0, 0, 0, V8DOMConfiguration::ConstantTypeUns ignedShort}, 1798 {"PARTIAL2_UNSIGNED_SHORT", 0, 0, 0, V8DOMConfiguration::ConstantTypeUns ignedShort},
1870 {"PARTIAL3_UNSIGNED_SHORT", 0, 0, 0, V8DOMConfiguration::ConstantTypeUns ignedShort},
1871 }; 1799 };
1872 V8DOMConfiguration::installConstants(functionTemplate, prototypeTemplate, V8 TestInterfaceConstants, WTF_ARRAY_LENGTH(V8TestInterfaceConstants), isolate); 1800 V8DOMConfiguration::installConstants(functionTemplate, prototypeTemplate, V8 TestInterfaceConstants, WTF_ARRAY_LENGTH(V8TestInterfaceConstants), isolate);
1873 if (RuntimeEnabledFeatures::partialFeatureNameEnabled()) { 1801 if (RuntimeEnabledFeatures::partialFeatureNameEnabled()) {
1874 static const V8DOMConfiguration::ConstantConfiguration constantConfigura tion = {"PARTIAL_UNSIGNED_SHORT", 0, 0, 0, V8DOMConfiguration::ConstantTypeUnsig nedShort}; 1802 static const V8DOMConfiguration::ConstantConfiguration constantConfigura tion = {"PARTIAL_UNSIGNED_SHORT", 0, 0, 0, V8DOMConfiguration::ConstantTypeUnsig nedShort};
1875 V8DOMConfiguration::installConstants(functionTemplate, prototypeTemplate , &constantConfiguration, 1, isolate); 1803 V8DOMConfiguration::installConstants(functionTemplate, prototypeTemplate , &constantConfiguration, 1, isolate);
1876 } 1804 }
1877 functionTemplate->InstanceTemplate()->SetIndexedPropertyHandler(TestInterfac eImplementationV8Internal::indexedPropertyGetterCallback, TestInterfaceImplement ationV8Internal::indexedPropertySetterCallback, 0, TestInterfaceImplementationV8 Internal::indexedPropertyDeleterCallback, indexedPropertyEnumerator<TestInterfac eImplementation>); 1805 functionTemplate->InstanceTemplate()->SetIndexedPropertyHandler(TestInterfac eImplementationV8Internal::indexedPropertyGetterCallback, TestInterfaceImplement ationV8Internal::indexedPropertySetterCallback, 0, TestInterfaceImplementationV8 Internal::indexedPropertyDeleterCallback, indexedPropertyEnumerator<TestInterfac eImplementation>);
1878 functionTemplate->InstanceTemplate()->SetNamedPropertyHandler(TestInterfaceI mplementationV8Internal::namedPropertyGetterCallback, TestInterfaceImplementatio nV8Internal::namedPropertySetterCallback, TestInterfaceImplementationV8Internal: :namedPropertyQueryCallback, TestInterfaceImplementationV8Internal::namedPropert yDeleterCallback, TestInterfaceImplementationV8Internal::namedPropertyEnumerator Callback); 1806 functionTemplate->InstanceTemplate()->SetNamedPropertyHandler(TestInterfaceI mplementationV8Internal::namedPropertyGetterCallback, TestInterfaceImplementatio nV8Internal::namedPropertySetterCallback, TestInterfaceImplementationV8Internal: :namedPropertyQueryCallback, TestInterfaceImplementationV8Internal::namedPropert yDeleterCallback, TestInterfaceImplementationV8Internal::namedPropertyEnumerator Callback);
1879 static const V8DOMConfiguration::SymbolKeyedMethodConfiguration symbolKeyedI teratorConfiguration = { v8::Symbol::GetIterator, TestInterfaceImplementationV8I nternal::iteratorMethodCallback, 0, V8DOMConfiguration::ExposedToAllScripts }; 1807 static const V8DOMConfiguration::SymbolKeyedMethodConfiguration symbolKeyedI teratorConfiguration = { v8::Symbol::GetIterator, TestInterfaceImplementationV8I nternal::iteratorMethodCallback, 0, V8DOMConfiguration::ExposedToAllScripts };
1880 V8DOMConfiguration::installMethod(prototypeTemplate, defaultSignature, v8::D ontDelete, symbolKeyedIteratorConfiguration, isolate); 1808 V8DOMConfiguration::installMethod(prototypeTemplate, defaultSignature, v8::D ontDelete, symbolKeyedIteratorConfiguration, isolate);
1881 functionTemplate->InstanceTemplate()->SetCallAsFunctionHandler(V8TestInterfa ce::legacyCallCustom); 1809 functionTemplate->InstanceTemplate()->SetCallAsFunctionHandler(V8TestInterfa ce::legacyCallCustom);
1882 static const V8DOMConfiguration::MethodConfiguration alwaysExposedStaticMeth odMethodConfiguration = { 1810 static const V8DOMConfiguration::MethodConfiguration alwaysExposedStaticMeth odMethodConfiguration = {
1883 "alwaysExposedStaticMethod", TestInterfaceImplementationV8Internal::alwa ysExposedStaticMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScrip ts, 1811 "alwaysExposedStaticMethod", TestInterfaceImplementationV8Internal::alwa ysExposedStaticMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScrip ts,
1884 }; 1812 };
1885 V8DOMConfiguration::installMethod(functionTemplate, v8::Local<v8::Signature> (), v8::None, alwaysExposedStaticMethodMethodConfiguration, isolate); 1813 V8DOMConfiguration::installMethod(functionTemplate, v8::Local<v8::Signature> (), v8::None, alwaysExposedStaticMethodMethodConfiguration, isolate);
1886 static const V8DOMConfiguration::MethodConfiguration voidMethodPartailOverlo adMethodConfiguration = {
1887 "voidMethodPartailOverload", TestInterfaceImplementationV8Internal::void MethodPartailOverloadMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScrip ts,
1888 };
1889 V8DOMConfiguration::installMethod(functionTemplate, v8::Local<v8::Signature> (), v8::None, voidMethodPartailOverloadMethodConfiguration, isolate);
1890 static const V8DOMConfiguration::MethodConfiguration implementsStaticVoidMet hodMethodConfiguration = { 1814 static const V8DOMConfiguration::MethodConfiguration implementsStaticVoidMet hodMethodConfiguration = {
1891 "implementsStaticVoidMethod", TestInterfaceImplementationV8Internal::imp lementsStaticVoidMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScr ipts, 1815 "implementsStaticVoidMethod", TestInterfaceImplementationV8Internal::imp lementsStaticVoidMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScr ipts,
1892 }; 1816 };
1893 V8DOMConfiguration::installMethod(functionTemplate, v8::Local<v8::Signature> (), v8::None, implementsStaticVoidMethodMethodConfiguration, isolate); 1817 V8DOMConfiguration::installMethod(functionTemplate, v8::Local<v8::Signature> (), v8::None, implementsStaticVoidMethodMethodConfiguration, isolate);
1894 if (RuntimeEnabledFeatures::implements2FeatureNameEnabled()) { 1818 if (RuntimeEnabledFeatures::implements2FeatureNameEnabled()) {
1895 static const V8DOMConfiguration::MethodConfiguration implements2VoidMeth odMethodConfiguration = { 1819 static const V8DOMConfiguration::MethodConfiguration implements2VoidMeth odMethodConfiguration = {
1896 "implements2VoidMethod", TestInterfaceImplementationV8Internal::impl ements2VoidMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts, 1820 "implements2VoidMethod", TestInterfaceImplementationV8Internal::impl ements2VoidMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts,
1897 }; 1821 };
1898 V8DOMConfiguration::installMethod(prototypeTemplate, defaultSignature, v 8::None, implements2VoidMethodMethodConfiguration, isolate); 1822 V8DOMConfiguration::installMethod(prototypeTemplate, defaultSignature, v 8::None, implements2VoidMethodMethodConfiguration, isolate);
1899 } 1823 }
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
1942 } 1866 }
1943 #endif // ENABLE(PARTIAL_CONDITION) 1867 #endif // ENABLE(PARTIAL_CONDITION)
1944 #if ENABLE(PARTIAL_CONDITION) 1868 #if ENABLE(PARTIAL_CONDITION)
1945 if (RuntimeEnabledFeatures::partialFeatureNameEnabled()) { 1869 if (RuntimeEnabledFeatures::partialFeatureNameEnabled()) {
1946 static const V8DOMConfiguration::MethodConfiguration shortMethodWithShor tArgumentImplementedInPrivateScriptMethodConfiguration = { 1870 static const V8DOMConfiguration::MethodConfiguration shortMethodWithShor tArgumentImplementedInPrivateScriptMethodConfiguration = {
1947 "shortMethodWithShortArgumentImplementedInPrivateScript", TestInterf aceImplementationV8Internal::shortMethodWithShortArgumentImplementedInPrivateScr iptMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts, 1871 "shortMethodWithShortArgumentImplementedInPrivateScript", TestInterf aceImplementationV8Internal::shortMethodWithShortArgumentImplementedInPrivateScr iptMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts,
1948 }; 1872 };
1949 V8DOMConfiguration::installMethod(prototypeTemplate, defaultSignature, v 8::None, shortMethodWithShortArgumentImplementedInPrivateScriptMethodConfigurati on, isolate); 1873 V8DOMConfiguration::installMethod(prototypeTemplate, defaultSignature, v 8::None, shortMethodWithShortArgumentImplementedInPrivateScriptMethodConfigurati on, isolate);
1950 } 1874 }
1951 #endif // ENABLE(PARTIAL_CONDITION) 1875 #endif // ENABLE(PARTIAL_CONDITION)
1876 static const V8DOMConfiguration::MethodConfiguration staticVoidMethodPartial OverloadMethodConfiguration = {
1877 "staticVoidMethodPartialOverload", TestInterfaceImplementationV8Internal ::staticVoidMethodPartialOverloadMethodCallback, 0, 0, V8DOMConfiguration::Expos edToAllScripts,
1878 };
1879 V8DOMConfiguration::installMethod(functionTemplate, v8::Local<v8::Signature> (), v8::None, staticVoidMethodPartialOverloadMethodConfiguration, isolate);
1952 static const V8DOMConfiguration::MethodConfiguration partial2StaticVoidMetho dMethodConfiguration = { 1880 static const V8DOMConfiguration::MethodConfiguration partial2StaticVoidMetho dMethodConfiguration = {
1953 "partial2StaticVoidMethod", TestInterfaceImplementationV8Internal::parti al2StaticVoidMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts , 1881 "partial2StaticVoidMethod", TestInterfaceImplementationV8Internal::parti al2StaticVoidMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts ,
1954 }; 1882 };
1955 V8DOMConfiguration::installMethod(functionTemplate, v8::Local<v8::Signature> (), v8::None, partial2StaticVoidMethodMethodConfiguration, isolate); 1883 V8DOMConfiguration::installMethod(functionTemplate, v8::Local<v8::Signature> (), v8::None, partial2StaticVoidMethodMethodConfiguration, isolate);
1956 static const V8DOMConfiguration::MethodConfiguration toStringMethodConfigura tion = { 1884 static const V8DOMConfiguration::MethodConfiguration toStringMethodConfigura tion = {
1957 "toString", TestInterfaceImplementationV8Internal::toStringMethodCallbac k, 0, 0, V8DOMConfiguration::ExposedToAllScripts, 1885 "toString", TestInterfaceImplementationV8Internal::toStringMethodCallbac k, 0, 0, V8DOMConfiguration::ExposedToAllScripts,
1958 }; 1886 };
1959 V8DOMConfiguration::installMethod(prototypeTemplate, defaultSignature, stati c_cast<v8::PropertyAttribute>(v8::DontDelete | v8::DontEnum), toStringMethodConf iguration, isolate); 1887 V8DOMConfiguration::installMethod(prototypeTemplate, defaultSignature, stati c_cast<v8::PropertyAttribute>(v8::DontDelete | v8::DontEnum), toStringMethodConf iguration, isolate);
1960 functionTemplate->SetNativeDataProperty(v8AtomicString(isolate, "staticStrin gAttribute"), TestInterfaceImplementationV8Internal::staticStringAttributeAttrib uteGetterCallback, TestInterfaceImplementationV8Internal::staticStringAttributeA ttributeSetterCallback, v8::External::New(isolate, 0), static_cast<v8::PropertyA ttribute>(v8::None), v8::Handle<v8::AccessorSignature>(), static_cast<v8::Access Control>(v8::DEFAULT)); 1888 functionTemplate->SetNativeDataProperty(v8AtomicString(isolate, "staticStrin gAttribute"), TestInterfaceImplementationV8Internal::staticStringAttributeAttrib uteGetterCallback, TestInterfaceImplementationV8Internal::staticStringAttributeA ttributeSetterCallback, v8::External::New(isolate, 0), static_cast<v8::PropertyA ttribute>(v8::None), v8::Handle<v8::AccessorSignature>(), static_cast<v8::Access Control>(v8::DEFAULT));
1961 functionTemplate->SetNativeDataProperty(v8AtomicString(isolate, "implementsS taticReadOnlyLongAttribute"), TestInterfaceImplementationV8Internal::implementsS taticReadOnlyLongAttributeAttributeGetterCallback, 0, v8::External::New(isolate, 0), static_cast<v8::PropertyAttribute>(v8::None), v8::Handle<v8::AccessorSignat ure>(), static_cast<v8::AccessControl>(v8::DEFAULT)); 1889 functionTemplate->SetNativeDataProperty(v8AtomicString(isolate, "implementsS taticReadOnlyLongAttribute"), TestInterfaceImplementationV8Internal::implementsS taticReadOnlyLongAttributeAttributeGetterCallback, 0, v8::External::New(isolate, 0), static_cast<v8::PropertyAttribute>(v8::None), v8::Handle<v8::AccessorSignat ure>(), static_cast<v8::AccessControl>(v8::DEFAULT));
1962 functionTemplate->SetNativeDataProperty(v8AtomicString(isolate, "implementsS taticStringAttribute"), TestInterfaceImplementationV8Internal::implementsStaticS tringAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::im plementsStaticStringAttributeAttributeSetterCallback, v8::External::New(isolate, 0), static_cast<v8::PropertyAttribute>(v8::None), v8::Handle<v8::AccessorSignat ure>(), static_cast<v8::AccessControl>(v8::DEFAULT)); 1890 functionTemplate->SetNativeDataProperty(v8AtomicString(isolate, "implementsS taticStringAttribute"), TestInterfaceImplementationV8Internal::implementsStaticS tringAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::im plementsStaticStringAttributeAttributeSetterCallback, v8::External::New(isolate, 0), static_cast<v8::PropertyAttribute>(v8::None), v8::Handle<v8::AccessorSignat ure>(), static_cast<v8::AccessControl>(v8::DEFAULT));
1963 functionTemplate->SetNativeDataProperty(v8AtomicString(isolate, "implements2 StaticStringAttribute"), TestInterfaceImplementationV8Internal::implements2Stati cStringAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal:: implements2StaticStringAttributeAttributeSetterCallback, v8::External::New(isola te, 0), static_cast<v8::PropertyAttribute>(v8::None), v8::Handle<v8::AccessorSig nature>(), static_cast<v8::AccessControl>(v8::DEFAULT)); 1891 functionTemplate->SetNativeDataProperty(v8AtomicString(isolate, "implements2 StaticStringAttribute"), TestInterfaceImplementationV8Internal::implements2Stati cStringAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal:: implements2StaticStringAttributeAttributeSetterCallback, v8::External::New(isola te, 0), static_cast<v8::PropertyAttribute>(v8::None), v8::Handle<v8::AccessorSig nature>(), static_cast<v8::AccessControl>(v8::DEFAULT));
1964 functionTemplate->SetNativeDataProperty(v8AtomicString(isolate, "implements3 StaticStringAttribute"), TestInterfaceImplementationV8Internal::implements3Stati cStringAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal:: implements3StaticStringAttributeAttributeSetterCallback, v8::External::New(isola te, 0), static_cast<v8::PropertyAttribute>(v8::None), v8::Handle<v8::AccessorSig nature>(), static_cast<v8::AccessControl>(v8::DEFAULT)); 1892 functionTemplate->SetNativeDataProperty(v8AtomicString(isolate, "implements3 StaticStringAttribute"), TestInterfaceImplementationV8Internal::implements3Stati cStringAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal:: implements3StaticStringAttributeAttributeSetterCallback, v8::External::New(isola te, 0), static_cast<v8::PropertyAttribute>(v8::None), v8::Handle<v8::AccessorSig nature>(), static_cast<v8::AccessControl>(v8::DEFAULT));
1965 #if ENABLE(PARTIAL_CONDITION) 1893 #if ENABLE(PARTIAL_CONDITION)
1966 functionTemplate->SetNativeDataProperty(v8AtomicString(isolate, "partialStat icLongAttribute"), TestInterfaceImplementationV8Internal::partialStaticLongAttri buteAttributeGetterCallback, TestInterfaceImplementationV8Internal::partialStati cLongAttributeAttributeSetterCallback, v8::External::New(isolate, 0), static_cas t<v8::PropertyAttribute>(v8::None), v8::Handle<v8::AccessorSignature>(), static_ cast<v8::AccessControl>(v8::DEFAULT)); 1894 functionTemplate->SetNativeDataProperty(v8AtomicString(isolate, "partialStat icLongAttribute"), TestInterfaceImplementationV8Internal::partialStaticLongAttri buteAttributeGetterCallback, TestInterfaceImplementationV8Internal::partialStati cLongAttributeAttributeSetterCallback, v8::External::New(isolate, 0), static_cas t<v8::PropertyAttribute>(v8::None), v8::Handle<v8::AccessorSignature>(), static_ cast<v8::AccessControl>(v8::DEFAULT));
1967 #endif // ENABLE(PARTIAL_CONDITION) 1895 #endif // ENABLE(PARTIAL_CONDITION)
1968 functionTemplate->SetNativeDataProperty(v8AtomicString(isolate, "partial2Sta ticLongAttribute"), TestInterfaceImplementationV8Internal::partial2StaticLongAtt ributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::partial2St aticLongAttributeAttributeSetterCallback, v8::External::New(isolate, 0), static_ cast<v8::PropertyAttribute>(v8::None), v8::Handle<v8::AccessorSignature>(), stat ic_cast<v8::AccessControl>(v8::DEFAULT)); 1896 functionTemplate->SetNativeDataProperty(v8AtomicString(isolate, "partial2Sta ticLongAttribute"), TestInterfaceImplementationV8Internal::partial2StaticLongAtt ributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::partial2St aticLongAttributeAttributeSetterCallback, v8::External::New(isolate, 0), static_ cast<v8::PropertyAttribute>(v8::None), v8::Handle<v8::AccessorSignature>(), stat ic_cast<v8::AccessControl>(v8::DEFAULT));
1969 functionTemplate->SetNativeDataProperty(v8AtomicString(isolate, "partial3Sta ticLongAttribute"), TestInterfaceImplementationV8Internal::partial3StaticLongAtt ributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::partial3St aticLongAttributeAttributeSetterCallback, v8::External::New(isolate, 0), static_ cast<v8::PropertyAttribute>(v8::None), v8::Handle<v8::AccessorSignature>(), stat ic_cast<v8::AccessControl>(v8::DEFAULT));
1970 1897
1971 // Custom toString template 1898 // Custom toString template
1972 functionTemplate->Set(v8AtomicString(isolate, "toString"), V8PerIsolateData: :from(isolate)->toStringTemplate()); 1899 functionTemplate->Set(v8AtomicString(isolate, "toString"), V8PerIsolateData: :from(isolate)->toStringTemplate());
1973 } 1900 }
1974 1901
1975 v8::Handle<v8::FunctionTemplate> V8TestInterface::domTemplate(v8::Isolate* isola te) 1902 v8::Handle<v8::FunctionTemplate> V8TestInterface::domTemplate(v8::Isolate* isola te)
1976 { 1903 {
1977 return V8DOMConfiguration::domClassTemplate(isolate, const_cast<WrapperTypeI nfo*>(&wrapperTypeInfo), installV8TestInterfaceTemplate); 1904 ASSERT(V8TestInterface::installV8TestInterfaceTemplateFunction != V8TestInte rface::installV8TestInterfaceTemplate);
1905 return V8DOMConfiguration::domClassTemplate(isolate, const_cast<WrapperTypeI nfo*>(&wrapperTypeInfo), V8TestInterface::installV8TestInterfaceTemplateFunction );
1978 } 1906 }
1979 1907
1980 bool V8TestInterface::hasInstance(v8::Handle<v8::Value> v8Value, v8::Isolate* is olate) 1908 bool V8TestInterface::hasInstance(v8::Handle<v8::Value> v8Value, v8::Isolate* is olate)
1981 { 1909 {
1982 return V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, v8Valu e); 1910 return V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, v8Valu e);
1983 } 1911 }
1984 1912
1985 v8::Handle<v8::Object> V8TestInterface::findInstanceInPrototypeChain(v8::Handle< v8::Value> v8Value, v8::Isolate* isolate) 1913 v8::Handle<v8::Object> V8TestInterface::findInstanceInPrototypeChain(v8::Handle< v8::Value> v8Value, v8::Isolate* isolate)
1986 { 1914 {
1987 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe rTypeInfo, v8Value); 1915 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe rTypeInfo, v8Value);
(...skipping 27 matching lines...) Expand all
2015 if (context && context->isDocument() && ContextFeatures::partialContextNameE nabled(toDocument(context))) { 1943 if (context && context->isDocument() && ContextFeatures::partialContextNameE nabled(toDocument(context))) {
2016 static const V8DOMConfiguration::AttributeConfiguration attributeConfigu ration =\ 1944 static const V8DOMConfiguration::AttributeConfiguration attributeConfigu ration =\
2017 {"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}; 1945 {"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};
2018 V8DOMConfiguration::installAttribute(instanceObject, prototypeObject, at tributeConfiguration, isolate); 1946 V8DOMConfiguration::installAttribute(instanceObject, prototypeObject, at tributeConfiguration, isolate);
2019 } 1947 }
2020 if (context && context->isDocument() && ContextFeatures::partialContextNameE nabled(toDocument(context))) { 1948 if (context && context->isDocument() && ContextFeatures::partialContextNameE nabled(toDocument(context))) {
2021 static const V8DOMConfiguration::AttributeConfiguration attributeConfigu ration =\ 1949 static const V8DOMConfiguration::AttributeConfiguration attributeConfigu ration =\
2022 {"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}; 1950 {"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};
2023 V8DOMConfiguration::installAttribute(instanceObject, prototypeObject, at tributeConfiguration, isolate); 1951 V8DOMConfiguration::installAttribute(instanceObject, prototypeObject, at tributeConfiguration, isolate);
2024 } 1952 }
2025 if (context && context->isDocument() && ContextFeatures::partialContextName3 Enabled(toDocument(context))) {
2026 static const V8DOMConfiguration::AttributeConfiguration attributeConfigu ration =\
2027 {"partial3LongAttribute", TestInterfaceImplementationV8Internal::partial 3LongAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::pa rtial3LongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessContr ol>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfigurati on::ExposedToAllScripts, V8DOMConfiguration::OnInstance};
2028 V8DOMConfiguration::installAttribute(instanceObject, prototypeObject, at tributeConfiguration, isolate);
2029 }
2030 if (context && context->isDocument() && ContextFeatures::partialContextName3 Enabled(toDocument(context))) {
2031 static const V8DOMConfiguration::AttributeConfiguration attributeConfigu ration =\
2032 {"partial3StaticLongAttribute", TestInterfaceImplementationV8Internal::p artial3StaticLongAttributeAttributeGetterCallback, TestInterfaceImplementationV8 Internal::partial3StaticLongAttributeAttributeSetterCallback, 0, 0, 0, static_ca st<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None) , V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance};
2033 V8DOMConfiguration::installAttribute(instanceObject, prototypeObject, at tributeConfiguration, isolate);
2034 }
2035 } 1953 }
2036 1954
2037 void V8TestInterface::installConditionallyEnabledMethods(v8::Handle<v8::Object> prototypeObject, v8::Isolate* isolate) 1955 void V8TestInterface::installConditionallyEnabledMethods(v8::Handle<v8::Object> prototypeObject, v8::Isolate* isolate)
2038 { 1956 {
2039 v8::Local<v8::Signature> defaultSignature = v8::Signature::New(isolate, domT emplate(isolate)); 1957 v8::Local<v8::Signature> defaultSignature = v8::Signature::New(isolate, domT emplate(isolate));
2040 ExecutionContext* context = toExecutionContext(prototypeObject->CreationCont ext()); 1958 ExecutionContext* context = toExecutionContext(prototypeObject->CreationCont ext());
2041 ASSERT(context); 1959 ASSERT(context);
2042 1960
2043 if (context && (context->isWorkerGlobalScope())) { 1961 if (context && (context->isWorkerGlobalScope())) {
2044 prototypeObject->Set(v8AtomicString(isolate, "workerExposedMethod"), v8: :FunctionTemplate::New(isolate, TestInterfaceImplementationV8Internal::workerExp osedMethodMethodCallback, v8Undefined(), defaultSignature, 0)->GetFunction()); 1962 prototypeObject->Set(v8AtomicString(isolate, "workerExposedMethod"), v8: :FunctionTemplate::New(isolate, TestInterfaceImplementationV8Internal::workerExp osedMethodMethodCallback, v8Undefined(), defaultSignature, 0)->GetFunction());
2045 } 1963 }
2046 if (context && (context->isDocument())) { 1964 if (context && (context->isDocument())) {
2047 prototypeObject->Set(v8AtomicString(isolate, "windowExposedMethod"), v8: :FunctionTemplate::New(isolate, TestInterfaceImplementationV8Internal::windowExp osedMethodMethodCallback, v8Undefined(), defaultSignature, 0)->GetFunction()); 1965 prototypeObject->Set(v8AtomicString(isolate, "windowExposedMethod"), v8: :FunctionTemplate::New(isolate, TestInterfaceImplementationV8Internal::windowExp osedMethodMethodCallback, v8Undefined(), defaultSignature, 0)->GetFunction());
2048 } 1966 }
2049 if (context && (context->isWorkerGlobalScope())) { 1967 if (context && (context->isWorkerGlobalScope())) {
2050 prototypeObject->Set(v8AtomicString(isolate, "workerExposedStaticMethod" ), v8::FunctionTemplate::New(isolate, TestInterfaceImplementationV8Internal::wor kerExposedStaticMethodMethodCallback, v8Undefined(), defaultSignature, 0)->GetFu nction()); 1968 prototypeObject->Set(v8AtomicString(isolate, "workerExposedStaticMethod" ), v8::FunctionTemplate::New(isolate, TestInterfaceImplementationV8Internal::wor kerExposedStaticMethodMethodCallback, v8Undefined(), defaultSignature, 0)->GetFu nction());
2051 } 1969 }
2052 if (context && (context->isDocument())) { 1970 if (context && (context->isDocument())) {
2053 prototypeObject->Set(v8AtomicString(isolate, "windowExposedStaticMethod" ), v8::FunctionTemplate::New(isolate, TestInterfaceImplementationV8Internal::win dowExposedStaticMethodMethodCallback, v8Undefined(), defaultSignature, 0)->GetFu nction()); 1971 prototypeObject->Set(v8AtomicString(isolate, "windowExposedStaticMethod" ), v8::FunctionTemplate::New(isolate, TestInterfaceImplementationV8Internal::win dowExposedStaticMethodMethodCallback, v8Undefined(), defaultSignature, 0)->GetFu nction());
2054 } 1972 }
2055 if (context && (context->isDocument() || context->isServiceWorkerGlobalScope ())) { 1973 if (context && (context->isDocument() || context->isServiceWorkerGlobalScope ())) {
2056 prototypeObject->Set(v8AtomicString(isolate, "windowAndServiceWorkerExpo sedMethod"), v8::FunctionTemplate::New(isolate, TestInterfaceImplementationV8Int ernal::windowAndServiceWorkerExposedMethodMethodCallback, v8Undefined(), default Signature, 0)->GetFunction()); 1974 prototypeObject->Set(v8AtomicString(isolate, "windowAndServiceWorkerExpo sedMethod"), v8::FunctionTemplate::New(isolate, TestInterfaceImplementationV8Int ernal::windowAndServiceWorkerExposedMethodMethodCallback, v8Undefined(), default Signature, 0)->GetFunction());
2057 } 1975 }
2058 if (context && context->isDocument() && ContextFeatures::partialContextName3 Enabled(toDocument(context))) {
2059 prototypeObject->Set(v8AtomicString(isolate, "voidMethodPartialOverload" ), v8::FunctionTemplate::New(isolate, TestInterfaceImplementationV8Internal::voi dMethodPartialOverloadMethodCallback, v8Undefined(), defaultSignature, 1)->GetFu nction());
2060 }
2061 if (context && context->isDocument() && ContextFeatures::partialContextName3 Enabled(toDocument(context))) {
2062 prototypeObject->Set(v8AtomicString(isolate, "voidMethodPartialOverload" ), v8::FunctionTemplate::New(isolate, TestInterfaceImplementationV8Internal::voi dMethodPartialOverloadMethodCallback, v8Undefined(), defaultSignature, 1)->GetFu nction());
2063 }
2064 } 1976 }
2065 1977
2066 ActiveDOMObject* V8TestInterface::toActiveDOMObject(v8::Handle<v8::Object> wrapp er) 1978 ActiveDOMObject* V8TestInterface::toActiveDOMObject(v8::Handle<v8::Object> wrapp er)
2067 { 1979 {
2068 return toImpl(wrapper); 1980 return toImpl(wrapper);
2069 } 1981 }
2070 1982
2071 void V8TestInterface::refObject(ScriptWrappableBase* scriptWrappableBase) 1983 void V8TestInterface::refObject(ScriptWrappableBase* scriptWrappableBase)
2072 { 1984 {
2073 scriptWrappableBase->toImpl<TestInterfaceImplementation>()->ref(); 1985 scriptWrappableBase->toImpl<TestInterfaceImplementation>()->ref();
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
2154 if (!scriptState->executionContext()) 2066 if (!scriptState->executionContext())
2155 return false; 2067 return false;
2156 2068
2157 ScriptState::Scope scope(scriptState); 2069 ScriptState::Scope scope(scriptState);
2158 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob al(), scriptState->isolate()); 2070 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob al(), scriptState->isolate());
2159 2071
2160 ExceptionState exceptionState(ExceptionState::SetterContext, "stringAttribut e", "TestInterfaceImplementation", scriptState->context()->Global(), scriptState ->isolate()); 2072 ExceptionState exceptionState(ExceptionState::SetterContext, "stringAttribut e", "TestInterfaceImplementation", scriptState->context()->Global(), scriptState ->isolate());
2161 return PrivateScriptRunner::runDOMAttributeSetter(scriptState, scriptStateIn UserScript, "TestInterfaceImplementation", "stringAttribute", holder, v8String(s criptState->isolate(), cppValue)); 2073 return PrivateScriptRunner::runDOMAttributeSetter(scriptState, scriptStateIn UserScript, "TestInterfaceImplementation", "stringAttribute", holder, v8String(s criptState->isolate(), cppValue));
2162 } 2074 }
2163 2075
2076 InstallTemplateFunction V8TestInterface::installV8TestInterfaceTemplateFunction = (InstallTemplateFunction)&V8TestInterface::installV8TestInterfaceTemplate;
2077
2078 void V8TestInterface::updateWrapperTypeInfo(InstallTemplateFunction installTempl ateFunction, InstallConditionallyEnabledMethodsFunction installConditionallyEnab ledMethodsFunction)
2079 {
2080 V8TestInterface::installV8TestInterfaceTemplateFunction = installTemplateFun ction;
2081 if (installConditionallyEnabledMethodsFunction)
2082 V8TestInterface::wrapperTypeInfo.installConditionallyEnabledMethodsFunct ion = installConditionallyEnabledMethodsFunction;
2083 }
2084
2085 void V8TestInterface::registerVoidMethodPartialOverloadMethodForPartialInterface (void (*method)(const v8::FunctionCallbackInfo<v8::Value>&))
2086 {
2087 TestInterfaceImplementationV8Internal::voidMethodPartialOverloadMethodForPar tialInterface = method;
2088 }
2089 void V8TestInterface::registerStaticVoidMethodPartialOverloadMethodForPartialInt erface(void (*method)(const v8::FunctionCallbackInfo<v8::Value>&))
2090 {
2091 TestInterfaceImplementationV8Internal::staticVoidMethodPartialOverloadMethod ForPartialInterface = method;
2092 }
2093 void V8TestInterface::registerPartial2VoidMethodMethodForPartialInterface(void ( *method)(const v8::FunctionCallbackInfo<v8::Value>&))
2094 {
2095 TestInterfaceImplementationV8Internal::partial2VoidMethodMethodForPartialInt erface = method;
2096 }
2097 void V8TestInterface::registerPartial2StaticVoidMethodMethodForPartialInterface( void (*method)(const v8::FunctionCallbackInfo<v8::Value>&))
2098 {
2099 TestInterfaceImplementationV8Internal::partial2StaticVoidMethodMethodForPart ialInterface = method;
2100 }
2164 } // namespace blink 2101 } // namespace blink
2165 #endif // ENABLE(CONDITION) 2102 #endif // ENABLE(CONDITION)
OLDNEW
« no previous file with comments | « Source/bindings/tests/results/core/V8TestInterface.h ('k') | Source/bindings/tests/results/modules/V8TestInterfacePartial.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698