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/ScriptValue.h" | 14 #include "bindings/core/v8/ScriptValue.h" |
14 #include "bindings/core/v8/V8AbstractEventListener.h" | 15 #include "bindings/core/v8/V8AbstractEventListener.h" |
15 #include "bindings/core/v8/V8DOMConfiguration.h" | 16 #include "bindings/core/v8/V8DOMConfiguration.h" |
16 #include "bindings/core/v8/V8EventListenerList.h" | 17 #include "bindings/core/v8/V8EventListenerList.h" |
17 #include "bindings/core/v8/V8HiddenValue.h" | 18 #include "bindings/core/v8/V8HiddenValue.h" |
18 #include "bindings/core/v8/V8ObjectConstructor.h" | 19 #include "bindings/core/v8/V8ObjectConstructor.h" |
19 #include "bindings/tests/idls/TestImplements2.h" | 20 #include "bindings/tests/idls/TestImplements2.h" |
20 #include "bindings/tests/idls/TestImplements3Implementation.h" | 21 #include "bindings/tests/idls/TestImplements3Implementation.h" |
21 #include "bindings/tests/idls/TestPartialInterface.h" | 22 #include "bindings/tests/idls/TestPartialInterface.h" |
22 #include "bindings/tests/idls/TestPartialInterfaceImplementation.h" | 23 #include "bindings/tests/idls/TestPartialInterfaceImplementation.h" |
| 24 #include "bindings/tests/v8/V8Iterator.h" |
23 #include "bindings/tests/v8/V8Node.h" | 25 #include "bindings/tests/v8/V8Node.h" |
24 #include "bindings/tests/v8/V8TestInterface.h" | 26 #include "bindings/tests/v8/V8TestInterface.h" |
25 #include "bindings/tests/v8/V8TestInterfaceEmpty.h" | 27 #include "bindings/tests/v8/V8TestInterfaceEmpty.h" |
26 #include "core/dom/ContextFeatures.h" | 28 #include "core/dom/ContextFeatures.h" |
27 #include "core/dom/Document.h" | 29 #include "core/dom/Document.h" |
28 #include "core/frame/LocalFrame.h" | 30 #include "core/frame/LocalFrame.h" |
29 #include "platform/RuntimeEnabledFeatures.h" | 31 #include "platform/RuntimeEnabledFeatures.h" |
30 #include "platform/ScriptForbiddenScope.h" | 32 #include "platform/ScriptForbiddenScope.h" |
31 #include "platform/TraceEvent.h" | 33 #include "platform/TraceEvent.h" |
32 #include "wtf/GetPtr.h" | 34 #include "wtf/GetPtr.h" |
(...skipping 1378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1411 v8SetReturnValueString(info, impl->toString(), info.GetIsolate()); | 1413 v8SetReturnValueString(info, impl->toString(), info.GetIsolate()); |
1412 } | 1414 } |
1413 | 1415 |
1414 static void toStringMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& in
fo) | 1416 static void toStringMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& in
fo) |
1415 { | 1417 { |
1416 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 1418 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
1417 TestInterfaceImplementationV8Internal::toStringMethod(info); | 1419 TestInterfaceImplementationV8Internal::toStringMethod(info); |
1418 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1420 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
1419 } | 1421 } |
1420 | 1422 |
| 1423 static void iteratorMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 1424 { |
| 1425 ExceptionState exceptionState(ExceptionState::ExecutionContext, "iterator",
"TestInterface", info.Holder(), info.GetIsolate()); |
| 1426 TestInterfaceImplementation* impl = V8TestInterface::toNative(info.Holder())
; |
| 1427 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); |
| 1428 RawPtr<Iterator> result = impl->iterator(scriptState, exceptionState); |
| 1429 if (exceptionState.hadException()) { |
| 1430 exceptionState.throwIfNeeded(); |
| 1431 return; |
| 1432 } |
| 1433 v8SetReturnValue(info, result.release()); |
| 1434 } |
| 1435 |
| 1436 static void iteratorMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& in
fo) |
| 1437 { |
| 1438 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 1439 TestInterfaceImplementationV8Internal::iteratorMethod(info); |
| 1440 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1441 } |
| 1442 |
1421 static void indexedPropertyGetter(uint32_t index, const v8::PropertyCallbackInfo
<v8::Value>& info) | 1443 static void indexedPropertyGetter(uint32_t index, const v8::PropertyCallbackInfo
<v8::Value>& info) |
1422 { | 1444 { |
1423 TestInterfaceImplementation* impl = V8TestInterface::toNative(info.Holder())
; | 1445 TestInterfaceImplementation* impl = V8TestInterface::toNative(info.Holder())
; |
1424 String result = impl->anonymousIndexedGetter(index); | 1446 String result = impl->anonymousIndexedGetter(index); |
1425 if (result.isNull()) | 1447 if (result.isNull()) |
1426 return; | 1448 return; |
1427 v8SetReturnValueString(info, result, info.GetIsolate()); | 1449 v8SetReturnValueString(info, result, info.GetIsolate()); |
1428 } | 1450 } |
1429 | 1451 |
1430 static void indexedPropertyGetterCallback(uint32_t index, const v8::PropertyCall
backInfo<v8::Value>& info) | 1452 static void indexedPropertyGetterCallback(uint32_t index, const v8::PropertyCall
backInfo<v8::Value>& info) |
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1672 {"IMPLEMENTS_CONSTANT_2", 2, 0, 0, V8DOMConfiguration::ConstantTypeUnsig
nedShort}, | 1694 {"IMPLEMENTS_CONSTANT_2", 2, 0, 0, V8DOMConfiguration::ConstantTypeUnsig
nedShort}, |
1673 {"PARTIAL2_UNSIGNED_SHORT", 0, 0, 0, V8DOMConfiguration::ConstantTypeUns
ignedShort}, | 1695 {"PARTIAL2_UNSIGNED_SHORT", 0, 0, 0, V8DOMConfiguration::ConstantTypeUns
ignedShort}, |
1674 }; | 1696 }; |
1675 V8DOMConfiguration::installConstants(functionTemplate, prototypeTemplate, V8
TestInterfaceConstants, WTF_ARRAY_LENGTH(V8TestInterfaceConstants), isolate); | 1697 V8DOMConfiguration::installConstants(functionTemplate, prototypeTemplate, V8
TestInterfaceConstants, WTF_ARRAY_LENGTH(V8TestInterfaceConstants), isolate); |
1676 if (RuntimeEnabledFeatures::partialFeatureNameEnabled()) { | 1698 if (RuntimeEnabledFeatures::partialFeatureNameEnabled()) { |
1677 static const V8DOMConfiguration::ConstantConfiguration constantConfigura
tion = {"PARTIAL_UNSIGNED_SHORT", 0, 0, 0, V8DOMConfiguration::ConstantTypeUnsig
nedShort}; | 1699 static const V8DOMConfiguration::ConstantConfiguration constantConfigura
tion = {"PARTIAL_UNSIGNED_SHORT", 0, 0, 0, V8DOMConfiguration::ConstantTypeUnsig
nedShort}; |
1678 V8DOMConfiguration::installConstants(functionTemplate, prototypeTemplate
, &constantConfiguration, 1, isolate); | 1700 V8DOMConfiguration::installConstants(functionTemplate, prototypeTemplate
, &constantConfiguration, 1, isolate); |
1679 } | 1701 } |
1680 functionTemplate->InstanceTemplate()->SetIndexedPropertyHandler(TestInterfac
eImplementationV8Internal::indexedPropertyGetterCallback, TestInterfaceImplement
ationV8Internal::indexedPropertySetterCallback, 0, TestInterfaceImplementationV8
Internal::indexedPropertyDeleterCallback, indexedPropertyEnumerator<TestInterfac
eImplementation>); | 1702 functionTemplate->InstanceTemplate()->SetIndexedPropertyHandler(TestInterfac
eImplementationV8Internal::indexedPropertyGetterCallback, TestInterfaceImplement
ationV8Internal::indexedPropertySetterCallback, 0, TestInterfaceImplementationV8
Internal::indexedPropertyDeleterCallback, indexedPropertyEnumerator<TestInterfac
eImplementation>); |
1681 functionTemplate->InstanceTemplate()->SetNamedPropertyHandler(TestInterfaceI
mplementationV8Internal::namedPropertyGetterCallback, TestInterfaceImplementatio
nV8Internal::namedPropertySetterCallback, TestInterfaceImplementationV8Internal:
:namedPropertyQueryCallback, TestInterfaceImplementationV8Internal::namedPropert
yDeleterCallback, TestInterfaceImplementationV8Internal::namedPropertyEnumerator
Callback); | 1703 functionTemplate->InstanceTemplate()->SetNamedPropertyHandler(TestInterfaceI
mplementationV8Internal::namedPropertyGetterCallback, TestInterfaceImplementatio
nV8Internal::namedPropertySetterCallback, TestInterfaceImplementationV8Internal:
:namedPropertyQueryCallback, TestInterfaceImplementationV8Internal::namedPropert
yDeleterCallback, TestInterfaceImplementationV8Internal::namedPropertyEnumerator
Callback); |
| 1704 static const V8DOMConfiguration::SymbolKeyedMethodConfiguration symbolKeyedI
teratorConfiguration = { v8::Symbol::GetIterator, TestInterfaceImplementationV8I
nternal::iteratorMethodCallback, 0, V8DOMConfiguration::ExposedToAllScripts }; |
| 1705 V8DOMConfiguration::installMethod(prototypeTemplate, defaultSignature, v8::D
ontDelete, symbolKeyedIteratorConfiguration, isolate); |
1682 functionTemplate->InstanceTemplate()->SetCallAsFunctionHandler(V8TestInterfa
ce::legacyCallCustom); | 1706 functionTemplate->InstanceTemplate()->SetCallAsFunctionHandler(V8TestInterfa
ce::legacyCallCustom); |
1683 static const V8DOMConfiguration::MethodConfiguration alwaysExposedStaticMeth
odMethodConfiguration = { | 1707 static const V8DOMConfiguration::MethodConfiguration alwaysExposedStaticMeth
odMethodConfiguration = { |
1684 "alwaysExposedStaticMethod", TestInterfaceImplementationV8Internal::alwa
ysExposedStaticMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScrip
ts, | 1708 "alwaysExposedStaticMethod", TestInterfaceImplementationV8Internal::alwa
ysExposedStaticMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScrip
ts, |
1685 }; | 1709 }; |
1686 V8DOMConfiguration::installMethod(functionTemplate, v8::Local<v8::Signature>
(), v8::None, alwaysExposedStaticMethodMethodConfiguration, isolate); | 1710 V8DOMConfiguration::installMethod(functionTemplate, v8::Local<v8::Signature>
(), v8::None, alwaysExposedStaticMethodMethodConfiguration, isolate); |
1687 static const V8DOMConfiguration::MethodConfiguration implementsStaticVoidMet
hodMethodConfiguration = { | 1711 static const V8DOMConfiguration::MethodConfiguration implementsStaticVoidMet
hodMethodConfiguration = { |
1688 "implementsStaticVoidMethod", TestInterfaceImplementationV8Internal::imp
lementsStaticVoidMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScr
ipts, | 1712 "implementsStaticVoidMethod", TestInterfaceImplementationV8Internal::imp
lementsStaticVoidMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScr
ipts, |
1689 }; | 1713 }; |
1690 V8DOMConfiguration::installMethod(functionTemplate, v8::Local<v8::Signature>
(), v8::None, implementsStaticVoidMethodMethodConfiguration, isolate); | 1714 V8DOMConfiguration::installMethod(functionTemplate, v8::Local<v8::Signature>
(), v8::None, implementsStaticVoidMethodMethodConfiguration, isolate); |
1691 if (RuntimeEnabledFeatures::implements2FeatureNameEnabled()) { | 1715 if (RuntimeEnabledFeatures::implements2FeatureNameEnabled()) { |
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1957 if (block.HasCaught()) { | 1981 if (block.HasCaught()) { |
1958 PrivateScriptRunner::rethrowExceptionInPrivateScript(scriptState->isolat
e(), exceptionState, block); | 1982 PrivateScriptRunner::rethrowExceptionInPrivateScript(scriptState->isolat
e(), exceptionState, block); |
1959 block.ReThrow(); | 1983 block.ReThrow(); |
1960 return false; | 1984 return false; |
1961 } | 1985 } |
1962 return true; | 1986 return true; |
1963 } | 1987 } |
1964 | 1988 |
1965 } // namespace blink | 1989 } // namespace blink |
1966 #endif // ENABLE(CONDITION) | 1990 #endif // ENABLE(CONDITION) |
OLD | NEW |