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 10745 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10756 v8SetReturnValue(info, result.release()); | 10756 v8SetReturnValue(info, result.release()); |
10757 } | 10757 } |
10758 | 10758 |
10759 static void entriesMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& inf
o) | 10759 static void entriesMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& inf
o) |
10760 { | 10760 { |
10761 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 10761 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
10762 TestObjectV8Internal::entriesMethod(info); | 10762 TestObjectV8Internal::entriesMethod(info); |
10763 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 10763 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
10764 } | 10764 } |
10765 | 10765 |
| 10766 static void forEachMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 10767 { |
| 10768 ExceptionState exceptionState(ExceptionState::ExecutionContext, "forEach", "
TestObject", info.Holder(), info.GetIsolate()); |
| 10769 if (UNLIKELY(info.Length() < 1)) { |
| 10770 setMinimumArityTypeError(exceptionState, 1, info.Length()); |
| 10771 exceptionState.throwIfNeeded(); |
| 10772 return; |
| 10773 } |
| 10774 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 10775 ScriptValue callback; |
| 10776 ScriptValue thisArg; |
| 10777 { |
| 10778 if (!info[0]->IsFunction()) { |
| 10779 exceptionState.throwTypeError("The callback provided as parameter 1
is not a function."); |
| 10780 exceptionState.throwIfNeeded(); |
| 10781 return; |
| 10782 } |
| 10783 callback = ScriptValue(ScriptState::current(info.GetIsolate()), info[0])
; |
| 10784 thisArg = ScriptValue(ScriptState::current(info.GetIsolate()), info[1]); |
| 10785 } |
| 10786 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); |
| 10787 impl->forEach(scriptState, ScriptValue(scriptState, info.This()), callback,
thisArg, exceptionState); |
| 10788 if (exceptionState.hadException()) { |
| 10789 exceptionState.throwIfNeeded(); |
| 10790 return; |
| 10791 } |
| 10792 } |
| 10793 |
| 10794 static void forEachMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& inf
o) |
| 10795 { |
| 10796 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 10797 TestObjectV8Internal::forEachMethod(info); |
| 10798 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 10799 } |
| 10800 |
10766 static void toStringMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | 10801 static void toStringMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
10767 { | 10802 { |
10768 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 10803 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
10769 v8SetReturnValueString(info, impl->stringifierAttribute(), info.GetIsolate()
); | 10804 v8SetReturnValueString(info, impl->stringifierAttribute(), info.GetIsolate()
); |
10770 } | 10805 } |
10771 | 10806 |
10772 static void toStringMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& in
fo) | 10807 static void toStringMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& in
fo) |
10773 { | 10808 { |
10774 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 10809 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
10775 TestObjectV8Internal::toStringMethod(info); | 10810 TestObjectV8Internal::toStringMethod(info); |
(...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11186 {"voidMethodImplementedInPrivateScript", TestObjectV8Internal::voidMethodImp
lementedInPrivateScriptMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScr
ipts}, | 11221 {"voidMethodImplementedInPrivateScript", TestObjectV8Internal::voidMethodImp
lementedInPrivateScriptMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScr
ipts}, |
11187 {"shortMethodImplementedInPrivateScript", TestObjectV8Internal::shortMethodI
mplementedInPrivateScriptMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllS
cripts}, | 11222 {"shortMethodImplementedInPrivateScript", TestObjectV8Internal::shortMethodI
mplementedInPrivateScriptMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllS
cripts}, |
11188 {"shortMethodWithShortArgumentImplementedInPrivateScript", TestObjectV8Inter
nal::shortMethodWithShortArgumentImplementedInPrivateScriptMethodCallback, 0, 1,
V8DOMConfiguration::ExposedToAllScripts}, | 11223 {"shortMethodWithShortArgumentImplementedInPrivateScript", TestObjectV8Inter
nal::shortMethodWithShortArgumentImplementedInPrivateScriptMethodCallback, 0, 1,
V8DOMConfiguration::ExposedToAllScripts}, |
11189 {"stringMethodWithStringArgumentImplementedInPrivateScript", TestObjectV8Int
ernal::stringMethodWithStringArgumentImplementedInPrivateScriptMethodCallback, 0
, 1, V8DOMConfiguration::ExposedToAllScripts}, | 11224 {"stringMethodWithStringArgumentImplementedInPrivateScript", TestObjectV8Int
ernal::stringMethodWithStringArgumentImplementedInPrivateScriptMethodCallback, 0
, 1, V8DOMConfiguration::ExposedToAllScripts}, |
11190 {"nodeMethodWithNodeArgumentImplementedInPrivateScript", TestObjectV8Interna
l::nodeMethodWithNodeArgumentImplementedInPrivateScriptMethodCallback, 0, 1, V8D
OMConfiguration::ExposedToAllScripts}, | 11225 {"nodeMethodWithNodeArgumentImplementedInPrivateScript", TestObjectV8Interna
l::nodeMethodWithNodeArgumentImplementedInPrivateScriptMethodCallback, 0, 1, V8D
OMConfiguration::ExposedToAllScripts}, |
11191 {"nodeMethodWithVariousArgumentsImplementedInPrivateScript", TestObjectV8Int
ernal::nodeMethodWithVariousArgumentsImplementedInPrivateScriptMethodCallback, 0
, 5, V8DOMConfiguration::ExposedToAllScripts}, | 11226 {"nodeMethodWithVariousArgumentsImplementedInPrivateScript", TestObjectV8Int
ernal::nodeMethodWithVariousArgumentsImplementedInPrivateScriptMethodCallback, 0
, 5, V8DOMConfiguration::ExposedToAllScripts}, |
11192 {"methodImplementedInCPPForPrivateScriptOnly", TestObjectV8Internal::methodI
mplementedInCPPForPrivateScriptOnlyMethodCallback, 0, 2, V8DOMConfiguration::Onl
yExposedToPrivateScript}, | 11227 {"methodImplementedInCPPForPrivateScriptOnly", TestObjectV8Internal::methodI
mplementedInCPPForPrivateScriptOnlyMethodCallback, 0, 2, V8DOMConfiguration::Onl
yExposedToPrivateScript}, |
11193 {"keys", TestObjectV8Internal::keysMethodCallback, 0, 0, V8DOMConfiguration:
:ExposedToAllScripts}, | 11228 {"keys", TestObjectV8Internal::keysMethodCallback, 0, 0, V8DOMConfiguration:
:ExposedToAllScripts}, |
11194 {"values", TestObjectV8Internal::valuesMethodCallback, 0, 0, V8DOMConfigurat
ion::ExposedToAllScripts}, | 11229 {"values", TestObjectV8Internal::valuesMethodCallback, 0, 0, V8DOMConfigurat
ion::ExposedToAllScripts}, |
11195 {"entries", TestObjectV8Internal::entriesMethodCallback, 0, 0, V8DOMConfigur
ation::ExposedToAllScripts}, | 11230 {"entries", TestObjectV8Internal::entriesMethodCallback, 0, 0, V8DOMConfigur
ation::ExposedToAllScripts}, |
| 11231 {"forEach", TestObjectV8Internal::forEachMethodCallback, 0, 1, V8DOMConfigur
ation::ExposedToAllScripts}, |
11196 {"toString", TestObjectV8Internal::toStringMethodCallback, 0, 0, V8DOMConfig
uration::ExposedToAllScripts}, | 11232 {"toString", TestObjectV8Internal::toStringMethodCallback, 0, 0, V8DOMConfig
uration::ExposedToAllScripts}, |
11197 }; | 11233 }; |
11198 | 11234 |
11199 static void installV8TestObjectTemplate(v8::Local<v8::FunctionTemplate> function
Template, v8::Isolate* isolate) | 11235 static void installV8TestObjectTemplate(v8::Local<v8::FunctionTemplate> function
Template, v8::Isolate* isolate) |
11200 { | 11236 { |
11201 functionTemplate->ReadOnlyPrototype(); | 11237 functionTemplate->ReadOnlyPrototype(); |
11202 | 11238 |
11203 v8::Local<v8::Signature> defaultSignature; | 11239 v8::Local<v8::Signature> defaultSignature; |
11204 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(isolate, func
tionTemplate, "TestObject", v8::Local<v8::FunctionTemplate>(), V8TestObject::int
ernalFieldCount, | 11240 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(isolate, func
tionTemplate, "TestObject", v8::Local<v8::FunctionTemplate>(), V8TestObject::int
ernalFieldCount, |
11205 V8TestObjectAttributes, WTF_ARRAY_LENGTH(V8TestObjectAttributes), | 11241 V8TestObjectAttributes, WTF_ARRAY_LENGTH(V8TestObjectAttributes), |
(...skipping 646 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11852 return false; | 11888 return false; |
11853 | 11889 |
11854 ScriptState::Scope scope(scriptState); | 11890 ScriptState::Scope scope(scriptState); |
11855 v8::Local<v8::Value> holder = toV8(holderImpl, scriptState->context()->Globa
l(), scriptState->isolate()); | 11891 v8::Local<v8::Value> holder = toV8(holderImpl, scriptState->context()->Globa
l(), scriptState->isolate()); |
11856 | 11892 |
11857 ExceptionState exceptionState(ExceptionState::SetterContext, "enumForPrivate
Script", "TestObject", scriptState->context()->Global(), scriptState->isolate())
; | 11893 ExceptionState exceptionState(ExceptionState::SetterContext, "enumForPrivate
Script", "TestObject", scriptState->context()->Global(), scriptState->isolate())
; |
11858 return PrivateScriptRunner::runDOMAttributeSetter(scriptState, scriptStateIn
UserScript, "TestObject", "enumForPrivateScript", holder, v8String(scriptState->
isolate(), cppValue)); | 11894 return PrivateScriptRunner::runDOMAttributeSetter(scriptState, scriptStateIn
UserScript, "TestObject", "enumForPrivateScript", holder, v8String(scriptState->
isolate(), cppValue)); |
11859 } | 11895 } |
11860 | 11896 |
11861 } // namespace blink | 11897 } // namespace blink |
OLD | NEW |