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 "V8TestInterface3.h" | 8 #include "V8TestInterface3.h" |
9 | 9 |
10 #include "bindings/core/v8/ExceptionState.h" | 10 #include "bindings/core/v8/ExceptionState.h" |
(...skipping 14 matching lines...) Expand all Loading... |
25 | 25 |
26 const WrapperTypeInfo V8TestInterface3::wrapperTypeInfo = { gin::kEmbedderBlink,
V8TestInterface3::domTemplate, V8TestInterface3::refObject, V8TestInterface3::d
erefObject, V8TestInterface3::trace, 0, V8TestInterface3::visitDOMWrapper, V8Tes
tInterface3::installConditionallyEnabledMethods, V8TestInterface3::installCondit
ionallyEnabledProperties, 0, WrapperTypeInfo::WrapperTypeObjectPrototype, Wrappe
rTypeInfo::ObjectClassId, WrapperTypeInfo::NotInheritFromEventTarget, WrapperTyp
eInfo::Dependent, WrapperTypeInfo::RefCountedObject }; | 26 const WrapperTypeInfo V8TestInterface3::wrapperTypeInfo = { gin::kEmbedderBlink,
V8TestInterface3::domTemplate, V8TestInterface3::refObject, V8TestInterface3::d
erefObject, V8TestInterface3::trace, 0, V8TestInterface3::visitDOMWrapper, V8Tes
tInterface3::installConditionallyEnabledMethods, V8TestInterface3::installCondit
ionallyEnabledProperties, 0, WrapperTypeInfo::WrapperTypeObjectPrototype, Wrappe
rTypeInfo::ObjectClassId, WrapperTypeInfo::NotInheritFromEventTarget, WrapperTyp
eInfo::Dependent, WrapperTypeInfo::RefCountedObject }; |
27 | 27 |
28 // This static member must be declared by DEFINE_WRAPPERTYPEINFO in TestInterfac
e3.h. | 28 // This static member must be declared by DEFINE_WRAPPERTYPEINFO in TestInterfac
e3.h. |
29 // For details, see the comment of DEFINE_WRAPPERTYPEINFO in | 29 // For details, see the comment of DEFINE_WRAPPERTYPEINFO in |
30 // bindings/core/v8/ScriptWrappable.h. | 30 // bindings/core/v8/ScriptWrappable.h. |
31 const WrapperTypeInfo& TestInterface3::s_wrapperTypeInfo = V8TestInterface3::wra
pperTypeInfo; | 31 const WrapperTypeInfo& TestInterface3::s_wrapperTypeInfo = V8TestInterface3::wra
pperTypeInfo; |
32 | 32 |
33 namespace TestInterface3V8Internal { | 33 namespace TestInterface3V8Internal { |
34 | 34 |
| 35 static void keysMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 36 { |
| 37 ExceptionState exceptionState(ExceptionState::ExecutionContext, "keys", "Tes
tInterface3", info.Holder(), info.GetIsolate()); |
| 38 TestInterface3* impl = V8TestInterface3::toImpl(info.Holder()); |
| 39 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); |
| 40 RawPtr<Iterator> result = impl->keys(scriptState, exceptionState); |
| 41 if (exceptionState.hadException()) { |
| 42 exceptionState.throwIfNeeded(); |
| 43 return; |
| 44 } |
| 45 v8SetReturnValue(info, result.release()); |
| 46 } |
| 47 |
| 48 static void keysMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 49 { |
| 50 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 51 TestInterface3V8Internal::keysMethod(info); |
| 52 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 53 } |
| 54 |
| 55 static void valuesMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 56 { |
| 57 ExceptionState exceptionState(ExceptionState::ExecutionContext, "values", "T
estInterface3", info.Holder(), info.GetIsolate()); |
| 58 TestInterface3* impl = V8TestInterface3::toImpl(info.Holder()); |
| 59 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); |
| 60 RawPtr<Iterator> result = impl->values(scriptState, exceptionState); |
| 61 if (exceptionState.hadException()) { |
| 62 exceptionState.throwIfNeeded(); |
| 63 return; |
| 64 } |
| 65 v8SetReturnValue(info, result.release()); |
| 66 } |
| 67 |
| 68 static void valuesMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info
) |
| 69 { |
| 70 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 71 TestInterface3V8Internal::valuesMethod(info); |
| 72 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 73 } |
| 74 |
| 75 static void entriesMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 76 { |
| 77 ExceptionState exceptionState(ExceptionState::ExecutionContext, "entries", "
TestInterface3", info.Holder(), info.GetIsolate()); |
| 78 TestInterface3* impl = V8TestInterface3::toImpl(info.Holder()); |
| 79 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); |
| 80 RawPtr<Iterator> result = impl->entries(scriptState, exceptionState); |
| 81 if (exceptionState.hadException()) { |
| 82 exceptionState.throwIfNeeded(); |
| 83 return; |
| 84 } |
| 85 v8SetReturnValue(info, result.release()); |
| 86 } |
| 87 |
| 88 static void entriesMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& inf
o) |
| 89 { |
| 90 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 91 TestInterface3V8Internal::entriesMethod(info); |
| 92 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 93 } |
| 94 |
35 static void iteratorMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | 95 static void iteratorMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
36 { | 96 { |
37 ExceptionState exceptionState(ExceptionState::ExecutionContext, "iterator",
"TestInterface3", info.Holder(), info.GetIsolate()); | 97 ExceptionState exceptionState(ExceptionState::ExecutionContext, "iterator",
"TestInterface3", info.Holder(), info.GetIsolate()); |
38 TestInterface3* impl = V8TestInterface3::toImpl(info.Holder()); | 98 TestInterface3* impl = V8TestInterface3::toImpl(info.Holder()); |
39 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); | 99 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); |
40 RawPtr<Iterator> result = impl->iterator(scriptState, exceptionState); | 100 RawPtr<Iterator> result = impl->iterator(scriptState, exceptionState); |
41 if (exceptionState.hadException()) { | 101 if (exceptionState.hadException()) { |
42 exceptionState.throwIfNeeded(); | 102 exceptionState.throwIfNeeded(); |
43 return; | 103 return; |
44 } | 104 } |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 | 163 |
104 static void namedPropertyEnumeratorCallback(const v8::PropertyCallbackInfo<v8::A
rray>& info) | 164 static void namedPropertyEnumeratorCallback(const v8::PropertyCallbackInfo<v8::A
rray>& info) |
105 { | 165 { |
106 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMNamedProperty"); | 166 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMNamedProperty"); |
107 V8TestInterface3::namedPropertyEnumeratorCustom(info); | 167 V8TestInterface3::namedPropertyEnumeratorCustom(info); |
108 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 168 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
109 } | 169 } |
110 | 170 |
111 } // namespace TestInterface3V8Internal | 171 } // namespace TestInterface3V8Internal |
112 | 172 |
| 173 static const V8DOMConfiguration::MethodConfiguration V8TestInterface3Methods[] =
{ |
| 174 {"keys", TestInterface3V8Internal::keysMethodCallback, 0, 0, V8DOMConfigurat
ion::ExposedToAllScripts}, |
| 175 {"values", TestInterface3V8Internal::valuesMethodCallback, 0, 0, V8DOMConfig
uration::ExposedToAllScripts}, |
| 176 {"entries", TestInterface3V8Internal::entriesMethodCallback, 0, 0, V8DOMConf
iguration::ExposedToAllScripts}, |
| 177 }; |
| 178 |
113 static void installV8TestInterface3Template(v8::Local<v8::FunctionTemplate> func
tionTemplate, v8::Isolate* isolate) | 179 static void installV8TestInterface3Template(v8::Local<v8::FunctionTemplate> func
tionTemplate, v8::Isolate* isolate) |
114 { | 180 { |
115 functionTemplate->ReadOnlyPrototype(); | 181 functionTemplate->ReadOnlyPrototype(); |
116 | 182 |
117 v8::Local<v8::Signature> defaultSignature; | 183 v8::Local<v8::Signature> defaultSignature; |
118 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(isolate, func
tionTemplate, "TestInterface3", v8::Local<v8::FunctionTemplate>(), V8TestInterfa
ce3::internalFieldCount, | 184 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(isolate, func
tionTemplate, "TestInterface3", v8::Local<v8::FunctionTemplate>(), V8TestInterfa
ce3::internalFieldCount, |
119 0, 0, | 185 0, 0, |
120 0, 0, | 186 0, 0, |
121 0, 0); | 187 V8TestInterface3Methods, WTF_ARRAY_LENGTH(V8TestInterface3Methods)); |
122 v8::Local<v8::ObjectTemplate> instanceTemplate = functionTemplate->InstanceT
emplate(); | 188 v8::Local<v8::ObjectTemplate> instanceTemplate = functionTemplate->InstanceT
emplate(); |
123 ALLOW_UNUSED_LOCAL(instanceTemplate); | 189 ALLOW_UNUSED_LOCAL(instanceTemplate); |
124 v8::Local<v8::ObjectTemplate> prototypeTemplate = functionTemplate->Prototyp
eTemplate(); | 190 v8::Local<v8::ObjectTemplate> prototypeTemplate = functionTemplate->Prototyp
eTemplate(); |
125 ALLOW_UNUSED_LOCAL(prototypeTemplate); | 191 ALLOW_UNUSED_LOCAL(prototypeTemplate); |
126 functionTemplate->InstanceTemplate()->SetHandler(v8::IndexedPropertyHandlerC
onfiguration(TestInterface3V8Internal::indexedPropertyGetterCallback, TestInterf
ace3V8Internal::indexedPropertySetterCallback, 0, TestInterface3V8Internal::inde
xedPropertyDeleterCallback, indexedPropertyEnumerator<TestInterface3>)); | 192 functionTemplate->InstanceTemplate()->SetHandler(v8::IndexedPropertyHandlerC
onfiguration(TestInterface3V8Internal::indexedPropertyGetterCallback, TestInterf
ace3V8Internal::indexedPropertySetterCallback, 0, TestInterface3V8Internal::inde
xedPropertyDeleterCallback, indexedPropertyEnumerator<TestInterface3>)); |
127 functionTemplate->InstanceTemplate()->SetHandler(v8::NamedPropertyHandlerCon
figuration(TestInterface3V8Internal::namedPropertyGetterCallback, TestInterface3
V8Internal::namedPropertySetterCallback, TestInterface3V8Internal::namedProperty
QueryCallback, TestInterface3V8Internal::namedPropertyDeleterCallback, TestInter
face3V8Internal::namedPropertyEnumeratorCallback)); | 193 functionTemplate->InstanceTemplate()->SetHandler(v8::NamedPropertyHandlerCon
figuration(TestInterface3V8Internal::namedPropertyGetterCallback, TestInterface3
V8Internal::namedPropertySetterCallback, TestInterface3V8Internal::namedProperty
QueryCallback, TestInterface3V8Internal::namedPropertyDeleterCallback, TestInter
face3V8Internal::namedPropertyEnumeratorCallback)); |
128 static const V8DOMConfiguration::SymbolKeyedMethodConfiguration symbolKeyedI
teratorConfiguration = { v8::Symbol::GetIterator, TestInterface3V8Internal::iter
atorMethodCallback, 0, V8DOMConfiguration::ExposedToAllScripts }; | 194 static const V8DOMConfiguration::SymbolKeyedMethodConfiguration symbolKeyedI
teratorConfiguration = { v8::Symbol::GetIterator, TestInterface3V8Internal::iter
atorMethodCallback, 0, V8DOMConfiguration::ExposedToAllScripts }; |
129 V8DOMConfiguration::installMethod(prototypeTemplate, defaultSignature, v8::D
ontDelete, symbolKeyedIteratorConfiguration, isolate); | 195 V8DOMConfiguration::installMethod(prototypeTemplate, defaultSignature, v8::D
ontDelete, symbolKeyedIteratorConfiguration, isolate); |
130 | 196 |
131 // Custom toString template | 197 // Custom toString template |
(...skipping 24 matching lines...) Expand all Loading... |
156 { | 222 { |
157 scriptWrappable->toImpl<TestInterface3>()->ref(); | 223 scriptWrappable->toImpl<TestInterface3>()->ref(); |
158 } | 224 } |
159 | 225 |
160 void V8TestInterface3::derefObject(ScriptWrappable* scriptWrappable) | 226 void V8TestInterface3::derefObject(ScriptWrappable* scriptWrappable) |
161 { | 227 { |
162 scriptWrappable->toImpl<TestInterface3>()->deref(); | 228 scriptWrappable->toImpl<TestInterface3>()->deref(); |
163 } | 229 } |
164 | 230 |
165 } // namespace blink | 231 } // namespace blink |
OLD | NEW |