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. | 5 // This file has been auto-generated by code_generator_v8.py. |
6 // DO NOT MODIFY! | 6 // DO NOT MODIFY! |
7 | 7 |
8 // clang-format off | 8 // clang-format off |
9 #include "V8TestInterface3.h" | 9 #include "V8TestInterface3.h" |
10 | 10 |
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
253 V8TestInterface3::indexedPropertyDeleterCustom(index, info); | 253 V8TestInterface3::indexedPropertyDeleterCustom(index, info); |
254 } | 254 } |
255 | 255 |
256 } // namespace TestInterface3V8Internal | 256 } // namespace TestInterface3V8Internal |
257 | 257 |
258 void V8TestInterface3::visitDOMWrapper(v8::Isolate* isolate, ScriptWrappable* sc
riptWrappable, const v8::Persistent<v8::Object>& wrapper) { | 258 void V8TestInterface3::visitDOMWrapper(v8::Isolate* isolate, ScriptWrappable* sc
riptWrappable, const v8::Persistent<v8::Object>& wrapper) { |
259 V8TestInterface3::visitDOMWrapperCustom(isolate, scriptWrappable, wrapper); | 259 V8TestInterface3::visitDOMWrapperCustom(isolate, scriptWrappable, wrapper); |
260 } | 260 } |
261 | 261 |
262 const V8DOMConfiguration::AccessorConfiguration V8TestInterface3Accessors[] = { | 262 const V8DOMConfiguration::AccessorConfiguration V8TestInterface3Accessors[] = { |
263 {"readonlyStringifierAttribute", TestInterface3V8Internal::readonlyStringifi
erAttributeAttributeGetterCallback, 0, 0, 0, nullptr, 0, v8::DEFAULT, static_cas
t<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::ExposedToAllScripts,
V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, | 263 {"readonlyStringifierAttribute", TestInterface3V8Internal::readonlyStringifi
erAttributeAttributeGetterCallback, 0, 0, 0, nullptr, 0, v8::DEFAULT, static_cas
t<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::OnPrototype, V8DOMCo
nfiguration::CheckHolder}, |
264 }; | 264 }; |
265 | 265 |
266 const V8DOMConfiguration::MethodConfiguration V8TestInterface3Methods[] = { | 266 const V8DOMConfiguration::MethodConfiguration V8TestInterface3Methods[] = { |
267 {"voidMethodDocument", TestInterface3V8Internal::voidMethodDocumentMethodCal
lback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfigurati
on::OnPrototype, V8DOMConfiguration::CheckHolder}, | 267 {"voidMethodDocument", TestInterface3V8Internal::voidMethodDocumentMethodCal
lback, 0, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::Chec
kHolder}, |
268 {"toString", TestInterface3V8Internal::toStringMethodCallback, 0, 0, v8::Non
e, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8D
OMConfiguration::CheckHolder}, | 268 {"toString", TestInterface3V8Internal::toStringMethodCallback, 0, 0, v8::Non
e, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
269 }; | 269 }; |
270 | 270 |
271 static void installV8TestInterface3Template(v8::Isolate* isolate, const DOMWrapp
erWorld& world, v8::Local<v8::FunctionTemplate> interfaceTemplate) { | 271 static void installV8TestInterface3Template(v8::Isolate* isolate, const DOMWrapp
erWorld& world, v8::Local<v8::FunctionTemplate> interfaceTemplate) { |
272 // Initialize the interface object's template. | 272 // Initialize the interface object's template. |
273 V8DOMConfiguration::initializeDOMInterfaceTemplate(isolate, interfaceTemplate,
V8TestInterface3::wrapperTypeInfo.interfaceName, v8::Local<v8::FunctionTemplate
>(), V8TestInterface3::internalFieldCount); | 273 V8DOMConfiguration::initializeDOMInterfaceTemplate(isolate, interfaceTemplate,
V8TestInterface3::wrapperTypeInfo.interfaceName, v8::Local<v8::FunctionTemplate
>(), V8TestInterface3::internalFieldCount); |
274 v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interfaceTemp
late); | 274 v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interfaceTemp
late); |
275 ALLOW_UNUSED_LOCAL(signature); | 275 ALLOW_UNUSED_LOCAL(signature); |
276 v8::Local<v8::ObjectTemplate> instanceTemplate = interfaceTemplate->InstanceTe
mplate(); | 276 v8::Local<v8::ObjectTemplate> instanceTemplate = interfaceTemplate->InstanceTe
mplate(); |
277 ALLOW_UNUSED_LOCAL(instanceTemplate); | 277 ALLOW_UNUSED_LOCAL(instanceTemplate); |
278 v8::Local<v8::ObjectTemplate> prototypeTemplate = interfaceTemplate->Prototype
Template(); | 278 v8::Local<v8::ObjectTemplate> prototypeTemplate = interfaceTemplate->Prototype
Template(); |
279 ALLOW_UNUSED_LOCAL(prototypeTemplate); | 279 ALLOW_UNUSED_LOCAL(prototypeTemplate); |
280 | 280 |
281 // Register DOM constants, attributes and operations. | 281 // Register DOM constants, attributes and operations. |
282 V8DOMConfiguration::installAccessors(isolate, world, instanceTemplate, prototy
peTemplate, interfaceTemplate, signature, V8TestInterface3Accessors, WTF_ARRAY_L
ENGTH(V8TestInterface3Accessors)); | 282 V8DOMConfiguration::installAccessors(isolate, world, instanceTemplate, prototy
peTemplate, interfaceTemplate, signature, V8TestInterface3Accessors, WTF_ARRAY_L
ENGTH(V8TestInterface3Accessors)); |
283 V8DOMConfiguration::installMethods(isolate, world, instanceTemplate, prototype
Template, interfaceTemplate, signature, V8TestInterface3Methods, WTF_ARRAY_LENGT
H(V8TestInterface3Methods)); | 283 V8DOMConfiguration::installMethods(isolate, world, instanceTemplate, prototype
Template, interfaceTemplate, signature, V8TestInterface3Methods, WTF_ARRAY_LENGT
H(V8TestInterface3Methods)); |
284 | 284 |
285 // Indexed properties | 285 // Indexed properties |
286 v8::IndexedPropertyHandlerConfiguration indexedPropertyHandlerConfig(TestInter
face3V8Internal::indexedPropertyGetterCallback, TestInterface3V8Internal::indexe
dPropertySetterCallback, 0, TestInterface3V8Internal::indexedPropertyDeleterCall
back, indexedPropertyEnumerator<TestInterface3>, v8::Local<v8::Value>(), v8::Pro
pertyHandlerFlags::kNone); | 286 v8::IndexedPropertyHandlerConfiguration indexedPropertyHandlerConfig(TestInter
face3V8Internal::indexedPropertyGetterCallback, TestInterface3V8Internal::indexe
dPropertySetterCallback, 0, TestInterface3V8Internal::indexedPropertyDeleterCall
back, indexedPropertyEnumerator<TestInterface3>, v8::Local<v8::Value>(), v8::Pro
pertyHandlerFlags::kNone); |
287 instanceTemplate->SetHandler(indexedPropertyHandlerConfig); | 287 instanceTemplate->SetHandler(indexedPropertyHandlerConfig); |
288 // Named properties | 288 // Named properties |
289 v8::NamedPropertyHandlerConfiguration namedPropertyHandlerConfig(TestInterface
3V8Internal::namedPropertyGetterCallback, TestInterface3V8Internal::namedPropert
ySetterCallback, TestInterface3V8Internal::namedPropertyQueryCallback, TestInter
face3V8Internal::namedPropertyDeleterCallback, TestInterface3V8Internal::namedPr
opertyEnumeratorCallback, v8::Local<v8::Value>(), static_cast<v8::PropertyHandle
rFlags>(int(v8::PropertyHandlerFlags::kOnlyInterceptStrings) | int(v8::PropertyH
andlerFlags::kNonMasking))); | 289 v8::NamedPropertyHandlerConfiguration namedPropertyHandlerConfig(TestInterface
3V8Internal::namedPropertyGetterCallback, TestInterface3V8Internal::namedPropert
ySetterCallback, TestInterface3V8Internal::namedPropertyQueryCallback, TestInter
face3V8Internal::namedPropertyDeleterCallback, TestInterface3V8Internal::namedPr
opertyEnumeratorCallback, v8::Local<v8::Value>(), static_cast<v8::PropertyHandle
rFlags>(int(v8::PropertyHandlerFlags::kOnlyInterceptStrings) | int(v8::PropertyH
andlerFlags::kNonMasking))); |
290 instanceTemplate->SetHandler(namedPropertyHandlerConfig); | 290 instanceTemplate->SetHandler(namedPropertyHandlerConfig); |
291 | 291 |
292 if (RuntimeEnabledFeatures::featureNameEnabled()) { | 292 if (RuntimeEnabledFeatures::featureNameEnabled()) { |
293 // Iterator (@@iterator) | 293 // Iterator (@@iterator) |
294 const V8DOMConfiguration::SymbolKeyedMethodConfiguration symbolKeyedIterat
orConfiguration = { v8::Symbol::GetIterator, TestInterface3V8Internal::iteratorM
ethodCallback, 0, v8::DontEnum, V8DOMConfiguration::ExposedToAllScripts, V8DOMCo
nfiguration::OnPrototype }; | 294 const V8DOMConfiguration::SymbolKeyedMethodConfiguration symbolKeyedIterat
orConfiguration = { v8::Symbol::GetIterator, TestInterface3V8Internal::iteratorM
ethodCallback, 0, v8::DontEnum, V8DOMConfiguration::OnPrototype }; |
295 V8DOMConfiguration::installMethod(isolate, world, prototypeTemplate, signa
ture, symbolKeyedIteratorConfiguration); | 295 V8DOMConfiguration::installMethod(isolate, world, prototypeTemplate, signa
ture, symbolKeyedIteratorConfiguration); |
296 } | 296 } |
297 | 297 |
298 if (RuntimeEnabledFeatures::featureNameEnabled()) { | 298 if (RuntimeEnabledFeatures::featureNameEnabled()) { |
299 const V8DOMConfiguration::MethodConfiguration keysMethodConfiguration = {"
keys", TestInterface3V8Internal::keysMethodCallback, 0, 0, v8::None, V8DOMConfig
uration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguratio
n::CheckHolder}; | 299 const V8DOMConfiguration::MethodConfiguration keysMethodConfiguration = {"
keys", TestInterface3V8Internal::keysMethodCallback, 0, 0, v8::None, V8DOMConfig
uration::OnPrototype, V8DOMConfiguration::CheckHolder}; |
300 V8DOMConfiguration::installMethod(isolate, world, instanceTemplate, protot
ypeTemplate, interfaceTemplate, signature, keysMethodConfiguration); | 300 V8DOMConfiguration::installMethod(isolate, world, instanceTemplate, protot
ypeTemplate, interfaceTemplate, signature, keysMethodConfiguration); |
301 } | 301 } |
302 if (RuntimeEnabledFeatures::featureNameEnabled()) { | 302 if (RuntimeEnabledFeatures::featureNameEnabled()) { |
303 const V8DOMConfiguration::MethodConfiguration valuesMethodConfiguration =
{"values", TestInterface3V8Internal::valuesMethodCallback, 0, 0, v8::None, V8DOM
Configuration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfig
uration::CheckHolder}; | 303 const V8DOMConfiguration::MethodConfiguration valuesMethodConfiguration =
{"values", TestInterface3V8Internal::valuesMethodCallback, 0, 0, v8::None, V8DOM
Configuration::OnPrototype, V8DOMConfiguration::CheckHolder}; |
304 V8DOMConfiguration::installMethod(isolate, world, instanceTemplate, protot
ypeTemplate, interfaceTemplate, signature, valuesMethodConfiguration); | 304 V8DOMConfiguration::installMethod(isolate, world, instanceTemplate, protot
ypeTemplate, interfaceTemplate, signature, valuesMethodConfiguration); |
305 } | 305 } |
306 if (RuntimeEnabledFeatures::featureNameEnabled()) { | 306 if (RuntimeEnabledFeatures::featureNameEnabled()) { |
307 const V8DOMConfiguration::MethodConfiguration entriesMethodConfiguration =
{"entries", TestInterface3V8Internal::entriesMethodCallback, 0, 0, v8::None, V8
DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMCon
figuration::CheckHolder}; | 307 const V8DOMConfiguration::MethodConfiguration entriesMethodConfiguration =
{"entries", TestInterface3V8Internal::entriesMethodCallback, 0, 0, v8::None, V8
DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; |
308 V8DOMConfiguration::installMethod(isolate, world, instanceTemplate, protot
ypeTemplate, interfaceTemplate, signature, entriesMethodConfiguration); | 308 V8DOMConfiguration::installMethod(isolate, world, instanceTemplate, protot
ypeTemplate, interfaceTemplate, signature, entriesMethodConfiguration); |
309 } | 309 } |
310 if (RuntimeEnabledFeatures::featureNameEnabled()) { | 310 if (RuntimeEnabledFeatures::featureNameEnabled()) { |
311 const V8DOMConfiguration::MethodConfiguration forEachMethodConfiguration =
{"forEach", TestInterface3V8Internal::forEachMethodCallback, 0, 1, v8::None, V8
DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMCon
figuration::CheckHolder}; | 311 const V8DOMConfiguration::MethodConfiguration forEachMethodConfiguration =
{"forEach", TestInterface3V8Internal::forEachMethodCallback, 0, 1, v8::None, V8
DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; |
312 V8DOMConfiguration::installMethod(isolate, world, instanceTemplate, protot
ypeTemplate, interfaceTemplate, signature, forEachMethodConfiguration); | 312 V8DOMConfiguration::installMethod(isolate, world, instanceTemplate, protot
ypeTemplate, interfaceTemplate, signature, forEachMethodConfiguration); |
313 } | 313 } |
314 } | 314 } |
315 | 315 |
316 v8::Local<v8::FunctionTemplate> V8TestInterface3::domTemplate(v8::Isolate* isola
te, const DOMWrapperWorld& world) { | 316 v8::Local<v8::FunctionTemplate> V8TestInterface3::domTemplate(v8::Isolate* isola
te, const DOMWrapperWorld& world) { |
317 return V8DOMConfiguration::domClassTemplate(isolate, world, const_cast<Wrapper
TypeInfo*>(&wrapperTypeInfo), installV8TestInterface3Template); | 317 return V8DOMConfiguration::domClassTemplate(isolate, world, const_cast<Wrapper
TypeInfo*>(&wrapperTypeInfo), installV8TestInterface3Template); |
318 } | 318 } |
319 | 319 |
320 bool V8TestInterface3::hasInstance(v8::Local<v8::Value> v8Value, v8::Isolate* is
olate) { | 320 bool V8TestInterface3::hasInstance(v8::Local<v8::Value> v8Value, v8::Isolate* is
olate) { |
321 return V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, v8Value)
; | 321 return V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, v8Value)
; |
322 } | 322 } |
323 | 323 |
324 v8::Local<v8::Object> V8TestInterface3::findInstanceInPrototypeChain(v8::Local<v
8::Value> v8Value, v8::Isolate* isolate) { | 324 v8::Local<v8::Object> V8TestInterface3::findInstanceInPrototypeChain(v8::Local<v
8::Value> v8Value, v8::Isolate* isolate) { |
325 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrapperT
ypeInfo, v8Value); | 325 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrapperT
ypeInfo, v8Value); |
326 } | 326 } |
327 | 327 |
328 TestInterface3* V8TestInterface3::toImplWithTypeCheck(v8::Isolate* isolate, v8::
Local<v8::Value> value) { | 328 TestInterface3* V8TestInterface3::toImplWithTypeCheck(v8::Isolate* isolate, v8::
Local<v8::Value> value) { |
329 return hasInstance(value, isolate) ? toImpl(v8::Local<v8::Object>::Cast(value)
) : nullptr; | 329 return hasInstance(value, isolate) ? toImpl(v8::Local<v8::Object>::Cast(value)
) : nullptr; |
330 } | 330 } |
331 | 331 |
332 } // namespace blink | 332 } // namespace blink |
OLD | NEW |