| 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 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 266 static void namedPropertyEnumeratorCallback(const v8::PropertyCallbackInfo<v8::A
rray>& info) | 266 static void namedPropertyEnumeratorCallback(const v8::PropertyCallbackInfo<v8::A
rray>& info) |
| 267 { | 267 { |
| 268 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMNamedProperty"); | 268 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMNamedProperty"); |
| 269 V8TestInterface3::namedPropertyEnumeratorCustom(info); | 269 V8TestInterface3::namedPropertyEnumeratorCustom(info); |
| 270 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 270 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 271 } | 271 } |
| 272 | 272 |
| 273 } // namespace TestInterface3V8Internal | 273 } // namespace TestInterface3V8Internal |
| 274 | 274 |
| 275 const V8DOMConfiguration::MethodConfiguration V8TestInterface3Methods[] = { | 275 const V8DOMConfiguration::MethodConfiguration V8TestInterface3Methods[] = { |
| 276 {"voidMethodDocument", TestInterface3V8Internal::voidMethodDocumentMethodCal
lback, 0, 1, V8DOMConfiguration::ExposedToAllScripts}, | 276 {"voidMethodDocument", TestInterface3V8Internal::voidMethodDocumentMethodCal
lback, 0, 1, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnProt
otype}, |
| 277 }; | 277 }; |
| 278 | 278 |
| 279 static void installV8TestInterface3Template(v8::Local<v8::FunctionTemplate> func
tionTemplate, v8::Isolate* isolate) | 279 static void installV8TestInterface3Template(v8::Local<v8::FunctionTemplate> func
tionTemplate, v8::Isolate* isolate) |
| 280 { | 280 { |
| 281 functionTemplate->ReadOnlyPrototype(); | 281 functionTemplate->ReadOnlyPrototype(); |
| 282 | 282 |
| 283 v8::Local<v8::Signature> defaultSignature; | 283 v8::Local<v8::Signature> defaultSignature; |
| 284 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(isolate, func
tionTemplate, "TestInterface3", v8::Local<v8::FunctionTemplate>(), V8TestInterfa
ce3::internalFieldCount, | 284 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(isolate, func
tionTemplate, "TestInterface3", v8::Local<v8::FunctionTemplate>(), V8TestInterfa
ce3::internalFieldCount, |
| 285 0, 0, | 285 0, 0, |
| 286 0, 0, | 286 0, 0, |
| 287 V8TestInterface3Methods, WTF_ARRAY_LENGTH(V8TestInterface3Methods)); | 287 V8TestInterface3Methods, WTF_ARRAY_LENGTH(V8TestInterface3Methods)); |
| 288 v8::Local<v8::ObjectTemplate> instanceTemplate = functionTemplate->InstanceT
emplate(); | 288 v8::Local<v8::ObjectTemplate> instanceTemplate = functionTemplate->InstanceT
emplate(); |
| 289 ALLOW_UNUSED_LOCAL(instanceTemplate); | 289 ALLOW_UNUSED_LOCAL(instanceTemplate); |
| 290 v8::Local<v8::ObjectTemplate> prototypeTemplate = functionTemplate->Prototyp
eTemplate(); | 290 v8::Local<v8::ObjectTemplate> prototypeTemplate = functionTemplate->Prototyp
eTemplate(); |
| 291 ALLOW_UNUSED_LOCAL(prototypeTemplate); | 291 ALLOW_UNUSED_LOCAL(prototypeTemplate); |
| 292 ExecutionContext* context = currentExecutionContext(isolate); | 292 ExecutionContext* context = currentExecutionContext(isolate); |
| 293 ALLOW_UNUSED_LOCAL(context); | 293 ALLOW_UNUSED_LOCAL(context); |
| 294 { | 294 { |
| 295 v8::IndexedPropertyHandlerConfiguration config(TestInterface3V8Internal:
:indexedPropertyGetterCallback, TestInterface3V8Internal::indexedPropertySetterC
allback, 0, TestInterface3V8Internal::indexedPropertyDeleterCallback, indexedPro
pertyEnumerator<TestInterface3>); | 295 v8::IndexedPropertyHandlerConfiguration config(TestInterface3V8Internal:
:indexedPropertyGetterCallback, TestInterface3V8Internal::indexedPropertySetterC
allback, 0, TestInterface3V8Internal::indexedPropertyDeleterCallback, indexedPro
pertyEnumerator<TestInterface3>); |
| 296 functionTemplate->InstanceTemplate()->SetHandler(config); | 296 functionTemplate->InstanceTemplate()->SetHandler(config); |
| 297 } | 297 } |
| 298 { | 298 { |
| 299 int flags = static_cast<int>(v8::PropertyHandlerFlags::kOnlyInterceptStr
ings); | 299 int flags = static_cast<int>(v8::PropertyHandlerFlags::kOnlyInterceptStr
ings); |
| 300 flags |= static_cast<int>(v8::PropertyHandlerFlags::kNonMasking); | 300 flags |= static_cast<int>(v8::PropertyHandlerFlags::kNonMasking); |
| 301 v8::NamedPropertyHandlerConfiguration config(TestInterface3V8Internal::n
amedPropertyGetterCallback, TestInterface3V8Internal::namedPropertySetterCallbac
k, TestInterface3V8Internal::namedPropertyQueryCallback, TestInterface3V8Interna
l::namedPropertyDeleterCallback, TestInterface3V8Internal::namedPropertyEnumerat
orCallback, v8::Handle<v8::Value>(), static_cast<v8::PropertyHandlerFlags>(flags
)); | 301 v8::NamedPropertyHandlerConfiguration config(TestInterface3V8Internal::n
amedPropertyGetterCallback, TestInterface3V8Internal::namedPropertySetterCallbac
k, TestInterface3V8Internal::namedPropertyQueryCallback, TestInterface3V8Interna
l::namedPropertyDeleterCallback, TestInterface3V8Internal::namedPropertyEnumerat
orCallback, v8::Handle<v8::Value>(), static_cast<v8::PropertyHandlerFlags>(flags
)); |
| 302 functionTemplate->InstanceTemplate()->SetHandler(config); | 302 functionTemplate->InstanceTemplate()->SetHandler(config); |
| 303 } | 303 } |
| 304 if (RuntimeEnabledFeatures::featureNameEnabled()) { | 304 if (RuntimeEnabledFeatures::featureNameEnabled()) { |
| 305 const V8DOMConfiguration::SymbolKeyedMethodConfiguration symbolKeyedIter
atorConfiguration = { v8::Symbol::GetIterator, TestInterface3V8Internal::iterato
rMethodCallback, 0, V8DOMConfiguration::ExposedToAllScripts }; | 305 const V8DOMConfiguration::SymbolKeyedMethodConfiguration symbolKeyedIter
atorConfiguration = { v8::Symbol::GetIterator, TestInterface3V8Internal::iterato
rMethodCallback, 0, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration:
:OnPrototype }; |
| 306 V8DOMConfiguration::installMethod(isolate, prototypeTemplate, defaultSig
nature, v8::DontDelete, symbolKeyedIteratorConfiguration); | 306 V8DOMConfiguration::installMethod(isolate, prototypeTemplate, defaultSig
nature, v8::DontDelete, symbolKeyedIteratorConfiguration); |
| 307 } | 307 } |
| 308 if (RuntimeEnabledFeatures::featureNameEnabled()) { | 308 if (RuntimeEnabledFeatures::featureNameEnabled()) { |
| 309 const V8DOMConfiguration::MethodConfiguration keysMethodConfiguration =
{ | 309 const V8DOMConfiguration::MethodConfiguration keysMethodConfiguration =
{"keys", TestInterface3V8Internal::keysMethodCallback, 0, 0, V8DOMConfiguration:
:ExposedToAllScripts, V8DOMConfiguration::OnPrototype}; |
| 310 "keys", TestInterface3V8Internal::keysMethodCallback, 0, 0, V8DOMCon
figuration::ExposedToAllScripts, | 310 V8DOMConfiguration::installMethod(isolate, instanceTemplate, prototypeTe
mplate, functionTemplate, defaultSignature, v8::None, keysMethodConfiguration); |
| 311 }; | |
| 312 V8DOMConfiguration::installMethod(isolate, prototypeTemplate, defaultSig
nature, v8::None, keysMethodConfiguration); | |
| 313 } | 311 } |
| 314 #if ENABLE(BAR) | 312 #if ENABLE(BAR) |
| 315 const V8DOMConfiguration::MethodConfiguration voidMethodDocumentMethodConfig
uration = { | 313 const V8DOMConfiguration::MethodConfiguration voidMethodDocumentMethodConfig
uration = {"voidMethodDocument", TestInterface3V8Internal::voidMethodDocumentMet
hodCallback, 0, 2, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::
OnInterface}; |
| 316 "voidMethodDocument", TestInterface3V8Internal::voidMethodDocumentMethod
Callback, 0, 2, V8DOMConfiguration::ExposedToAllScripts, | 314 V8DOMConfiguration::installMethod(isolate, instanceTemplate, prototypeTempla
te, functionTemplate, defaultSignature, v8::None, voidMethodDocumentMethodConfig
uration); |
| 317 }; | |
| 318 V8DOMConfiguration::installMethod(isolate, functionTemplate, v8::Local<v8::S
ignature>(), v8::None, voidMethodDocumentMethodConfiguration); | |
| 319 #endif // ENABLE(BAR) | 315 #endif // ENABLE(BAR) |
| 320 if (RuntimeEnabledFeatures::featureNameEnabled()) { | 316 if (RuntimeEnabledFeatures::featureNameEnabled()) { |
| 321 const V8DOMConfiguration::MethodConfiguration valuesMethodConfiguration
= { | 317 const V8DOMConfiguration::MethodConfiguration valuesMethodConfiguration
= {"values", TestInterface3V8Internal::valuesMethodCallback, 0, 0, V8DOMConfigur
ation::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}; |
| 322 "values", TestInterface3V8Internal::valuesMethodCallback, 0, 0, V8DO
MConfiguration::ExposedToAllScripts, | 318 V8DOMConfiguration::installMethod(isolate, instanceTemplate, prototypeTe
mplate, functionTemplate, defaultSignature, v8::None, valuesMethodConfiguration)
; |
| 323 }; | |
| 324 V8DOMConfiguration::installMethod(isolate, prototypeTemplate, defaultSig
nature, v8::None, valuesMethodConfiguration); | |
| 325 } | 319 } |
| 326 if (RuntimeEnabledFeatures::featureNameEnabled()) { | 320 if (RuntimeEnabledFeatures::featureNameEnabled()) { |
| 327 const V8DOMConfiguration::MethodConfiguration entriesMethodConfiguration
= { | 321 const V8DOMConfiguration::MethodConfiguration entriesMethodConfiguration
= {"entries", TestInterface3V8Internal::entriesMethodCallback, 0, 0, V8DOMConfi
guration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}; |
| 328 "entries", TestInterface3V8Internal::entriesMethodCallback, 0, 0, V8
DOMConfiguration::ExposedToAllScripts, | 322 V8DOMConfiguration::installMethod(isolate, instanceTemplate, prototypeTe
mplate, functionTemplate, defaultSignature, v8::None, entriesMethodConfiguration
); |
| 329 }; | |
| 330 V8DOMConfiguration::installMethod(isolate, prototypeTemplate, defaultSig
nature, v8::None, entriesMethodConfiguration); | |
| 331 } | 323 } |
| 332 if (RuntimeEnabledFeatures::featureNameEnabled()) { | 324 if (RuntimeEnabledFeatures::featureNameEnabled()) { |
| 333 const V8DOMConfiguration::MethodConfiguration forEachMethodConfiguration
= { | 325 const V8DOMConfiguration::MethodConfiguration forEachMethodConfiguration
= {"forEach", TestInterface3V8Internal::forEachMethodCallback, 0, 1, V8DOMConfi
guration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}; |
| 334 "forEach", TestInterface3V8Internal::forEachMethodCallback, 0, 1, V8
DOMConfiguration::ExposedToAllScripts, | 326 V8DOMConfiguration::installMethod(isolate, instanceTemplate, prototypeTe
mplate, functionTemplate, defaultSignature, v8::None, forEachMethodConfiguration
); |
| 335 }; | |
| 336 V8DOMConfiguration::installMethod(isolate, prototypeTemplate, defaultSig
nature, v8::None, forEachMethodConfiguration); | |
| 337 } | 327 } |
| 338 | 328 |
| 339 // Custom toString template | 329 // Custom toString template |
| 340 functionTemplate->Set(v8AtomicString(isolate, "toString"), V8PerIsolateData:
:from(isolate)->toStringTemplate()); | 330 functionTemplate->Set(v8AtomicString(isolate, "toString"), V8PerIsolateData:
:from(isolate)->toStringTemplate()); |
| 341 } | 331 } |
| 342 | 332 |
| 343 v8::Local<v8::FunctionTemplate> V8TestInterface3::domTemplate(v8::Isolate* isola
te) | 333 v8::Local<v8::FunctionTemplate> V8TestInterface3::domTemplate(v8::Isolate* isola
te) |
| 344 { | 334 { |
| 345 return V8DOMConfiguration::domClassTemplate(isolate, const_cast<WrapperTypeI
nfo*>(&wrapperTypeInfo), installV8TestInterface3Template); | 335 return V8DOMConfiguration::domClassTemplate(isolate, const_cast<WrapperTypeI
nfo*>(&wrapperTypeInfo), installV8TestInterface3Template); |
| 346 } | 336 } |
| (...skipping 17 matching lines...) Expand all Loading... |
| 364 { | 354 { |
| 365 scriptWrappable->toImpl<TestInterface3>()->ref(); | 355 scriptWrappable->toImpl<TestInterface3>()->ref(); |
| 366 } | 356 } |
| 367 | 357 |
| 368 void V8TestInterface3::derefObject(ScriptWrappable* scriptWrappable) | 358 void V8TestInterface3::derefObject(ScriptWrappable* scriptWrappable) |
| 369 { | 359 { |
| 370 scriptWrappable->toImpl<TestInterface3>()->deref(); | 360 scriptWrappable->toImpl<TestInterface3>()->deref(); |
| 371 } | 361 } |
| 372 | 362 |
| 373 } // namespace blink | 363 } // namespace blink |
| OLD | NEW |