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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 | 104 |
105 static void implementsStaticAttrAttributeGetterCallback(v8::Local<v8::String>, c
onst v8::PropertyCallbackInfo<v8::Value>& info) | 105 static void implementsStaticAttrAttributeGetterCallback(v8::Local<v8::String>, c
onst v8::PropertyCallbackInfo<v8::Value>& info) |
106 { | 106 { |
107 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 107 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
108 TestInterfaceV8Internal::implementsStaticAttrAttributeGetter(info); | 108 TestInterfaceV8Internal::implementsStaticAttrAttributeGetter(info); |
109 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 109 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
110 } | 110 } |
111 | 111 |
112 static void implementsStaticAttrAttributeSetter(v8::Local<v8::Value> jsValue, co
nst v8::PropertyCallbackInfo<void>& info) | 112 static void implementsStaticAttrAttributeSetter(v8::Local<v8::Value> jsValue, co
nst v8::PropertyCallbackInfo<void>& info) |
113 { | 113 { |
| 114 ExceptionState exceptionState(ExceptionState::SetterContext, "implementsStat
icAttr", "TestInterface", info.Holder(), info.GetIsolate()); |
114 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); | 115 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); |
115 TestImplements::setImplementsStaticAttr(cppValue); | 116 TestImplements::setImplementsStaticAttr(cppValue); |
116 } | 117 } |
117 | 118 |
118 static void implementsStaticAttrAttributeSetterCallback(v8::Local<v8::String>, v
8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 119 static void implementsStaticAttrAttributeSetterCallback(v8::Local<v8::String>, v
8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
119 { | 120 { |
120 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 121 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
121 TestInterfaceV8Internal::implementsStaticAttrAttributeSetter(jsValue, info); | 122 TestInterfaceV8Internal::implementsStaticAttrAttributeSetter(jsValue, info); |
122 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 123 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
123 } | 124 } |
(...skipping 19 matching lines...) Expand all Loading... |
143 | 144 |
144 static void implementsStr2AttributeGetterCallback(v8::Local<v8::String>, const v
8::PropertyCallbackInfo<v8::Value>& info) | 145 static void implementsStr2AttributeGetterCallback(v8::Local<v8::String>, const v
8::PropertyCallbackInfo<v8::Value>& info) |
145 { | 146 { |
146 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 147 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
147 TestInterfaceV8Internal::implementsStr2AttributeGetter(info); | 148 TestInterfaceV8Internal::implementsStr2AttributeGetter(info); |
148 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 149 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
149 } | 150 } |
150 | 151 |
151 static void implementsStr2AttributeSetter(v8::Local<v8::Value> jsValue, const v8
::PropertyCallbackInfo<void>& info) | 152 static void implementsStr2AttributeSetter(v8::Local<v8::Value> jsValue, const v8
::PropertyCallbackInfo<void>& info) |
152 { | 153 { |
| 154 ExceptionState exceptionState(ExceptionState::SetterContext, "implementsStr2
", "TestInterface", info.Holder(), info.GetIsolate()); |
153 TestInterface* imp = V8TestInterface::toNative(info.Holder()); | 155 TestInterface* imp = V8TestInterface::toNative(info.Holder()); |
154 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); | 156 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); |
155 TestImplements::setImplementsStr2(imp, cppValue); | 157 TestImplements::setImplementsStr2(imp, cppValue); |
156 } | 158 } |
157 | 159 |
158 static void implementsStr2AttributeSetterCallback(v8::Local<v8::String>, v8::Loc
al<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 160 static void implementsStr2AttributeSetterCallback(v8::Local<v8::String>, v8::Loc
al<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
159 { | 161 { |
160 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 162 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
161 TestInterfaceV8Internal::implementsStr2AttributeSetter(jsValue, info); | 163 TestInterfaceV8Internal::implementsStr2AttributeSetter(jsValue, info); |
162 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 164 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
(...skipping 21 matching lines...) Expand all Loading... |
184 | 186 |
185 static void implementsNodeAttributeGetterCallback(v8::Local<v8::String>, const v
8::PropertyCallbackInfo<v8::Value>& info) | 187 static void implementsNodeAttributeGetterCallback(v8::Local<v8::String>, const v
8::PropertyCallbackInfo<v8::Value>& info) |
186 { | 188 { |
187 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 189 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
188 TestInterfaceV8Internal::implementsNodeAttributeGetter(info); | 190 TestInterfaceV8Internal::implementsNodeAttributeGetter(info); |
189 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 191 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
190 } | 192 } |
191 | 193 |
192 static void implementsNodeAttributeSetter(v8::Local<v8::Value> jsValue, const v8
::PropertyCallbackInfo<void>& info) | 194 static void implementsNodeAttributeSetter(v8::Local<v8::Value> jsValue, const v8
::PropertyCallbackInfo<void>& info) |
193 { | 195 { |
| 196 ExceptionState exceptionState(ExceptionState::SetterContext, "implementsNode
", "TestInterface", info.Holder(), info.GetIsolate()); |
194 TestInterface* imp = V8TestInterface::toNative(info.Holder()); | 197 TestInterface* imp = V8TestInterface::toNative(info.Holder()); |
195 V8TRYCATCH_VOID(Node*, cppValue, V8Node::hasInstance(jsValue, info.GetIsolat
e(), worldType(info.GetIsolate())) ? V8Node::toNative(v8::Handle<v8::Object>::Ca
st(jsValue)) : 0); | 198 V8TRYCATCH_VOID(Node*, cppValue, V8Node::hasInstance(jsValue, info.GetIsolat
e(), worldType(info.GetIsolate())) ? V8Node::toNative(v8::Handle<v8::Object>::Ca
st(jsValue)) : 0); |
196 TestImplements::setImplementsNode(imp, WTF::getPtr(cppValue)); | 199 TestImplements::setImplementsNode(imp, WTF::getPtr(cppValue)); |
197 } | 200 } |
198 | 201 |
199 static void implementsNodeAttributeSetterCallback(v8::Local<v8::String>, v8::Loc
al<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 202 static void implementsNodeAttributeSetterCallback(v8::Local<v8::String>, v8::Loc
al<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
200 { | 203 { |
201 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 204 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
202 TestInterfaceV8Internal::implementsNodeAttributeSetter(jsValue, info); | 205 TestInterfaceV8Internal::implementsNodeAttributeSetter(jsValue, info); |
203 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 206 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
204 } | 207 } |
205 | 208 |
206 static void eventHandlerAttributeAttributeGetter(const v8::PropertyCallbackInfo<
v8::Value>& info) | 209 static void eventHandlerAttributeAttributeGetter(const v8::PropertyCallbackInfo<
v8::Value>& info) |
207 { | 210 { |
208 TestInterface* imp = V8TestInterface::toNative(info.Holder()); | 211 TestInterface* imp = V8TestInterface::toNative(info.Holder()); |
209 EventListener* jsValue = TestImplements::eventHandlerAttribute(imp, isolated
WorldForIsolate(info.GetIsolate())); | 212 EventListener* jsValue = TestImplements::eventHandlerAttribute(imp, isolated
WorldForIsolate(info.GetIsolate())); |
210 v8SetReturnValue(info, jsValue ? v8::Handle<v8::Value>(V8AbstractEventListen
er::cast(jsValue)->getListenerObject(imp->executionContext())) : v8::Handle<v8::
Value>(v8::Null(info.GetIsolate()))); | 213 v8SetReturnValue(info, jsValue ? v8::Handle<v8::Value>(V8AbstractEventListen
er::cast(jsValue)->getListenerObject(imp->executionContext())) : v8::Handle<v8::
Value>(v8::Null(info.GetIsolate()))); |
211 } | 214 } |
212 | 215 |
213 static void eventHandlerAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) | 216 static void eventHandlerAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) |
214 { | 217 { |
215 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 218 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
216 TestInterfaceV8Internal::eventHandlerAttributeAttributeGetter(info); | 219 TestInterfaceV8Internal::eventHandlerAttributeAttributeGetter(info); |
217 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 220 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
218 } | 221 } |
219 | 222 |
220 static void eventHandlerAttributeAttributeSetter(v8::Local<v8::Value> jsValue, c
onst v8::PropertyCallbackInfo<void>& info) | 223 static void eventHandlerAttributeAttributeSetter(v8::Local<v8::Value> jsValue, c
onst v8::PropertyCallbackInfo<void>& info) |
221 { | 224 { |
| 225 ExceptionState exceptionState(ExceptionState::SetterContext, "eventHandlerAt
tribute", "TestInterface", info.Holder(), info.GetIsolate()); |
222 TestInterface* imp = V8TestInterface::toNative(info.Holder()); | 226 TestInterface* imp = V8TestInterface::toNative(info.Holder()); |
223 transferHiddenDependency(info.Holder(), TestImplements::eventHandlerAttribut
e(imp, isolatedWorldForIsolate(info.GetIsolate())), jsValue, V8TestInterface::ev
entListenerCacheIndex, info.GetIsolate()); | 227 transferHiddenDependency(info.Holder(), TestImplements::eventHandlerAttribut
e(imp, isolatedWorldForIsolate(info.GetIsolate())), jsValue, V8TestInterface::ev
entListenerCacheIndex, info.GetIsolate()); |
224 TestImplements::setEventHandlerAttribute(imp, V8EventListenerList::getEventL
istener(jsValue, true, ListenerFindOrCreate), isolatedWorldForIsolate(info.GetIs
olate())); | 228 TestImplements::setEventHandlerAttribute(imp, V8EventListenerList::getEventL
istener(jsValue, true, ListenerFindOrCreate), isolatedWorldForIsolate(info.GetIs
olate())); |
225 } | 229 } |
226 | 230 |
227 static void eventHandlerAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 231 static void eventHandlerAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
228 { | 232 { |
229 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 233 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
230 TestInterfaceV8Internal::eventHandlerAttributeAttributeSetter(jsValue, info)
; | 234 TestInterfaceV8Internal::eventHandlerAttributeAttributeSetter(jsValue, info)
; |
231 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 235 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
232 } | 236 } |
233 | 237 |
234 static void Node23AttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& inf
o) | 238 static void Node23AttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& inf
o) |
235 { | 239 { |
236 TestInterface* imp = V8TestInterface::toNative(info.Holder()); | 240 TestInterface* imp = V8TestInterface::toNative(info.Holder()); |
237 v8SetReturnValueFast(info, TestImplements::node23(imp), imp); | 241 v8SetReturnValueFast(info, TestImplements::node23(imp), imp); |
238 } | 242 } |
239 | 243 |
240 static void Node23AttributeGetterCallback(v8::Local<v8::String>, const v8::Prope
rtyCallbackInfo<v8::Value>& info) | 244 static void Node23AttributeGetterCallback(v8::Local<v8::String>, const v8::Prope
rtyCallbackInfo<v8::Value>& info) |
241 { | 245 { |
242 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 246 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
243 TestInterfaceV8Internal::Node23AttributeGetter(info); | 247 TestInterfaceV8Internal::Node23AttributeGetter(info); |
244 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 248 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
245 } | 249 } |
246 | 250 |
247 static void Node23AttributeSetter(v8::Local<v8::Value> jsValue, const v8::Proper
tyCallbackInfo<void>& info) | 251 static void Node23AttributeSetter(v8::Local<v8::Value> jsValue, const v8::Proper
tyCallbackInfo<void>& info) |
248 { | 252 { |
| 253 ExceptionState exceptionState(ExceptionState::SetterContext, "Node23", "Test
Interface", info.Holder(), info.GetIsolate()); |
249 TestInterface* imp = V8TestInterface::toNative(info.Holder()); | 254 TestInterface* imp = V8TestInterface::toNative(info.Holder()); |
250 V8TRYCATCH_VOID(Node*, cppValue, V8Node::hasInstance(jsValue, info.GetIsolat
e(), worldType(info.GetIsolate())) ? V8Node::toNative(v8::Handle<v8::Object>::Ca
st(jsValue)) : 0); | 255 V8TRYCATCH_VOID(Node*, cppValue, V8Node::hasInstance(jsValue, info.GetIsolat
e(), worldType(info.GetIsolate())) ? V8Node::toNative(v8::Handle<v8::Object>::Ca
st(jsValue)) : 0); |
251 TestImplements::setNode23(imp, WTF::getPtr(cppValue)); | 256 TestImplements::setNode23(imp, WTF::getPtr(cppValue)); |
252 } | 257 } |
253 | 258 |
254 static void Node23AttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::V
alue> jsValue, const v8::PropertyCallbackInfo<void>& info) | 259 static void Node23AttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::V
alue> jsValue, const v8::PropertyCallbackInfo<void>& info) |
255 { | 260 { |
256 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 261 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
257 TestInterfaceV8Internal::Node23AttributeSetter(jsValue, info); | 262 TestInterfaceV8Internal::Node23AttributeSetter(jsValue, info); |
258 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 263 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
259 } | 264 } |
260 | 265 |
261 static void Node24AttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& inf
o) | 266 static void Node24AttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& inf
o) |
262 { | 267 { |
263 TestInterface* imp = V8TestInterface::toNative(info.Holder()); | 268 TestInterface* imp = V8TestInterface::toNative(info.Holder()); |
264 v8SetReturnValueFast(info, TestImplements::node24(imp), imp); | 269 v8SetReturnValueFast(info, TestImplements::node24(imp), imp); |
265 } | 270 } |
266 | 271 |
267 static void Node24AttributeGetterCallback(v8::Local<v8::String>, const v8::Prope
rtyCallbackInfo<v8::Value>& info) | 272 static void Node24AttributeGetterCallback(v8::Local<v8::String>, const v8::Prope
rtyCallbackInfo<v8::Value>& info) |
268 { | 273 { |
269 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 274 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
270 TestInterfaceV8Internal::Node24AttributeGetter(info); | 275 TestInterfaceV8Internal::Node24AttributeGetter(info); |
271 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 276 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
272 } | 277 } |
273 | 278 |
274 static void Node24AttributeSetter(v8::Local<v8::Value> jsValue, const v8::Proper
tyCallbackInfo<void>& info) | 279 static void Node24AttributeSetter(v8::Local<v8::Value> jsValue, const v8::Proper
tyCallbackInfo<void>& info) |
275 { | 280 { |
| 281 ExceptionState exceptionState(ExceptionState::SetterContext, "Node24", "Test
Interface", info.Holder(), info.GetIsolate()); |
276 TestInterface* imp = V8TestInterface::toNative(info.Holder()); | 282 TestInterface* imp = V8TestInterface::toNative(info.Holder()); |
277 V8TRYCATCH_VOID(Node*, cppValue, V8Node::hasInstance(jsValue, info.GetIsolat
e(), worldType(info.GetIsolate())) ? V8Node::toNative(v8::Handle<v8::Object>::Ca
st(jsValue)) : 0); | 283 V8TRYCATCH_VOID(Node*, cppValue, V8Node::hasInstance(jsValue, info.GetIsolat
e(), worldType(info.GetIsolate())) ? V8Node::toNative(v8::Handle<v8::Object>::Ca
st(jsValue)) : 0); |
278 TestImplements::setNode24(imp, WTF::getPtr(cppValue)); | 284 TestImplements::setNode24(imp, WTF::getPtr(cppValue)); |
279 } | 285 } |
280 | 286 |
281 static void Node24AttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::V
alue> jsValue, const v8::PropertyCallbackInfo<void>& info) | 287 static void Node24AttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::V
alue> jsValue, const v8::PropertyCallbackInfo<void>& info) |
282 { | 288 { |
283 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 289 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
284 TestInterfaceV8Internal::Node24AttributeSetter(jsValue, info); | 290 TestInterfaceV8Internal::Node24AttributeSetter(jsValue, info); |
285 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 291 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
(...skipping 27 matching lines...) Expand all Loading... |
313 { | 319 { |
314 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 320 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
315 TestInterfaceV8Internal::supplementalStaticAttrAttributeGetter(info); | 321 TestInterfaceV8Internal::supplementalStaticAttrAttributeGetter(info); |
316 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 322 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
317 } | 323 } |
318 #endif // ENABLE(Condition11) || ENABLE(Condition12) | 324 #endif // ENABLE(Condition11) || ENABLE(Condition12) |
319 | 325 |
320 #if ENABLE(Condition11) || ENABLE(Condition12) | 326 #if ENABLE(Condition11) || ENABLE(Condition12) |
321 static void supplementalStaticAttrAttributeSetter(v8::Local<v8::Value> jsValue,
const v8::PropertyCallbackInfo<void>& info) | 327 static void supplementalStaticAttrAttributeSetter(v8::Local<v8::Value> jsValue,
const v8::PropertyCallbackInfo<void>& info) |
322 { | 328 { |
| 329 ExceptionState exceptionState(ExceptionState::SetterContext, "supplementalSt
aticAttr", "TestInterface", info.Holder(), info.GetIsolate()); |
323 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); | 330 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); |
324 TestPartialInterface::setSupplementalStaticAttr(cppValue); | 331 TestPartialInterface::setSupplementalStaticAttr(cppValue); |
325 } | 332 } |
326 #endif // ENABLE(Condition11) || ENABLE(Condition12) | 333 #endif // ENABLE(Condition11) || ENABLE(Condition12) |
327 | 334 |
328 #if ENABLE(Condition11) || ENABLE(Condition12) | 335 #if ENABLE(Condition11) || ENABLE(Condition12) |
329 static void supplementalStaticAttrAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 336 static void supplementalStaticAttrAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
330 { | 337 { |
331 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 338 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
332 TestInterfaceV8Internal::supplementalStaticAttrAttributeSetter(jsValue, info
); | 339 TestInterfaceV8Internal::supplementalStaticAttrAttributeSetter(jsValue, info
); |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
364 { | 371 { |
365 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 372 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
366 TestInterfaceV8Internal::supplementalStr2AttributeGetter(info); | 373 TestInterfaceV8Internal::supplementalStr2AttributeGetter(info); |
367 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 374 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
368 } | 375 } |
369 #endif // ENABLE(Condition11) || ENABLE(Condition12) | 376 #endif // ENABLE(Condition11) || ENABLE(Condition12) |
370 | 377 |
371 #if ENABLE(Condition11) || ENABLE(Condition12) | 378 #if ENABLE(Condition11) || ENABLE(Condition12) |
372 static void supplementalStr2AttributeSetter(v8::Local<v8::Value> jsValue, const
v8::PropertyCallbackInfo<void>& info) | 379 static void supplementalStr2AttributeSetter(v8::Local<v8::Value> jsValue, const
v8::PropertyCallbackInfo<void>& info) |
373 { | 380 { |
| 381 ExceptionState exceptionState(ExceptionState::SetterContext, "supplementalSt
r2", "TestInterface", info.Holder(), info.GetIsolate()); |
374 TestInterface* imp = V8TestInterface::toNative(info.Holder()); | 382 TestInterface* imp = V8TestInterface::toNative(info.Holder()); |
375 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); | 383 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); |
376 TestPartialInterface::setSupplementalStr2(imp, cppValue); | 384 TestPartialInterface::setSupplementalStr2(imp, cppValue); |
377 } | 385 } |
378 #endif // ENABLE(Condition11) || ENABLE(Condition12) | 386 #endif // ENABLE(Condition11) || ENABLE(Condition12) |
379 | 387 |
380 #if ENABLE(Condition11) || ENABLE(Condition12) | 388 #if ENABLE(Condition11) || ENABLE(Condition12) |
381 static void supplementalStr2AttributeSetterCallback(v8::Local<v8::String>, v8::L
ocal<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 389 static void supplementalStr2AttributeSetterCallback(v8::Local<v8::String>, v8::L
ocal<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
382 { | 390 { |
383 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 391 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
417 { | 425 { |
418 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 426 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
419 TestInterfaceV8Internal::supplementalNodeAttributeGetter(info); | 427 TestInterfaceV8Internal::supplementalNodeAttributeGetter(info); |
420 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 428 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
421 } | 429 } |
422 #endif // ENABLE(Condition11) || ENABLE(Condition12) | 430 #endif // ENABLE(Condition11) || ENABLE(Condition12) |
423 | 431 |
424 #if ENABLE(Condition11) || ENABLE(Condition12) | 432 #if ENABLE(Condition11) || ENABLE(Condition12) |
425 static void supplementalNodeAttributeSetter(v8::Local<v8::Value> jsValue, const
v8::PropertyCallbackInfo<void>& info) | 433 static void supplementalNodeAttributeSetter(v8::Local<v8::Value> jsValue, const
v8::PropertyCallbackInfo<void>& info) |
426 { | 434 { |
| 435 ExceptionState exceptionState(ExceptionState::SetterContext, "supplementalNo
de", "TestInterface", info.Holder(), info.GetIsolate()); |
427 TestInterface* imp = V8TestInterface::toNative(info.Holder()); | 436 TestInterface* imp = V8TestInterface::toNative(info.Holder()); |
428 V8TRYCATCH_VOID(Node*, cppValue, V8Node::hasInstance(jsValue, info.GetIsolat
e(), worldType(info.GetIsolate())) ? V8Node::toNative(v8::Handle<v8::Object>::Ca
st(jsValue)) : 0); | 437 V8TRYCATCH_VOID(Node*, cppValue, V8Node::hasInstance(jsValue, info.GetIsolat
e(), worldType(info.GetIsolate())) ? V8Node::toNative(v8::Handle<v8::Object>::Ca
st(jsValue)) : 0); |
429 TestPartialInterface::setSupplementalNode(imp, WTF::getPtr(cppValue)); | 438 TestPartialInterface::setSupplementalNode(imp, WTF::getPtr(cppValue)); |
430 } | 439 } |
431 #endif // ENABLE(Condition11) || ENABLE(Condition12) | 440 #endif // ENABLE(Condition11) || ENABLE(Condition12) |
432 | 441 |
433 #if ENABLE(Condition11) || ENABLE(Condition12) | 442 #if ENABLE(Condition11) || ENABLE(Condition12) |
434 static void supplementalNodeAttributeSetterCallback(v8::Local<v8::String>, v8::L
ocal<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) | 443 static void supplementalNodeAttributeSetterCallback(v8::Local<v8::String>, v8::L
ocal<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
435 { | 444 { |
436 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 445 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
(...skipping 15 matching lines...) Expand all Loading... |
452 { | 461 { |
453 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 462 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
454 TestInterfaceV8Internal::Node13AttributeGetter(info); | 463 TestInterfaceV8Internal::Node13AttributeGetter(info); |
455 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 464 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
456 } | 465 } |
457 #endif // ENABLE(Condition11) || ENABLE(Condition12) | 466 #endif // ENABLE(Condition11) || ENABLE(Condition12) |
458 | 467 |
459 #if ENABLE(Condition11) || ENABLE(Condition12) | 468 #if ENABLE(Condition11) || ENABLE(Condition12) |
460 static void Node13AttributeSetter(v8::Local<v8::Value> jsValue, const v8::Proper
tyCallbackInfo<void>& info) | 469 static void Node13AttributeSetter(v8::Local<v8::Value> jsValue, const v8::Proper
tyCallbackInfo<void>& info) |
461 { | 470 { |
| 471 ExceptionState exceptionState(ExceptionState::SetterContext, "Node13", "Test
Interface", info.Holder(), info.GetIsolate()); |
462 TestInterface* imp = V8TestInterface::toNative(info.Holder()); | 472 TestInterface* imp = V8TestInterface::toNative(info.Holder()); |
463 V8TRYCATCH_VOID(Node*, cppValue, V8Node::hasInstance(jsValue, info.GetIsolat
e(), worldType(info.GetIsolate())) ? V8Node::toNative(v8::Handle<v8::Object>::Ca
st(jsValue)) : 0); | 473 V8TRYCATCH_VOID(Node*, cppValue, V8Node::hasInstance(jsValue, info.GetIsolat
e(), worldType(info.GetIsolate())) ? V8Node::toNative(v8::Handle<v8::Object>::Ca
st(jsValue)) : 0); |
464 TestPartialInterface::setNode13(imp, WTF::getPtr(cppValue)); | 474 TestPartialInterface::setNode13(imp, WTF::getPtr(cppValue)); |
465 } | 475 } |
466 #endif // ENABLE(Condition11) || ENABLE(Condition12) | 476 #endif // ENABLE(Condition11) || ENABLE(Condition12) |
467 | 477 |
468 #if ENABLE(Condition11) || ENABLE(Condition12) | 478 #if ENABLE(Condition11) || ENABLE(Condition12) |
469 static void Node13AttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::V
alue> jsValue, const v8::PropertyCallbackInfo<void>& info) | 479 static void Node13AttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::V
alue> jsValue, const v8::PropertyCallbackInfo<void>& info) |
470 { | 480 { |
471 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 481 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
(...skipping 15 matching lines...) Expand all Loading... |
487 { | 497 { |
488 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 498 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
489 TestInterfaceV8Internal::Node14AttributeGetter(info); | 499 TestInterfaceV8Internal::Node14AttributeGetter(info); |
490 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 500 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
491 } | 501 } |
492 #endif // ENABLE(Condition11) || ENABLE(Condition12) | 502 #endif // ENABLE(Condition11) || ENABLE(Condition12) |
493 | 503 |
494 #if ENABLE(Condition11) || ENABLE(Condition12) | 504 #if ENABLE(Condition11) || ENABLE(Condition12) |
495 static void Node14AttributeSetter(v8::Local<v8::Value> jsValue, const v8::Proper
tyCallbackInfo<void>& info) | 505 static void Node14AttributeSetter(v8::Local<v8::Value> jsValue, const v8::Proper
tyCallbackInfo<void>& info) |
496 { | 506 { |
| 507 ExceptionState exceptionState(ExceptionState::SetterContext, "Node14", "Test
Interface", info.Holder(), info.GetIsolate()); |
497 TestInterface* imp = V8TestInterface::toNative(info.Holder()); | 508 TestInterface* imp = V8TestInterface::toNative(info.Holder()); |
498 V8TRYCATCH_VOID(Node*, cppValue, V8Node::hasInstance(jsValue, info.GetIsolat
e(), worldType(info.GetIsolate())) ? V8Node::toNative(v8::Handle<v8::Object>::Ca
st(jsValue)) : 0); | 509 V8TRYCATCH_VOID(Node*, cppValue, V8Node::hasInstance(jsValue, info.GetIsolat
e(), worldType(info.GetIsolate())) ? V8Node::toNative(v8::Handle<v8::Object>::Ca
st(jsValue)) : 0); |
499 TestPartialInterface::setNode14(imp, WTF::getPtr(cppValue)); | 510 TestPartialInterface::setNode14(imp, WTF::getPtr(cppValue)); |
500 } | 511 } |
501 #endif // ENABLE(Condition11) || ENABLE(Condition12) | 512 #endif // ENABLE(Condition11) || ENABLE(Condition12) |
502 | 513 |
503 #if ENABLE(Condition11) || ENABLE(Condition12) | 514 #if ENABLE(Condition11) || ENABLE(Condition12) |
504 static void Node14AttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::V
alue> jsValue, const v8::PropertyCallbackInfo<void>& info) | 515 static void Node14AttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::V
alue> jsValue, const v8::PropertyCallbackInfo<void>& info) |
505 { | 516 { |
506 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 517 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
(...skipping 15 matching lines...) Expand all Loading... |
522 { | 533 { |
523 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 534 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
524 TestInterfaceV8Internal::Node15AttributeGetter(info); | 535 TestInterfaceV8Internal::Node15AttributeGetter(info); |
525 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 536 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
526 } | 537 } |
527 #endif // ENABLE(Condition11) || ENABLE(Condition12) | 538 #endif // ENABLE(Condition11) || ENABLE(Condition12) |
528 | 539 |
529 #if ENABLE(Condition11) || ENABLE(Condition12) | 540 #if ENABLE(Condition11) || ENABLE(Condition12) |
530 static void Node15AttributeSetter(v8::Local<v8::Value> jsValue, const v8::Proper
tyCallbackInfo<void>& info) | 541 static void Node15AttributeSetter(v8::Local<v8::Value> jsValue, const v8::Proper
tyCallbackInfo<void>& info) |
531 { | 542 { |
| 543 ExceptionState exceptionState(ExceptionState::SetterContext, "Node15", "Test
Interface", info.Holder(), info.GetIsolate()); |
532 TestInterface* imp = V8TestInterface::toNative(info.Holder()); | 544 TestInterface* imp = V8TestInterface::toNative(info.Holder()); |
533 V8TRYCATCH_VOID(Node*, cppValue, V8Node::hasInstance(jsValue, info.GetIsolat
e(), worldType(info.GetIsolate())) ? V8Node::toNative(v8::Handle<v8::Object>::Ca
st(jsValue)) : 0); | 545 V8TRYCATCH_VOID(Node*, cppValue, V8Node::hasInstance(jsValue, info.GetIsolat
e(), worldType(info.GetIsolate())) ? V8Node::toNative(v8::Handle<v8::Object>::Ca
st(jsValue)) : 0); |
534 TestPartialInterface::setNode15(imp, WTF::getPtr(cppValue)); | 546 TestPartialInterface::setNode15(imp, WTF::getPtr(cppValue)); |
535 } | 547 } |
536 #endif // ENABLE(Condition11) || ENABLE(Condition12) | 548 #endif // ENABLE(Condition11) || ENABLE(Condition12) |
537 | 549 |
538 #if ENABLE(Condition11) || ENABLE(Condition12) | 550 #if ENABLE(Condition11) || ENABLE(Condition12) |
539 static void Node15AttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::V
alue> jsValue, const v8::PropertyCallbackInfo<void>& info) | 551 static void Node15AttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::V
alue> jsValue, const v8::PropertyCallbackInfo<void>& info) |
540 { | 552 { |
541 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 553 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
542 TestInterfaceV8Internal::Node15AttributeSetter(jsValue, info); | 554 TestInterfaceV8Internal::Node15AttributeSetter(jsValue, info); |
543 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 555 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
544 } | 556 } |
545 #endif // ENABLE(Condition11) || ENABLE(Condition12) | 557 #endif // ENABLE(Condition11) || ENABLE(Condition12) |
546 | 558 |
547 static void implementsMethod1Method(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) | 559 static void implementsMethod1Method(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) |
548 { | 560 { |
| 561 ExceptionState exceptionState(ExceptionState::ExecutionContext, "implementsM
ethod1", "TestInterface", info.Holder(), info.GetIsolate()); |
549 TestInterface* imp = V8TestInterface::toNative(info.Holder()); | 562 TestInterface* imp = V8TestInterface::toNative(info.Holder()); |
550 TestImplements::implementsMethod1(imp); | 563 TestImplements::implementsMethod1(imp); |
551 } | 564 } |
552 | 565 |
553 static void implementsMethod1MethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) | 566 static void implementsMethod1MethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) |
554 { | 567 { |
555 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 568 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
556 TestInterfaceV8Internal::implementsMethod1Method(info); | 569 TestInterfaceV8Internal::implementsMethod1Method(info); |
557 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 570 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
558 } | 571 } |
559 | 572 |
560 static void implementsMethod2Method(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) | 573 static void implementsMethod2Method(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) |
561 { | 574 { |
| 575 ExceptionState exceptionState(ExceptionState::ExecutionContext, "implementsM
ethod2", "TestInterface", info.Holder(), info.GetIsolate()); |
562 if (UNLIKELY(info.Length() < 2)) { | 576 if (UNLIKELY(info.Length() < 2)) { |
563 throwTypeError(ExceptionMessages::failedToExecute("implementsMethod2", "
TestInterface", ExceptionMessages::notEnoughArguments(2, info.Length())), info.G
etIsolate()); | 577 throwTypeError(ExceptionMessages::failedToExecute("implementsMethod2", "
TestInterface", ExceptionMessages::notEnoughArguments(2, info.Length())), info.G
etIsolate()); |
564 return; | 578 return; |
565 } | 579 } |
566 TestInterface* imp = V8TestInterface::toNative(info.Holder()); | 580 TestInterface* imp = V8TestInterface::toNative(info.Holder()); |
567 ExceptionState exceptionState(info.Holder(), info.GetIsolate()); | |
568 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, info[0]); | 581 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, info[0]); |
569 V8TRYCATCH_VOID(TestObj*, objArg, V8TestObject::hasInstance(info[1], info.Ge
tIsolate(), worldType(info.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8
::Object>::Cast(info[1])) : 0); | 582 V8TRYCATCH_VOID(TestObj*, objArg, V8TestObject::hasInstance(info[1], info.Ge
tIsolate(), worldType(info.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8
::Object>::Cast(info[1])) : 0); |
570 ExecutionContext* scriptContext = getExecutionContext(); | 583 ExecutionContext* scriptContext = getExecutionContext(); |
571 RefPtr<TestObj> result = TestImplements::implementsMethod2(scriptContext, im
p, strArg, objArg, exceptionState); | 584 RefPtr<TestObj> result = TestImplements::implementsMethod2(scriptContext, im
p, strArg, objArg, exceptionState); |
572 if (exceptionState.throwIfNeeded()) | 585 if (exceptionState.throwIfNeeded()) |
573 return; | 586 return; |
574 v8SetReturnValue(info, result.release()); | 587 v8SetReturnValue(info, result.release()); |
575 } | 588 } |
576 | 589 |
577 static void implementsMethod2MethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) | 590 static void implementsMethod2MethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) |
578 { | 591 { |
579 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 592 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
580 TestInterfaceV8Internal::implementsMethod2Method(info); | 593 TestInterfaceV8Internal::implementsMethod2Method(info); |
581 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 594 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
582 } | 595 } |
583 | 596 |
584 static void implementsMethod3MethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) | 597 static void implementsMethod3MethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) |
585 { | 598 { |
586 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 599 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
587 V8TestInterface::implementsMethod3MethodCustom(info); | 600 V8TestInterface::implementsMethod3MethodCustom(info); |
588 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 601 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
589 } | 602 } |
590 | 603 |
591 static void implementsMethod4Method(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) | 604 static void implementsMethod4Method(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) |
592 { | 605 { |
| 606 ExceptionState exceptionState(ExceptionState::ExecutionContext, "implementsM
ethod4", "TestInterface", info.Holder(), info.GetIsolate()); |
593 TestImplements::implementsMethod4(); | 607 TestImplements::implementsMethod4(); |
594 } | 608 } |
595 | 609 |
596 static void implementsMethod4MethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) | 610 static void implementsMethod4MethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) |
597 { | 611 { |
598 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 612 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
599 TestInterfaceV8Internal::implementsMethod4Method(info); | 613 TestInterfaceV8Internal::implementsMethod4Method(info); |
600 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 614 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
601 } | 615 } |
602 | 616 |
603 #if ENABLE(Condition11) || ENABLE(Condition12) | 617 #if ENABLE(Condition11) || ENABLE(Condition12) |
604 static void supplementalMethod1Method(const v8::FunctionCallbackInfo<v8::Value>&
info) | 618 static void supplementalMethod1Method(const v8::FunctionCallbackInfo<v8::Value>&
info) |
605 { | 619 { |
| 620 ExceptionState exceptionState(ExceptionState::ExecutionContext, "supplementa
lMethod1", "TestInterface", info.Holder(), info.GetIsolate()); |
606 TestInterface* imp = V8TestInterface::toNative(info.Holder()); | 621 TestInterface* imp = V8TestInterface::toNative(info.Holder()); |
607 TestPartialInterface::supplementalMethod1(imp); | 622 TestPartialInterface::supplementalMethod1(imp); |
608 } | 623 } |
609 #endif // ENABLE(Condition11) || ENABLE(Condition12) | 624 #endif // ENABLE(Condition11) || ENABLE(Condition12) |
610 | 625 |
611 #if ENABLE(Condition11) || ENABLE(Condition12) | 626 #if ENABLE(Condition11) || ENABLE(Condition12) |
612 static void supplementalMethod1MethodCallback(const v8::FunctionCallbackInfo<v8:
:Value>& info) | 627 static void supplementalMethod1MethodCallback(const v8::FunctionCallbackInfo<v8:
:Value>& info) |
613 { | 628 { |
614 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 629 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
615 TestInterfaceV8Internal::supplementalMethod1Method(info); | 630 TestInterfaceV8Internal::supplementalMethod1Method(info); |
616 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 631 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
617 } | 632 } |
618 #endif // ENABLE(Condition11) || ENABLE(Condition12) | 633 #endif // ENABLE(Condition11) || ENABLE(Condition12) |
619 | 634 |
620 #if ENABLE(Condition11) || ENABLE(Condition12) | 635 #if ENABLE(Condition11) || ENABLE(Condition12) |
621 static void supplementalMethod2Method(const v8::FunctionCallbackInfo<v8::Value>&
info) | 636 static void supplementalMethod2Method(const v8::FunctionCallbackInfo<v8::Value>&
info) |
622 { | 637 { |
| 638 ExceptionState exceptionState(ExceptionState::ExecutionContext, "supplementa
lMethod2", "TestInterface", info.Holder(), info.GetIsolate()); |
623 if (UNLIKELY(info.Length() < 2)) { | 639 if (UNLIKELY(info.Length() < 2)) { |
624 throwTypeError(ExceptionMessages::failedToExecute("supplementalMethod2",
"TestInterface", ExceptionMessages::notEnoughArguments(2, info.Length())), info
.GetIsolate()); | 640 throwTypeError(ExceptionMessages::failedToExecute("supplementalMethod2",
"TestInterface", ExceptionMessages::notEnoughArguments(2, info.Length())), info
.GetIsolate()); |
625 return; | 641 return; |
626 } | 642 } |
627 TestInterface* imp = V8TestInterface::toNative(info.Holder()); | 643 TestInterface* imp = V8TestInterface::toNative(info.Holder()); |
628 ExceptionState exceptionState(info.Holder(), info.GetIsolate()); | |
629 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, info[0]); | 644 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, info[0]); |
630 V8TRYCATCH_VOID(TestObj*, objArg, V8TestObject::hasInstance(info[1], info.Ge
tIsolate(), worldType(info.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8
::Object>::Cast(info[1])) : 0); | 645 V8TRYCATCH_VOID(TestObj*, objArg, V8TestObject::hasInstance(info[1], info.Ge
tIsolate(), worldType(info.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8
::Object>::Cast(info[1])) : 0); |
631 ExecutionContext* scriptContext = getExecutionContext(); | 646 ExecutionContext* scriptContext = getExecutionContext(); |
632 RefPtr<TestObj> result = TestPartialInterface::supplementalMethod2(scriptCon
text, imp, strArg, objArg, exceptionState); | 647 RefPtr<TestObj> result = TestPartialInterface::supplementalMethod2(scriptCon
text, imp, strArg, objArg, exceptionState); |
633 if (exceptionState.throwIfNeeded()) | 648 if (exceptionState.throwIfNeeded()) |
634 return; | 649 return; |
635 v8SetReturnValue(info, result.release()); | 650 v8SetReturnValue(info, result.release()); |
636 } | 651 } |
637 #endif // ENABLE(Condition11) || ENABLE(Condition12) | 652 #endif // ENABLE(Condition11) || ENABLE(Condition12) |
638 | 653 |
(...skipping 11 matching lines...) Expand all Loading... |
650 { | 665 { |
651 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 666 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
652 V8TestInterface::supplementalMethod3MethodCustom(info); | 667 V8TestInterface::supplementalMethod3MethodCustom(info); |
653 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 668 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
654 } | 669 } |
655 #endif // ENABLE(Condition11) || ENABLE(Condition12) | 670 #endif // ENABLE(Condition11) || ENABLE(Condition12) |
656 | 671 |
657 #if ENABLE(Condition11) || ENABLE(Condition12) | 672 #if ENABLE(Condition11) || ENABLE(Condition12) |
658 static void supplementalMethod4Method(const v8::FunctionCallbackInfo<v8::Value>&
info) | 673 static void supplementalMethod4Method(const v8::FunctionCallbackInfo<v8::Value>&
info) |
659 { | 674 { |
| 675 ExceptionState exceptionState(ExceptionState::ExecutionContext, "supplementa
lMethod4", "TestInterface", info.Holder(), info.GetIsolate()); |
660 TestPartialInterface::supplementalMethod4(); | 676 TestPartialInterface::supplementalMethod4(); |
661 } | 677 } |
662 #endif // ENABLE(Condition11) || ENABLE(Condition12) | 678 #endif // ENABLE(Condition11) || ENABLE(Condition12) |
663 | 679 |
664 #if ENABLE(Condition11) || ENABLE(Condition12) | 680 #if ENABLE(Condition11) || ENABLE(Condition12) |
665 static void supplementalMethod4MethodCallback(const v8::FunctionCallbackInfo<v8:
:Value>& info) | 681 static void supplementalMethod4MethodCallback(const v8::FunctionCallbackInfo<v8:
:Value>& info) |
666 { | 682 { |
667 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 683 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
668 TestInterfaceV8Internal::supplementalMethod4Method(info); | 684 TestInterfaceV8Internal::supplementalMethod4Method(info); |
669 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 685 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
989 } | 1005 } |
990 | 1006 |
991 template<> | 1007 template<> |
992 v8::Handle<v8::Value> toV8NoInline(TestInterface* impl, v8::Handle<v8::Object> c
reationContext, v8::Isolate* isolate) | 1008 v8::Handle<v8::Value> toV8NoInline(TestInterface* impl, v8::Handle<v8::Object> c
reationContext, v8::Isolate* isolate) |
993 { | 1009 { |
994 return toV8(impl, creationContext, isolate); | 1010 return toV8(impl, creationContext, isolate); |
995 } | 1011 } |
996 | 1012 |
997 } // namespace WebCore | 1013 } // namespace WebCore |
998 #endif // ENABLE(Condition1) || ENABLE(Condition2) | 1014 #endif // ENABLE(Condition1) || ENABLE(Condition2) |
OLD | NEW |