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 #include "V8TestObject.h" | 8 #include "V8TestObject.h" |
9 | 9 |
10 #include "bindings/core/v8/BindingSecurity.h" | 10 #include "bindings/core/v8/BindingSecurity.h" |
(...skipping 10685 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10696 v8SetReturnValueInt(info, impl->methodImplementedInCPPForPrivateScriptOnly(v
alue1, value2)); | 10696 v8SetReturnValueInt(info, impl->methodImplementedInCPPForPrivateScriptOnly(v
alue1, value2)); |
10697 } | 10697 } |
10698 | 10698 |
10699 static void methodImplementedInCPPForPrivateScriptOnlyMethodCallback(const v8::F
unctionCallbackInfo<v8::Value>& info) | 10699 static void methodImplementedInCPPForPrivateScriptOnlyMethodCallback(const v8::F
unctionCallbackInfo<v8::Value>& info) |
10700 { | 10700 { |
10701 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 10701 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
10702 TestObjectV8Internal::methodImplementedInCPPForPrivateScriptOnlyMethod(info)
; | 10702 TestObjectV8Internal::methodImplementedInCPPForPrivateScriptOnlyMethod(info)
; |
10703 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 10703 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
10704 } | 10704 } |
10705 | 10705 |
| 10706 static void keysMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 10707 { |
| 10708 ExceptionState exceptionState(ExceptionState::ExecutionContext, "keys", "Tes
tObject", info.Holder(), info.GetIsolate()); |
| 10709 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 10710 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); |
| 10711 RawPtr<Iterator> result = impl->keys(scriptState, exceptionState); |
| 10712 if (exceptionState.hadException()) { |
| 10713 exceptionState.throwIfNeeded(); |
| 10714 return; |
| 10715 } |
| 10716 v8SetReturnValue(info, result.release()); |
| 10717 } |
| 10718 |
| 10719 static void keysMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 10720 { |
| 10721 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 10722 TestObjectV8Internal::keysMethod(info); |
| 10723 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 10724 } |
| 10725 |
| 10726 static void valuesMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 10727 { |
| 10728 ExceptionState exceptionState(ExceptionState::ExecutionContext, "values", "T
estObject", info.Holder(), info.GetIsolate()); |
| 10729 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 10730 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); |
| 10731 RawPtr<Iterator> result = impl->values(scriptState, exceptionState); |
| 10732 if (exceptionState.hadException()) { |
| 10733 exceptionState.throwIfNeeded(); |
| 10734 return; |
| 10735 } |
| 10736 v8SetReturnValue(info, result.release()); |
| 10737 } |
| 10738 |
| 10739 static void valuesMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info
) |
| 10740 { |
| 10741 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 10742 TestObjectV8Internal::valuesMethod(info); |
| 10743 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 10744 } |
| 10745 |
| 10746 static void entriesMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 10747 { |
| 10748 ExceptionState exceptionState(ExceptionState::ExecutionContext, "entries", "
TestObject", info.Holder(), info.GetIsolate()); |
| 10749 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 10750 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); |
| 10751 RawPtr<Iterator> result = impl->entries(scriptState, exceptionState); |
| 10752 if (exceptionState.hadException()) { |
| 10753 exceptionState.throwIfNeeded(); |
| 10754 return; |
| 10755 } |
| 10756 v8SetReturnValue(info, result.release()); |
| 10757 } |
| 10758 |
| 10759 static void entriesMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& inf
o) |
| 10760 { |
| 10761 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 10762 TestObjectV8Internal::entriesMethod(info); |
| 10763 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 10764 } |
| 10765 |
10706 static void toStringMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | 10766 static void toStringMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
10707 { | 10767 { |
10708 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 10768 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
10709 v8SetReturnValueString(info, impl->stringifierAttribute(), info.GetIsolate()
); | 10769 v8SetReturnValueString(info, impl->stringifierAttribute(), info.GetIsolate()
); |
10710 } | 10770 } |
10711 | 10771 |
10712 static void toStringMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& in
fo) | 10772 static void toStringMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& in
fo) |
10713 { | 10773 { |
10714 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 10774 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
10715 TestObjectV8Internal::toStringMethod(info); | 10775 TestObjectV8Internal::toStringMethod(info); |
(...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11123 {"voidMethodTestInterfaceGarbageCollectedArrayArg", TestObjectV8Internal::vo
idMethodTestInterfaceGarbageCollectedArrayArgMethodCallback, 0, 1, V8DOMConfigur
ation::ExposedToAllScripts}, | 11183 {"voidMethodTestInterfaceGarbageCollectedArrayArg", TestObjectV8Internal::vo
idMethodTestInterfaceGarbageCollectedArrayArgMethodCallback, 0, 1, V8DOMConfigur
ation::ExposedToAllScripts}, |
11124 {"voidMethodTestInterfaceWillBeGarbageCollectedSequenceArg", TestObjectV8Int
ernal::voidMethodTestInterfaceWillBeGarbageCollectedSequenceArgMethodCallback, 0
, 1, V8DOMConfiguration::ExposedToAllScripts}, | 11184 {"voidMethodTestInterfaceWillBeGarbageCollectedSequenceArg", TestObjectV8Int
ernal::voidMethodTestInterfaceWillBeGarbageCollectedSequenceArgMethodCallback, 0
, 1, V8DOMConfiguration::ExposedToAllScripts}, |
11125 {"voidMethodTestInterfaceWillBeGarbageCollectedArrayArg", TestObjectV8Intern
al::voidMethodTestInterfaceWillBeGarbageCollectedArrayArgMethodCallback, 0, 1, V
8DOMConfiguration::ExposedToAllScripts}, | 11185 {"voidMethodTestInterfaceWillBeGarbageCollectedArrayArg", TestObjectV8Intern
al::voidMethodTestInterfaceWillBeGarbageCollectedArrayArgMethodCallback, 0, 1, V
8DOMConfiguration::ExposedToAllScripts}, |
11126 {"voidMethodImplementedInPrivateScript", TestObjectV8Internal::voidMethodImp
lementedInPrivateScriptMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScr
ipts}, | 11186 {"voidMethodImplementedInPrivateScript", TestObjectV8Internal::voidMethodImp
lementedInPrivateScriptMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScr
ipts}, |
11127 {"shortMethodImplementedInPrivateScript", TestObjectV8Internal::shortMethodI
mplementedInPrivateScriptMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllS
cripts}, | 11187 {"shortMethodImplementedInPrivateScript", TestObjectV8Internal::shortMethodI
mplementedInPrivateScriptMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllS
cripts}, |
11128 {"shortMethodWithShortArgumentImplementedInPrivateScript", TestObjectV8Inter
nal::shortMethodWithShortArgumentImplementedInPrivateScriptMethodCallback, 0, 1,
V8DOMConfiguration::ExposedToAllScripts}, | 11188 {"shortMethodWithShortArgumentImplementedInPrivateScript", TestObjectV8Inter
nal::shortMethodWithShortArgumentImplementedInPrivateScriptMethodCallback, 0, 1,
V8DOMConfiguration::ExposedToAllScripts}, |
11129 {"stringMethodWithStringArgumentImplementedInPrivateScript", TestObjectV8Int
ernal::stringMethodWithStringArgumentImplementedInPrivateScriptMethodCallback, 0
, 1, V8DOMConfiguration::ExposedToAllScripts}, | 11189 {"stringMethodWithStringArgumentImplementedInPrivateScript", TestObjectV8Int
ernal::stringMethodWithStringArgumentImplementedInPrivateScriptMethodCallback, 0
, 1, V8DOMConfiguration::ExposedToAllScripts}, |
11130 {"nodeMethodWithNodeArgumentImplementedInPrivateScript", TestObjectV8Interna
l::nodeMethodWithNodeArgumentImplementedInPrivateScriptMethodCallback, 0, 1, V8D
OMConfiguration::ExposedToAllScripts}, | 11190 {"nodeMethodWithNodeArgumentImplementedInPrivateScript", TestObjectV8Interna
l::nodeMethodWithNodeArgumentImplementedInPrivateScriptMethodCallback, 0, 1, V8D
OMConfiguration::ExposedToAllScripts}, |
11131 {"nodeMethodWithVariousArgumentsImplementedInPrivateScript", TestObjectV8Int
ernal::nodeMethodWithVariousArgumentsImplementedInPrivateScriptMethodCallback, 0
, 5, V8DOMConfiguration::ExposedToAllScripts}, | 11191 {"nodeMethodWithVariousArgumentsImplementedInPrivateScript", TestObjectV8Int
ernal::nodeMethodWithVariousArgumentsImplementedInPrivateScriptMethodCallback, 0
, 5, V8DOMConfiguration::ExposedToAllScripts}, |
11132 {"methodImplementedInCPPForPrivateScriptOnly", TestObjectV8Internal::methodI
mplementedInCPPForPrivateScriptOnlyMethodCallback, 0, 2, V8DOMConfiguration::Onl
yExposedToPrivateScript}, | 11192 {"methodImplementedInCPPForPrivateScriptOnly", TestObjectV8Internal::methodI
mplementedInCPPForPrivateScriptOnlyMethodCallback, 0, 2, V8DOMConfiguration::Onl
yExposedToPrivateScript}, |
| 11193 {"keys", TestObjectV8Internal::keysMethodCallback, 0, 0, V8DOMConfiguration:
:ExposedToAllScripts}, |
| 11194 {"values", TestObjectV8Internal::valuesMethodCallback, 0, 0, V8DOMConfigurat
ion::ExposedToAllScripts}, |
| 11195 {"entries", TestObjectV8Internal::entriesMethodCallback, 0, 0, V8DOMConfigur
ation::ExposedToAllScripts}, |
11133 {"toString", TestObjectV8Internal::toStringMethodCallback, 0, 0, V8DOMConfig
uration::ExposedToAllScripts}, | 11196 {"toString", TestObjectV8Internal::toStringMethodCallback, 0, 0, V8DOMConfig
uration::ExposedToAllScripts}, |
11134 }; | 11197 }; |
11135 | 11198 |
11136 static void installV8TestObjectTemplate(v8::Local<v8::FunctionTemplate> function
Template, v8::Isolate* isolate) | 11199 static void installV8TestObjectTemplate(v8::Local<v8::FunctionTemplate> function
Template, v8::Isolate* isolate) |
11137 { | 11200 { |
11138 functionTemplate->ReadOnlyPrototype(); | 11201 functionTemplate->ReadOnlyPrototype(); |
11139 | 11202 |
11140 v8::Local<v8::Signature> defaultSignature; | 11203 v8::Local<v8::Signature> defaultSignature; |
11141 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(isolate, func
tionTemplate, "TestObject", v8::Local<v8::FunctionTemplate>(), V8TestObject::int
ernalFieldCount, | 11204 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(isolate, func
tionTemplate, "TestObject", v8::Local<v8::FunctionTemplate>(), V8TestObject::int
ernalFieldCount, |
11142 V8TestObjectAttributes, WTF_ARRAY_LENGTH(V8TestObjectAttributes), | 11205 V8TestObjectAttributes, WTF_ARRAY_LENGTH(V8TestObjectAttributes), |
(...skipping 646 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11789 return false; | 11852 return false; |
11790 | 11853 |
11791 ScriptState::Scope scope(scriptState); | 11854 ScriptState::Scope scope(scriptState); |
11792 v8::Local<v8::Value> holder = toV8(holderImpl, scriptState->context()->Globa
l(), scriptState->isolate()); | 11855 v8::Local<v8::Value> holder = toV8(holderImpl, scriptState->context()->Globa
l(), scriptState->isolate()); |
11793 | 11856 |
11794 ExceptionState exceptionState(ExceptionState::SetterContext, "enumForPrivate
Script", "TestObject", scriptState->context()->Global(), scriptState->isolate())
; | 11857 ExceptionState exceptionState(ExceptionState::SetterContext, "enumForPrivate
Script", "TestObject", scriptState->context()->Global(), scriptState->isolate())
; |
11795 return PrivateScriptRunner::runDOMAttributeSetter(scriptState, scriptStateIn
UserScript, "TestObject", "enumForPrivateScript", holder, v8String(scriptState->
isolate(), cppValue)); | 11858 return PrivateScriptRunner::runDOMAttributeSetter(scriptState, scriptStateIn
UserScript, "TestObject", "enumForPrivateScript", holder, v8String(scriptState->
isolate(), cppValue)); |
11796 } | 11859 } |
11797 | 11860 |
11798 } // namespace blink | 11861 } // namespace blink |
OLD | NEW |