OLD | NEW |
---|---|
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 (*partial2VoidMethodMethodForPartialInterface)(const v8::FunctionCal lbackInfo<v8::Value>&) = 0; | |
48 static void (*partial2StaticVoidMethodMethodForPartialInterface)(const v8::Funct ionCallbackInfo<v8::Value>&) = 0; | |
48 | 49 |
49 static void testInterfaceAttributeAttributeGetter(const v8::PropertyCallbackInfo <v8::Value>& info) | 50 static void testInterfaceAttributeAttributeGetter(const v8::PropertyCallbackInfo <v8::Value>& info) |
50 { | 51 { |
51 v8::Handle<v8::Object> holder = info.Holder(); | 52 v8::Handle<v8::Object> holder = info.Holder(); |
52 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 53 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
53 v8SetReturnValueFast(info, WTF::getPtr(impl->testInterfaceAttribute()), impl ); | 54 v8SetReturnValueFast(info, WTF::getPtr(impl->testInterfaceAttribute()), impl ); |
54 } | 55 } |
55 | 56 |
56 static void testInterfaceAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 57 static void testInterfaceAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
57 { | 58 { |
(...skipping 832 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
890 TestPartialInterfaceImplementation::setPartial2StaticLongAttribute(cppValue) ; | 891 TestPartialInterfaceImplementation::setPartial2StaticLongAttribute(cppValue) ; |
891 } | 892 } |
892 | 893 |
893 static void partial2StaticLongAttributeAttributeSetterCallback(v8::Local<v8::Str ing>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 894 static void partial2StaticLongAttributeAttributeSetterCallback(v8::Local<v8::Str ing>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
894 { | 895 { |
895 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 896 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
896 TestInterfaceImplementationV8Internal::partial2StaticLongAttributeAttributeS etter(v8Value, info); | 897 TestInterfaceImplementationV8Internal::partial2StaticLongAttributeAttributeS etter(v8Value, info); |
897 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 898 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
898 } | 899 } |
899 | 900 |
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) | 901 static void TestInterfaceImplementationConstructorGetter(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
957 { | 902 { |
958 v8::Handle<v8::Value> data = info.Data(); | 903 v8::Handle<v8::Value> data = info.Data(); |
959 ASSERT(data->IsExternal()); | 904 ASSERT(data->IsExternal()); |
960 V8PerContextData* perContextData = V8PerContextData::from(info.Holder()->Cre ationContext()); | 905 V8PerContextData* perContextData = V8PerContextData::from(info.Holder()->Cre ationContext()); |
961 if (!perContextData) | 906 if (!perContextData) |
962 return; | 907 return; |
963 v8SetReturnValue(info, perContextData->constructorForType(WrapperTypeInfo::u nwrap(data))); | 908 v8SetReturnValue(info, perContextData->constructorForType(WrapperTypeInfo::u nwrap(data))); |
964 } | 909 } |
965 | 910 |
(...skipping 480 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1446 { | 1391 { |
1447 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); | 1392 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); |
1448 TestPartialInterfaceImplementation::partial2VoidMethod(*impl); | 1393 TestPartialInterfaceImplementation::partial2VoidMethod(*impl); |
1449 } | 1394 } |
1450 | 1395 |
1451 static void partial2StaticVoidMethod1Method(const v8::FunctionCallbackInfo<v8::V alue>& info) | 1396 static void partial2StaticVoidMethod1Method(const v8::FunctionCallbackInfo<v8::V alue>& info) |
1452 { | 1397 { |
1453 TestPartialInterfaceImplementation::partial2StaticVoidMethod(); | 1398 TestPartialInterfaceImplementation::partial2StaticVoidMethod(); |
1454 } | 1399 } |
1455 | 1400 |
1456 static void voidMethodPartialOverloadMethod(const v8::FunctionCallbackInfo<v8::V alue>& info) | |
1457 { | |
1458 if (UNLIKELY(info.Length() < 1)) { | |
1459 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v oidMethodPartialOverload", "TestInterface", 1, info.Length(), info.GetIsolate()) , info.GetIsolate()); | |
1460 return; | |
1461 } | |
1462 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); | |
1463 V8StringResource<> value; | |
1464 { | |
1465 TOSTRING_VOID_INTERNAL(value, info[0]); | |
1466 } | |
1467 TestPartialInterfaceImplementation3::voidMethodPartialOverload(*impl, value) ; | |
1468 } | |
1469 | |
1470 static void voidMethodPartialOverloadMethodCallback(const v8::FunctionCallbackIn fo<v8::Value>& info) | |
1471 { | |
1472 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
1473 TestInterfaceImplementationV8Internal::voidMethodPartialOverloadMethod(info) ; | |
1474 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
1475 } | |
1476 | |
1477 static void voidMethodPartialOverloadMethod(const v8::FunctionCallbackInfo<v8::V alue>& info) | |
1478 { | |
1479 if (UNLIKELY(info.Length() < 1)) { | |
1480 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v oidMethodPartialOverload", "TestInterface", 1, info.Length(), info.GetIsolate()) , info.GetIsolate()); | |
1481 return; | |
1482 } | |
1483 V8StringResource<> value; | |
1484 { | |
1485 TOSTRING_VOID_INTERNAL(value, info[0]); | |
1486 } | |
1487 TestPartialInterfaceImplementation3::voidMethodPartialOverload(value); | |
1488 } | |
1489 | |
1490 static void voidMethodPartialOverloadMethodCallback(const v8::FunctionCallbackIn fo<v8::Value>& info) | |
1491 { | |
1492 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | |
1493 TestInterfaceImplementationV8Internal::voidMethodPartialOverloadMethod(info) ; | |
1494 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | |
1495 } | |
1496 | |
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) | 1401 static void partial2VoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
1508 { | 1402 { |
1509 ExceptionState exceptionState(ExceptionState::ExecutionContext, "partial2Voi dMethod", "TestInterface", info.Holder(), info.GetIsolate()); | 1403 ExceptionState exceptionState(ExceptionState::ExecutionContext, "partial2Voi dMethod", "TestInterface", info.Holder(), info.GetIsolate()); |
1510 switch (std::min(1, info.Length())) { | 1404 switch (std::min(1, info.Length())) { |
1511 case 0: | 1405 case 0: |
1512 if (true) { | 1406 if (true) { |
1513 partial2VoidMethod1Method(info); | 1407 partial2VoidMethod1Method(info); |
1514 return; | 1408 return; |
1515 } | 1409 } |
1516 break; | 1410 break; |
1517 case 1: | 1411 case 1: |
1518 if (true) { | 1412 break; |
1519 partial2VoidMethod2Method(info); | 1413 default: |
1414 if (partial2VoidMethodMethodForPartialInterface) { | |
haraken
2014/10/09 04:24:02
Is it possible that partial2VoidMethodMethodForPar
tasak
2014/10/10 07:52:24
Done.
If we want downloadable modules, we will ini
| |
1415 (partial2VoidMethodMethodForPartialInterface)(info); | |
1520 return; | 1416 return; |
1521 } | 1417 } |
1522 break; | |
1523 default: | |
1524 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(0, i nfo.Length())); | 1418 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(0, i nfo.Length())); |
1525 exceptionState.throwIfNeeded(); | 1419 exceptionState.throwIfNeeded(); |
1526 return; | 1420 return; |
1527 } | 1421 } |
1422 if (partial2VoidMethodMethodForPartialInterface) { | |
haraken
2014/10/09 04:24:02
Ditto.
tasak
2014/10/10 07:52:24
Done.
| |
1423 (partial2VoidMethodMethodForPartialInterface)(info); | |
1424 return; | |
1425 } | |
1528 exceptionState.throwTypeError("No function was found that matched the signat ure provided."); | 1426 exceptionState.throwTypeError("No function was found that matched the signat ure provided."); |
1529 exceptionState.throwIfNeeded(); | 1427 exceptionState.throwIfNeeded(); |
1530 } | 1428 } |
1531 | 1429 |
1532 static void partial2VoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8:: Value>& info) | 1430 static void partial2VoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8:: Value>& info) |
1533 { | 1431 { |
1534 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 1432 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
1535 TestInterfaceImplementationV8Internal::partial2VoidMethodMethod(info); | 1433 TestInterfaceImplementationV8Internal::partial2VoidMethodMethod(info); |
1536 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1434 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
1537 } | 1435 } |
1538 | 1436 |
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) | 1437 static void partial2StaticVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Va lue>& info) |
1549 { | 1438 { |
1550 ExceptionState exceptionState(ExceptionState::ExecutionContext, "partial2Sta ticVoidMethod", "TestInterface", info.Holder(), info.GetIsolate()); | 1439 ExceptionState exceptionState(ExceptionState::ExecutionContext, "partial2Sta ticVoidMethod", "TestInterface", info.Holder(), info.GetIsolate()); |
1551 switch (std::min(1, info.Length())) { | 1440 switch (std::min(1, info.Length())) { |
1552 case 0: | 1441 case 0: |
1553 if (true) { | 1442 if (true) { |
1554 partial2StaticVoidMethod1Method(info); | 1443 partial2StaticVoidMethod1Method(info); |
1555 return; | 1444 return; |
1556 } | 1445 } |
1557 break; | 1446 break; |
1558 case 1: | 1447 case 1: |
1559 if (true) { | 1448 break; |
1560 partial2StaticVoidMethod2Method(info); | 1449 default: |
1450 if (partial2StaticVoidMethodMethodForPartialInterface) { | |
1451 (partial2StaticVoidMethodMethodForPartialInterface)(info); | |
1561 return; | 1452 return; |
1562 } | 1453 } |
1563 break; | |
1564 default: | |
1565 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(0, i nfo.Length())); | 1454 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(0, i nfo.Length())); |
1566 exceptionState.throwIfNeeded(); | 1455 exceptionState.throwIfNeeded(); |
1567 return; | 1456 return; |
1568 } | 1457 } |
1458 if (partial2StaticVoidMethodMethodForPartialInterface) { | |
1459 (partial2StaticVoidMethodMethodForPartialInterface)(info); | |
1460 return; | |
1461 } | |
1569 exceptionState.throwTypeError("No function was found that matched the signat ure provided."); | 1462 exceptionState.throwTypeError("No function was found that matched the signat ure provided."); |
1570 exceptionState.throwIfNeeded(); | 1463 exceptionState.throwIfNeeded(); |
1571 } | 1464 } |
1572 | 1465 |
1573 static void partial2StaticVoidMethodMethodCallback(const v8::FunctionCallbackInf o<v8::Value>& info) | 1466 static void partial2StaticVoidMethodMethodCallback(const v8::FunctionCallbackInf o<v8::Value>& info) |
1574 { | 1467 { |
1575 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 1468 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
1576 TestInterfaceImplementationV8Internal::partial2StaticVoidMethodMethod(info); | 1469 TestInterfaceImplementationV8Internal::partial2StaticVoidMethodMethod(info); |
1577 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1470 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
1578 } | 1471 } |
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1799 {"voidMethod", TestInterfaceImplementationV8Internal::voidMethodMethodCallba ck, TestInterfaceImplementationV8Internal::voidMethodMethodCallbackForMainWorld, 0, V8DOMConfiguration::ExposedToAllScripts}, | 1692 {"voidMethod", TestInterfaceImplementationV8Internal::voidMethodMethodCallba ck, TestInterfaceImplementationV8Internal::voidMethodMethodCallbackForMainWorld, 0, V8DOMConfiguration::ExposedToAllScripts}, |
1800 {"alwaysExposedMethod", TestInterfaceImplementationV8Internal::alwaysExposed MethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, | 1693 {"alwaysExposedMethod", TestInterfaceImplementationV8Internal::alwaysExposed MethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, |
1801 {"voidMethodPartailOverload", TestInterfaceImplementationV8Internal::voidMet hodPartailOverloadMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts} , | 1694 {"voidMethodPartailOverload", TestInterfaceImplementationV8Internal::voidMet hodPartailOverloadMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts} , |
1802 {"implementsVoidMethod", TestInterfaceImplementationV8Internal::implementsVo idMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, | 1695 {"implementsVoidMethod", TestInterfaceImplementationV8Internal::implementsVo idMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, |
1803 {"implementsComplexMethod", TestInterfaceImplementationV8Internal::implement sComplexMethodMethodCallback, 0, 2, V8DOMConfiguration::ExposedToAllScripts}, | 1696 {"implementsComplexMethod", TestInterfaceImplementationV8Internal::implement sComplexMethodMethodCallback, 0, 2, V8DOMConfiguration::ExposedToAllScripts}, |
1804 {"implementsCustomVoidMethod", TestInterfaceImplementationV8Internal::implem entsCustomVoidMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScript s}, | 1697 {"implementsCustomVoidMethod", TestInterfaceImplementationV8Internal::implem entsCustomVoidMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScript s}, |
1805 {"implements3VoidMethod", TestInterfaceImplementationV8Internal::implements3 VoidMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, | 1698 {"implements3VoidMethod", TestInterfaceImplementationV8Internal::implements3 VoidMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, |
1806 {"partial2VoidMethod", TestInterfaceImplementationV8Internal::partial2VoidMe thodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, | 1699 {"partial2VoidMethod", TestInterfaceImplementationV8Internal::partial2VoidMe thodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, |
1807 }; | 1700 }; |
1808 | 1701 |
1809 static void installV8TestInterfaceTemplate(v8::Handle<v8::FunctionTemplate> func tionTemplate, v8::Isolate* isolate) | 1702 void V8TestInterface::installV8TestInterfaceTemplate(v8::Handle<v8::FunctionTemp late> functionTemplate, v8::Isolate* isolate) |
1810 { | 1703 { |
1811 functionTemplate->ReadOnlyPrototype(); | 1704 functionTemplate->ReadOnlyPrototype(); |
1812 | 1705 |
1813 v8::Local<v8::Signature> defaultSignature; | 1706 v8::Local<v8::Signature> defaultSignature; |
1814 if (!RuntimeEnabledFeatures::featureNameEnabled()) | 1707 if (!RuntimeEnabledFeatures::featureNameEnabled()) |
1815 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(functionT emplate, "", V8TestInterfaceEmpty::domTemplate(isolate), V8TestInterface::intern alFieldCount, 0, 0, 0, 0, 0, 0, isolate); | 1708 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(functionT emplate, "", V8TestInterfaceEmpty::domTemplate(isolate), V8TestInterface::intern alFieldCount, 0, 0, 0, 0, 0, 0, isolate); |
1816 else | 1709 else |
1817 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(functionT emplate, "TestInterface", V8TestInterfaceEmpty::domTemplate(isolate), V8TestInte rface::internalFieldCount, | 1710 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(functionT emplate, "TestInterface", V8TestInterfaceEmpty::domTemplate(isolate), V8TestInte rface::internalFieldCount, |
1818 V8TestInterfaceAttributes, WTF_ARRAY_LENGTH(V8TestInterfaceAttribute s), | 1711 V8TestInterfaceAttributes, WTF_ARRAY_LENGTH(V8TestInterfaceAttribute s), |
1819 0, 0, | 1712 0, 0, |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1858 {"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}; | 1751 {"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}; |
1859 V8DOMConfiguration::installAttribute(instanceTemplate, prototypeTemplate , attributeConfiguration, isolate); | 1752 V8DOMConfiguration::installAttribute(instanceTemplate, prototypeTemplate , attributeConfiguration, isolate); |
1860 } | 1753 } |
1861 #endif // ENABLE(PARTIAL_CONDITION) | 1754 #endif // ENABLE(PARTIAL_CONDITION) |
1862 static const V8DOMConfiguration::ConstantConfiguration V8TestInterfaceConsta nts[] = { | 1755 static const V8DOMConfiguration::ConstantConfiguration V8TestInterfaceConsta nts[] = { |
1863 {"UNSIGNED_LONG", 0, 0, 0, V8DOMConfiguration::ConstantTypeUnsignedLong} , | 1756 {"UNSIGNED_LONG", 0, 0, 0, V8DOMConfiguration::ConstantTypeUnsignedLong} , |
1864 {"CONST_JAVASCRIPT", 1, 0, 0, V8DOMConfiguration::ConstantTypeShort}, | 1757 {"CONST_JAVASCRIPT", 1, 0, 0, V8DOMConfiguration::ConstantTypeShort}, |
1865 {"IMPLEMENTS_CONSTANT_1", 1, 0, 0, V8DOMConfiguration::ConstantTypeUnsig nedShort}, | 1758 {"IMPLEMENTS_CONSTANT_1", 1, 0, 0, V8DOMConfiguration::ConstantTypeUnsig nedShort}, |
1866 {"IMPLEMENTS_CONSTANT_2", 2, 0, 0, V8DOMConfiguration::ConstantTypeUnsig nedShort}, | 1759 {"IMPLEMENTS_CONSTANT_2", 2, 0, 0, V8DOMConfiguration::ConstantTypeUnsig nedShort}, |
1867 {"PARTIAL2_UNSIGNED_SHORT", 0, 0, 0, V8DOMConfiguration::ConstantTypeUns ignedShort}, | 1760 {"PARTIAL2_UNSIGNED_SHORT", 0, 0, 0, V8DOMConfiguration::ConstantTypeUns ignedShort}, |
1868 {"PARTIAL3_UNSIGNED_SHORT", 0, 0, 0, V8DOMConfiguration::ConstantTypeUns ignedShort}, | |
1869 }; | 1761 }; |
1870 V8DOMConfiguration::installConstants(functionTemplate, prototypeTemplate, V8 TestInterfaceConstants, WTF_ARRAY_LENGTH(V8TestInterfaceConstants), isolate); | 1762 V8DOMConfiguration::installConstants(functionTemplate, prototypeTemplate, V8 TestInterfaceConstants, WTF_ARRAY_LENGTH(V8TestInterfaceConstants), isolate); |
1871 if (RuntimeEnabledFeatures::partialFeatureNameEnabled()) { | 1763 if (RuntimeEnabledFeatures::partialFeatureNameEnabled()) { |
1872 static const V8DOMConfiguration::ConstantConfiguration constantConfigura tion = {"PARTIAL_UNSIGNED_SHORT", 0, 0, 0, V8DOMConfiguration::ConstantTypeUnsig nedShort}; | 1764 static const V8DOMConfiguration::ConstantConfiguration constantConfigura tion = {"PARTIAL_UNSIGNED_SHORT", 0, 0, 0, V8DOMConfiguration::ConstantTypeUnsig nedShort}; |
1873 V8DOMConfiguration::installConstants(functionTemplate, prototypeTemplate , &constantConfiguration, 1, isolate); | 1765 V8DOMConfiguration::installConstants(functionTemplate, prototypeTemplate , &constantConfiguration, 1, isolate); |
1874 } | 1766 } |
1875 functionTemplate->InstanceTemplate()->SetIndexedPropertyHandler(TestInterfac eImplementationV8Internal::indexedPropertyGetterCallback, TestInterfaceImplement ationV8Internal::indexedPropertySetterCallback, 0, TestInterfaceImplementationV8 Internal::indexedPropertyDeleterCallback, indexedPropertyEnumerator<TestInterfac eImplementation>); | 1767 functionTemplate->InstanceTemplate()->SetIndexedPropertyHandler(TestInterfac eImplementationV8Internal::indexedPropertyGetterCallback, TestInterfaceImplement ationV8Internal::indexedPropertySetterCallback, 0, TestInterfaceImplementationV8 Internal::indexedPropertyDeleterCallback, indexedPropertyEnumerator<TestInterfac eImplementation>); |
1876 functionTemplate->InstanceTemplate()->SetNamedPropertyHandler(TestInterfaceI mplementationV8Internal::namedPropertyGetterCallback, TestInterfaceImplementatio nV8Internal::namedPropertySetterCallback, TestInterfaceImplementationV8Internal: :namedPropertyQueryCallback, TestInterfaceImplementationV8Internal::namedPropert yDeleterCallback, TestInterfaceImplementationV8Internal::namedPropertyEnumerator Callback); | 1768 functionTemplate->InstanceTemplate()->SetNamedPropertyHandler(TestInterfaceI mplementationV8Internal::namedPropertyGetterCallback, TestInterfaceImplementatio nV8Internal::namedPropertySetterCallback, TestInterfaceImplementationV8Internal: :namedPropertyQueryCallback, TestInterfaceImplementationV8Internal::namedPropert yDeleterCallback, TestInterfaceImplementationV8Internal::namedPropertyEnumerator Callback); |
1877 static const V8DOMConfiguration::SymbolKeyedMethodConfiguration symbolKeyedI teratorConfiguration = { v8::Symbol::GetIterator, TestInterfaceImplementationV8I nternal::iteratorMethodCallback, 0, V8DOMConfiguration::ExposedToAllScripts }; | 1769 static const V8DOMConfiguration::SymbolKeyedMethodConfiguration symbolKeyedI teratorConfiguration = { v8::Symbol::GetIterator, TestInterfaceImplementationV8I nternal::iteratorMethodCallback, 0, V8DOMConfiguration::ExposedToAllScripts }; |
1878 V8DOMConfiguration::installMethod(prototypeTemplate, defaultSignature, v8::D ontDelete, symbolKeyedIteratorConfiguration, isolate); | 1770 V8DOMConfiguration::installMethod(prototypeTemplate, defaultSignature, v8::D ontDelete, symbolKeyedIteratorConfiguration, isolate); |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1957 V8DOMConfiguration::installMethod(prototypeTemplate, defaultSignature, stati c_cast<v8::PropertyAttribute>(v8::DontDelete | v8::DontEnum), toStringMethodConf iguration, isolate); | 1849 V8DOMConfiguration::installMethod(prototypeTemplate, defaultSignature, stati c_cast<v8::PropertyAttribute>(v8::DontDelete | v8::DontEnum), toStringMethodConf iguration, isolate); |
1958 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)); | 1850 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)); |
1959 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)); | 1851 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)); |
1960 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)); | 1852 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)); |
1961 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)); | 1853 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)); |
1962 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)); | 1854 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)); |
1963 #if ENABLE(PARTIAL_CONDITION) | 1855 #if ENABLE(PARTIAL_CONDITION) |
1964 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)); | 1856 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)); |
1965 #endif // ENABLE(PARTIAL_CONDITION) | 1857 #endif // ENABLE(PARTIAL_CONDITION) |
1966 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)); | 1858 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)); |
1967 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)); | |
1968 | 1859 |
1969 // Custom toString template | 1860 // Custom toString template |
1970 functionTemplate->Set(v8AtomicString(isolate, "toString"), V8PerIsolateData: :from(isolate)->toStringTemplate()); | 1861 functionTemplate->Set(v8AtomicString(isolate, "toString"), V8PerIsolateData: :from(isolate)->toStringTemplate()); |
1971 } | 1862 } |
1972 | 1863 |
1973 v8::Handle<v8::FunctionTemplate> V8TestInterface::domTemplate(v8::Isolate* isola te) | 1864 v8::Handle<v8::FunctionTemplate> V8TestInterface::domTemplate(v8::Isolate* isola te) |
1974 { | 1865 { |
1975 return V8DOMConfiguration::domClassTemplate(isolate, const_cast<WrapperTypeI nfo*>(&wrapperTypeInfo), installV8TestInterfaceTemplate); | 1866 return V8DOMConfiguration::domClassTemplate(isolate, const_cast<WrapperTypeI nfo*>(&wrapperTypeInfo), V8TestInterface::installV8TestInterfaceTemplateFunction ); |
haraken
2014/10/09 04:24:02
Can we add an assert to verify that V8TestInterfac
tasak
2014/10/10 07:52:24
Done.
| |
1976 } | 1867 } |
1977 | 1868 |
1978 bool V8TestInterface::hasInstance(v8::Handle<v8::Value> v8Value, v8::Isolate* is olate) | 1869 bool V8TestInterface::hasInstance(v8::Handle<v8::Value> v8Value, v8::Isolate* is olate) |
1979 { | 1870 { |
1980 return V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, v8Valu e); | 1871 return V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, v8Valu e); |
1981 } | 1872 } |
1982 | 1873 |
1983 v8::Handle<v8::Object> V8TestInterface::findInstanceInPrototypeChain(v8::Handle< v8::Value> v8Value, v8::Isolate* isolate) | 1874 v8::Handle<v8::Object> V8TestInterface::findInstanceInPrototypeChain(v8::Handle< v8::Value> v8Value, v8::Isolate* isolate) |
1984 { | 1875 { |
1985 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe rTypeInfo, v8Value); | 1876 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe rTypeInfo, v8Value); |
(...skipping 27 matching lines...) Expand all Loading... | |
2013 if (context && context->isDocument() && ContextFeatures::partialContextNameE nabled(toDocument(context))) { | 1904 if (context && context->isDocument() && ContextFeatures::partialContextNameE nabled(toDocument(context))) { |
2014 static const V8DOMConfiguration::AttributeConfiguration attributeConfigu ration =\ | 1905 static const V8DOMConfiguration::AttributeConfiguration attributeConfigu ration =\ |
2015 {"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}; | 1906 {"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}; |
2016 V8DOMConfiguration::installAttribute(instanceObject, prototypeObject, at tributeConfiguration, isolate); | 1907 V8DOMConfiguration::installAttribute(instanceObject, prototypeObject, at tributeConfiguration, isolate); |
2017 } | 1908 } |
2018 if (context && context->isDocument() && ContextFeatures::partialContextNameE nabled(toDocument(context))) { | 1909 if (context && context->isDocument() && ContextFeatures::partialContextNameE nabled(toDocument(context))) { |
2019 static const V8DOMConfiguration::AttributeConfiguration attributeConfigu ration =\ | 1910 static const V8DOMConfiguration::AttributeConfiguration attributeConfigu ration =\ |
2020 {"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}; | 1911 {"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}; |
2021 V8DOMConfiguration::installAttribute(instanceObject, prototypeObject, at tributeConfiguration, isolate); | 1912 V8DOMConfiguration::installAttribute(instanceObject, prototypeObject, at tributeConfiguration, isolate); |
2022 } | 1913 } |
2023 if (context && context->isDocument() && ContextFeatures::partialContextName3 Enabled(toDocument(context))) { | |
2024 static const V8DOMConfiguration::AttributeConfiguration attributeConfigu ration =\ | |
2025 {"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}; | |
2026 V8DOMConfiguration::installAttribute(instanceObject, prototypeObject, at tributeConfiguration, isolate); | |
2027 } | |
2028 if (context && context->isDocument() && ContextFeatures::partialContextName3 Enabled(toDocument(context))) { | |
2029 static const V8DOMConfiguration::AttributeConfiguration attributeConfigu ration =\ | |
2030 {"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}; | |
2031 V8DOMConfiguration::installAttribute(instanceObject, prototypeObject, at tributeConfiguration, isolate); | |
2032 } | |
2033 } | 1914 } |
2034 | 1915 |
2035 void V8TestInterface::installConditionallyEnabledMethods(v8::Handle<v8::Object> prototypeObject, v8::Isolate* isolate) | 1916 void V8TestInterface::installConditionallyEnabledMethods(v8::Handle<v8::Object> prototypeObject, v8::Isolate* isolate) |
2036 { | 1917 { |
2037 v8::Local<v8::Signature> defaultSignature = v8::Signature::New(isolate, domT emplate(isolate)); | 1918 v8::Local<v8::Signature> defaultSignature = v8::Signature::New(isolate, domT emplate(isolate)); |
2038 ExecutionContext* context = toExecutionContext(prototypeObject->CreationCont ext()); | 1919 ExecutionContext* context = toExecutionContext(prototypeObject->CreationCont ext()); |
2039 ASSERT(context); | 1920 ASSERT(context); |
2040 | 1921 |
2041 if (context && (context->isWorkerGlobalScope())) { | 1922 if (context && (context->isWorkerGlobalScope())) { |
2042 prototypeObject->Set(v8AtomicString(isolate, "workerExposedMethod"), v8: :FunctionTemplate::New(isolate, TestInterfaceImplementationV8Internal::workerExp osedMethodMethodCallback, v8Undefined(), defaultSignature, 0)->GetFunction()); | 1923 prototypeObject->Set(v8AtomicString(isolate, "workerExposedMethod"), v8: :FunctionTemplate::New(isolate, TestInterfaceImplementationV8Internal::workerExp osedMethodMethodCallback, v8Undefined(), defaultSignature, 0)->GetFunction()); |
2043 } | 1924 } |
2044 if (context && (context->isDocument())) { | 1925 if (context && (context->isDocument())) { |
2045 prototypeObject->Set(v8AtomicString(isolate, "windowExposedMethod"), v8: :FunctionTemplate::New(isolate, TestInterfaceImplementationV8Internal::windowExp osedMethodMethodCallback, v8Undefined(), defaultSignature, 0)->GetFunction()); | 1926 prototypeObject->Set(v8AtomicString(isolate, "windowExposedMethod"), v8: :FunctionTemplate::New(isolate, TestInterfaceImplementationV8Internal::windowExp osedMethodMethodCallback, v8Undefined(), defaultSignature, 0)->GetFunction()); |
2046 } | 1927 } |
2047 if (context && (context->isWorkerGlobalScope())) { | 1928 if (context && (context->isWorkerGlobalScope())) { |
2048 prototypeObject->Set(v8AtomicString(isolate, "workerExposedStaticMethod" ), v8::FunctionTemplate::New(isolate, TestInterfaceImplementationV8Internal::wor kerExposedStaticMethodMethodCallback, v8Undefined(), defaultSignature, 0)->GetFu nction()); | 1929 prototypeObject->Set(v8AtomicString(isolate, "workerExposedStaticMethod" ), v8::FunctionTemplate::New(isolate, TestInterfaceImplementationV8Internal::wor kerExposedStaticMethodMethodCallback, v8Undefined(), defaultSignature, 0)->GetFu nction()); |
2049 } | 1930 } |
2050 if (context && (context->isDocument())) { | 1931 if (context && (context->isDocument())) { |
2051 prototypeObject->Set(v8AtomicString(isolate, "windowExposedStaticMethod" ), v8::FunctionTemplate::New(isolate, TestInterfaceImplementationV8Internal::win dowExposedStaticMethodMethodCallback, v8Undefined(), defaultSignature, 0)->GetFu nction()); | 1932 prototypeObject->Set(v8AtomicString(isolate, "windowExposedStaticMethod" ), v8::FunctionTemplate::New(isolate, TestInterfaceImplementationV8Internal::win dowExposedStaticMethodMethodCallback, v8Undefined(), defaultSignature, 0)->GetFu nction()); |
2052 } | 1933 } |
2053 if (context && (context->isDocument() || context->isServiceWorkerGlobalScope ())) { | 1934 if (context && (context->isDocument() || context->isServiceWorkerGlobalScope ())) { |
2054 prototypeObject->Set(v8AtomicString(isolate, "windowAndServiceWorkerExpo sedMethod"), v8::FunctionTemplate::New(isolate, TestInterfaceImplementationV8Int ernal::windowAndServiceWorkerExposedMethodMethodCallback, v8Undefined(), default Signature, 0)->GetFunction()); | 1935 prototypeObject->Set(v8AtomicString(isolate, "windowAndServiceWorkerExpo sedMethod"), v8::FunctionTemplate::New(isolate, TestInterfaceImplementationV8Int ernal::windowAndServiceWorkerExposedMethodMethodCallback, v8Undefined(), default Signature, 0)->GetFunction()); |
2055 } | 1936 } |
2056 if (context && context->isDocument() && ContextFeatures::partialContextName3 Enabled(toDocument(context))) { | |
2057 prototypeObject->Set(v8AtomicString(isolate, "voidMethodPartialOverload" ), v8::FunctionTemplate::New(isolate, TestInterfaceImplementationV8Internal::voi dMethodPartialOverloadMethodCallback, v8Undefined(), defaultSignature, 1)->GetFu nction()); | |
2058 } | |
2059 if (context && context->isDocument() && ContextFeatures::partialContextName3 Enabled(toDocument(context))) { | |
2060 prototypeObject->Set(v8AtomicString(isolate, "voidMethodPartialOverload" ), v8::FunctionTemplate::New(isolate, TestInterfaceImplementationV8Internal::voi dMethodPartialOverloadMethodCallback, v8Undefined(), defaultSignature, 1)->GetFu nction()); | |
2061 } | |
2062 } | 1937 } |
2063 | 1938 |
2064 ActiveDOMObject* V8TestInterface::toActiveDOMObject(v8::Handle<v8::Object> wrapp er) | 1939 ActiveDOMObject* V8TestInterface::toActiveDOMObject(v8::Handle<v8::Object> wrapp er) |
2065 { | 1940 { |
2066 return toImpl(wrapper); | 1941 return toImpl(wrapper); |
2067 } | 1942 } |
2068 | 1943 |
2069 | 1944 |
2070 void V8TestInterface::refObject(ScriptWrappableBase* internalPointer) | 1945 void V8TestInterface::refObject(ScriptWrappableBase* internalPointer) |
2071 { | 1946 { |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2159 if (!scriptState->executionContext()) | 2034 if (!scriptState->executionContext()) |
2160 return false; | 2035 return false; |
2161 | 2036 |
2162 ScriptState::Scope scope(scriptState); | 2037 ScriptState::Scope scope(scriptState); |
2163 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob al(), scriptState->isolate()); | 2038 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob al(), scriptState->isolate()); |
2164 | 2039 |
2165 ExceptionState exceptionState(ExceptionState::SetterContext, "stringAttribut e", "TestInterfaceImplementation", scriptState->context()->Global(), scriptState ->isolate()); | 2040 ExceptionState exceptionState(ExceptionState::SetterContext, "stringAttribut e", "TestInterfaceImplementation", scriptState->context()->Global(), scriptState ->isolate()); |
2166 return PrivateScriptRunner::runDOMAttributeSetter(scriptState, scriptStateIn UserScript, "TestInterfaceImplementation", "stringAttribute", holder, v8String(s criptState->isolate(), cppValue)); | 2041 return PrivateScriptRunner::runDOMAttributeSetter(scriptState, scriptStateIn UserScript, "TestInterfaceImplementation", "stringAttribute", holder, v8String(s criptState->isolate(), cppValue)); |
2167 } | 2042 } |
2168 | 2043 |
2044 InstallTemplateFunction V8TestInterface::installV8TestInterfaceTemplateFunction = (InstallTemplateFunction)&V8TestInterface::installV8TestInterfaceTemplate; | |
2045 | |
2046 void V8TestInterface::updateWrapperTypeInfo(InstallTemplateFunction installTempl ateFunction, InstallConditionallyEnabledMethodsFunction installConditionallyEnab ledMethodsFunction) | |
2047 { | |
2048 V8TestInterface::installV8TestInterfaceTemplateFunction = installTemplateFun ction; | |
2049 if (installConditionallyEnabledMethodsFunction) | |
2050 V8TestInterface::wrapperTypeInfo.installConditionallyEnabledMethodsFunct ion = installConditionallyEnabledMethodsFunction; | |
2051 } | |
2052 | |
2053 void V8TestInterface::registerPartial2VoidMethodMethodForPartialInterface(void ( *method)(const v8::FunctionCallbackInfo<v8::Value>&)) | |
2054 { | |
2055 TestInterfaceImplementationV8Internal::partial2VoidMethodMethodForPartialInt erface = method; | |
2056 } | |
2057 void V8TestInterface::registerPartial2StaticVoidMethodMethodForPartialInterface( void (*method)(const v8::FunctionCallbackInfo<v8::Value>&)) | |
2058 { | |
2059 TestInterfaceImplementationV8Internal::partial2StaticVoidMethodMethodForPart ialInterface = method; | |
2060 } | |
2169 } // namespace blink | 2061 } // namespace blink |
2170 #endif // ENABLE(CONDITION) | 2062 #endif // ENABLE(CONDITION) |
OLD | NEW |