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 "V8TestInterfaceWillBeGarbageCollected.h" | 8 #include "V8TestInterfaceWillBeGarbageCollected.h" |
9 | 9 |
10 #include "bindings/core/v8/ExceptionState.h" | 10 #include "bindings/core/v8/ExceptionState.h" |
(...skipping 13 matching lines...) Expand all Loading... |
24 | 24 |
25 const WrapperTypeInfo V8TestInterfaceWillBeGarbageCollected::wrapperTypeInfo = {
gin::kEmbedderBlink, V8TestInterfaceWillBeGarbageCollected::domTemplate, V8Test
InterfaceWillBeGarbageCollected::refObject, V8TestInterfaceWillBeGarbageCollecte
d::derefObject, V8TestInterfaceWillBeGarbageCollected::trace, 0, 0, V8TestInterf
aceWillBeGarbageCollected::installConditionallyEnabledMethods, V8TestInterfaceWi
llBeGarbageCollected::installConditionallyEnabledProperties, &V8EventTarget::wra
pperTypeInfo, WrapperTypeInfo::WrapperTypeObjectPrototype, WrapperTypeInfo::Obje
ctClassId, WrapperTypeInfo::InheritFromEventTarget, WrapperTypeInfo::Independent
, WrapperTypeInfo::WillBeGarbageCollectedObject }; | 25 const WrapperTypeInfo V8TestInterfaceWillBeGarbageCollected::wrapperTypeInfo = {
gin::kEmbedderBlink, V8TestInterfaceWillBeGarbageCollected::domTemplate, V8Test
InterfaceWillBeGarbageCollected::refObject, V8TestInterfaceWillBeGarbageCollecte
d::derefObject, V8TestInterfaceWillBeGarbageCollected::trace, 0, 0, V8TestInterf
aceWillBeGarbageCollected::installConditionallyEnabledMethods, V8TestInterfaceWi
llBeGarbageCollected::installConditionallyEnabledProperties, &V8EventTarget::wra
pperTypeInfo, WrapperTypeInfo::WrapperTypeObjectPrototype, WrapperTypeInfo::Obje
ctClassId, WrapperTypeInfo::InheritFromEventTarget, WrapperTypeInfo::Independent
, WrapperTypeInfo::WillBeGarbageCollectedObject }; |
26 | 26 |
27 // This static member must be declared by DEFINE_WRAPPERTYPEINFO in TestInterfac
eWillBeGarbageCollected.h. | 27 // This static member must be declared by DEFINE_WRAPPERTYPEINFO in TestInterfac
eWillBeGarbageCollected.h. |
28 // For details, see the comment of DEFINE_WRAPPERTYPEINFO in | 28 // For details, see the comment of DEFINE_WRAPPERTYPEINFO in |
29 // bindings/core/v8/ScriptWrappable.h. | 29 // bindings/core/v8/ScriptWrappable.h. |
30 const WrapperTypeInfo& TestInterfaceWillBeGarbageCollected::s_wrapperTypeInfo =
V8TestInterfaceWillBeGarbageCollected::wrapperTypeInfo; | 30 const WrapperTypeInfo& TestInterfaceWillBeGarbageCollected::s_wrapperTypeInfo =
V8TestInterfaceWillBeGarbageCollected::wrapperTypeInfo; |
31 | 31 |
32 namespace TestInterfaceWillBeGarbageCollectedV8Internal { | 32 namespace TestInterfaceWillBeGarbageCollectedV8Internal { |
33 | 33 |
34 static void attr1AttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info
) | 34 static void attr1AttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info
) |
35 { | 35 { |
36 v8::Local<v8::Object> holder = info.Holder(); | 36 v8::Local<v8::Object> holder = info.Holder(); |
37 TestInterfaceWillBeGarbageCollected* impl = V8TestInterfaceWillBeGarbageColl
ected::toImpl(holder); | 37 TestInterfaceWillBeGarbageCollected* impl = V8TestInterfaceWillBeGarbageColl
ected::toImpl(holder); |
38 v8SetReturnValueFast(info, WTF::getPtr(impl->attr1()), impl); | 38 v8SetReturnValueFast(info, WTF::getPtr(impl->attr1()), impl); |
39 } | 39 } |
40 | 40 |
41 static void attr1AttributeGetterCallback(v8::Local<v8::String>, const v8::Proper
tyCallbackInfo<v8::Value>& info) | 41 static void attr1AttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Valu
e>& info) |
42 { | 42 { |
43 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 43 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
44 TestInterfaceWillBeGarbageCollectedV8Internal::attr1AttributeGetter(info); | 44 TestInterfaceWillBeGarbageCollectedV8Internal::attr1AttributeGetter(info); |
45 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 45 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
46 } | 46 } |
47 | 47 |
48 static void attr1AttributeSetter(v8::Local<v8::Value> v8Value, const v8::Propert
yCallbackInfo<void>& info) | 48 static void attr1AttributeSetter(v8::Local<v8::Value> v8Value, const v8::Functio
nCallbackInfo<v8::Value>& info) |
49 { | 49 { |
50 v8::Local<v8::Object> holder = info.Holder(); | 50 v8::Local<v8::Object> holder = info.Holder(); |
51 TestInterfaceWillBeGarbageCollected* impl = V8TestInterfaceWillBeGarbageColl
ected::toImpl(holder); | 51 TestInterfaceWillBeGarbageCollected* impl = V8TestInterfaceWillBeGarbageColl
ected::toImpl(holder); |
52 TestInterfaceWillBeGarbageCollected* cppValue = V8TestInterfaceWillBeGarbage
Collected::toImplWithTypeCheck(info.GetIsolate(), v8Value); | 52 TestInterfaceWillBeGarbageCollected* cppValue = V8TestInterfaceWillBeGarbage
Collected::toImplWithTypeCheck(info.GetIsolate(), v8Value); |
53 impl->setAttr1(WTF::getPtr(cppValue)); | 53 impl->setAttr1(WTF::getPtr(cppValue)); |
54 } | 54 } |
55 | 55 |
56 static void attr1AttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Va
lue> v8Value, const v8::PropertyCallbackInfo<void>& info) | 56 static void attr1AttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Valu
e>& info) |
57 { | 57 { |
| 58 v8::Local<v8::Value> v8Value = info[0]; |
58 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 59 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
59 TestInterfaceWillBeGarbageCollectedV8Internal::attr1AttributeSetter(v8Value,
info); | 60 TestInterfaceWillBeGarbageCollectedV8Internal::attr1AttributeSetter(v8Value,
info); |
60 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 61 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
61 } | 62 } |
62 | 63 |
63 static void funcMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | 64 static void funcMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
64 { | 65 { |
65 if (UNLIKELY(info.Length() < 1)) { | 66 if (UNLIKELY(info.Length() < 1)) { |
66 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod(in
fo.GetIsolate(), "func", "TestInterfaceWillBeGarbageCollected", 1, info.Length()
), info.GetIsolate()); | 67 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod(in
fo.GetIsolate(), "func", "TestInterfaceWillBeGarbageCollected", 1, info.Length()
), info.GetIsolate()); |
67 return; | 68 return; |
(...skipping 24 matching lines...) Expand all Loading... |
92 TOSTRING_VOID_INTERNAL(str, info[0]); | 93 TOSTRING_VOID_INTERNAL(str, info[0]); |
93 } | 94 } |
94 RefPtrWillBeRawPtr<TestInterfaceWillBeGarbageCollected> impl = TestInterface
WillBeGarbageCollected::create(str); | 95 RefPtrWillBeRawPtr<TestInterfaceWillBeGarbageCollected> impl = TestInterface
WillBeGarbageCollected::create(str); |
95 v8::Local<v8::Object> wrapper = info.Holder(); | 96 v8::Local<v8::Object> wrapper = info.Holder(); |
96 impl->associateWithWrapper(info.GetIsolate(), &V8TestInterfaceWillBeGarbageC
ollected::wrapperTypeInfo, wrapper); | 97 impl->associateWithWrapper(info.GetIsolate(), &V8TestInterfaceWillBeGarbageC
ollected::wrapperTypeInfo, wrapper); |
97 v8SetReturnValue(info, wrapper); | 98 v8SetReturnValue(info, wrapper); |
98 } | 99 } |
99 | 100 |
100 } // namespace TestInterfaceWillBeGarbageCollectedV8Internal | 101 } // namespace TestInterfaceWillBeGarbageCollectedV8Internal |
101 | 102 |
102 static const V8DOMConfiguration::AttributeConfiguration V8TestInterfaceWillBeGar
bageCollectedAttributes[] = { | 103 static const V8DOMConfiguration::AccessorConfiguration V8TestInterfaceWillBeGarb
ageCollectedAccessors[] = { |
103 {"attr1", TestInterfaceWillBeGarbageCollectedV8Internal::attr1AttributeGette
rCallback, TestInterfaceWillBeGarbageCollectedV8Internal::attr1AttributeSetterCa
llback, 0, 0, 0, static_cast<v8::AccessControl>(v8::PROHIBITS_OVERWRITING), stat
ic_cast<v8::PropertyAttribute>(v8::DontDelete), V8DOMConfiguration::ExposedToAll
Scripts, V8DOMConfiguration::OnInstance}, | 104 {"attr1", TestInterfaceWillBeGarbageCollectedV8Internal::attr1AttributeGette
rCallback, TestInterfaceWillBeGarbageCollectedV8Internal::attr1AttributeSetterCa
llback, 0, 0, 0, static_cast<v8::AccessControl>(v8::PROHIBITS_OVERWRITING), stat
ic_cast<v8::PropertyAttribute>(v8::DontDelete), V8DOMConfiguration::ExposedToAll
Scripts}, |
104 }; | 105 }; |
105 | 106 |
106 const WrapperTypeInfo V8TestInterfaceWillBeGarbageCollectedConstructor::wrapperT
ypeInfo = { gin::kEmbedderBlink, V8TestInterfaceWillBeGarbageCollectedConstructo
r::domTemplate, V8TestInterfaceWillBeGarbageCollected::refObject, V8TestInterfac
eWillBeGarbageCollected::derefObject, V8TestInterfaceWillBeGarbageCollected::tra
ce, 0, 0, V8TestInterfaceWillBeGarbageCollected::installConditionallyEnabledMeth
ods, V8TestInterfaceWillBeGarbageCollected::installConditionallyEnabledPropertie
s, 0, WrapperTypeInfo::WrapperTypeObjectPrototype, WrapperTypeInfo::ObjectClassI
d, WrapperTypeInfo::InheritFromEventTarget, WrapperTypeInfo::Independent, Wrappe
rTypeInfo::WillBeGarbageCollectedObject }; | 107 const WrapperTypeInfo V8TestInterfaceWillBeGarbageCollectedConstructor::wrapperT
ypeInfo = { gin::kEmbedderBlink, V8TestInterfaceWillBeGarbageCollectedConstructo
r::domTemplate, V8TestInterfaceWillBeGarbageCollected::refObject, V8TestInterfac
eWillBeGarbageCollected::derefObject, V8TestInterfaceWillBeGarbageCollected::tra
ce, 0, 0, V8TestInterfaceWillBeGarbageCollected::installConditionallyEnabledMeth
ods, V8TestInterfaceWillBeGarbageCollected::installConditionallyEnabledPropertie
s, 0, WrapperTypeInfo::WrapperTypeObjectPrototype, WrapperTypeInfo::ObjectClassI
d, WrapperTypeInfo::InheritFromEventTarget, WrapperTypeInfo::Independent, Wrappe
rTypeInfo::WillBeGarbageCollectedObject }; |
107 | 108 |
108 static void V8TestInterfaceWillBeGarbageCollectedConstructorCallback(const v8::F
unctionCallbackInfo<v8::Value>& info) | 109 static void V8TestInterfaceWillBeGarbageCollectedConstructorCallback(const v8::F
unctionCallbackInfo<v8::Value>& info) |
109 { | 110 { |
110 if (!info.IsConstructCall()) { | 111 if (!info.IsConstructCall()) { |
111 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::c
onstructorNotCallableAsFunction("TestInterface")); | 112 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::c
onstructorNotCallableAsFunction("TestInterface")); |
112 return; | 113 return; |
113 } | 114 } |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 | 164 |
164 TestInterfaceWillBeGarbageCollectedV8Internal::constructor(info); | 165 TestInterfaceWillBeGarbageCollectedV8Internal::constructor(info); |
165 } | 166 } |
166 | 167 |
167 static void installV8TestInterfaceWillBeGarbageCollectedTemplate(v8::Local<v8::F
unctionTemplate> functionTemplate, v8::Isolate* isolate) | 168 static void installV8TestInterfaceWillBeGarbageCollectedTemplate(v8::Local<v8::F
unctionTemplate> functionTemplate, v8::Isolate* isolate) |
168 { | 169 { |
169 functionTemplate->ReadOnlyPrototype(); | 170 functionTemplate->ReadOnlyPrototype(); |
170 | 171 |
171 v8::Local<v8::Signature> defaultSignature; | 172 v8::Local<v8::Signature> defaultSignature; |
172 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(isolate, func
tionTemplate, "TestInterfaceWillBeGarbageCollected", V8EventTarget::domTemplate(
isolate), V8TestInterfaceWillBeGarbageCollected::internalFieldCount, | 173 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(isolate, func
tionTemplate, "TestInterfaceWillBeGarbageCollected", V8EventTarget::domTemplate(
isolate), V8TestInterfaceWillBeGarbageCollected::internalFieldCount, |
173 V8TestInterfaceWillBeGarbageCollectedAttributes, WTF_ARRAY_LENGTH(V8Test
InterfaceWillBeGarbageCollectedAttributes), | |
174 0, 0, | 174 0, 0, |
| 175 V8TestInterfaceWillBeGarbageCollectedAccessors, WTF_ARRAY_LENGTH(V8TestI
nterfaceWillBeGarbageCollectedAccessors), |
175 0, 0); | 176 0, 0); |
176 functionTemplate->SetCallHandler(V8TestInterfaceWillBeGarbageCollected::cons
tructorCallback); | 177 functionTemplate->SetCallHandler(V8TestInterfaceWillBeGarbageCollected::cons
tructorCallback); |
177 functionTemplate->SetLength(1); | 178 functionTemplate->SetLength(1); |
178 v8::Local<v8::ObjectTemplate> instanceTemplate = functionTemplate->InstanceT
emplate(); | 179 v8::Local<v8::ObjectTemplate> instanceTemplate = functionTemplate->InstanceT
emplate(); |
179 ALLOW_UNUSED_LOCAL(instanceTemplate); | 180 ALLOW_UNUSED_LOCAL(instanceTemplate); |
180 v8::Local<v8::ObjectTemplate> prototypeTemplate = functionTemplate->Prototyp
eTemplate(); | 181 v8::Local<v8::ObjectTemplate> prototypeTemplate = functionTemplate->Prototyp
eTemplate(); |
181 ALLOW_UNUSED_LOCAL(prototypeTemplate); | 182 ALLOW_UNUSED_LOCAL(prototypeTemplate); |
182 const V8DOMConfiguration::MethodConfiguration funcMethodConfiguration = { | 183 const V8DOMConfiguration::MethodConfiguration funcMethodConfiguration = { |
183 "func", TestInterfaceWillBeGarbageCollectedV8Internal::funcMethodCallbac
k, 0, 1, V8DOMConfiguration::ExposedToAllScripts, | 184 "func", TestInterfaceWillBeGarbageCollectedV8Internal::funcMethodCallbac
k, 0, 1, V8DOMConfiguration::ExposedToAllScripts, |
184 }; | 185 }; |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
216 } | 217 } |
217 | 218 |
218 void V8TestInterfaceWillBeGarbageCollected::derefObject(ScriptWrappable* scriptW
rappable) | 219 void V8TestInterfaceWillBeGarbageCollected::derefObject(ScriptWrappable* scriptW
rappable) |
219 { | 220 { |
220 #if !ENABLE(OILPAN) | 221 #if !ENABLE(OILPAN) |
221 scriptWrappable->toImpl<TestInterfaceWillBeGarbageCollected>()->deref(); | 222 scriptWrappable->toImpl<TestInterfaceWillBeGarbageCollected>()->deref(); |
222 #endif | 223 #endif |
223 } | 224 } |
224 | 225 |
225 } // namespace blink | 226 } // namespace blink |
OLD | NEW |