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 "V8TestInterfaceGarbageCollected.h" | 8 #include "V8TestInterfaceGarbageCollected.h" |
9 | 9 |
10 #include "bindings/core/v8/ExceptionState.h" | 10 #include "bindings/core/v8/ExceptionState.h" |
(...skipping 16 matching lines...) Expand all Loading... |
27 | 27 |
28 const WrapperTypeInfo V8TestInterfaceGarbageCollected::wrapperTypeInfo = { gin::
kEmbedderBlink, V8TestInterfaceGarbageCollected::domTemplate, V8TestInterfaceGar
bageCollected::refObject, V8TestInterfaceGarbageCollected::derefObject, V8TestIn
terfaceGarbageCollected::trace, 0, 0, V8TestInterfaceGarbageCollected::installCo
nditionallyEnabledMethods, V8TestInterfaceGarbageCollected::installConditionally
EnabledProperties, &V8EventTarget::wrapperTypeInfo, WrapperTypeInfo::WrapperType
ObjectPrototype, WrapperTypeInfo::ObjectClassId, WrapperTypeInfo::InheritFromEve
ntTarget, WrapperTypeInfo::Independent, WrapperTypeInfo::GarbageCollectedObject
}; | 28 const WrapperTypeInfo V8TestInterfaceGarbageCollected::wrapperTypeInfo = { gin::
kEmbedderBlink, V8TestInterfaceGarbageCollected::domTemplate, V8TestInterfaceGar
bageCollected::refObject, V8TestInterfaceGarbageCollected::derefObject, V8TestIn
terfaceGarbageCollected::trace, 0, 0, V8TestInterfaceGarbageCollected::installCo
nditionallyEnabledMethods, V8TestInterfaceGarbageCollected::installConditionally
EnabledProperties, &V8EventTarget::wrapperTypeInfo, WrapperTypeInfo::WrapperType
ObjectPrototype, WrapperTypeInfo::ObjectClassId, WrapperTypeInfo::InheritFromEve
ntTarget, WrapperTypeInfo::Independent, WrapperTypeInfo::GarbageCollectedObject
}; |
29 | 29 |
30 // This static member must be declared by DEFINE_WRAPPERTYPEINFO in TestInterfac
eGarbageCollected.h. | 30 // This static member must be declared by DEFINE_WRAPPERTYPEINFO in TestInterfac
eGarbageCollected.h. |
31 // For details, see the comment of DEFINE_WRAPPERTYPEINFO in | 31 // For details, see the comment of DEFINE_WRAPPERTYPEINFO in |
32 // bindings/core/v8/ScriptWrappable.h. | 32 // bindings/core/v8/ScriptWrappable.h. |
33 const WrapperTypeInfo& TestInterfaceGarbageCollected::s_wrapperTypeInfo = V8Test
InterfaceGarbageCollected::wrapperTypeInfo; | 33 const WrapperTypeInfo& TestInterfaceGarbageCollected::s_wrapperTypeInfo = V8Test
InterfaceGarbageCollected::wrapperTypeInfo; |
34 | 34 |
35 namespace TestInterfaceGarbageCollectedV8Internal { | 35 namespace TestInterfaceGarbageCollectedV8Internal { |
36 | 36 |
37 static void attr1AttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info
) | 37 static void attr1AttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info
) |
38 { | 38 { |
39 v8::Local<v8::Object> holder = info.Holder(); | 39 v8::Local<v8::Object> holder = info.Holder(); |
40 TestInterfaceGarbageCollected* impl = V8TestInterfaceGarbageCollected::toImp
l(holder); | 40 TestInterfaceGarbageCollected* impl = V8TestInterfaceGarbageCollected::toImp
l(holder); |
41 v8SetReturnValueFast(info, WTF::getPtr(impl->attr1()), impl); | 41 v8SetReturnValueFast(info, WTF::getPtr(impl->attr1()), impl); |
42 } | 42 } |
43 | 43 |
44 static void attr1AttributeGetterCallback(v8::Local<v8::String>, const v8::Proper
tyCallbackInfo<v8::Value>& info) | 44 static void attr1AttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Valu
e>& info) |
45 { | 45 { |
46 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 46 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
47 TestInterfaceGarbageCollectedV8Internal::attr1AttributeGetter(info); | 47 TestInterfaceGarbageCollectedV8Internal::attr1AttributeGetter(info); |
48 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 48 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
49 } | 49 } |
50 | 50 |
51 static void attr1AttributeSetter(v8::Local<v8::Value> v8Value, const v8::Propert
yCallbackInfo<void>& info) | 51 static void attr1AttributeSetter(v8::Local<v8::Value> v8Value, const v8::Functio
nCallbackInfo<v8::Value>& info) |
52 { | 52 { |
53 v8::Local<v8::Object> holder = info.Holder(); | 53 v8::Local<v8::Object> holder = info.Holder(); |
54 TestInterfaceGarbageCollected* impl = V8TestInterfaceGarbageCollected::toImp
l(holder); | 54 TestInterfaceGarbageCollected* impl = V8TestInterfaceGarbageCollected::toImp
l(holder); |
55 TestInterfaceGarbageCollected* cppValue = V8TestInterfaceGarbageCollected::t
oImplWithTypeCheck(info.GetIsolate(), v8Value); | 55 TestInterfaceGarbageCollected* cppValue = V8TestInterfaceGarbageCollected::t
oImplWithTypeCheck(info.GetIsolate(), v8Value); |
56 impl->setAttr1(WTF::getPtr(cppValue)); | 56 impl->setAttr1(WTF::getPtr(cppValue)); |
57 } | 57 } |
58 | 58 |
59 static void attr1AttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Va
lue> v8Value, const v8::PropertyCallbackInfo<void>& info) | 59 static void attr1AttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Valu
e>& info) |
60 { | 60 { |
| 61 v8::Local<v8::Value> v8Value = info[0]; |
61 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 62 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
62 TestInterfaceGarbageCollectedV8Internal::attr1AttributeSetter(v8Value, info)
; | 63 TestInterfaceGarbageCollectedV8Internal::attr1AttributeSetter(v8Value, info)
; |
63 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 64 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
64 } | 65 } |
65 | 66 |
66 static void funcMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | 67 static void funcMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
67 { | 68 { |
68 if (UNLIKELY(info.Length() < 1)) { | 69 if (UNLIKELY(info.Length() < 1)) { |
69 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod(in
fo.GetIsolate(), "func", "TestInterfaceGarbageCollected", 1, info.Length()), inf
o.GetIsolate()); | 70 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod(in
fo.GetIsolate(), "func", "TestInterfaceGarbageCollected", 1, info.Length()), inf
o.GetIsolate()); |
70 return; | 71 return; |
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
324 return; | 325 return; |
325 } | 326 } |
326 RawPtr<TestInterfaceGarbageCollected> impl = TestInterfaceGarbageCollected::
create(str); | 327 RawPtr<TestInterfaceGarbageCollected> impl = TestInterfaceGarbageCollected::
create(str); |
327 v8::Local<v8::Object> wrapper = info.Holder(); | 328 v8::Local<v8::Object> wrapper = info.Holder(); |
328 impl->associateWithWrapper(info.GetIsolate(), &V8TestInterfaceGarbageCollect
ed::wrapperTypeInfo, wrapper); | 329 impl->associateWithWrapper(info.GetIsolate(), &V8TestInterfaceGarbageCollect
ed::wrapperTypeInfo, wrapper); |
329 v8SetReturnValue(info, wrapper); | 330 v8SetReturnValue(info, wrapper); |
330 } | 331 } |
331 | 332 |
332 } // namespace TestInterfaceGarbageCollectedV8Internal | 333 } // namespace TestInterfaceGarbageCollectedV8Internal |
333 | 334 |
334 static const V8DOMConfiguration::AttributeConfiguration V8TestInterfaceGarbageCo
llectedAttributes[] = { | 335 static const V8DOMConfiguration::AccessorConfiguration V8TestInterfaceGarbageCol
lectedAccessors[] = { |
335 {"attr1", TestInterfaceGarbageCollectedV8Internal::attr1AttributeGetterCallb
ack, TestInterfaceGarbageCollectedV8Internal::attr1AttributeSetterCallback, 0, 0
, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttrib
ute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnI
nstance}, | 336 {"attr1", TestInterfaceGarbageCollectedV8Internal::attr1AttributeGetterCallb
ack, TestInterfaceGarbageCollectedV8Internal::attr1AttributeSetterCallback, 0, 0
, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttrib
ute>(v8::None), V8DOMConfiguration::ExposedToAllScripts}, |
336 }; | 337 }; |
337 | 338 |
338 static const V8DOMConfiguration::MethodConfiguration V8TestInterfaceGarbageColle
ctedMethods[] = { | 339 static const V8DOMConfiguration::MethodConfiguration V8TestInterfaceGarbageColle
ctedMethods[] = { |
339 {"func", TestInterfaceGarbageCollectedV8Internal::funcMethodCallback, 0, 1,
V8DOMConfiguration::ExposedToAllScripts}, | 340 {"func", TestInterfaceGarbageCollectedV8Internal::funcMethodCallback, 0, 1,
V8DOMConfiguration::ExposedToAllScripts}, |
340 {"keys", TestInterfaceGarbageCollectedV8Internal::keysMethodCallback, 0, 0,
V8DOMConfiguration::ExposedToAllScripts}, | 341 {"keys", TestInterfaceGarbageCollectedV8Internal::keysMethodCallback, 0, 0,
V8DOMConfiguration::ExposedToAllScripts}, |
341 {"values", TestInterfaceGarbageCollectedV8Internal::valuesMethodCallback, 0,
0, V8DOMConfiguration::ExposedToAllScripts}, | 342 {"values", TestInterfaceGarbageCollectedV8Internal::valuesMethodCallback, 0,
0, V8DOMConfiguration::ExposedToAllScripts}, |
342 {"entries", TestInterfaceGarbageCollectedV8Internal::entriesMethodCallback,
0, 0, V8DOMConfiguration::ExposedToAllScripts}, | 343 {"entries", TestInterfaceGarbageCollectedV8Internal::entriesMethodCallback,
0, 0, V8DOMConfiguration::ExposedToAllScripts}, |
343 {"forEach", TestInterfaceGarbageCollectedV8Internal::forEachMethodCallback,
0, 1, V8DOMConfiguration::ExposedToAllScripts}, | 344 {"forEach", TestInterfaceGarbageCollectedV8Internal::forEachMethodCallback,
0, 1, V8DOMConfiguration::ExposedToAllScripts}, |
344 {"has", TestInterfaceGarbageCollectedV8Internal::hasMethodCallback, 0, 1, V8
DOMConfiguration::ExposedToAllScripts}, | 345 {"has", TestInterfaceGarbageCollectedV8Internal::hasMethodCallback, 0, 1, V8
DOMConfiguration::ExposedToAllScripts}, |
345 {"add", TestInterfaceGarbageCollectedV8Internal::addMethodCallback, 0, 1, V8
DOMConfiguration::ExposedToAllScripts}, | 346 {"add", TestInterfaceGarbageCollectedV8Internal::addMethodCallback, 0, 1, V8
DOMConfiguration::ExposedToAllScripts}, |
(...skipping 16 matching lines...) Expand all Loading... |
362 | 363 |
363 TestInterfaceGarbageCollectedV8Internal::constructor(info); | 364 TestInterfaceGarbageCollectedV8Internal::constructor(info); |
364 } | 365 } |
365 | 366 |
366 static void installV8TestInterfaceGarbageCollectedTemplate(v8::Local<v8::Functio
nTemplate> functionTemplate, v8::Isolate* isolate) | 367 static void installV8TestInterfaceGarbageCollectedTemplate(v8::Local<v8::Functio
nTemplate> functionTemplate, v8::Isolate* isolate) |
367 { | 368 { |
368 functionTemplate->ReadOnlyPrototype(); | 369 functionTemplate->ReadOnlyPrototype(); |
369 | 370 |
370 v8::Local<v8::Signature> defaultSignature; | 371 v8::Local<v8::Signature> defaultSignature; |
371 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(isolate, func
tionTemplate, "TestInterfaceGarbageCollected", V8EventTarget::domTemplate(isolat
e), V8TestInterfaceGarbageCollected::internalFieldCount, | 372 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(isolate, func
tionTemplate, "TestInterfaceGarbageCollected", V8EventTarget::domTemplate(isolat
e), V8TestInterfaceGarbageCollected::internalFieldCount, |
372 V8TestInterfaceGarbageCollectedAttributes, WTF_ARRAY_LENGTH(V8TestInterf
aceGarbageCollectedAttributes), | |
373 0, 0, | 373 0, 0, |
| 374 V8TestInterfaceGarbageCollectedAccessors, WTF_ARRAY_LENGTH(V8TestInterfa
ceGarbageCollectedAccessors), |
374 V8TestInterfaceGarbageCollectedMethods, WTF_ARRAY_LENGTH(V8TestInterface
GarbageCollectedMethods)); | 375 V8TestInterfaceGarbageCollectedMethods, WTF_ARRAY_LENGTH(V8TestInterface
GarbageCollectedMethods)); |
375 functionTemplate->SetCallHandler(V8TestInterfaceGarbageCollected::constructo
rCallback); | 376 functionTemplate->SetCallHandler(V8TestInterfaceGarbageCollected::constructo
rCallback); |
376 functionTemplate->SetLength(1); | 377 functionTemplate->SetLength(1); |
377 v8::Local<v8::ObjectTemplate> instanceTemplate = functionTemplate->InstanceT
emplate(); | 378 v8::Local<v8::ObjectTemplate> instanceTemplate = functionTemplate->InstanceT
emplate(); |
378 ALLOW_UNUSED_LOCAL(instanceTemplate); | 379 ALLOW_UNUSED_LOCAL(instanceTemplate); |
379 v8::Local<v8::ObjectTemplate> prototypeTemplate = functionTemplate->Prototyp
eTemplate(); | 380 v8::Local<v8::ObjectTemplate> prototypeTemplate = functionTemplate->Prototyp
eTemplate(); |
380 ALLOW_UNUSED_LOCAL(prototypeTemplate); | 381 ALLOW_UNUSED_LOCAL(prototypeTemplate); |
381 static const V8DOMConfiguration::SymbolKeyedMethodConfiguration symbolKeyedI
teratorConfiguration = { v8::Symbol::GetIterator, TestInterfaceGarbageCollectedV
8Internal::iteratorMethodCallback, 0, V8DOMConfiguration::ExposedToAllScripts }; | 382 static const V8DOMConfiguration::SymbolKeyedMethodConfiguration symbolKeyedI
teratorConfiguration = { v8::Symbol::GetIterator, TestInterfaceGarbageCollectedV
8Internal::iteratorMethodCallback, 0, V8DOMConfiguration::ExposedToAllScripts }; |
382 V8DOMConfiguration::installMethod(isolate, prototypeTemplate, defaultSignatu
re, v8::DontDelete, symbolKeyedIteratorConfiguration); | 383 V8DOMConfiguration::installMethod(isolate, prototypeTemplate, defaultSignatu
re, v8::DontDelete, symbolKeyedIteratorConfiguration); |
383 | 384 |
(...skipping 23 matching lines...) Expand all Loading... |
407 | 408 |
408 void V8TestInterfaceGarbageCollected::refObject(ScriptWrappable* scriptWrappable
) | 409 void V8TestInterfaceGarbageCollected::refObject(ScriptWrappable* scriptWrappable
) |
409 { | 410 { |
410 } | 411 } |
411 | 412 |
412 void V8TestInterfaceGarbageCollected::derefObject(ScriptWrappable* scriptWrappab
le) | 413 void V8TestInterfaceGarbageCollected::derefObject(ScriptWrappable* scriptWrappab
le) |
413 { | 414 { |
414 } | 415 } |
415 | 416 |
416 } // namespace blink | 417 } // namespace blink |
OLD | NEW |