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

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: 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::createPersistentHandle, V8TestInterface::toActiveDOMObj ect, 0, V8TestInterface::visitDOMWrapper, V8TestInterface::installConditionallyE nabledMethods, V8TestInterface::installConditionallyEnabledProperties, &V8TestIn terfaceEmpty::wrapperTypeInfo, WrapperTypeInfo::WrapperTypeObjectPrototype, Wrap perTypeInfo::ObjectClassId, WrapperTypeInfo::Dependent, WrapperTypeInfo::RefCoun tedObject }; 39 WrapperTypeInfo V8TestInterface::wrapperTypeInfo = { gin::kEmbedderBlink, V8Test Interface::domTemplate, V8TestInterface::refObject, V8TestInterface::derefObject , V8TestInterface::createPersistentHandle, V8TestInterface::toActiveDOMObject, 0 , V8TestInterface::visitDOMWrapper, V8TestInterface::installConditionallyEnabled Methods, V8TestInterface::installConditionallyEnabledProperties, &V8TestInterfac eEmpty::wrapperTypeInfo, WrapperTypeInfo::WrapperTypeObjectPrototype, WrapperTyp eInfo::ObjectClassId, WrapperTypeInfo::Dependent, WrapperTypeInfo::RefCountedObj ect };
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())) {
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;
1425 default:
haraken 2014/10/16 04:24:09 Do we need this default block? I'm fine with havi
tasak 2014/10/17 07:38:18 Done.
1426 (voidMethodPartialOverloadMethodForPartialInterface)(info);
1460 return; 1427 return;
1461 } 1428 }
1462 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); 1429 (voidMethodPartialOverloadMethodForPartialInterface)(info);
haraken 2014/10/16 04:24:09 Can we add: ASSERT(voidMethodPartialOverloadMet
tasak 2014/10/17 07:38:18 Done.
1463 V8StringResource<> value;
1464 {
1465 TOSTRING_VOID_INTERNAL(value, info[0]);
1466 }
1467 TestPartialInterfaceImplementation3::voidMethodPartialOverload(*impl, value) ;
1468 } 1430 }
1469 1431
1470 static void voidMethodPartialOverloadMethodCallback(const v8::FunctionCallbackIn fo<v8::Value>& info) 1432 static void voidMethodPartialOverloadMethodCallback(const v8::FunctionCallbackIn fo<v8::Value>& info)
1471 { 1433 {
1472 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 1434 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
1473 TestInterfaceImplementationV8Internal::voidMethodPartialOverloadMethod(info) ; 1435 TestInterfaceImplementationV8Internal::voidMethodPartialOverloadMethod(info) ;
1474 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 1436 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
1475 } 1437 }
1476 1438
1477 static void voidMethodPartialOverloadMethod(const v8::FunctionCallbackInfo<v8::V alue>& info) 1439 static void staticVoidMethodPartialOverloadMethod(const v8::FunctionCallbackInfo <v8::Value>& info)
1478 { 1440 {
1479 if (UNLIKELY(info.Length() < 1)) { 1441 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()); 1442 switch (std::min(1, info.Length())) {
1443 case 0:
1444 if (true) {
1445 staticVoidMethodPartialOverload1Method(info);
1446 return;
1447 }
1448 break;
1449 case 1:
1450 break;
1451 default:
1452 (staticVoidMethodPartialOverloadMethodForPartialInterface)(info);
1481 return; 1453 return;
1482 } 1454 }
1483 V8StringResource<> value; 1455 (staticVoidMethodPartialOverloadMethodForPartialInterface)(info);
1484 {
1485 TOSTRING_VOID_INTERNAL(value, info[0]);
1486 }
1487 TestPartialInterfaceImplementation3::voidMethodPartialOverload(value);
1488 } 1456 }
1489 1457
1490 static void voidMethodPartialOverloadMethodCallback(const v8::FunctionCallbackIn fo<v8::Value>& info) 1458 static void staticVoidMethodPartialOverloadMethodCallback(const v8::FunctionCall backInfo<v8::Value>& info)
1491 { 1459 {
1492 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 1460 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
1493 TestInterfaceImplementationV8Internal::voidMethodPartialOverloadMethod(info) ; 1461 TestInterfaceImplementationV8Internal::staticVoidMethodPartialOverloadMethod (info);
1494 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 1462 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
1495 } 1463 }
1496 1464
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) 1465 static void partial2VoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
1508 { 1466 {
1509 ExceptionState exceptionState(ExceptionState::ExecutionContext, "partial2Voi dMethod", "TestInterface", info.Holder(), info.GetIsolate()); 1467 ExceptionState exceptionState(ExceptionState::ExecutionContext, "partial2Voi dMethod", "TestInterface", info.Holder(), info.GetIsolate());
1510 switch (std::min(1, info.Length())) { 1468 switch (std::min(1, info.Length())) {
1511 case 0: 1469 case 0:
1512 if (true) { 1470 if (true) {
1513 partial2VoidMethod1Method(info); 1471 partial2VoidMethod1Method(info);
1514 return; 1472 return;
1515 } 1473 }
1516 break; 1474 break;
1517 case 1: 1475 case 1:
1518 if (true) {
1519 partial2VoidMethod2Method(info);
1520 return;
1521 }
1522 break; 1476 break;
1523 default: 1477 default:
1524 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(0, i nfo.Length())); 1478 (partial2VoidMethodMethodForPartialInterface)(info);
1525 exceptionState.throwIfNeeded();
1526 return; 1479 return;
1527 } 1480 }
1528 exceptionState.throwTypeError("No function was found that matched the signat ure provided."); 1481 (partial2VoidMethodMethodForPartialInterface)(info);
1529 exceptionState.throwIfNeeded();
1530 } 1482 }
1531 1483
1532 static void partial2VoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8:: Value>& info) 1484 static void partial2VoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8:: Value>& info)
1533 { 1485 {
1534 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 1486 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
1535 TestInterfaceImplementationV8Internal::partial2VoidMethodMethod(info); 1487 TestInterfaceImplementationV8Internal::partial2VoidMethodMethod(info);
1536 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 1488 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
1537 } 1489 }
1538 1490
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) 1491 static void partial2StaticVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Va lue>& info)
1549 { 1492 {
1550 ExceptionState exceptionState(ExceptionState::ExecutionContext, "partial2Sta ticVoidMethod", "TestInterface", info.Holder(), info.GetIsolate()); 1493 ExceptionState exceptionState(ExceptionState::ExecutionContext, "partial2Sta ticVoidMethod", "TestInterface", info.Holder(), info.GetIsolate());
1551 switch (std::min(1, info.Length())) { 1494 switch (std::min(1, info.Length())) {
1552 case 0: 1495 case 0:
1553 if (true) { 1496 if (true) {
1554 partial2StaticVoidMethod1Method(info); 1497 partial2StaticVoidMethod1Method(info);
1555 return; 1498 return;
1556 } 1499 }
1557 break; 1500 break;
1558 case 1: 1501 case 1:
1559 if (true) {
1560 partial2StaticVoidMethod2Method(info);
1561 return;
1562 }
1563 break; 1502 break;
1564 default: 1503 default:
1565 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(0, i nfo.Length())); 1504 (partial2StaticVoidMethodMethodForPartialInterface)(info);
1566 exceptionState.throwIfNeeded();
1567 return; 1505 return;
1568 } 1506 }
1569 exceptionState.throwTypeError("No function was found that matched the signat ure provided."); 1507 (partial2StaticVoidMethodMethodForPartialInterface)(info);
1570 exceptionState.throwIfNeeded();
1571 } 1508 }
1572 1509
1573 static void partial2StaticVoidMethodMethodCallback(const v8::FunctionCallbackInf o<v8::Value>& info) 1510 static void partial2StaticVoidMethodMethodCallback(const v8::FunctionCallbackInf o<v8::Value>& info)
1574 { 1511 {
1575 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 1512 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
1576 TestInterfaceImplementationV8Internal::partial2StaticVoidMethodMethod(info); 1513 TestInterfaceImplementationV8Internal::partial2StaticVoidMethodMethod(info);
1577 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 1514 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
1578 } 1515 }
1579 1516
1580 static void toStringMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 1517 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}, 1728 {"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}, 1729 {"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 }; 1730 };
1794 1731
1795 static const V8DOMConfiguration::MethodConfiguration V8TestInterfaceMethods[] = { 1732 static const V8DOMConfiguration::MethodConfiguration V8TestInterfaceMethods[] = {
1796 {"voidMethodTestInterfaceEmptyArg", TestInterfaceImplementationV8Internal::v oidMethodTestInterfaceEmptyArgMethodCallback, 0, 1, V8DOMConfiguration::ExposedT oAllScripts}, 1733 {"voidMethodTestInterfaceEmptyArg", TestInterfaceImplementationV8Internal::v oidMethodTestInterfaceEmptyArgMethodCallback, 0, 1, V8DOMConfiguration::ExposedT oAllScripts},
1797 {"voidMethodDoubleArgFloatArg", TestInterfaceImplementationV8Internal::voidM ethodDoubleArgFloatArgMethodCallback, 0, 2, V8DOMConfiguration::ExposedToAllScri pts}, 1734 {"voidMethodDoubleArgFloatArg", TestInterfaceImplementationV8Internal::voidM ethodDoubleArgFloatArgMethodCallback, 0, 2, V8DOMConfiguration::ExposedToAllScri pts},
1798 {"voidMethodUnrestrictedDoubleArgUnrestrictedFloatArg", TestInterfaceImpleme ntationV8Internal::voidMethodUnrestrictedDoubleArgUnrestrictedFloatArgMethodCall back, 0, 2, V8DOMConfiguration::ExposedToAllScripts}, 1735 {"voidMethodUnrestrictedDoubleArgUnrestrictedFloatArg", TestInterfaceImpleme ntationV8Internal::voidMethodUnrestrictedDoubleArgUnrestrictedFloatArgMethodCall back, 0, 2, V8DOMConfiguration::ExposedToAllScripts},
1799 {"voidMethod", TestInterfaceImplementationV8Internal::voidMethodMethodCallba ck, TestInterfaceImplementationV8Internal::voidMethodMethodCallbackForMainWorld, 0, V8DOMConfiguration::ExposedToAllScripts}, 1736 {"voidMethod", TestInterfaceImplementationV8Internal::voidMethodMethodCallba ck, TestInterfaceImplementationV8Internal::voidMethodMethodCallbackForMainWorld, 0, V8DOMConfiguration::ExposedToAllScripts},
1800 {"alwaysExposedMethod", TestInterfaceImplementationV8Internal::alwaysExposed MethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, 1737 {"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}, 1738 {"implementsVoidMethod", TestInterfaceImplementationV8Internal::implementsVo idMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts},
1803 {"implementsComplexMethod", TestInterfaceImplementationV8Internal::implement sComplexMethodMethodCallback, 0, 2, V8DOMConfiguration::ExposedToAllScripts}, 1739 {"implementsComplexMethod", TestInterfaceImplementationV8Internal::implement sComplexMethodMethodCallback, 0, 2, V8DOMConfiguration::ExposedToAllScripts},
1804 {"implementsCustomVoidMethod", TestInterfaceImplementationV8Internal::implem entsCustomVoidMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScript s}, 1740 {"implementsCustomVoidMethod", TestInterfaceImplementationV8Internal::implem entsCustomVoidMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScript s},
1805 {"implements3VoidMethod", TestInterfaceImplementationV8Internal::implements3 VoidMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, 1741 {"implements3VoidMethod", TestInterfaceImplementationV8Internal::implements3 VoidMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts},
1742 {"voidMethodPartialOverload", TestInterfaceImplementationV8Internal::voidMet hodPartialOverloadMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts} ,
1806 {"partial2VoidMethod", TestInterfaceImplementationV8Internal::partial2VoidMe thodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, 1743 {"partial2VoidMethod", TestInterfaceImplementationV8Internal::partial2VoidMe thodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts},
1807 }; 1744 };
1808 1745
1809 static void installV8TestInterfaceTemplate(v8::Handle<v8::FunctionTemplate> func tionTemplate, v8::Isolate* isolate) 1746 void V8TestInterface::installV8TestInterfaceTemplate(v8::Handle<v8::FunctionTemp late> functionTemplate, v8::Isolate* isolate)
1810 { 1747 {
1811 functionTemplate->ReadOnlyPrototype(); 1748 functionTemplate->ReadOnlyPrototype();
1812 1749
1813 v8::Local<v8::Signature> defaultSignature; 1750 v8::Local<v8::Signature> defaultSignature;
1814 if (!RuntimeEnabledFeatures::featureNameEnabled()) 1751 if (!RuntimeEnabledFeatures::featureNameEnabled())
1815 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(functionT emplate, "", V8TestInterfaceEmpty::domTemplate(isolate), V8TestInterface::intern alFieldCount, 0, 0, 0, 0, 0, 0, isolate); 1752 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(functionT emplate, "", V8TestInterfaceEmpty::domTemplate(isolate), V8TestInterface::intern alFieldCount, 0, 0, 0, 0, 0, 0, isolate);
1816 else 1753 else
1817 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(functionT emplate, "TestInterface", V8TestInterfaceEmpty::domTemplate(isolate), V8TestInte rface::internalFieldCount, 1754 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(functionT emplate, "TestInterface", V8TestInterfaceEmpty::domTemplate(isolate), V8TestInte rface::internalFieldCount,
1818 V8TestInterfaceAttributes, WTF_ARRAY_LENGTH(V8TestInterfaceAttribute s), 1755 V8TestInterfaceAttributes, WTF_ARRAY_LENGTH(V8TestInterfaceAttribute s),
1819 0, 0, 1756 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}; 1797 {"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); 1798 V8DOMConfiguration::installAttribute(instanceTemplate, prototypeTemplate , attributeConfiguration, isolate);
1862 } 1799 }
1863 #endif // ENABLE(PARTIAL_CONDITION) 1800 #endif // ENABLE(PARTIAL_CONDITION)
1864 static const V8DOMConfiguration::ConstantConfiguration V8TestInterfaceConsta nts[] = { 1801 static const V8DOMConfiguration::ConstantConfiguration V8TestInterfaceConsta nts[] = {
1865 {"UNSIGNED_LONG", 0, 0, 0, V8DOMConfiguration::ConstantTypeUnsignedLong} , 1802 {"UNSIGNED_LONG", 0, 0, 0, V8DOMConfiguration::ConstantTypeUnsignedLong} ,
1866 {"CONST_JAVASCRIPT", 1, 0, 0, V8DOMConfiguration::ConstantTypeShort}, 1803 {"CONST_JAVASCRIPT", 1, 0, 0, V8DOMConfiguration::ConstantTypeShort},
1867 {"IMPLEMENTS_CONSTANT_1", 1, 0, 0, V8DOMConfiguration::ConstantTypeUnsig nedShort}, 1804 {"IMPLEMENTS_CONSTANT_1", 1, 0, 0, V8DOMConfiguration::ConstantTypeUnsig nedShort},
1868 {"IMPLEMENTS_CONSTANT_2", 2, 0, 0, V8DOMConfiguration::ConstantTypeUnsig nedShort}, 1805 {"IMPLEMENTS_CONSTANT_2", 2, 0, 0, V8DOMConfiguration::ConstantTypeUnsig nedShort},
1869 {"PARTIAL2_UNSIGNED_SHORT", 0, 0, 0, V8DOMConfiguration::ConstantTypeUns ignedShort}, 1806 {"PARTIAL2_UNSIGNED_SHORT", 0, 0, 0, V8DOMConfiguration::ConstantTypeUns ignedShort},
1870 {"PARTIAL3_UNSIGNED_SHORT", 0, 0, 0, V8DOMConfiguration::ConstantTypeUns ignedShort},
1871 }; 1807 };
1872 V8DOMConfiguration::installConstants(functionTemplate, prototypeTemplate, V8 TestInterfaceConstants, WTF_ARRAY_LENGTH(V8TestInterfaceConstants), isolate); 1808 V8DOMConfiguration::installConstants(functionTemplate, prototypeTemplate, V8 TestInterfaceConstants, WTF_ARRAY_LENGTH(V8TestInterfaceConstants), isolate);
1873 if (RuntimeEnabledFeatures::partialFeatureNameEnabled()) { 1809 if (RuntimeEnabledFeatures::partialFeatureNameEnabled()) {
1874 static const V8DOMConfiguration::ConstantConfiguration constantConfigura tion = {"PARTIAL_UNSIGNED_SHORT", 0, 0, 0, V8DOMConfiguration::ConstantTypeUnsig nedShort}; 1810 static const V8DOMConfiguration::ConstantConfiguration constantConfigura tion = {"PARTIAL_UNSIGNED_SHORT", 0, 0, 0, V8DOMConfiguration::ConstantTypeUnsig nedShort};
1875 V8DOMConfiguration::installConstants(functionTemplate, prototypeTemplate , &constantConfiguration, 1, isolate); 1811 V8DOMConfiguration::installConstants(functionTemplate, prototypeTemplate , &constantConfiguration, 1, isolate);
1876 } 1812 }
1877 functionTemplate->InstanceTemplate()->SetIndexedPropertyHandler(TestInterfac eImplementationV8Internal::indexedPropertyGetterCallback, TestInterfaceImplement ationV8Internal::indexedPropertySetterCallback, 0, TestInterfaceImplementationV8 Internal::indexedPropertyDeleterCallback, indexedPropertyEnumerator<TestInterfac eImplementation>); 1813 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); 1814 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 }; 1815 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); 1816 V8DOMConfiguration::installMethod(prototypeTemplate, defaultSignature, v8::D ontDelete, symbolKeyedIteratorConfiguration, isolate);
1881 functionTemplate->InstanceTemplate()->SetCallAsFunctionHandler(V8TestInterfa ce::legacyCallCustom); 1817 functionTemplate->InstanceTemplate()->SetCallAsFunctionHandler(V8TestInterfa ce::legacyCallCustom);
1882 static const V8DOMConfiguration::MethodConfiguration alwaysExposedStaticMeth odMethodConfiguration = { 1818 static const V8DOMConfiguration::MethodConfiguration alwaysExposedStaticMeth odMethodConfiguration = {
1883 "alwaysExposedStaticMethod", TestInterfaceImplementationV8Internal::alwa ysExposedStaticMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScrip ts, 1819 "alwaysExposedStaticMethod", TestInterfaceImplementationV8Internal::alwa ysExposedStaticMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScrip ts,
1884 }; 1820 };
1885 V8DOMConfiguration::installMethod(functionTemplate, v8::Local<v8::Signature> (), v8::None, alwaysExposedStaticMethodMethodConfiguration, isolate); 1821 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 = { 1822 static const V8DOMConfiguration::MethodConfiguration implementsStaticVoidMet hodMethodConfiguration = {
1891 "implementsStaticVoidMethod", TestInterfaceImplementationV8Internal::imp lementsStaticVoidMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScr ipts, 1823 "implementsStaticVoidMethod", TestInterfaceImplementationV8Internal::imp lementsStaticVoidMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScr ipts,
1892 }; 1824 };
1893 V8DOMConfiguration::installMethod(functionTemplate, v8::Local<v8::Signature> (), v8::None, implementsStaticVoidMethodMethodConfiguration, isolate); 1825 V8DOMConfiguration::installMethod(functionTemplate, v8::Local<v8::Signature> (), v8::None, implementsStaticVoidMethodMethodConfiguration, isolate);
1894 if (RuntimeEnabledFeatures::implements2FeatureNameEnabled()) { 1826 if (RuntimeEnabledFeatures::implements2FeatureNameEnabled()) {
1895 static const V8DOMConfiguration::MethodConfiguration implements2VoidMeth odMethodConfiguration = { 1827 static const V8DOMConfiguration::MethodConfiguration implements2VoidMeth odMethodConfiguration = {
1896 "implements2VoidMethod", TestInterfaceImplementationV8Internal::impl ements2VoidMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts, 1828 "implements2VoidMethod", TestInterfaceImplementationV8Internal::impl ements2VoidMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts,
1897 }; 1829 };
1898 V8DOMConfiguration::installMethod(prototypeTemplate, defaultSignature, v 8::None, implements2VoidMethodMethodConfiguration, isolate); 1830 V8DOMConfiguration::installMethod(prototypeTemplate, defaultSignature, v 8::None, implements2VoidMethodMethodConfiguration, isolate);
1899 } 1831 }
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
1942 } 1874 }
1943 #endif // ENABLE(PARTIAL_CONDITION) 1875 #endif // ENABLE(PARTIAL_CONDITION)
1944 #if ENABLE(PARTIAL_CONDITION) 1876 #if ENABLE(PARTIAL_CONDITION)
1945 if (RuntimeEnabledFeatures::partialFeatureNameEnabled()) { 1877 if (RuntimeEnabledFeatures::partialFeatureNameEnabled()) {
1946 static const V8DOMConfiguration::MethodConfiguration shortMethodWithShor tArgumentImplementedInPrivateScriptMethodConfiguration = { 1878 static const V8DOMConfiguration::MethodConfiguration shortMethodWithShor tArgumentImplementedInPrivateScriptMethodConfiguration = {
1947 "shortMethodWithShortArgumentImplementedInPrivateScript", TestInterf aceImplementationV8Internal::shortMethodWithShortArgumentImplementedInPrivateScr iptMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts, 1879 "shortMethodWithShortArgumentImplementedInPrivateScript", TestInterf aceImplementationV8Internal::shortMethodWithShortArgumentImplementedInPrivateScr iptMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts,
1948 }; 1880 };
1949 V8DOMConfiguration::installMethod(prototypeTemplate, defaultSignature, v 8::None, shortMethodWithShortArgumentImplementedInPrivateScriptMethodConfigurati on, isolate); 1881 V8DOMConfiguration::installMethod(prototypeTemplate, defaultSignature, v 8::None, shortMethodWithShortArgumentImplementedInPrivateScriptMethodConfigurati on, isolate);
1950 } 1882 }
1951 #endif // ENABLE(PARTIAL_CONDITION) 1883 #endif // ENABLE(PARTIAL_CONDITION)
1884 static const V8DOMConfiguration::MethodConfiguration staticVoidMethodPartial OverloadMethodConfiguration = {
1885 "staticVoidMethodPartialOverload", TestInterfaceImplementationV8Internal ::staticVoidMethodPartialOverloadMethodCallback, 0, 0, V8DOMConfiguration::Expos edToAllScripts,
1886 };
1887 V8DOMConfiguration::installMethod(functionTemplate, v8::Local<v8::Signature> (), v8::None, staticVoidMethodPartialOverloadMethodConfiguration, isolate);
1952 static const V8DOMConfiguration::MethodConfiguration partial2StaticVoidMetho dMethodConfiguration = { 1888 static const V8DOMConfiguration::MethodConfiguration partial2StaticVoidMetho dMethodConfiguration = {
1953 "partial2StaticVoidMethod", TestInterfaceImplementationV8Internal::parti al2StaticVoidMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts , 1889 "partial2StaticVoidMethod", TestInterfaceImplementationV8Internal::parti al2StaticVoidMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts ,
1954 }; 1890 };
1955 V8DOMConfiguration::installMethod(functionTemplate, v8::Local<v8::Signature> (), v8::None, partial2StaticVoidMethodMethodConfiguration, isolate); 1891 V8DOMConfiguration::installMethod(functionTemplate, v8::Local<v8::Signature> (), v8::None, partial2StaticVoidMethodMethodConfiguration, isolate);
1956 static const V8DOMConfiguration::MethodConfiguration toStringMethodConfigura tion = { 1892 static const V8DOMConfiguration::MethodConfiguration toStringMethodConfigura tion = {
1957 "toString", TestInterfaceImplementationV8Internal::toStringMethodCallbac k, 0, 0, V8DOMConfiguration::ExposedToAllScripts, 1893 "toString", TestInterfaceImplementationV8Internal::toStringMethodCallbac k, 0, 0, V8DOMConfiguration::ExposedToAllScripts,
1958 }; 1894 };
1959 V8DOMConfiguration::installMethod(prototypeTemplate, defaultSignature, stati c_cast<v8::PropertyAttribute>(v8::DontDelete | v8::DontEnum), toStringMethodConf iguration, isolate); 1895 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)); 1896 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)); 1897 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)); 1898 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)); 1899 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)); 1900 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) 1901 #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)); 1902 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) 1903 #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)); 1904 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 1905
1971 // Custom toString template 1906 // Custom toString template
1972 functionTemplate->Set(v8AtomicString(isolate, "toString"), V8PerIsolateData: :from(isolate)->toStringTemplate()); 1907 functionTemplate->Set(v8AtomicString(isolate, "toString"), V8PerIsolateData: :from(isolate)->toStringTemplate());
1973 } 1908 }
1974 1909
1975 v8::Handle<v8::FunctionTemplate> V8TestInterface::domTemplate(v8::Isolate* isola te) 1910 v8::Handle<v8::FunctionTemplate> V8TestInterface::domTemplate(v8::Isolate* isola te)
1976 { 1911 {
1977 return V8DOMConfiguration::domClassTemplate(isolate, const_cast<WrapperTypeI nfo*>(&wrapperTypeInfo), installV8TestInterfaceTemplate); 1912 ASSERT(V8TestInterface::installV8TestInterfaceTemplateFunction != V8TestInte rface::installV8TestInterfaceTemplate);
1913 return V8DOMConfiguration::domClassTemplate(isolate, const_cast<WrapperTypeI nfo*>(&wrapperTypeInfo), V8TestInterface::installV8TestInterfaceTemplateFunction );
1978 } 1914 }
1979 1915
1980 bool V8TestInterface::hasInstance(v8::Handle<v8::Value> v8Value, v8::Isolate* is olate) 1916 bool V8TestInterface::hasInstance(v8::Handle<v8::Value> v8Value, v8::Isolate* is olate)
1981 { 1917 {
1982 return V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, v8Valu e); 1918 return V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, v8Valu e);
1983 } 1919 }
1984 1920
1985 v8::Handle<v8::Object> V8TestInterface::findInstanceInPrototypeChain(v8::Handle< v8::Value> v8Value, v8::Isolate* isolate) 1921 v8::Handle<v8::Object> V8TestInterface::findInstanceInPrototypeChain(v8::Handle< v8::Value> v8Value, v8::Isolate* isolate)
1986 { 1922 {
1987 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe rTypeInfo, v8Value); 1923 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe rTypeInfo, v8Value);
(...skipping 27 matching lines...) Expand all
2015 if (context && context->isDocument() && ContextFeatures::partialContextNameE nabled(toDocument(context))) { 1951 if (context && context->isDocument() && ContextFeatures::partialContextNameE nabled(toDocument(context))) {
2016 static const V8DOMConfiguration::AttributeConfiguration attributeConfigu ration =\ 1952 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}; 1953 {"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); 1954 V8DOMConfiguration::installAttribute(instanceObject, prototypeObject, at tributeConfiguration, isolate);
2019 } 1955 }
2020 if (context && context->isDocument() && ContextFeatures::partialContextNameE nabled(toDocument(context))) { 1956 if (context && context->isDocument() && ContextFeatures::partialContextNameE nabled(toDocument(context))) {
2021 static const V8DOMConfiguration::AttributeConfiguration attributeConfigu ration =\ 1957 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}; 1958 {"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); 1959 V8DOMConfiguration::installAttribute(instanceObject, prototypeObject, at tributeConfiguration, isolate);
2024 } 1960 }
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 } 1961 }
2036 1962
2037 void V8TestInterface::installConditionallyEnabledMethods(v8::Handle<v8::Object> prototypeObject, v8::Isolate* isolate) 1963 void V8TestInterface::installConditionallyEnabledMethods(v8::Handle<v8::Object> prototypeObject, v8::Isolate* isolate)
2038 { 1964 {
2039 v8::Local<v8::Signature> defaultSignature = v8::Signature::New(isolate, domT emplate(isolate)); 1965 v8::Local<v8::Signature> defaultSignature = v8::Signature::New(isolate, domT emplate(isolate));
2040 ExecutionContext* context = toExecutionContext(prototypeObject->CreationCont ext()); 1966 ExecutionContext* context = toExecutionContext(prototypeObject->CreationCont ext());
2041 ASSERT(context); 1967 ASSERT(context);
2042 1968
2043 if (context && (context->isWorkerGlobalScope())) { 1969 if (context && (context->isWorkerGlobalScope())) {
2044 prototypeObject->Set(v8AtomicString(isolate, "workerExposedMethod"), v8: :FunctionTemplate::New(isolate, TestInterfaceImplementationV8Internal::workerExp osedMethodMethodCallback, v8Undefined(), defaultSignature, 0)->GetFunction()); 1970 prototypeObject->Set(v8AtomicString(isolate, "workerExposedMethod"), v8: :FunctionTemplate::New(isolate, TestInterfaceImplementationV8Internal::workerExp osedMethodMethodCallback, v8Undefined(), defaultSignature, 0)->GetFunction());
2045 } 1971 }
2046 if (context && (context->isDocument())) { 1972 if (context && (context->isDocument())) {
2047 prototypeObject->Set(v8AtomicString(isolate, "windowExposedMethod"), v8: :FunctionTemplate::New(isolate, TestInterfaceImplementationV8Internal::windowExp osedMethodMethodCallback, v8Undefined(), defaultSignature, 0)->GetFunction()); 1973 prototypeObject->Set(v8AtomicString(isolate, "windowExposedMethod"), v8: :FunctionTemplate::New(isolate, TestInterfaceImplementationV8Internal::windowExp osedMethodMethodCallback, v8Undefined(), defaultSignature, 0)->GetFunction());
2048 } 1974 }
2049 if (context && (context->isWorkerGlobalScope())) { 1975 if (context && (context->isWorkerGlobalScope())) {
2050 prototypeObject->Set(v8AtomicString(isolate, "workerExposedStaticMethod" ), v8::FunctionTemplate::New(isolate, TestInterfaceImplementationV8Internal::wor kerExposedStaticMethodMethodCallback, v8Undefined(), defaultSignature, 0)->GetFu nction()); 1976 prototypeObject->Set(v8AtomicString(isolate, "workerExposedStaticMethod" ), v8::FunctionTemplate::New(isolate, TestInterfaceImplementationV8Internal::wor kerExposedStaticMethodMethodCallback, v8Undefined(), defaultSignature, 0)->GetFu nction());
2051 } 1977 }
2052 if (context && (context->isDocument())) { 1978 if (context && (context->isDocument())) {
2053 prototypeObject->Set(v8AtomicString(isolate, "windowExposedStaticMethod" ), v8::FunctionTemplate::New(isolate, TestInterfaceImplementationV8Internal::win dowExposedStaticMethodMethodCallback, v8Undefined(), defaultSignature, 0)->GetFu nction()); 1979 prototypeObject->Set(v8AtomicString(isolate, "windowExposedStaticMethod" ), v8::FunctionTemplate::New(isolate, TestInterfaceImplementationV8Internal::win dowExposedStaticMethodMethodCallback, v8Undefined(), defaultSignature, 0)->GetFu nction());
2054 } 1980 }
2055 if (context && (context->isDocument() || context->isServiceWorkerGlobalScope ())) { 1981 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()); 1982 prototypeObject->Set(v8AtomicString(isolate, "windowAndServiceWorkerExpo sedMethod"), v8::FunctionTemplate::New(isolate, TestInterfaceImplementationV8Int ernal::windowAndServiceWorkerExposedMethodMethodCallback, v8Undefined(), default Signature, 0)->GetFunction());
2057 } 1983 }
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 } 1984 }
2065 1985
2066 ActiveDOMObject* V8TestInterface::toActiveDOMObject(v8::Handle<v8::Object> wrapp er) 1986 ActiveDOMObject* V8TestInterface::toActiveDOMObject(v8::Handle<v8::Object> wrapp er)
2067 { 1987 {
2068 return toImpl(wrapper); 1988 return toImpl(wrapper);
2069 } 1989 }
2070 1990
2071 1991
2072 void V8TestInterface::refObject(ScriptWrappableBase* internalPointer) 1992 void V8TestInterface::refObject(ScriptWrappableBase* internalPointer)
2073 { 1993 {
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
2161 if (!scriptState->executionContext()) 2081 if (!scriptState->executionContext())
2162 return false; 2082 return false;
2163 2083
2164 ScriptState::Scope scope(scriptState); 2084 ScriptState::Scope scope(scriptState);
2165 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob al(), scriptState->isolate()); 2085 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob al(), scriptState->isolate());
2166 2086
2167 ExceptionState exceptionState(ExceptionState::SetterContext, "stringAttribut e", "TestInterfaceImplementation", scriptState->context()->Global(), scriptState ->isolate()); 2087 ExceptionState exceptionState(ExceptionState::SetterContext, "stringAttribut e", "TestInterfaceImplementation", scriptState->context()->Global(), scriptState ->isolate());
2168 return PrivateScriptRunner::runDOMAttributeSetter(scriptState, scriptStateIn UserScript, "TestInterfaceImplementation", "stringAttribute", holder, v8String(s criptState->isolate(), cppValue)); 2088 return PrivateScriptRunner::runDOMAttributeSetter(scriptState, scriptStateIn UserScript, "TestInterfaceImplementation", "stringAttribute", holder, v8String(s criptState->isolate(), cppValue));
2169 } 2089 }
2170 2090
2091 InstallTemplateFunction V8TestInterface::installV8TestInterfaceTemplateFunction = (InstallTemplateFunction)&V8TestInterface::installV8TestInterfaceTemplate;
2092
2093 void V8TestInterface::updateWrapperTypeInfo(InstallTemplateFunction installTempl ateFunction, InstallConditionallyEnabledMethodsFunction installConditionallyEnab ledMethodsFunction)
2094 {
2095 V8TestInterface::installV8TestInterfaceTemplateFunction = installTemplateFun ction;
2096 if (installConditionallyEnabledMethodsFunction)
2097 V8TestInterface::wrapperTypeInfo.installConditionallyEnabledMethodsFunct ion = installConditionallyEnabledMethodsFunction;
2098 }
2099
2100 void V8TestInterface::registerVoidMethodPartialOverloadMethodForPartialInterface (void (*method)(const v8::FunctionCallbackInfo<v8::Value>&))
2101 {
2102 TestInterfaceImplementationV8Internal::voidMethodPartialOverloadMethodForPar tialInterface = method;
2103 }
2104 void V8TestInterface::registerStaticVoidMethodPartialOverloadMethodForPartialInt erface(void (*method)(const v8::FunctionCallbackInfo<v8::Value>&))
2105 {
2106 TestInterfaceImplementationV8Internal::staticVoidMethodPartialOverloadMethod ForPartialInterface = method;
2107 }
2108 void V8TestInterface::registerPartial2VoidMethodMethodForPartialInterface(void ( *method)(const v8::FunctionCallbackInfo<v8::Value>&))
2109 {
2110 TestInterfaceImplementationV8Internal::partial2VoidMethodMethodForPartialInt erface = method;
2111 }
2112 void V8TestInterface::registerPartial2StaticVoidMethodMethodForPartialInterface( void (*method)(const v8::FunctionCallbackInfo<v8::Value>&))
2113 {
2114 TestInterfaceImplementationV8Internal::partial2StaticVoidMethodMethodForPart ialInterface = method;
2115 }
2171 } // namespace blink 2116 } // namespace blink
2172 #endif // ENABLE(CONDITION) 2117 #endif // ENABLE(CONDITION)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698