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 10767 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10778 v8SetReturnValue(info, result.release()); | 10778 v8SetReturnValue(info, result.release()); |
10779 } | 10779 } |
10780 | 10780 |
10781 static void entriesMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& inf
o) | 10781 static void entriesMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& inf
o) |
10782 { | 10782 { |
10783 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 10783 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
10784 TestObjectV8Internal::entriesMethod(info); | 10784 TestObjectV8Internal::entriesMethod(info); |
10785 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 10785 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
10786 } | 10786 } |
10787 | 10787 |
| 10788 static void forEachMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 10789 { |
| 10790 ExceptionState exceptionState(ExceptionState::ExecutionContext, "forEach", "
TestObject", info.Holder(), info.GetIsolate()); |
| 10791 if (UNLIKELY(info.Length() < 1)) { |
| 10792 setMinimumArityTypeError(exceptionState, 1, info.Length()); |
| 10793 exceptionState.throwIfNeeded(); |
| 10794 return; |
| 10795 } |
| 10796 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 10797 ScriptValue callback; |
| 10798 ScriptValue thisArg; |
| 10799 { |
| 10800 if (!info[0]->IsFunction()) { |
| 10801 exceptionState.throwTypeError("The callback provided as parameter 1
is not a function."); |
| 10802 exceptionState.throwIfNeeded(); |
| 10803 return; |
| 10804 } |
| 10805 callback = ScriptValue(ScriptState::current(info.GetIsolate()), info[0])
; |
| 10806 thisArg = ScriptValue(ScriptState::current(info.GetIsolate()), info[1]); |
| 10807 } |
| 10808 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); |
| 10809 impl->forEach(scriptState, ScriptValue(scriptState, info.This()), callback,
thisArg, exceptionState); |
| 10810 if (exceptionState.hadException()) { |
| 10811 exceptionState.throwIfNeeded(); |
| 10812 return; |
| 10813 } |
| 10814 } |
| 10815 |
| 10816 static void forEachMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& inf
o) |
| 10817 { |
| 10818 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 10819 TestObjectV8Internal::forEachMethod(info); |
| 10820 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 10821 } |
| 10822 |
10788 static void toStringMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | 10823 static void toStringMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
10789 { | 10824 { |
10790 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 10825 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
10791 v8SetReturnValueString(info, impl->stringifierAttribute(), info.GetIsolate()
); | 10826 v8SetReturnValueString(info, impl->stringifierAttribute(), info.GetIsolate()
); |
10792 } | 10827 } |
10793 | 10828 |
10794 static void toStringMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& in
fo) | 10829 static void toStringMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& in
fo) |
10795 { | 10830 { |
10796 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 10831 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
10797 TestObjectV8Internal::toStringMethod(info); | 10832 TestObjectV8Internal::toStringMethod(info); |
(...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11209 {"voidMethodImplementedInPrivateScript", TestObjectV8Internal::voidMethodImp
lementedInPrivateScriptMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScr
ipts}, | 11244 {"voidMethodImplementedInPrivateScript", TestObjectV8Internal::voidMethodImp
lementedInPrivateScriptMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScr
ipts}, |
11210 {"shortMethodImplementedInPrivateScript", TestObjectV8Internal::shortMethodI
mplementedInPrivateScriptMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllS
cripts}, | 11245 {"shortMethodImplementedInPrivateScript", TestObjectV8Internal::shortMethodI
mplementedInPrivateScriptMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllS
cripts}, |
11211 {"shortMethodWithShortArgumentImplementedInPrivateScript", TestObjectV8Inter
nal::shortMethodWithShortArgumentImplementedInPrivateScriptMethodCallback, 0, 1,
V8DOMConfiguration::ExposedToAllScripts}, | 11246 {"shortMethodWithShortArgumentImplementedInPrivateScript", TestObjectV8Inter
nal::shortMethodWithShortArgumentImplementedInPrivateScriptMethodCallback, 0, 1,
V8DOMConfiguration::ExposedToAllScripts}, |
11212 {"stringMethodWithStringArgumentImplementedInPrivateScript", TestObjectV8Int
ernal::stringMethodWithStringArgumentImplementedInPrivateScriptMethodCallback, 0
, 1, V8DOMConfiguration::ExposedToAllScripts}, | 11247 {"stringMethodWithStringArgumentImplementedInPrivateScript", TestObjectV8Int
ernal::stringMethodWithStringArgumentImplementedInPrivateScriptMethodCallback, 0
, 1, V8DOMConfiguration::ExposedToAllScripts}, |
11213 {"nodeMethodWithNodeArgumentImplementedInPrivateScript", TestObjectV8Interna
l::nodeMethodWithNodeArgumentImplementedInPrivateScriptMethodCallback, 0, 1, V8D
OMConfiguration::ExposedToAllScripts}, | 11248 {"nodeMethodWithNodeArgumentImplementedInPrivateScript", TestObjectV8Interna
l::nodeMethodWithNodeArgumentImplementedInPrivateScriptMethodCallback, 0, 1, V8D
OMConfiguration::ExposedToAllScripts}, |
11214 {"nodeMethodWithVariousArgumentsImplementedInPrivateScript", TestObjectV8Int
ernal::nodeMethodWithVariousArgumentsImplementedInPrivateScriptMethodCallback, 0
, 5, V8DOMConfiguration::ExposedToAllScripts}, | 11249 {"nodeMethodWithVariousArgumentsImplementedInPrivateScript", TestObjectV8Int
ernal::nodeMethodWithVariousArgumentsImplementedInPrivateScriptMethodCallback, 0
, 5, V8DOMConfiguration::ExposedToAllScripts}, |
11215 {"methodImplementedInCPPForPrivateScriptOnly", TestObjectV8Internal::methodI
mplementedInCPPForPrivateScriptOnlyMethodCallback, 0, 2, V8DOMConfiguration::Onl
yExposedToPrivateScript}, | 11250 {"methodImplementedInCPPForPrivateScriptOnly", TestObjectV8Internal::methodI
mplementedInCPPForPrivateScriptOnlyMethodCallback, 0, 2, V8DOMConfiguration::Onl
yExposedToPrivateScript}, |
11216 {"keys", TestObjectV8Internal::keysMethodCallback, 0, 0, V8DOMConfiguration:
:ExposedToAllScripts}, | 11251 {"keys", TestObjectV8Internal::keysMethodCallback, 0, 0, V8DOMConfiguration:
:ExposedToAllScripts}, |
11217 {"values", TestObjectV8Internal::valuesMethodCallback, 0, 0, V8DOMConfigurat
ion::ExposedToAllScripts}, | 11252 {"values", TestObjectV8Internal::valuesMethodCallback, 0, 0, V8DOMConfigurat
ion::ExposedToAllScripts}, |
11218 {"entries", TestObjectV8Internal::entriesMethodCallback, 0, 0, V8DOMConfigur
ation::ExposedToAllScripts}, | 11253 {"entries", TestObjectV8Internal::entriesMethodCallback, 0, 0, V8DOMConfigur
ation::ExposedToAllScripts}, |
| 11254 {"forEach", TestObjectV8Internal::forEachMethodCallback, 0, 1, V8DOMConfigur
ation::ExposedToAllScripts}, |
11219 {"toString", TestObjectV8Internal::toStringMethodCallback, 0, 0, V8DOMConfig
uration::ExposedToAllScripts}, | 11255 {"toString", TestObjectV8Internal::toStringMethodCallback, 0, 0, V8DOMConfig
uration::ExposedToAllScripts}, |
11220 }; | 11256 }; |
11221 | 11257 |
11222 static void installV8TestObjectTemplate(v8::Local<v8::FunctionTemplate> function
Template, v8::Isolate* isolate) | 11258 static void installV8TestObjectTemplate(v8::Local<v8::FunctionTemplate> function
Template, v8::Isolate* isolate) |
11223 { | 11259 { |
11224 functionTemplate->ReadOnlyPrototype(); | 11260 functionTemplate->ReadOnlyPrototype(); |
11225 | 11261 |
11226 v8::Local<v8::Signature> defaultSignature; | 11262 v8::Local<v8::Signature> defaultSignature; |
11227 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(isolate, func
tionTemplate, "TestObject", v8::Local<v8::FunctionTemplate>(), V8TestObject::int
ernalFieldCount, | 11263 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(isolate, func
tionTemplate, "TestObject", v8::Local<v8::FunctionTemplate>(), V8TestObject::int
ernalFieldCount, |
11228 V8TestObjectAttributes, WTF_ARRAY_LENGTH(V8TestObjectAttributes), | 11264 V8TestObjectAttributes, WTF_ARRAY_LENGTH(V8TestObjectAttributes), |
(...skipping 646 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11875 return false; | 11911 return false; |
11876 | 11912 |
11877 ScriptState::Scope scope(scriptState); | 11913 ScriptState::Scope scope(scriptState); |
11878 v8::Local<v8::Value> holder = toV8(holderImpl, scriptState->context()->Globa
l(), scriptState->isolate()); | 11914 v8::Local<v8::Value> holder = toV8(holderImpl, scriptState->context()->Globa
l(), scriptState->isolate()); |
11879 | 11915 |
11880 ExceptionState exceptionState(ExceptionState::SetterContext, "enumForPrivate
Script", "TestObject", scriptState->context()->Global(), scriptState->isolate())
; | 11916 ExceptionState exceptionState(ExceptionState::SetterContext, "enumForPrivate
Script", "TestObject", scriptState->context()->Global(), scriptState->isolate())
; |
11881 return PrivateScriptRunner::runDOMAttributeSetter(scriptState, scriptStateIn
UserScript, "TestObject", "enumForPrivateScript", holder, v8String(scriptState->
isolate(), cppValue)); | 11917 return PrivateScriptRunner::runDOMAttributeSetter(scriptState, scriptStateIn
UserScript, "TestObject", "enumForPrivateScript", holder, v8String(scriptState->
isolate(), cppValue)); |
11882 } | 11918 } |
11883 | 11919 |
11884 } // namespace blink | 11920 } // namespace blink |
OLD | NEW |