Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(366)

Side by Side Diff: Source/bindings/tests/results/V8TestInterfacePython.cpp

Issue 171333003: Pass implementation object to supplemental classes by reference (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 static void implementsStaticStringAttributeAttributeSetterCallback(v8::Local<v8: :String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& in fo) 227 static void implementsStaticStringAttributeAttributeSetterCallback(v8::Local<v8: :String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& in fo)
228 { 228 {
229 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 229 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
230 TestInterfacePythonImplementationV8Internal::implementsStaticStringAttribute AttributeSetter(jsValue, info); 230 TestInterfacePythonImplementationV8Internal::implementsStaticStringAttribute AttributeSetter(jsValue, info);
231 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 231 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
232 } 232 }
233 233
234 static void implementsReadonlyStringAttributeAttributeGetter(const v8::PropertyC allbackInfo<v8::Value>& info) 234 static void implementsReadonlyStringAttributeAttributeGetter(const v8::PropertyC allbackInfo<v8::Value>& info)
235 { 235 {
236 TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(inf o.Holder()); 236 TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(inf o.Holder());
237 v8SetReturnValueString(info, TestImplements::implementsReadonlyStringAttribu te(imp), info.GetIsolate()); 237 ASSERT(imp);
238 v8SetReturnValueString(info, TestImplements::implementsReadonlyStringAttribu te(*imp), info.GetIsolate());
238 } 239 }
239 240
240 static void implementsReadonlyStringAttributeAttributeGetterCallback(v8::Local<v 8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) 241 static void implementsReadonlyStringAttributeAttributeGetterCallback(v8::Local<v 8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
241 { 242 {
242 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 243 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
243 TestInterfacePythonImplementationV8Internal::implementsReadonlyStringAttribu teAttributeGetter(info); 244 TestInterfacePythonImplementationV8Internal::implementsReadonlyStringAttribu teAttributeGetter(info);
244 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 245 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
245 } 246 }
246 247
247 static void implementsStringAttributeAttributeGetter(const v8::PropertyCallbackI nfo<v8::Value>& info) 248 static void implementsStringAttributeAttributeGetter(const v8::PropertyCallbackI nfo<v8::Value>& info)
248 { 249 {
249 TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(inf o.Holder()); 250 TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(inf o.Holder());
250 v8SetReturnValueString(info, TestImplements::implementsStringAttribute(imp), info.GetIsolate()); 251 ASSERT(imp);
252 v8SetReturnValueString(info, TestImplements::implementsStringAttribute(*imp) , info.GetIsolate());
251 } 253 }
252 254
253 static void implementsStringAttributeAttributeGetterCallback(v8::Local<v8::Strin g>, const v8::PropertyCallbackInfo<v8::Value>& info) 255 static void implementsStringAttributeAttributeGetterCallback(v8::Local<v8::Strin g>, const v8::PropertyCallbackInfo<v8::Value>& info)
254 { 256 {
255 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 257 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
256 TestInterfacePythonImplementationV8Internal::implementsStringAttributeAttrib uteGetter(info); 258 TestInterfacePythonImplementationV8Internal::implementsStringAttributeAttrib uteGetter(info);
257 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 259 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
258 } 260 }
259 261
260 static void implementsStringAttributeAttributeSetter(v8::Local<v8::Value> jsValu e, const v8::PropertyCallbackInfo<void>& info) 262 static void implementsStringAttributeAttributeSetter(v8::Local<v8::Value> jsValu e, const v8::PropertyCallbackInfo<void>& info)
261 { 263 {
262 TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(inf o.Holder()); 264 TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(inf o.Holder());
263 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); 265 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue);
264 TestImplements::setImplementsStringAttribute(imp, cppValue); 266 ASSERT(imp);
267 TestImplements::setImplementsStringAttribute(*imp, cppValue);
265 } 268 }
266 269
267 static void implementsStringAttributeAttributeSetterCallback(v8::Local<v8::Strin g>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 270 static void implementsStringAttributeAttributeSetterCallback(v8::Local<v8::Strin g>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
268 { 271 {
269 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 272 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
270 TestInterfacePythonImplementationV8Internal::implementsStringAttributeAttrib uteSetter(jsValue, info); 273 TestInterfacePythonImplementationV8Internal::implementsStringAttributeAttrib uteSetter(jsValue, info);
271 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 274 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
272 } 275 }
273 276
274 static void implementsNodeAttributeAttributeGetter(const v8::PropertyCallbackInf o<v8::Value>& info) 277 static void implementsNodeAttributeAttributeGetter(const v8::PropertyCallbackInf o<v8::Value>& info)
275 { 278 {
276 TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(inf o.Holder()); 279 TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(inf o.Holder());
277 v8SetReturnValueFast(info, TestImplements::implementsNodeAttribute(imp), imp ); 280 ASSERT(imp);
281 v8SetReturnValueFast(info, TestImplements::implementsNodeAttribute(*imp), im p);
278 } 282 }
279 283
280 static void implementsNodeAttributeAttributeGetterCallback(v8::Local<v8::String> , const v8::PropertyCallbackInfo<v8::Value>& info) 284 static void implementsNodeAttributeAttributeGetterCallback(v8::Local<v8::String> , const v8::PropertyCallbackInfo<v8::Value>& info)
281 { 285 {
282 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 286 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
283 TestInterfacePythonImplementationV8Internal::implementsNodeAttributeAttribut eGetter(info); 287 TestInterfacePythonImplementationV8Internal::implementsNodeAttributeAttribut eGetter(info);
284 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 288 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
285 } 289 }
286 290
287 static void implementsNodeAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 291 static void implementsNodeAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
288 { 292 {
289 ExceptionState exceptionState(ExceptionState::SetterContext, "implementsNode Attribute", "TestInterfacePython", info.Holder(), info.GetIsolate()); 293 ExceptionState exceptionState(ExceptionState::SetterContext, "implementsNode Attribute", "TestInterfacePython", info.Holder(), info.GetIsolate());
290 if (!isUndefinedOrNull(jsValue) && !V8Node::hasInstance(jsValue, info.GetIso late())) { 294 if (!isUndefinedOrNull(jsValue) && !V8Node::hasInstance(jsValue, info.GetIso late())) {
291 exceptionState.throwTypeError("The provided value is not of type 'Node'. "); 295 exceptionState.throwTypeError("The provided value is not of type 'Node'. ");
292 exceptionState.throwIfNeeded(); 296 exceptionState.throwIfNeeded();
293 return; 297 return;
294 } 298 }
295 TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(inf o.Holder()); 299 TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(inf o.Holder());
296 V8TRYCATCH_VOID(Node*, cppValue, V8Node::toNativeWithTypeCheck(info.GetIsola te(), jsValue)); 300 V8TRYCATCH_VOID(Node*, cppValue, V8Node::toNativeWithTypeCheck(info.GetIsola te(), jsValue));
297 TestImplements::setImplementsNodeAttribute(imp, WTF::getPtr(cppValue)); 301 ASSERT(imp);
302 TestImplements::setImplementsNodeAttribute(*imp, WTF::getPtr(cppValue));
298 } 303 }
299 304
300 static void implementsNodeAttributeAttributeSetterCallback(v8::Local<v8::String> , v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 305 static void implementsNodeAttributeAttributeSetterCallback(v8::Local<v8::String> , v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
301 { 306 {
302 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 307 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
303 TestInterfacePythonImplementationV8Internal::implementsNodeAttributeAttribut eSetter(jsValue, info); 308 TestInterfacePythonImplementationV8Internal::implementsNodeAttributeAttribut eSetter(jsValue, info);
304 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 309 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
305 } 310 }
306 311
307 static void implementsEventHandlerAttributeAttributeGetter(const v8::PropertyCal lbackInfo<v8::Value>& info) 312 static void implementsEventHandlerAttributeAttributeGetter(const v8::PropertyCal lbackInfo<v8::Value>& info)
308 { 313 {
309 TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(inf o.Holder()); 314 TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(inf o.Holder());
310 EventListener* jsValue = TestImplements::implementsEventHandlerAttribute(imp ); 315 ASSERT(imp);
316 ASSERT(imp);
317 EventListener* jsValue = TestImplements::implementsEventHandlerAttribute(*im p);
311 v8SetReturnValue(info, jsValue ? v8::Handle<v8::Value>(V8AbstractEventListen er::cast(jsValue)->getListenerObject(imp->executionContext())) : v8::Handle<v8:: Value>(v8::Null(info.GetIsolate()))); 318 v8SetReturnValue(info, jsValue ? v8::Handle<v8::Value>(V8AbstractEventListen er::cast(jsValue)->getListenerObject(imp->executionContext())) : v8::Handle<v8:: Value>(v8::Null(info.GetIsolate())));
312 } 319 }
313 320
314 static void implementsEventHandlerAttributeAttributeGetterCallback(v8::Local<v8: :String>, const v8::PropertyCallbackInfo<v8::Value>& info) 321 static void implementsEventHandlerAttributeAttributeGetterCallback(v8::Local<v8: :String>, const v8::PropertyCallbackInfo<v8::Value>& info)
315 { 322 {
316 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 323 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
317 TestInterfacePythonImplementationV8Internal::implementsEventHandlerAttribute AttributeGetter(info); 324 TestInterfacePythonImplementationV8Internal::implementsEventHandlerAttribute AttributeGetter(info);
318 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 325 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
319 } 326 }
320 327
321 static void implementsEventHandlerAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 328 static void implementsEventHandlerAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
322 { 329 {
323 TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(inf o.Holder()); 330 TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(inf o.Holder());
324 moveEventListenerToNewWrapper(info.Holder(), TestImplements::implementsEvent HandlerAttribute(imp), jsValue, V8TestInterfacePython::eventListenerCacheIndex, info.GetIsolate()); 331 ASSERT(imp);
325 TestImplements::setImplementsEventHandlerAttribute(imp, V8EventListenerList: :getEventListener(jsValue, true, ListenerFindOrCreate)); 332 moveEventListenerToNewWrapper(info.Holder(), TestImplements::implementsEvent HandlerAttribute(*imp), jsValue, V8TestInterfacePython::eventListenerCacheIndex, info.GetIsolate());
333 ASSERT(imp);
334 TestImplements::setImplementsEventHandlerAttribute(*imp, V8EventListenerList ::getEventListener(jsValue, true, ListenerFindOrCreate));
326 } 335 }
327 336
328 static void implementsEventHandlerAttributeAttributeSetterCallback(v8::Local<v8: :String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& in fo) 337 static void implementsEventHandlerAttributeAttributeSetterCallback(v8::Local<v8: :String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& in fo)
329 { 338 {
330 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 339 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
331 TestInterfacePythonImplementationV8Internal::implementsEventHandlerAttribute AttributeSetter(jsValue, info); 340 TestInterfacePythonImplementationV8Internal::implementsEventHandlerAttribute AttributeSetter(jsValue, info);
332 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 341 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
333 } 342 }
334 343
335 static void implementsRuntimeEnabledNodeAttributeAttributeGetter(const v8::Prope rtyCallbackInfo<v8::Value>& info) 344 static void implementsRuntimeEnabledNodeAttributeAttributeGetter(const v8::Prope rtyCallbackInfo<v8::Value>& info)
336 { 345 {
337 TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(inf o.Holder()); 346 TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(inf o.Holder());
338 v8SetReturnValueFast(info, TestImplements::implementsRuntimeEnabledNodeAttri bute(imp), imp); 347 ASSERT(imp);
348 v8SetReturnValueFast(info, TestImplements::implementsRuntimeEnabledNodeAttri bute(*imp), imp);
339 } 349 }
340 350
341 static void implementsRuntimeEnabledNodeAttributeAttributeGetterCallback(v8::Loc al<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) 351 static void implementsRuntimeEnabledNodeAttributeAttributeGetterCallback(v8::Loc al<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
342 { 352 {
343 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 353 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
344 TestInterfacePythonImplementationV8Internal::implementsRuntimeEnabledNodeAtt ributeAttributeGetter(info); 354 TestInterfacePythonImplementationV8Internal::implementsRuntimeEnabledNodeAtt ributeAttributeGetter(info);
345 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 355 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
346 } 356 }
347 357
348 static void implementsRuntimeEnabledNodeAttributeAttributeSetter(v8::Local<v8::V alue> jsValue, const v8::PropertyCallbackInfo<void>& info) 358 static void implementsRuntimeEnabledNodeAttributeAttributeSetter(v8::Local<v8::V alue> jsValue, const v8::PropertyCallbackInfo<void>& info)
349 { 359 {
350 ExceptionState exceptionState(ExceptionState::SetterContext, "implementsRunt imeEnabledNodeAttribute", "TestInterfacePython", info.Holder(), info.GetIsolate( )); 360 ExceptionState exceptionState(ExceptionState::SetterContext, "implementsRunt imeEnabledNodeAttribute", "TestInterfacePython", info.Holder(), info.GetIsolate( ));
351 if (!isUndefinedOrNull(jsValue) && !V8Node::hasInstance(jsValue, info.GetIso late())) { 361 if (!isUndefinedOrNull(jsValue) && !V8Node::hasInstance(jsValue, info.GetIso late())) {
352 exceptionState.throwTypeError("The provided value is not of type 'Node'. "); 362 exceptionState.throwTypeError("The provided value is not of type 'Node'. ");
353 exceptionState.throwIfNeeded(); 363 exceptionState.throwIfNeeded();
354 return; 364 return;
355 } 365 }
356 TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(inf o.Holder()); 366 TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(inf o.Holder());
357 V8TRYCATCH_VOID(Node*, cppValue, V8Node::toNativeWithTypeCheck(info.GetIsola te(), jsValue)); 367 V8TRYCATCH_VOID(Node*, cppValue, V8Node::toNativeWithTypeCheck(info.GetIsola te(), jsValue));
358 TestImplements::setImplementsRuntimeEnabledNodeAttribute(imp, WTF::getPtr(cp pValue)); 368 ASSERT(imp);
369 TestImplements::setImplementsRuntimeEnabledNodeAttribute(*imp, WTF::getPtr(c ppValue));
359 } 370 }
360 371
361 static void implementsRuntimeEnabledNodeAttributeAttributeSetterCallback(v8::Loc al<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<voi d>& info) 372 static void implementsRuntimeEnabledNodeAttributeAttributeSetterCallback(v8::Loc al<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<voi d>& info)
362 { 373 {
363 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 374 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
364 TestInterfacePythonImplementationV8Internal::implementsRuntimeEnabledNodeAtt ributeAttributeSetter(jsValue, info); 375 TestInterfacePythonImplementationV8Internal::implementsRuntimeEnabledNodeAtt ributeAttributeSetter(jsValue, info);
365 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 376 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
366 } 377 }
367 378
368 static void implementsPerContextEnabledNodeAttributeAttributeGetter(const v8::Pr opertyCallbackInfo<v8::Value>& info) 379 static void implementsPerContextEnabledNodeAttributeAttributeGetter(const v8::Pr opertyCallbackInfo<v8::Value>& info)
369 { 380 {
370 TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(inf o.Holder()); 381 TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(inf o.Holder());
371 v8SetReturnValueFast(info, TestImplements::implementsPerContextEnabledNodeAt tribute(imp), imp); 382 ASSERT(imp);
383 v8SetReturnValueFast(info, TestImplements::implementsPerContextEnabledNodeAt tribute(*imp), imp);
372 } 384 }
373 385
374 static void implementsPerContextEnabledNodeAttributeAttributeGetterCallback(v8:: Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) 386 static void implementsPerContextEnabledNodeAttributeAttributeGetterCallback(v8:: Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
375 { 387 {
376 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 388 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
377 TestInterfacePythonImplementationV8Internal::implementsPerContextEnabledNode AttributeAttributeGetter(info); 389 TestInterfacePythonImplementationV8Internal::implementsPerContextEnabledNode AttributeAttributeGetter(info);
378 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 390 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
379 } 391 }
380 392
381 static void implementsPerContextEnabledNodeAttributeAttributeSetter(v8::Local<v8 ::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 393 static void implementsPerContextEnabledNodeAttributeAttributeSetter(v8::Local<v8 ::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
382 { 394 {
383 ExceptionState exceptionState(ExceptionState::SetterContext, "implementsPerC ontextEnabledNodeAttribute", "TestInterfacePython", info.Holder(), info.GetIsola te()); 395 ExceptionState exceptionState(ExceptionState::SetterContext, "implementsPerC ontextEnabledNodeAttribute", "TestInterfacePython", info.Holder(), info.GetIsola te());
384 if (!isUndefinedOrNull(jsValue) && !V8Node::hasInstance(jsValue, info.GetIso late())) { 396 if (!isUndefinedOrNull(jsValue) && !V8Node::hasInstance(jsValue, info.GetIso late())) {
385 exceptionState.throwTypeError("The provided value is not of type 'Node'. "); 397 exceptionState.throwTypeError("The provided value is not of type 'Node'. ");
386 exceptionState.throwIfNeeded(); 398 exceptionState.throwIfNeeded();
387 return; 399 return;
388 } 400 }
389 TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(inf o.Holder()); 401 TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(inf o.Holder());
390 V8TRYCATCH_VOID(Node*, cppValue, V8Node::toNativeWithTypeCheck(info.GetIsola te(), jsValue)); 402 V8TRYCATCH_VOID(Node*, cppValue, V8Node::toNativeWithTypeCheck(info.GetIsola te(), jsValue));
391 TestImplements::setImplementsPerContextEnabledNodeAttribute(imp, WTF::getPtr (cppValue)); 403 ASSERT(imp);
404 TestImplements::setImplementsPerContextEnabledNodeAttribute(*imp, WTF::getPt r(cppValue));
392 } 405 }
393 406
394 static void implementsPerContextEnabledNodeAttributeAttributeSetterCallback(v8:: Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo< void>& info) 407 static void implementsPerContextEnabledNodeAttributeAttributeSetterCallback(v8:: Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo< void>& info)
395 { 408 {
396 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 409 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
397 TestInterfacePythonImplementationV8Internal::implementsPerContextEnabledNode AttributeAttributeSetter(jsValue, info); 410 TestInterfacePythonImplementationV8Internal::implementsPerContextEnabledNode AttributeAttributeSetter(jsValue, info);
398 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 411 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
399 } 412 }
400 413
401 static void implements2StaticStringAttributeAttributeGetter(const v8::PropertyCa llbackInfo<v8::Value>& info) 414 static void implements2StaticStringAttributeAttributeGetter(const v8::PropertyCa llbackInfo<v8::Value>& info)
(...skipping 17 matching lines...) Expand all
419 static void implements2StaticStringAttributeAttributeSetterCallback(v8::Local<v8 ::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& i nfo) 432 static void implements2StaticStringAttributeAttributeSetterCallback(v8::Local<v8 ::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& i nfo)
420 { 433 {
421 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 434 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
422 TestInterfacePythonImplementationV8Internal::implements2StaticStringAttribut eAttributeSetter(jsValue, info); 435 TestInterfacePythonImplementationV8Internal::implements2StaticStringAttribut eAttributeSetter(jsValue, info);
423 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 436 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
424 } 437 }
425 438
426 static void implements2StringAttributeAttributeGetter(const v8::PropertyCallback Info<v8::Value>& info) 439 static void implements2StringAttributeAttributeGetter(const v8::PropertyCallback Info<v8::Value>& info)
427 { 440 {
428 TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(inf o.Holder()); 441 TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(inf o.Holder());
429 v8SetReturnValueString(info, TestImplements2Implementation::implements2Strin gAttribute(imp), info.GetIsolate()); 442 ASSERT(imp);
443 v8SetReturnValueString(info, TestImplements2Implementation::implements2Strin gAttribute(*imp), info.GetIsolate());
430 } 444 }
431 445
432 static void implements2StringAttributeAttributeGetterCallback(v8::Local<v8::Stri ng>, const v8::PropertyCallbackInfo<v8::Value>& info) 446 static void implements2StringAttributeAttributeGetterCallback(v8::Local<v8::Stri ng>, const v8::PropertyCallbackInfo<v8::Value>& info)
433 { 447 {
434 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 448 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
435 TestInterfacePythonImplementationV8Internal::implements2StringAttributeAttri buteGetter(info); 449 TestInterfacePythonImplementationV8Internal::implements2StringAttributeAttri buteGetter(info);
436 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 450 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
437 } 451 }
438 452
439 static void implements2StringAttributeAttributeSetter(v8::Local<v8::Value> jsVal ue, const v8::PropertyCallbackInfo<void>& info) 453 static void implements2StringAttributeAttributeSetter(v8::Local<v8::Value> jsVal ue, const v8::PropertyCallbackInfo<void>& info)
440 { 454 {
441 TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(inf o.Holder()); 455 TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(inf o.Holder());
442 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); 456 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue);
443 TestImplements2Implementation::setImplements2StringAttribute(imp, cppValue); 457 ASSERT(imp);
458 TestImplements2Implementation::setImplements2StringAttribute(*imp, cppValue) ;
444 } 459 }
445 460
446 static void implements2StringAttributeAttributeSetterCallback(v8::Local<v8::Stri ng>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 461 static void implements2StringAttributeAttributeSetterCallback(v8::Local<v8::Stri ng>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
447 { 462 {
448 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 463 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
449 TestInterfacePythonImplementationV8Internal::implements2StringAttributeAttri buteSetter(jsValue, info); 464 TestInterfacePythonImplementationV8Internal::implements2StringAttributeAttri buteSetter(jsValue, info);
450 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 465 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
451 } 466 }
452 467
453 #if ENABLE(PARTIAL_CONDITION) 468 #if ENABLE(PARTIAL_CONDITION)
454 static void partialLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v 8::Value>& info) 469 static void partialLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v 8::Value>& info)
455 { 470 {
456 TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(inf o.Holder()); 471 TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(inf o.Holder());
457 v8SetReturnValueInt(info, TestPartialInterfacePython::partialLongAttribute(i mp)); 472 ASSERT(imp);
473 v8SetReturnValueInt(info, TestPartialInterfacePython::partialLongAttribute(* imp));
458 } 474 }
459 #endif // ENABLE(PARTIAL_CONDITION) 475 #endif // ENABLE(PARTIAL_CONDITION)
460 476
461 #if ENABLE(PARTIAL_CONDITION) 477 #if ENABLE(PARTIAL_CONDITION)
462 static void partialLongAttributeAttributeGetterCallback(v8::Local<v8::String>, c onst v8::PropertyCallbackInfo<v8::Value>& info) 478 static void partialLongAttributeAttributeGetterCallback(v8::Local<v8::String>, c onst v8::PropertyCallbackInfo<v8::Value>& info)
463 { 479 {
464 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 480 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
465 TestInterfacePythonImplementationV8Internal::partialLongAttributeAttributeGe tter(info); 481 TestInterfacePythonImplementationV8Internal::partialLongAttributeAttributeGe tter(info);
466 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 482 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
467 } 483 }
468 #endif // ENABLE(PARTIAL_CONDITION) 484 #endif // ENABLE(PARTIAL_CONDITION)
469 485
470 #if ENABLE(PARTIAL_CONDITION) 486 #if ENABLE(PARTIAL_CONDITION)
471 static void partialLongAttributeAttributeSetter(v8::Local<v8::Value> jsValue, co nst v8::PropertyCallbackInfo<void>& info) 487 static void partialLongAttributeAttributeSetter(v8::Local<v8::Value> jsValue, co nst v8::PropertyCallbackInfo<void>& info)
472 { 488 {
473 ExceptionState exceptionState(ExceptionState::SetterContext, "partialLongAtt ribute", "TestInterfacePython", info.Holder(), info.GetIsolate()); 489 ExceptionState exceptionState(ExceptionState::SetterContext, "partialLongAtt ribute", "TestInterfacePython", info.Holder(), info.GetIsolate());
474 TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(inf o.Holder()); 490 TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(inf o.Holder());
475 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e xceptionState); 491 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e xceptionState);
476 TestPartialInterfacePython::setPartialLongAttribute(imp, cppValue); 492 ASSERT(imp);
493 TestPartialInterfacePython::setPartialLongAttribute(*imp, cppValue);
477 } 494 }
478 #endif // ENABLE(PARTIAL_CONDITION) 495 #endif // ENABLE(PARTIAL_CONDITION)
479 496
480 #if ENABLE(PARTIAL_CONDITION) 497 #if ENABLE(PARTIAL_CONDITION)
481 static void partialLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v 8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 498 static void partialLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v 8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
482 { 499 {
483 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 500 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
484 TestInterfacePythonImplementationV8Internal::partialLongAttributeAttributeSe tter(jsValue, info); 501 TestInterfacePythonImplementationV8Internal::partialLongAttributeAttributeSe tter(jsValue, info);
485 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 502 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
486 } 503 }
(...skipping 30 matching lines...) Expand all
517 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 534 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
518 TestInterfacePythonImplementationV8Internal::partialStaticLongAttributeAttri buteSetter(jsValue, info); 535 TestInterfacePythonImplementationV8Internal::partialStaticLongAttributeAttri buteSetter(jsValue, info);
519 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 536 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
520 } 537 }
521 #endif // ENABLE(PARTIAL_CONDITION) 538 #endif // ENABLE(PARTIAL_CONDITION)
522 539
523 #if ENABLE(PARTIAL_CONDITION) 540 #if ENABLE(PARTIAL_CONDITION)
524 static void partialCallWithExecutionContextLongAttributeAttributeGetter(const v8 ::PropertyCallbackInfo<v8::Value>& info) 541 static void partialCallWithExecutionContextLongAttributeAttributeGetter(const v8 ::PropertyCallbackInfo<v8::Value>& info)
525 { 542 {
526 TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(inf o.Holder()); 543 TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(inf o.Holder());
544 ASSERT(imp);
527 ExecutionContext* scriptContext = currentExecutionContext(info.GetIsolate()) ; 545 ExecutionContext* scriptContext = currentExecutionContext(info.GetIsolate()) ;
528 v8SetReturnValueInt(info, TestPartialInterfacePython::partialCallWithExecuti onContextLongAttribute(scriptContext, imp)); 546 v8SetReturnValueInt(info, TestPartialInterfacePython::partialCallWithExecuti onContextLongAttribute(scriptContext, *imp));
529 } 547 }
530 #endif // ENABLE(PARTIAL_CONDITION) 548 #endif // ENABLE(PARTIAL_CONDITION)
531 549
532 #if ENABLE(PARTIAL_CONDITION) 550 #if ENABLE(PARTIAL_CONDITION)
533 static void partialCallWithExecutionContextLongAttributeAttributeGetterCallback( v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) 551 static void partialCallWithExecutionContextLongAttributeAttributeGetterCallback( v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
534 { 552 {
535 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 553 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
536 TestInterfacePythonImplementationV8Internal::partialCallWithExecutionContext LongAttributeAttributeGetter(info); 554 TestInterfacePythonImplementationV8Internal::partialCallWithExecutionContext LongAttributeAttributeGetter(info);
537 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 555 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
538 } 556 }
539 #endif // ENABLE(PARTIAL_CONDITION) 557 #endif // ENABLE(PARTIAL_CONDITION)
540 558
541 #if ENABLE(PARTIAL_CONDITION) 559 #if ENABLE(PARTIAL_CONDITION)
542 static void partialCallWithExecutionContextLongAttributeAttributeSetter(v8::Loca l<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 560 static void partialCallWithExecutionContextLongAttributeAttributeSetter(v8::Loca l<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
543 { 561 {
544 ExceptionState exceptionState(ExceptionState::SetterContext, "partialCallWit hExecutionContextLongAttribute", "TestInterfacePython", info.Holder(), info.GetI solate()); 562 ExceptionState exceptionState(ExceptionState::SetterContext, "partialCallWit hExecutionContextLongAttribute", "TestInterfacePython", info.Holder(), info.GetI solate());
545 TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(inf o.Holder()); 563 TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(inf o.Holder());
546 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e xceptionState); 564 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e xceptionState);
565 ASSERT(imp);
547 ExecutionContext* scriptContext = currentExecutionContext(info.GetIsolate()) ; 566 ExecutionContext* scriptContext = currentExecutionContext(info.GetIsolate()) ;
548 TestPartialInterfacePython::setPartialCallWithExecutionContextLongAttribute( scriptContext, imp, cppValue); 567 TestPartialInterfacePython::setPartialCallWithExecutionContextLongAttribute( scriptContext, *imp, cppValue);
549 } 568 }
550 #endif // ENABLE(PARTIAL_CONDITION) 569 #endif // ENABLE(PARTIAL_CONDITION)
551 570
552 #if ENABLE(PARTIAL_CONDITION) 571 #if ENABLE(PARTIAL_CONDITION)
553 static void partialCallWithExecutionContextLongAttributeAttributeSetterCallback( v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackI nfo<void>& info) 572 static void partialCallWithExecutionContextLongAttributeAttributeSetterCallback( v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackI nfo<void>& info)
554 { 573 {
555 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 574 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
556 TestInterfacePythonImplementationV8Internal::partialCallWithExecutionContext LongAttributeAttributeSetter(jsValue, info); 575 TestInterfacePythonImplementationV8Internal::partialCallWithExecutionContext LongAttributeAttributeSetter(jsValue, info);
557 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 576 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
558 } 577 }
559 #endif // ENABLE(PARTIAL_CONDITION) 578 #endif // ENABLE(PARTIAL_CONDITION)
560 579
561 static void partial2LongAttributeAttributeGetter(const v8::PropertyCallbackInfo< v8::Value>& info) 580 static void partial2LongAttributeAttributeGetter(const v8::PropertyCallbackInfo< v8::Value>& info)
562 { 581 {
563 TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(inf o.Holder()); 582 TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(inf o.Holder());
564 v8SetReturnValueInt(info, TestPartialInterfacePythonImplementation::partial2 LongAttribute(imp)); 583 ASSERT(imp);
584 v8SetReturnValueInt(info, TestPartialInterfacePythonImplementation::partial2 LongAttribute(*imp));
565 } 585 }
566 586
567 static void partial2LongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) 587 static void partial2LongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
568 { 588 {
569 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 589 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
570 TestInterfacePythonImplementationV8Internal::partial2LongAttributeAttributeG etter(info); 590 TestInterfacePythonImplementationV8Internal::partial2LongAttributeAttributeG etter(info);
571 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 591 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
572 } 592 }
573 593
574 static void partial2LongAttributeAttributeSetter(v8::Local<v8::Value> jsValue, c onst v8::PropertyCallbackInfo<void>& info) 594 static void partial2LongAttributeAttributeSetter(v8::Local<v8::Value> jsValue, c onst v8::PropertyCallbackInfo<void>& info)
575 { 595 {
576 ExceptionState exceptionState(ExceptionState::SetterContext, "partial2LongAt tribute", "TestInterfacePython", info.Holder(), info.GetIsolate()); 596 ExceptionState exceptionState(ExceptionState::SetterContext, "partial2LongAt tribute", "TestInterfacePython", info.Holder(), info.GetIsolate());
577 TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(inf o.Holder()); 597 TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(inf o.Holder());
578 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e xceptionState); 598 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), e xceptionState);
579 TestPartialInterfacePythonImplementation::setPartial2LongAttribute(imp, cppV alue); 599 ASSERT(imp);
600 TestPartialInterfacePythonImplementation::setPartial2LongAttribute(*imp, cpp Value);
580 } 601 }
581 602
582 static void partial2LongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 603 static void partial2LongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
583 { 604 {
584 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 605 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
585 TestInterfacePythonImplementationV8Internal::partial2LongAttributeAttributeS etter(jsValue, info); 606 TestInterfacePythonImplementationV8Internal::partial2LongAttributeAttributeS etter(jsValue, info);
586 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 607 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
587 } 608 }
588 609
589 static void partial2StaticLongAttributeAttributeGetter(const v8::PropertyCallbac kInfo<v8::Value>& info) 610 static void partial2StaticLongAttributeAttributeGetter(const v8::PropertyCallbac kInfo<v8::Value>& info)
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
676 static void voidMethodMethodCallbackForMainWorld(const v8::FunctionCallbackInfo< v8::Value>& info) 697 static void voidMethodMethodCallbackForMainWorld(const v8::FunctionCallbackInfo< v8::Value>& info)
677 { 698 {
678 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 699 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
679 TestInterfacePythonImplementationV8Internal::voidMethodMethodForMainWorld(in fo); 700 TestInterfacePythonImplementationV8Internal::voidMethodMethodForMainWorld(in fo);
680 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 701 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
681 } 702 }
682 703
683 static void implementsVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value> & info) 704 static void implementsVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value> & info)
684 { 705 {
685 TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(inf o.Holder()); 706 TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(inf o.Holder());
686 TestImplements::implementsVoidMethod(imp); 707 ASSERT(imp);
708 TestImplements::implementsVoidMethod(*imp);
687 } 709 }
688 710
689 static void implementsVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8 ::Value>& info) 711 static void implementsVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8 ::Value>& info)
690 { 712 {
691 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 713 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
692 TestInterfacePythonImplementationV8Internal::implementsVoidMethodMethod(info ); 714 TestInterfacePythonImplementationV8Internal::implementsVoidMethodMethod(info );
693 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 715 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
694 } 716 }
695 717
696 static void implementsComplexMethodMethod(const v8::FunctionCallbackInfo<v8::Val ue>& info) 718 static void implementsComplexMethodMethod(const v8::FunctionCallbackInfo<v8::Val ue>& info)
697 { 719 {
698 ExceptionState exceptionState(ExceptionState::ExecutionContext, "implementsC omplexMethod", "TestInterfacePython", info.Holder(), info.GetIsolate()); 720 ExceptionState exceptionState(ExceptionState::ExecutionContext, "implementsC omplexMethod", "TestInterfacePython", info.Holder(), info.GetIsolate());
699 if (UNLIKELY(info.Length() < 2)) { 721 if (UNLIKELY(info.Length() < 2)) {
700 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(2, i nfo.Length())); 722 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(2, i nfo.Length()));
701 exceptionState.throwIfNeeded(); 723 exceptionState.throwIfNeeded();
702 return; 724 return;
703 } 725 }
704 TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(inf o.Holder()); 726 TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(inf o.Holder());
705 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, info[0]); 727 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, info[0]);
706 if (info.Length() > 1 && !V8TestInterfaceEmpty::hasInstance(info[1], info.Ge tIsolate())) { 728 if (info.Length() > 1 && !V8TestInterfaceEmpty::hasInstance(info[1], info.Ge tIsolate())) {
707 exceptionState.throwTypeError("parameter 2 is not of type 'TestInterface Empty'."); 729 exceptionState.throwTypeError("parameter 2 is not of type 'TestInterface Empty'.");
708 exceptionState.throwIfNeeded(); 730 exceptionState.throwIfNeeded();
709 return; 731 return;
710 } 732 }
711 V8TRYCATCH_VOID(TestInterfaceEmpty*, testInterfaceEmptyArg, V8TestInterfaceE mpty::toNativeWithTypeCheck(info.GetIsolate(), info[1])); 733 V8TRYCATCH_VOID(TestInterfaceEmpty*, testInterfaceEmptyArg, V8TestInterfaceE mpty::toNativeWithTypeCheck(info.GetIsolate(), info[1]));
734 ASSERT(imp);
712 ExecutionContext* scriptContext = currentExecutionContext(info.GetIsolate()) ; 735 ExecutionContext* scriptContext = currentExecutionContext(info.GetIsolate()) ;
713 RefPtr<TestInterfaceEmpty> result = TestImplements::implementsComplexMethod( scriptContext, imp, strArg, testInterfaceEmptyArg, exceptionState); 736 RefPtr<TestInterfaceEmpty> result = TestImplements::implementsComplexMethod( scriptContext, *imp, strArg, testInterfaceEmptyArg, exceptionState);
714 if (exceptionState.throwIfNeeded()) 737 if (exceptionState.throwIfNeeded())
715 return; 738 return;
716 v8SetReturnValue(info, result.release()); 739 v8SetReturnValue(info, result.release());
717 } 740 }
718 741
719 static void implementsComplexMethodMethodCallback(const v8::FunctionCallbackInfo <v8::Value>& info) 742 static void implementsComplexMethodMethodCallback(const v8::FunctionCallbackInfo <v8::Value>& info)
720 { 743 {
721 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 744 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
722 TestInterfacePythonImplementationV8Internal::implementsComplexMethodMethod(i nfo); 745 TestInterfacePythonImplementationV8Internal::implementsComplexMethodMethod(i nfo);
723 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 746 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
(...skipping 14 matching lines...) Expand all
738 static void implementsStaticVoidMethodMethodCallback(const v8::FunctionCallbackI nfo<v8::Value>& info) 761 static void implementsStaticVoidMethodMethodCallback(const v8::FunctionCallbackI nfo<v8::Value>& info)
739 { 762 {
740 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 763 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
741 TestInterfacePythonImplementationV8Internal::implementsStaticVoidMethodMetho d(info); 764 TestInterfacePythonImplementationV8Internal::implementsStaticVoidMethodMetho d(info);
742 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 765 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
743 } 766 }
744 767
745 static void implements2VoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value >& info) 768 static void implements2VoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value >& info)
746 { 769 {
747 TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(inf o.Holder()); 770 TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(inf o.Holder());
748 TestImplements2Implementation::implements2VoidMethod(imp); 771 ASSERT(imp);
772 TestImplements2Implementation::implements2VoidMethod(*imp);
749 } 773 }
750 774
751 static void implements2VoidMethodMethodCallback(const v8::FunctionCallbackInfo<v 8::Value>& info) 775 static void implements2VoidMethodMethodCallback(const v8::FunctionCallbackInfo<v 8::Value>& info)
752 { 776 {
753 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 777 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
754 TestInterfacePythonImplementationV8Internal::implements2VoidMethodMethod(inf o); 778 TestInterfacePythonImplementationV8Internal::implements2VoidMethodMethod(inf o);
755 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 779 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
756 } 780 }
757 781
758 #if ENABLE(PARTIAL_CONDITION) 782 #if ENABLE(PARTIAL_CONDITION)
759 static void partialVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& i nfo) 783 static void partialVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& i nfo)
760 { 784 {
761 TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(inf o.Holder()); 785 TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(inf o.Holder());
762 TestPartialInterfacePython::partialVoidMethod(imp); 786 ASSERT(imp);
787 TestPartialInterfacePython::partialVoidMethod(*imp);
763 } 788 }
764 #endif // ENABLE(PARTIAL_CONDITION) 789 #endif // ENABLE(PARTIAL_CONDITION)
765 790
766 #if ENABLE(PARTIAL_CONDITION) 791 #if ENABLE(PARTIAL_CONDITION)
767 static void partialVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::V alue>& info) 792 static void partialVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::V alue>& info)
768 { 793 {
769 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 794 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
770 TestInterfacePythonImplementationV8Internal::partialVoidMethodMethod(info); 795 TestInterfacePythonImplementationV8Internal::partialVoidMethodMethod(info);
771 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 796 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
772 } 797 }
(...skipping 19 matching lines...) Expand all
792 static void partialVoidMethodLongArgMethod(const v8::FunctionCallbackInfo<v8::Va lue>& info) 817 static void partialVoidMethodLongArgMethod(const v8::FunctionCallbackInfo<v8::Va lue>& info)
793 { 818 {
794 ExceptionState exceptionState(ExceptionState::ExecutionContext, "partialVoid MethodLongArg", "TestInterfacePython", info.Holder(), info.GetIsolate()); 819 ExceptionState exceptionState(ExceptionState::ExecutionContext, "partialVoid MethodLongArg", "TestInterfacePython", info.Holder(), info.GetIsolate());
795 if (UNLIKELY(info.Length() < 1)) { 820 if (UNLIKELY(info.Length() < 1)) {
796 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length())); 821 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
797 exceptionState.throwIfNeeded(); 822 exceptionState.throwIfNeeded();
798 return; 823 return;
799 } 824 }
800 TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(inf o.Holder()); 825 TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(inf o.Holder());
801 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), ex ceptionState); 826 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), ex ceptionState);
802 TestPartialInterfacePython::partialVoidMethodLongArg(imp, longArg); 827 ASSERT(imp);
828 TestPartialInterfacePython::partialVoidMethodLongArg(*imp, longArg);
803 } 829 }
804 #endif // ENABLE(PARTIAL_CONDITION) 830 #endif // ENABLE(PARTIAL_CONDITION)
805 831
806 #if ENABLE(PARTIAL_CONDITION) 832 #if ENABLE(PARTIAL_CONDITION)
807 static void partialVoidMethodLongArgMethodCallback(const v8::FunctionCallbackInf o<v8::Value>& info) 833 static void partialVoidMethodLongArgMethodCallback(const v8::FunctionCallbackInf o<v8::Value>& info)
808 { 834 {
809 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 835 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
810 TestInterfacePythonImplementationV8Internal::partialVoidMethodLongArgMethod( info); 836 TestInterfacePythonImplementationV8Internal::partialVoidMethodLongArgMethod( info);
811 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 837 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
812 } 838 }
813 #endif // ENABLE(PARTIAL_CONDITION) 839 #endif // ENABLE(PARTIAL_CONDITION)
814 840
815 #if ENABLE(PARTIAL_CONDITION) 841 #if ENABLE(PARTIAL_CONDITION)
816 static void partialCallWithExecutionContextRaisesExceptionVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 842 static void partialCallWithExecutionContextRaisesExceptionVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
817 { 843 {
818 ExceptionState exceptionState(ExceptionState::ExecutionContext, "partialCall WithExecutionContextRaisesExceptionVoidMethod", "TestInterfacePython", info.Hold er(), info.GetIsolate()); 844 ExceptionState exceptionState(ExceptionState::ExecutionContext, "partialCall WithExecutionContextRaisesExceptionVoidMethod", "TestInterfacePython", info.Hold er(), info.GetIsolate());
819 TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(inf o.Holder()); 845 TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(inf o.Holder());
846 ASSERT(imp);
820 ExecutionContext* scriptContext = currentExecutionContext(info.GetIsolate()) ; 847 ExecutionContext* scriptContext = currentExecutionContext(info.GetIsolate()) ;
821 TestPartialInterfacePython::partialCallWithExecutionContextRaisesExceptionVo idMethod(scriptContext, imp, exceptionState); 848 TestPartialInterfacePython::partialCallWithExecutionContextRaisesExceptionVo idMethod(scriptContext, *imp, exceptionState);
822 if (exceptionState.throwIfNeeded()) 849 if (exceptionState.throwIfNeeded())
823 return; 850 return;
824 } 851 }
825 #endif // ENABLE(PARTIAL_CONDITION) 852 #endif // ENABLE(PARTIAL_CONDITION)
826 853
827 #if ENABLE(PARTIAL_CONDITION) 854 #if ENABLE(PARTIAL_CONDITION)
828 static void partialCallWithExecutionContextRaisesExceptionVoidMethodMethodCallba ck(const v8::FunctionCallbackInfo<v8::Value>& info) 855 static void partialCallWithExecutionContextRaisesExceptionVoidMethodMethodCallba ck(const v8::FunctionCallbackInfo<v8::Value>& info)
829 { 856 {
830 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 857 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
831 TestInterfacePythonImplementationV8Internal::partialCallWithExecutionContext RaisesExceptionVoidMethodMethod(info); 858 TestInterfacePythonImplementationV8Internal::partialCallWithExecutionContext RaisesExceptionVoidMethodMethod(info);
832 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 859 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
833 } 860 }
834 #endif // ENABLE(PARTIAL_CONDITION) 861 #endif // ENABLE(PARTIAL_CONDITION)
835 862
836 static void partial2VoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 863 static void partial2VoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
837 { 864 {
838 TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(inf o.Holder()); 865 TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(inf o.Holder());
839 TestPartialInterfacePythonImplementation::partial2VoidMethod(imp); 866 ASSERT(imp);
867 TestPartialInterfacePythonImplementation::partial2VoidMethod(*imp);
840 } 868 }
841 869
842 static void partial2VoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8:: Value>& info) 870 static void partial2VoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8:: Value>& info)
843 { 871 {
844 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 872 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
845 TestInterfacePythonImplementationV8Internal::partial2VoidMethodMethod(info); 873 TestInterfacePythonImplementationV8Internal::partial2VoidMethodMethod(info);
846 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 874 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
847 } 875 }
848 876
849 static void partial2StaticVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Va lue>& info) 877 static void partial2StaticVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Va lue>& info)
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
1030 } 1058 }
1031 1059
1032 template<> 1060 template<>
1033 v8::Handle<v8::Value> toV8NoInline(TestInterfacePythonImplementation* impl, v8:: Handle<v8::Object> creationContext, v8::Isolate* isolate) 1061 v8::Handle<v8::Value> toV8NoInline(TestInterfacePythonImplementation* impl, v8:: Handle<v8::Object> creationContext, v8::Isolate* isolate)
1034 { 1062 {
1035 return toV8(impl, creationContext, isolate); 1063 return toV8(impl, creationContext, isolate);
1036 } 1064 }
1037 1065
1038 } // namespace WebCore 1066 } // namespace WebCore
1039 #endif // ENABLE(CONDITION) 1067 #endif // ENABLE(CONDITION)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698