OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 | 72 |
73 namespace WebCore { | 73 namespace WebCore { |
74 const WrapperTypeInfo V8TestInterfaceNode::wrapperTypeInfo = { gin::kEmbedderBli
nk, V8TestInterfaceNode::domTemplate, V8TestInterfaceNode::derefObject, 0, V8Tes
tInterfaceNode::toEventTarget, 0, V8TestInterfaceNode::installPerContextEnabledM
ethods, &V8Node::wrapperTypeInfo, WrapperTypeObjectPrototype, false }; | 74 const WrapperTypeInfo V8TestInterfaceNode::wrapperTypeInfo = { gin::kEmbedderBli
nk, V8TestInterfaceNode::domTemplate, V8TestInterfaceNode::derefObject, 0, V8Tes
tInterfaceNode::toEventTarget, 0, V8TestInterfaceNode::installPerContextEnabledM
ethods, &V8Node::wrapperTypeInfo, WrapperTypeObjectPrototype, false }; |
75 | 75 |
76 namespace TestInterfaceNodeV8Internal { | 76 namespace TestInterfaceNodeV8Internal { |
77 | 77 |
78 template <typename T> void V8_USE(T) { } | 78 template <typename T> void V8_USE(T) { } |
79 | 79 |
80 static void stringAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Va
lue>& info) | 80 static void stringAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Va
lue>& info) |
81 { | 81 { |
82 TestInterfaceNode* imp = V8TestInterfaceNode::toNative(info.Holder()); | 82 TestInterfaceNode* impl = V8TestInterfaceNode::toNative(info.Holder()); |
83 v8SetReturnValueString(info, imp->stringAttribute(), info.GetIsolate()); | 83 v8SetReturnValueString(info, impl->stringAttribute(), info.GetIsolate()); |
84 } | 84 } |
85 | 85 |
86 static void stringAttributeAttributeGetterCallback(v8::Local<v8::String>, const
v8::PropertyCallbackInfo<v8::Value>& info) | 86 static void stringAttributeAttributeGetterCallback(v8::Local<v8::String>, const
v8::PropertyCallbackInfo<v8::Value>& info) |
87 { | 87 { |
88 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 88 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
89 TestInterfaceNodeV8Internal::stringAttributeAttributeGetter(info); | 89 TestInterfaceNodeV8Internal::stringAttributeAttributeGetter(info); |
90 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 90 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
91 } | 91 } |
92 | 92 |
93 static void stringAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v
8::PropertyCallbackInfo<void>& info) | 93 static void stringAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v
8::PropertyCallbackInfo<void>& info) |
94 { | 94 { |
95 TestInterfaceNode* imp = V8TestInterfaceNode::toNative(info.Holder()); | 95 TestInterfaceNode* impl = V8TestInterfaceNode::toNative(info.Holder()); |
96 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); | 96 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); |
97 imp->setStringAttribute(cppValue); | 97 impl->setStringAttribute(cppValue); |
98 } | 98 } |
99 | 99 |
100 static void stringAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Lo
cal<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 100 static void stringAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Lo
cal<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
101 { | 101 { |
102 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 102 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
103 TestInterfaceNodeV8Internal::stringAttributeAttributeSetter(jsValue, info); | 103 TestInterfaceNodeV8Internal::stringAttributeAttributeSetter(jsValue, info); |
104 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 104 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
105 } | 105 } |
106 | 106 |
107 static void readonlyTestInterfaceEmptyAttributeAttributeGetter(const v8::Propert
yCallbackInfo<v8::Value>& info) | 107 static void readonlyTestInterfaceEmptyAttributeAttributeGetter(const v8::Propert
yCallbackInfo<v8::Value>& info) |
108 { | 108 { |
109 TestInterfaceNode* imp = V8TestInterfaceNode::toNative(info.Holder()); | 109 TestInterfaceNode* impl = V8TestInterfaceNode::toNative(info.Holder()); |
110 v8SetReturnValueFast(info, WTF::getPtr(imp->readonlyTestInterfaceEmptyAttrib
ute()), imp); | 110 v8SetReturnValueFast(info, WTF::getPtr(impl->readonlyTestInterfaceEmptyAttri
bute()), impl); |
111 } | 111 } |
112 | 112 |
113 static void readonlyTestInterfaceEmptyAttributeAttributeGetterCallback(v8::Local
<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 113 static void readonlyTestInterfaceEmptyAttributeAttributeGetterCallback(v8::Local
<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
114 { | 114 { |
115 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 115 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
116 TestInterfaceNodeV8Internal::readonlyTestInterfaceEmptyAttributeAttributeGet
ter(info); | 116 TestInterfaceNodeV8Internal::readonlyTestInterfaceEmptyAttributeAttributeGet
ter(info); |
117 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 117 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
118 } | 118 } |
119 | 119 |
120 static void eventHandlerAttributeAttributeGetter(const v8::PropertyCallbackInfo<
v8::Value>& info) | 120 static void eventHandlerAttributeAttributeGetter(const v8::PropertyCallbackInfo<
v8::Value>& info) |
121 { | 121 { |
122 TestInterfaceNode* imp = V8TestInterfaceNode::toNative(info.Holder()); | 122 TestInterfaceNode* impl = V8TestInterfaceNode::toNative(info.Holder()); |
123 EventListener* jsValue = imp->eventHandlerAttribute(); | 123 EventListener* jsValue = impl->eventHandlerAttribute(); |
124 v8SetReturnValue(info, jsValue ? v8::Handle<v8::Value>(V8AbstractEventListen
er::cast(jsValue)->getListenerObject(imp->executionContext())) : v8::Handle<v8::
Value>(v8::Null(info.GetIsolate()))); | 124 v8SetReturnValue(info, jsValue ? v8::Handle<v8::Value>(V8AbstractEventListen
er::cast(jsValue)->getListenerObject(impl->executionContext())) : v8::Handle<v8:
:Value>(v8::Null(info.GetIsolate()))); |
125 } | 125 } |
126 | 126 |
127 static void eventHandlerAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) | 127 static void eventHandlerAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) |
128 { | 128 { |
129 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 129 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
130 TestInterfaceNodeV8Internal::eventHandlerAttributeAttributeGetter(info); | 130 TestInterfaceNodeV8Internal::eventHandlerAttributeAttributeGetter(info); |
131 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 131 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
132 } | 132 } |
133 | 133 |
134 static void eventHandlerAttributeAttributeSetter(v8::Local<v8::Value> jsValue, c
onst v8::PropertyCallbackInfo<void>& info) | 134 static void eventHandlerAttributeAttributeSetter(v8::Local<v8::Value> jsValue, c
onst v8::PropertyCallbackInfo<void>& info) |
135 { | 135 { |
136 TestInterfaceNode* imp = V8TestInterfaceNode::toNative(info.Holder()); | 136 TestInterfaceNode* impl = V8TestInterfaceNode::toNative(info.Holder()); |
137 imp->setEventHandlerAttribute(V8EventListenerList::getEventListener(jsValue,
true, ListenerFindOrCreate)); | 137 impl->setEventHandlerAttribute(V8EventListenerList::getEventListener(jsValue
, true, ListenerFindOrCreate)); |
138 } | 138 } |
139 | 139 |
140 static void eventHandlerAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 140 static void eventHandlerAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
141 { | 141 { |
142 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 142 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
143 TestInterfaceNodeV8Internal::eventHandlerAttributeAttributeSetter(jsValue, i
nfo); | 143 TestInterfaceNodeV8Internal::eventHandlerAttributeAttributeSetter(jsValue, i
nfo); |
144 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 144 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
145 } | 145 } |
146 | 146 |
147 static void perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetter(c
onst v8::PropertyCallbackInfo<v8::Value>& info) | 147 static void perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetter(c
onst v8::PropertyCallbackInfo<v8::Value>& info) |
148 { | 148 { |
149 TestInterfaceNode* imp = V8TestInterfaceNode::toNative(info.Holder()); | 149 TestInterfaceNode* impl = V8TestInterfaceNode::toNative(info.Holder()); |
150 v8SetReturnValueFast(info, WTF::getPtr(imp->perWorldBindingsReadonlyTestInte
rfaceEmptyAttribute()), imp); | 150 v8SetReturnValueFast(info, WTF::getPtr(impl->perWorldBindingsReadonlyTestInt
erfaceEmptyAttribute()), impl); |
151 } | 151 } |
152 | 152 |
153 static void perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetterCa
llback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 153 static void perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetterCa
llback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
154 { | 154 { |
155 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 155 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
156 TestInterfaceNodeV8Internal::perWorldBindingsReadonlyTestInterfaceEmptyAttri
buteAttributeGetter(info); | 156 TestInterfaceNodeV8Internal::perWorldBindingsReadonlyTestInterfaceEmptyAttri
buteAttributeGetter(info); |
157 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 157 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
158 } | 158 } |
159 | 159 |
160 static void perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetterFo
rMainWorld(const v8::PropertyCallbackInfo<v8::Value>& info) | 160 static void perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetterFo
rMainWorld(const v8::PropertyCallbackInfo<v8::Value>& info) |
161 { | 161 { |
162 TestInterfaceNode* imp = V8TestInterfaceNode::toNative(info.Holder()); | 162 TestInterfaceNode* impl = V8TestInterfaceNode::toNative(info.Holder()); |
163 v8SetReturnValueForMainWorld(info, WTF::getPtr(imp->perWorldBindingsReadonly
TestInterfaceEmptyAttribute())); | 163 v8SetReturnValueForMainWorld(info, WTF::getPtr(impl->perWorldBindingsReadonl
yTestInterfaceEmptyAttribute())); |
164 } | 164 } |
165 | 165 |
166 static void perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetterCa
llbackForMainWorld(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Val
ue>& info) | 166 static void perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetterCa
llbackForMainWorld(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Val
ue>& info) |
167 { | 167 { |
168 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 168 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
169 TestInterfaceNodeV8Internal::perWorldBindingsReadonlyTestInterfaceEmptyAttri
buteAttributeGetterForMainWorld(info); | 169 TestInterfaceNodeV8Internal::perWorldBindingsReadonlyTestInterfaceEmptyAttri
buteAttributeGetterForMainWorld(info); |
170 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 170 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
171 } | 171 } |
172 | 172 |
173 static void reflectStringAttributeAttributeGetter(const v8::PropertyCallbackInfo
<v8::Value>& info) | 173 static void reflectStringAttributeAttributeGetter(const v8::PropertyCallbackInfo
<v8::Value>& info) |
174 { | 174 { |
175 Element* imp = V8Element::toNative(info.Holder()); | 175 Element* impl = V8Element::toNative(info.Holder()); |
176 v8SetReturnValueString(info, imp->fastGetAttribute(HTMLNames::reflectstringa
ttributeAttr), info.GetIsolate()); | 176 v8SetReturnValueString(info, impl->fastGetAttribute(HTMLNames::reflectstring
attributeAttr), info.GetIsolate()); |
177 } | 177 } |
178 | 178 |
179 static void reflectStringAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) | 179 static void reflectStringAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) |
180 { | 180 { |
181 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 181 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
182 TestInterfaceNodeV8Internal::reflectStringAttributeAttributeGetter(info); | 182 TestInterfaceNodeV8Internal::reflectStringAttributeAttributeGetter(info); |
183 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 183 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
184 } | 184 } |
185 | 185 |
186 static void reflectStringAttributeAttributeSetter(v8::Local<v8::Value> jsValue,
const v8::PropertyCallbackInfo<void>& info) | 186 static void reflectStringAttributeAttributeSetter(v8::Local<v8::Value> jsValue,
const v8::PropertyCallbackInfo<void>& info) |
187 { | 187 { |
188 Element* imp = V8Element::toNative(info.Holder()); | 188 Element* impl = V8Element::toNative(info.Holder()); |
189 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); | 189 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); |
190 imp->setAttribute(HTMLNames::reflectstringattributeAttr, cppValue); | 190 impl->setAttribute(HTMLNames::reflectstringattributeAttr, cppValue); |
191 } | 191 } |
192 | 192 |
193 static void reflectStringAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 193 static void reflectStringAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
194 { | 194 { |
195 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 195 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
196 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 196 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
197 TestInterfaceNodeV8Internal::reflectStringAttributeAttributeSetter(jsValue,
info); | 197 TestInterfaceNodeV8Internal::reflectStringAttributeAttributeSetter(jsValue,
info); |
198 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 198 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
199 } | 199 } |
200 | 200 |
201 static void reflectUrlStringAttributeAttributeGetter(const v8::PropertyCallbackI
nfo<v8::Value>& info) | 201 static void reflectUrlStringAttributeAttributeGetter(const v8::PropertyCallbackI
nfo<v8::Value>& info) |
202 { | 202 { |
203 TestInterfaceNode* imp = V8TestInterfaceNode::toNative(info.Holder()); | 203 TestInterfaceNode* impl = V8TestInterfaceNode::toNative(info.Holder()); |
204 v8SetReturnValueString(info, imp->getURLAttribute(HTMLNames::reflecturlstrin
gattributeAttr), info.GetIsolate()); | 204 v8SetReturnValueString(info, impl->getURLAttribute(HTMLNames::reflecturlstri
ngattributeAttr), info.GetIsolate()); |
205 } | 205 } |
206 | 206 |
207 static void reflectUrlStringAttributeAttributeGetterCallback(v8::Local<v8::Strin
g>, const v8::PropertyCallbackInfo<v8::Value>& info) | 207 static void reflectUrlStringAttributeAttributeGetterCallback(v8::Local<v8::Strin
g>, const v8::PropertyCallbackInfo<v8::Value>& info) |
208 { | 208 { |
209 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 209 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
210 TestInterfaceNodeV8Internal::reflectUrlStringAttributeAttributeGetter(info); | 210 TestInterfaceNodeV8Internal::reflectUrlStringAttributeAttributeGetter(info); |
211 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 211 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
212 } | 212 } |
213 | 213 |
214 static void reflectUrlStringAttributeAttributeSetter(v8::Local<v8::Value> jsValu
e, const v8::PropertyCallbackInfo<void>& info) | 214 static void reflectUrlStringAttributeAttributeSetter(v8::Local<v8::Value> jsValu
e, const v8::PropertyCallbackInfo<void>& info) |
215 { | 215 { |
216 Element* imp = V8Element::toNative(info.Holder()); | 216 Element* impl = V8Element::toNative(info.Holder()); |
217 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); | 217 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); |
218 imp->setAttribute(HTMLNames::reflecturlstringattributeAttr, cppValue); | 218 impl->setAttribute(HTMLNames::reflecturlstringattributeAttr, cppValue); |
219 } | 219 } |
220 | 220 |
221 static void reflectUrlStringAttributeAttributeSetterCallback(v8::Local<v8::Strin
g>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 221 static void reflectUrlStringAttributeAttributeSetterCallback(v8::Local<v8::Strin
g>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
222 { | 222 { |
223 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 223 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
224 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; | 224 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; |
225 TestInterfaceNodeV8Internal::reflectUrlStringAttributeAttributeSetter(jsValu
e, info); | 225 TestInterfaceNodeV8Internal::reflectUrlStringAttributeAttributeSetter(jsValu
e, info); |
226 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 226 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
227 } | 227 } |
228 | 228 |
229 static void testInterfaceEmptyMethodMethod(const v8::FunctionCallbackInfo<v8::Va
lue>& info) | 229 static void testInterfaceEmptyMethodMethod(const v8::FunctionCallbackInfo<v8::Va
lue>& info) |
230 { | 230 { |
231 TestInterfaceNode* imp = V8TestInterfaceNode::toNative(info.Holder()); | 231 TestInterfaceNode* impl = V8TestInterfaceNode::toNative(info.Holder()); |
232 v8SetReturnValueFast(info, WTF::getPtr(imp->testInterfaceEmptyMethod()), imp
); | 232 v8SetReturnValueFast(info, WTF::getPtr(impl->testInterfaceEmptyMethod()), im
pl); |
233 } | 233 } |
234 | 234 |
235 static void testInterfaceEmptyMethodMethodCallback(const v8::FunctionCallbackInf
o<v8::Value>& info) | 235 static void testInterfaceEmptyMethodMethodCallback(const v8::FunctionCallbackInf
o<v8::Value>& info) |
236 { | 236 { |
237 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 237 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
238 TestInterfaceNodeV8Internal::testInterfaceEmptyMethodMethod(info); | 238 TestInterfaceNodeV8Internal::testInterfaceEmptyMethodMethod(info); |
239 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 239 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
240 } | 240 } |
241 | 241 |
242 static void perWorldBindingsTestInterfaceEmptyMethodMethod(const v8::FunctionCal
lbackInfo<v8::Value>& info) | 242 static void perWorldBindingsTestInterfaceEmptyMethodMethod(const v8::FunctionCal
lbackInfo<v8::Value>& info) |
243 { | 243 { |
244 TestInterfaceNode* imp = V8TestInterfaceNode::toNative(info.Holder()); | 244 TestInterfaceNode* impl = V8TestInterfaceNode::toNative(info.Holder()); |
245 v8SetReturnValueFast(info, WTF::getPtr(imp->perWorldBindingsTestInterfaceEmp
tyMethod()), imp); | 245 v8SetReturnValueFast(info, WTF::getPtr(impl->perWorldBindingsTestInterfaceEm
ptyMethod()), impl); |
246 } | 246 } |
247 | 247 |
248 static void perWorldBindingsTestInterfaceEmptyMethodMethodCallback(const v8::Fun
ctionCallbackInfo<v8::Value>& info) | 248 static void perWorldBindingsTestInterfaceEmptyMethodMethodCallback(const v8::Fun
ctionCallbackInfo<v8::Value>& info) |
249 { | 249 { |
250 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 250 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
251 TestInterfaceNodeV8Internal::perWorldBindingsTestInterfaceEmptyMethodMethod(
info); | 251 TestInterfaceNodeV8Internal::perWorldBindingsTestInterfaceEmptyMethodMethod(
info); |
252 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 252 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
253 } | 253 } |
254 | 254 |
255 static void perWorldBindingsTestInterfaceEmptyMethodMethodForMainWorld(const v8:
:FunctionCallbackInfo<v8::Value>& info) | 255 static void perWorldBindingsTestInterfaceEmptyMethodMethodForMainWorld(const v8:
:FunctionCallbackInfo<v8::Value>& info) |
256 { | 256 { |
257 TestInterfaceNode* imp = V8TestInterfaceNode::toNative(info.Holder()); | 257 TestInterfaceNode* impl = V8TestInterfaceNode::toNative(info.Holder()); |
258 v8SetReturnValueForMainWorld(info, WTF::getPtr(imp->perWorldBindingsTestInte
rfaceEmptyMethod())); | 258 v8SetReturnValueForMainWorld(info, WTF::getPtr(impl->perWorldBindingsTestInt
erfaceEmptyMethod())); |
259 } | 259 } |
260 | 260 |
261 static void perWorldBindingsTestInterfaceEmptyMethodMethodCallbackForMainWorld(c
onst v8::FunctionCallbackInfo<v8::Value>& info) | 261 static void perWorldBindingsTestInterfaceEmptyMethodMethodCallbackForMainWorld(c
onst v8::FunctionCallbackInfo<v8::Value>& info) |
262 { | 262 { |
263 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 263 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
264 TestInterfaceNodeV8Internal::perWorldBindingsTestInterfaceEmptyMethodMethodF
orMainWorld(info); | 264 TestInterfaceNodeV8Internal::perWorldBindingsTestInterfaceEmptyMethodMethodF
orMainWorld(info); |
265 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 265 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
266 } | 266 } |
267 | 267 |
268 static void perWorldBindingsTestInterfaceEmptyMethodOptionalBooleanArgMethod(con
st v8::FunctionCallbackInfo<v8::Value>& info) | 268 static void perWorldBindingsTestInterfaceEmptyMethodOptionalBooleanArgMethod(con
st v8::FunctionCallbackInfo<v8::Value>& info) |
269 { | 269 { |
270 TestInterfaceNode* imp = V8TestInterfaceNode::toNative(info.Holder()); | 270 TestInterfaceNode* impl = V8TestInterfaceNode::toNative(info.Holder()); |
271 if (UNLIKELY(info.Length() <= 0)) { | 271 if (UNLIKELY(info.Length() <= 0)) { |
272 v8SetReturnValueFast(info, WTF::getPtr(imp->perWorldBindingsTestInterfac
eEmptyMethodOptionalBooleanArg()), imp); | 272 v8SetReturnValueFast(info, WTF::getPtr(impl->perWorldBindingsTestInterfa
ceEmptyMethodOptionalBooleanArg()), impl); |
273 return; | 273 return; |
274 } | 274 } |
275 V8TRYCATCH_VOID(bool, optionalBooleanArgument, info[0]->BooleanValue()); | 275 V8TRYCATCH_VOID(bool, optionalBooleanArgument, info[0]->BooleanValue()); |
276 v8SetReturnValueFast(info, WTF::getPtr(imp->perWorldBindingsTestInterfaceEmp
tyMethodOptionalBooleanArg(optionalBooleanArgument)), imp); | 276 v8SetReturnValueFast(info, WTF::getPtr(impl->perWorldBindingsTestInterfaceEm
ptyMethodOptionalBooleanArg(optionalBooleanArgument)), impl); |
277 } | 277 } |
278 | 278 |
279 static void perWorldBindingsTestInterfaceEmptyMethodOptionalBooleanArgMethodCall
back(const v8::FunctionCallbackInfo<v8::Value>& info) | 279 static void perWorldBindingsTestInterfaceEmptyMethodOptionalBooleanArgMethodCall
back(const v8::FunctionCallbackInfo<v8::Value>& info) |
280 { | 280 { |
281 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 281 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
282 TestInterfaceNodeV8Internal::perWorldBindingsTestInterfaceEmptyMethodOptiona
lBooleanArgMethod(info); | 282 TestInterfaceNodeV8Internal::perWorldBindingsTestInterfaceEmptyMethodOptiona
lBooleanArgMethod(info); |
283 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 283 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
284 } | 284 } |
285 | 285 |
286 static void perWorldBindingsTestInterfaceEmptyMethodOptionalBooleanArgMethodForM
ainWorld(const v8::FunctionCallbackInfo<v8::Value>& info) | 286 static void perWorldBindingsTestInterfaceEmptyMethodOptionalBooleanArgMethodForM
ainWorld(const v8::FunctionCallbackInfo<v8::Value>& info) |
287 { | 287 { |
288 TestInterfaceNode* imp = V8TestInterfaceNode::toNative(info.Holder()); | 288 TestInterfaceNode* impl = V8TestInterfaceNode::toNative(info.Holder()); |
289 if (UNLIKELY(info.Length() <= 0)) { | 289 if (UNLIKELY(info.Length() <= 0)) { |
290 v8SetReturnValueForMainWorld(info, WTF::getPtr(imp->perWorldBindingsTest
InterfaceEmptyMethodOptionalBooleanArg())); | 290 v8SetReturnValueForMainWorld(info, WTF::getPtr(impl->perWorldBindingsTes
tInterfaceEmptyMethodOptionalBooleanArg())); |
291 return; | 291 return; |
292 } | 292 } |
293 V8TRYCATCH_VOID(bool, optionalBooleanArgument, info[0]->BooleanValue()); | 293 V8TRYCATCH_VOID(bool, optionalBooleanArgument, info[0]->BooleanValue()); |
294 v8SetReturnValueForMainWorld(info, WTF::getPtr(imp->perWorldBindingsTestInte
rfaceEmptyMethodOptionalBooleanArg(optionalBooleanArgument))); | 294 v8SetReturnValueForMainWorld(info, WTF::getPtr(impl->perWorldBindingsTestInt
erfaceEmptyMethodOptionalBooleanArg(optionalBooleanArgument))); |
295 } | 295 } |
296 | 296 |
297 static void perWorldBindingsTestInterfaceEmptyMethodOptionalBooleanArgMethodCall
backForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info) | 297 static void perWorldBindingsTestInterfaceEmptyMethodOptionalBooleanArgMethodCall
backForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info) |
298 { | 298 { |
299 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 299 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
300 TestInterfaceNodeV8Internal::perWorldBindingsTestInterfaceEmptyMethodOptiona
lBooleanArgMethodForMainWorld(info); | 300 TestInterfaceNodeV8Internal::perWorldBindingsTestInterfaceEmptyMethodOptiona
lBooleanArgMethodForMainWorld(info); |
301 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 301 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
302 } | 302 } |
303 | 303 |
304 } // namespace TestInterfaceNodeV8Internal | 304 } // namespace TestInterfaceNodeV8Internal |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
394 fromInternalPointer(object)->deref(); | 394 fromInternalPointer(object)->deref(); |
395 } | 395 } |
396 | 396 |
397 template<> | 397 template<> |
398 v8::Handle<v8::Value> toV8NoInline(TestInterfaceNode* impl, v8::Handle<v8::Objec
t> creationContext, v8::Isolate* isolate) | 398 v8::Handle<v8::Value> toV8NoInline(TestInterfaceNode* impl, v8::Handle<v8::Objec
t> creationContext, v8::Isolate* isolate) |
399 { | 399 { |
400 return toV8(impl, creationContext, isolate); | 400 return toV8(impl, creationContext, isolate); |
401 } | 401 } |
402 | 402 |
403 } // namespace WebCore | 403 } // namespace WebCore |
OLD | NEW |