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 "V8TestInterfaceNode.h" | 8 #include "V8TestInterfaceNode.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 V8TestInterfaceNode::wrapperTypeInfo = { gin::kEmbedderBli
nk, V8TestInterfaceNode::domTemplate, V8TestInterfaceNode::refObject, V8TestInte
rfaceNode::derefObject, V8TestInterfaceNode::trace, 0, 0, V8TestInterfaceNode::i
nstallConditionallyEnabledMethods, V8TestInterfaceNode::installConditionallyEnab
ledProperties, &V8Node::wrapperTypeInfo, WrapperTypeInfo::WrapperTypeObjectProto
type, WrapperTypeInfo::NodeClassId, WrapperTypeInfo::InheritFromEventTarget, Wra
pperTypeInfo::Dependent, WrapperTypeInfo::WillBeGarbageCollectedObject }; | 28 const WrapperTypeInfo V8TestInterfaceNode::wrapperTypeInfo = { gin::kEmbedderBli
nk, V8TestInterfaceNode::domTemplate, V8TestInterfaceNode::refObject, V8TestInte
rfaceNode::derefObject, V8TestInterfaceNode::trace, 0, 0, V8TestInterfaceNode::i
nstallConditionallyEnabledMethods, V8TestInterfaceNode::installConditionallyEnab
ledProperties, &V8Node::wrapperTypeInfo, WrapperTypeInfo::WrapperTypeObjectProto
type, WrapperTypeInfo::NodeClassId, WrapperTypeInfo::InheritFromEventTarget, Wra
pperTypeInfo::Dependent, WrapperTypeInfo::WillBeGarbageCollectedObject }; |
29 | 29 |
30 // This static member must be declared by DEFINE_WRAPPERTYPEINFO in TestInterfac
eNode.h. | 30 // This static member must be declared by DEFINE_WRAPPERTYPEINFO in TestInterfac
eNode.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& TestInterfaceNode::s_wrapperTypeInfo = V8TestInterfaceNod
e::wrapperTypeInfo; | 33 const WrapperTypeInfo& TestInterfaceNode::s_wrapperTypeInfo = V8TestInterfaceNod
e::wrapperTypeInfo; |
34 | 34 |
35 namespace TestInterfaceNodeV8Internal { | 35 namespace TestInterfaceNodeV8Internal { |
36 | 36 |
37 static void stringAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Va
lue>& info) | 37 static void stringAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Va
lue>& info) |
38 { | 38 { |
39 v8::Local<v8::Object> holder = info.Holder(); | 39 v8::Local<v8::Object> holder = info.Holder(); |
40 TestInterfaceNode* impl = V8TestInterfaceNode::toImpl(holder); | 40 TestInterfaceNode* impl = V8TestInterfaceNode::toImpl(holder); |
41 v8SetReturnValueString(info, impl->stringAttribute(), info.GetIsolate()); | 41 v8SetReturnValueString(info, impl->stringAttribute(), info.GetIsolate()); |
42 } | 42 } |
43 | 43 |
44 static void stringAttributeAttributeGetterCallback(v8::Local<v8::String>, const
v8::PropertyCallbackInfo<v8::Value>& info) | 44 static void stringAttributeAttributeGetterCallback(const v8::FunctionCallbackInf
o<v8::Value>& info) |
45 { | 45 { |
46 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 46 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
47 TestInterfaceNodeV8Internal::stringAttributeAttributeGetter(info); | 47 TestInterfaceNodeV8Internal::stringAttributeAttributeGetter(info); |
48 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 48 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
49 } | 49 } |
50 | 50 |
51 static void stringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v
8::PropertyCallbackInfo<void>& info) | 51 static void stringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v
8::FunctionCallbackInfo<v8::Value>& info) |
52 { | 52 { |
53 v8::Local<v8::Object> holder = info.Holder(); | 53 v8::Local<v8::Object> holder = info.Holder(); |
54 TestInterfaceNode* impl = V8TestInterfaceNode::toImpl(holder); | 54 TestInterfaceNode* impl = V8TestInterfaceNode::toImpl(holder); |
55 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); | 55 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); |
56 impl->setStringAttribute(cppValue); | 56 impl->setStringAttribute(cppValue); |
57 } | 57 } |
58 | 58 |
59 static void stringAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Lo
cal<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 59 static void stringAttributeAttributeSetterCallback(const v8::FunctionCallbackInf
o<v8::Value>& 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 TestInterfaceNodeV8Internal::stringAttributeAttributeSetter(v8Value, info); | 63 TestInterfaceNodeV8Internal::stringAttributeAttributeSetter(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 readonlyTestInterfaceEmptyAttributeAttributeGetter(const v8::Propert
yCallbackInfo<v8::Value>& info) | 67 static void readonlyTestInterfaceEmptyAttributeAttributeGetter(const v8::Functio
nCallbackInfo<v8::Value>& info) |
67 { | 68 { |
68 v8::Local<v8::Object> holder = info.Holder(); | 69 v8::Local<v8::Object> holder = info.Holder(); |
69 TestInterfaceNode* impl = V8TestInterfaceNode::toImpl(holder); | 70 TestInterfaceNode* impl = V8TestInterfaceNode::toImpl(holder); |
70 v8SetReturnValueFast(info, WTF::getPtr(impl->readonlyTestInterfaceEmptyAttri
bute()), impl); | 71 v8SetReturnValueFast(info, WTF::getPtr(impl->readonlyTestInterfaceEmptyAttri
bute()), impl); |
71 } | 72 } |
72 | 73 |
73 static void readonlyTestInterfaceEmptyAttributeAttributeGetterCallback(v8::Local
<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 74 static void readonlyTestInterfaceEmptyAttributeAttributeGetterCallback(const v8:
:FunctionCallbackInfo<v8::Value>& info) |
74 { | 75 { |
75 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 76 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
76 TestInterfaceNodeV8Internal::readonlyTestInterfaceEmptyAttributeAttributeGet
ter(info); | 77 TestInterfaceNodeV8Internal::readonlyTestInterfaceEmptyAttributeAttributeGet
ter(info); |
77 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 78 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
78 } | 79 } |
79 | 80 |
80 static void eventHandlerAttributeAttributeGetter(const v8::PropertyCallbackInfo<
v8::Value>& info) | 81 static void eventHandlerAttributeAttributeGetter(const v8::PropertyCallbackInfo<
v8::Value>& info) |
81 { | 82 { |
82 v8::Local<v8::Object> holder = info.Holder(); | 83 v8::Local<v8::Object> holder = info.Holder(); |
83 TestInterfaceNode* impl = V8TestInterfaceNode::toImpl(holder); | 84 TestInterfaceNode* impl = V8TestInterfaceNode::toImpl(holder); |
(...skipping 15 matching lines...) Expand all Loading... |
99 impl->setEventHandlerAttribute(V8EventListenerList::getEventListener(ScriptS
tate::current(info.GetIsolate()), v8Value, true, ListenerFindOrCreate)); | 100 impl->setEventHandlerAttribute(V8EventListenerList::getEventListener(ScriptS
tate::current(info.GetIsolate()), v8Value, true, ListenerFindOrCreate)); |
100 } | 101 } |
101 | 102 |
102 static void eventHandlerAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 103 static void eventHandlerAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
103 { | 104 { |
104 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 105 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
105 TestInterfaceNodeV8Internal::eventHandlerAttributeAttributeSetter(v8Value, i
nfo); | 106 TestInterfaceNodeV8Internal::eventHandlerAttributeAttributeSetter(v8Value, i
nfo); |
106 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 107 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
107 } | 108 } |
108 | 109 |
109 static void perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetter(c
onst v8::PropertyCallbackInfo<v8::Value>& info) | 110 static void perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetter(c
onst v8::FunctionCallbackInfo<v8::Value>& info) |
110 { | 111 { |
111 v8::Local<v8::Object> holder = info.Holder(); | 112 v8::Local<v8::Object> holder = info.Holder(); |
112 TestInterfaceNode* impl = V8TestInterfaceNode::toImpl(holder); | 113 TestInterfaceNode* impl = V8TestInterfaceNode::toImpl(holder); |
113 v8SetReturnValueFast(info, WTF::getPtr(impl->perWorldBindingsReadonlyTestInt
erfaceEmptyAttribute()), impl); | 114 v8SetReturnValueFast(info, WTF::getPtr(impl->perWorldBindingsReadonlyTestInt
erfaceEmptyAttribute()), impl); |
114 } | 115 } |
115 | 116 |
116 static void perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetterCa
llback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 117 static void perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetterCa
llback(const v8::FunctionCallbackInfo<v8::Value>& info) |
117 { | 118 { |
118 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 119 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
119 TestInterfaceNodeV8Internal::perWorldBindingsReadonlyTestInterfaceEmptyAttri
buteAttributeGetter(info); | 120 TestInterfaceNodeV8Internal::perWorldBindingsReadonlyTestInterfaceEmptyAttri
buteAttributeGetter(info); |
120 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 121 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
121 } | 122 } |
122 | 123 |
123 static void perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetterFo
rMainWorld(const v8::PropertyCallbackInfo<v8::Value>& info) | 124 static void perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetterFo
rMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info) |
124 { | 125 { |
125 v8::Local<v8::Object> holder = info.Holder(); | 126 v8::Local<v8::Object> holder = info.Holder(); |
126 TestInterfaceNode* impl = V8TestInterfaceNode::toImpl(holder); | 127 TestInterfaceNode* impl = V8TestInterfaceNode::toImpl(holder); |
127 v8SetReturnValueForMainWorld(info, WTF::getPtr(impl->perWorldBindingsReadonl
yTestInterfaceEmptyAttribute())); | 128 v8SetReturnValueForMainWorld(info, WTF::getPtr(impl->perWorldBindingsReadonl
yTestInterfaceEmptyAttribute())); |
128 } | 129 } |
129 | 130 |
130 static void perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetterCa
llbackForMainWorld(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Val
ue>& info) | 131 static void perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetterCa
llbackForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info) |
131 { | 132 { |
132 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 133 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
133 TestInterfaceNodeV8Internal::perWorldBindingsReadonlyTestInterfaceEmptyAttri
buteAttributeGetterForMainWorld(info); | 134 TestInterfaceNodeV8Internal::perWorldBindingsReadonlyTestInterfaceEmptyAttri
buteAttributeGetterForMainWorld(info); |
134 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 135 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
135 } | 136 } |
136 | 137 |
137 static void reflectStringAttributeAttributeGetter(const v8::PropertyCallbackInfo
<v8::Value>& info) | 138 static void reflectStringAttributeAttributeGetter(const v8::FunctionCallbackInfo
<v8::Value>& info) |
138 { | 139 { |
139 v8::Local<v8::Object> holder = info.Holder(); | 140 v8::Local<v8::Object> holder = info.Holder(); |
140 Element* impl = V8Element::toImpl(holder); | 141 Element* impl = V8Element::toImpl(holder); |
141 v8SetReturnValueString(info, impl->fastGetAttribute(HTMLNames::reflectstring
attributeAttr), info.GetIsolate()); | 142 v8SetReturnValueString(info, impl->fastGetAttribute(HTMLNames::reflectstring
attributeAttr), info.GetIsolate()); |
142 } | 143 } |
143 | 144 |
144 static void reflectStringAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) | 145 static void reflectStringAttributeAttributeGetterCallback(const v8::FunctionCall
backInfo<v8::Value>& info) |
145 { | 146 { |
146 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 147 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
147 TestInterfaceNodeV8Internal::reflectStringAttributeAttributeGetter(info); | 148 TestInterfaceNodeV8Internal::reflectStringAttributeAttributeGetter(info); |
148 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 149 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
149 } | 150 } |
150 | 151 |
151 static void reflectStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<void>& info) | 152 static void reflectStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::FunctionCallbackInfo<v8::Value>& info) |
152 { | 153 { |
153 v8::Local<v8::Object> holder = info.Holder(); | 154 v8::Local<v8::Object> holder = info.Holder(); |
154 Element* impl = V8Element::toImpl(holder); | 155 Element* impl = V8Element::toImpl(holder); |
155 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); | 156 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); |
156 impl->setAttribute(HTMLNames::reflectstringattributeAttr, cppValue); | 157 impl->setAttribute(HTMLNames::reflectstringattributeAttr, cppValue); |
157 } | 158 } |
158 | 159 |
159 static void reflectStringAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 160 static void reflectStringAttributeAttributeSetterCallback(const v8::FunctionCall
backInfo<v8::Value>& info) |
160 { | 161 { |
| 162 v8::Local<v8::Value> v8Value = info[0]; |
161 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 163 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
162 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | 164 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
163 TestInterfaceNodeV8Internal::reflectStringAttributeAttributeSetter(v8Value,
info); | 165 TestInterfaceNodeV8Internal::reflectStringAttributeAttributeSetter(v8Value,
info); |
164 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 166 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
165 } | 167 } |
166 | 168 |
167 static void reflectUrlStringAttributeAttributeGetter(const v8::PropertyCallbackI
nfo<v8::Value>& info) | 169 static void reflectUrlStringAttributeAttributeGetter(const v8::FunctionCallbackI
nfo<v8::Value>& info) |
168 { | 170 { |
169 v8::Local<v8::Object> holder = info.Holder(); | 171 v8::Local<v8::Object> holder = info.Holder(); |
170 TestInterfaceNode* impl = V8TestInterfaceNode::toImpl(holder); | 172 TestInterfaceNode* impl = V8TestInterfaceNode::toImpl(holder); |
171 v8SetReturnValueString(info, impl->getURLAttribute(HTMLNames::reflecturlstri
ngattributeAttr), info.GetIsolate()); | 173 v8SetReturnValueString(info, impl->getURLAttribute(HTMLNames::reflecturlstri
ngattributeAttr), info.GetIsolate()); |
172 } | 174 } |
173 | 175 |
174 static void reflectUrlStringAttributeAttributeGetterCallback(v8::Local<v8::Strin
g>, const v8::PropertyCallbackInfo<v8::Value>& info) | 176 static void reflectUrlStringAttributeAttributeGetterCallback(const v8::FunctionC
allbackInfo<v8::Value>& info) |
175 { | 177 { |
176 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 178 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
177 TestInterfaceNodeV8Internal::reflectUrlStringAttributeAttributeGetter(info); | 179 TestInterfaceNodeV8Internal::reflectUrlStringAttributeAttributeGetter(info); |
178 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 180 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
179 } | 181 } |
180 | 182 |
181 static void reflectUrlStringAttributeAttributeSetter(v8::Local<v8::Value> v8Valu
e, const v8::PropertyCallbackInfo<void>& info) | 183 static void reflectUrlStringAttributeAttributeSetter(v8::Local<v8::Value> v8Valu
e, const v8::FunctionCallbackInfo<v8::Value>& info) |
182 { | 184 { |
183 v8::Local<v8::Object> holder = info.Holder(); | 185 v8::Local<v8::Object> holder = info.Holder(); |
184 Element* impl = V8Element::toImpl(holder); | 186 Element* impl = V8Element::toImpl(holder); |
185 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); | 187 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); |
186 impl->setAttribute(HTMLNames::reflecturlstringattributeAttr, cppValue); | 188 impl->setAttribute(HTMLNames::reflecturlstringattributeAttr, cppValue); |
187 } | 189 } |
188 | 190 |
189 static void reflectUrlStringAttributeAttributeSetterCallback(v8::Local<v8::Strin
g>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 191 static void reflectUrlStringAttributeAttributeSetterCallback(const v8::FunctionC
allbackInfo<v8::Value>& info) |
190 { | 192 { |
| 193 v8::Local<v8::Value> v8Value = info[0]; |
191 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 194 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
192 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; | 195 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
193 TestInterfaceNodeV8Internal::reflectUrlStringAttributeAttributeSetter(v8Valu
e, info); | 196 TestInterfaceNodeV8Internal::reflectUrlStringAttributeAttributeSetter(v8Valu
e, info); |
194 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 197 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
195 } | 198 } |
196 | 199 |
197 static void testInterfaceEmptyMethodMethod(const v8::FunctionCallbackInfo<v8::Va
lue>& info) | 200 static void testInterfaceEmptyMethodMethod(const v8::FunctionCallbackInfo<v8::Va
lue>& info) |
198 { | 201 { |
199 TestInterfaceNode* impl = V8TestInterfaceNode::toImpl(info.Holder()); | 202 TestInterfaceNode* impl = V8TestInterfaceNode::toImpl(info.Holder()); |
200 v8SetReturnValueFast(info, WTF::getPtr(impl->testInterfaceEmptyMethod()), im
pl); | 203 v8SetReturnValueFast(info, WTF::getPtr(impl->testInterfaceEmptyMethod()), im
pl); |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
271 static void perWorldBindingsTestInterfaceEmptyMethodOptionalBooleanArgMethodCall
backForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info) | 274 static void perWorldBindingsTestInterfaceEmptyMethodOptionalBooleanArgMethodCall
backForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info) |
272 { | 275 { |
273 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 276 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
274 TestInterfaceNodeV8Internal::perWorldBindingsTestInterfaceEmptyMethodOptiona
lBooleanArgMethodForMainWorld(info); | 277 TestInterfaceNodeV8Internal::perWorldBindingsTestInterfaceEmptyMethodOptiona
lBooleanArgMethodForMainWorld(info); |
275 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 278 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
276 } | 279 } |
277 | 280 |
278 } // namespace TestInterfaceNodeV8Internal | 281 } // namespace TestInterfaceNodeV8Internal |
279 | 282 |
280 static const V8DOMConfiguration::AttributeConfiguration V8TestInterfaceNodeAttri
butes[] = { | 283 static const V8DOMConfiguration::AttributeConfiguration V8TestInterfaceNodeAttri
butes[] = { |
281 {"stringAttribute", TestInterfaceNodeV8Internal::stringAttributeAttributeGet
terCallback, TestInterfaceNodeV8Internal::stringAttributeAttributeSetterCallback
, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::Property
Attribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguratio
n::OnInstance}, | |
282 {"readonlyTestInterfaceEmptyAttribute", TestInterfaceNodeV8Internal::readonl
yTestInterfaceEmptyAttributeAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8:
:AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DO
MConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance}, | |
283 {"eventHandlerAttribute", TestInterfaceNodeV8Internal::eventHandlerAttribute
AttributeGetterCallback, TestInterfaceNodeV8Internal::eventHandlerAttributeAttri
buteSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static
_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts,
V8DOMConfiguration::OnInstance}, | 284 {"eventHandlerAttribute", TestInterfaceNodeV8Internal::eventHandlerAttribute
AttributeGetterCallback, TestInterfaceNodeV8Internal::eventHandlerAttributeAttri
buteSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static
_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts,
V8DOMConfiguration::OnInstance}, |
284 {"perWorldBindingsReadonlyTestInterfaceEmptyAttribute", TestInterfaceNodeV8I
nternal::perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetterCallb
ack, 0, TestInterfaceNodeV8Internal::perWorldBindingsReadonlyTestInterfaceEmptyA
ttributeAttributeGetterCallbackForMainWorld, 0, 0, static_cast<v8::AccessControl
>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration
::ExposedToAllScripts, V8DOMConfiguration::OnInstance}, | 285 }; |
285 {"reflectStringAttribute", TestInterfaceNodeV8Internal::reflectStringAttribu
teAttributeGetterCallback, TestInterfaceNodeV8Internal::reflectStringAttributeAt
tributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), sta
tic_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScrip
ts, V8DOMConfiguration::OnInstance}, | 286 |
286 {"reflectUrlStringAttribute", TestInterfaceNodeV8Internal::reflectUrlStringA
ttributeAttributeGetterCallback, TestInterfaceNodeV8Internal::reflectUrlStringAt
tributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFA
ULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedT
oAllScripts, V8DOMConfiguration::OnInstance}, | 287 static const V8DOMConfiguration::AccessorConfiguration V8TestInterfaceNodeAccess
ors[] = { |
| 288 {"stringAttribute", TestInterfaceNodeV8Internal::stringAttributeAttributeGet
terCallback, TestInterfaceNodeV8Internal::stringAttributeAttributeSetterCallback
, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::Property
Attribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts}, |
| 289 {"readonlyTestInterfaceEmptyAttribute", TestInterfaceNodeV8Internal::readonl
yTestInterfaceEmptyAttributeAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8:
:AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DO
MConfiguration::ExposedToAllScripts}, |
| 290 {"perWorldBindingsReadonlyTestInterfaceEmptyAttribute", TestInterfaceNodeV8I
nternal::perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetterCallb
ack, 0, TestInterfaceNodeV8Internal::perWorldBindingsReadonlyTestInterfaceEmptyA
ttributeAttributeGetterCallbackForMainWorld, 0, 0, static_cast<v8::AccessControl
>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration
::ExposedToAllScripts}, |
| 291 {"reflectStringAttribute", TestInterfaceNodeV8Internal::reflectStringAttribu
teAttributeGetterCallback, TestInterfaceNodeV8Internal::reflectStringAttributeAt
tributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), sta
tic_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScrip
ts}, |
| 292 {"reflectUrlStringAttribute", TestInterfaceNodeV8Internal::reflectUrlStringA
ttributeAttributeGetterCallback, TestInterfaceNodeV8Internal::reflectUrlStringAt
tributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFA
ULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedT
oAllScripts}, |
287 }; | 293 }; |
288 | 294 |
289 static const V8DOMConfiguration::MethodConfiguration V8TestInterfaceNodeMethods[
] = { | 295 static const V8DOMConfiguration::MethodConfiguration V8TestInterfaceNodeMethods[
] = { |
290 {"testInterfaceEmptyMethod", TestInterfaceNodeV8Internal::testInterfaceEmpty
MethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, | 296 {"testInterfaceEmptyMethod", TestInterfaceNodeV8Internal::testInterfaceEmpty
MethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, |
291 {"perWorldBindingsTestInterfaceEmptyMethod", TestInterfaceNodeV8Internal::pe
rWorldBindingsTestInterfaceEmptyMethodMethodCallback, TestInterfaceNodeV8Interna
l::perWorldBindingsTestInterfaceEmptyMethodMethodCallbackForMainWorld, 0, V8DOMC
onfiguration::ExposedToAllScripts}, | 297 {"perWorldBindingsTestInterfaceEmptyMethod", TestInterfaceNodeV8Internal::pe
rWorldBindingsTestInterfaceEmptyMethodMethodCallback, TestInterfaceNodeV8Interna
l::perWorldBindingsTestInterfaceEmptyMethodMethodCallbackForMainWorld, 0, V8DOMC
onfiguration::ExposedToAllScripts}, |
292 {"perWorldBindingsTestInterfaceEmptyMethodOptionalBooleanArg", TestInterface
NodeV8Internal::perWorldBindingsTestInterfaceEmptyMethodOptionalBooleanArgMethod
Callback, TestInterfaceNodeV8Internal::perWorldBindingsTestInterfaceEmptyMethodO
ptionalBooleanArgMethodCallbackForMainWorld, 0, V8DOMConfiguration::ExposedToAll
Scripts}, | 298 {"perWorldBindingsTestInterfaceEmptyMethodOptionalBooleanArg", TestInterface
NodeV8Internal::perWorldBindingsTestInterfaceEmptyMethodOptionalBooleanArgMethod
Callback, TestInterfaceNodeV8Internal::perWorldBindingsTestInterfaceEmptyMethodO
ptionalBooleanArgMethodCallbackForMainWorld, 0, V8DOMConfiguration::ExposedToAll
Scripts}, |
293 }; | 299 }; |
294 | 300 |
295 static void installV8TestInterfaceNodeTemplate(v8::Local<v8::FunctionTemplate> f
unctionTemplate, v8::Isolate* isolate) | 301 static void installV8TestInterfaceNodeTemplate(v8::Local<v8::FunctionTemplate> f
unctionTemplate, v8::Isolate* isolate) |
296 { | 302 { |
297 functionTemplate->ReadOnlyPrototype(); | 303 functionTemplate->ReadOnlyPrototype(); |
298 | 304 |
299 v8::Local<v8::Signature> defaultSignature; | 305 v8::Local<v8::Signature> defaultSignature; |
300 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(isolate, func
tionTemplate, "TestInterfaceNode", V8Node::domTemplate(isolate), V8TestInterface
Node::internalFieldCount, | 306 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(isolate, func
tionTemplate, "TestInterfaceNode", V8Node::domTemplate(isolate), V8TestInterface
Node::internalFieldCount, |
301 V8TestInterfaceNodeAttributes, WTF_ARRAY_LENGTH(V8TestInterfaceNodeAttri
butes), | 307 V8TestInterfaceNodeAttributes, WTF_ARRAY_LENGTH(V8TestInterfaceNodeAttri
butes), |
302 0, 0, | 308 V8TestInterfaceNodeAccessors, WTF_ARRAY_LENGTH(V8TestInterfaceNodeAccess
ors), |
303 V8TestInterfaceNodeMethods, WTF_ARRAY_LENGTH(V8TestInterfaceNodeMethods)
); | 309 V8TestInterfaceNodeMethods, WTF_ARRAY_LENGTH(V8TestInterfaceNodeMethods)
); |
304 v8::Local<v8::ObjectTemplate> instanceTemplate = functionTemplate->InstanceT
emplate(); | 310 v8::Local<v8::ObjectTemplate> instanceTemplate = functionTemplate->InstanceT
emplate(); |
305 ALLOW_UNUSED_LOCAL(instanceTemplate); | 311 ALLOW_UNUSED_LOCAL(instanceTemplate); |
306 v8::Local<v8::ObjectTemplate> prototypeTemplate = functionTemplate->Prototyp
eTemplate(); | 312 v8::Local<v8::ObjectTemplate> prototypeTemplate = functionTemplate->Prototyp
eTemplate(); |
307 ALLOW_UNUSED_LOCAL(prototypeTemplate); | 313 ALLOW_UNUSED_LOCAL(prototypeTemplate); |
308 | 314 |
309 // Custom toString template | 315 // Custom toString template |
310 functionTemplate->Set(v8AtomicString(isolate, "toString"), V8PerIsolateData:
:from(isolate)->toStringTemplate()); | 316 functionTemplate->Set(v8AtomicString(isolate, "toString"), V8PerIsolateData:
:from(isolate)->toStringTemplate()); |
311 } | 317 } |
312 | 318 |
(...skipping 25 matching lines...) Expand all Loading... |
338 } | 344 } |
339 | 345 |
340 void V8TestInterfaceNode::derefObject(ScriptWrappable* scriptWrappable) | 346 void V8TestInterfaceNode::derefObject(ScriptWrappable* scriptWrappable) |
341 { | 347 { |
342 #if !ENABLE(OILPAN) | 348 #if !ENABLE(OILPAN) |
343 scriptWrappable->toImpl<TestInterfaceNode>()->deref(); | 349 scriptWrappable->toImpl<TestInterfaceNode>()->deref(); |
344 #endif | 350 #endif |
345 } | 351 } |
346 | 352 |
347 } // namespace blink | 353 } // namespace blink |
OLD | NEW |