2 * Copyright (C) 2013 Google Inc. All rights reserved.
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are
8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above
11 * copyright notice, this list of conditions and the following disclaimer
12 * in the documentation and/or other materials provided with the
14 * * Neither the name of Google Inc. nor the names of its
15 * contributors may be used to endorse or promote products derived from
16 * this software without specific prior written permission.
18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 // This file has been auto-generated by code_generator_v8.pm. DO NOT MODIFY!
34 #include "V8TestObjectPython.h"
36 #include "HTMLNames.h"
37 #include "RuntimeEnabledFeatures.h"
39 #include "V8Document.h"
40 #include "V8DocumentFragment.h"
41 #include "V8DocumentType.h"
42 #include "V8Element.h"
44 #include "V8EventTarget.h"
45 #include "V8HTMLCollection.h"
46 #include "V8HTMLElement.h"
48 #include "V8NodeFilter.h"
49 #include "V8ShadowRoot.h"
50 #include "V8TestCallbackInterface.h"
51 #include "V8TestInterface.h"
52 #include "V8TestInterfaceEmpty.h"
53 #include "V8TestInterfacePython.h"
54 #include "V8TestInterfaceWillBeGarbageCollected.h"
55 #include "V8TestNode.h"
56 #include "V8TestObjectA.h"
58 #include "V8XPathNSResolver.h"
59 #include "bindings/v8/BindingSecurity.h"
60 #include "bindings/v8/Dictionary.h"
61 #include "bindings/v8/ExceptionState.h"
62 #include "bindings/v8/ScriptCallStackFactory.h"
63 #include "bindings/v8/ScriptPromise.h"
64 #include "bindings/v8/ScriptState.h"
65 #include "bindings/v8/ScriptValue.h"
66 #include "bindings/v8/SerializedScriptValue.h"
67 #include "bindings/v8/V8AbstractEventListener.h"
68 #include "bindings/v8/V8DOMActivityLogger.h"
69 #include "bindings/v8/V8DOMConfiguration.h"
70 #include "bindings/v8/V8EventListenerList.h"
71 #include "bindings/v8/V8ObjectConstructor.h"
72 #include "bindings/v8/custom/V8ArrayBufferCustom.h"
73 #include "bindings/v8/custom/V8ArrayBufferViewCustom.h"
74 #include "bindings/v8/custom/V8Float32ArrayCustom.h"
75 #include "bindings/v8/custom/V8Int32ArrayCustom.h"
76 #include "bindings/v8/custom/V8Uint8ArrayCustom.h"
77 #include "core/css/MediaQueryListListener.h"
78 #include "core/dom/ContextFeatures.h"
79 #include "core/dom/Document.h"
80 #include "core/dom/custom/CustomElementCallbackDispatcher.h"
81 #include "core/frame/DOMWindow.h"
82 #include "core/frame/UseCounter.h"
83 #include "core/inspector/ScriptArguments.h"
84 #include "platform/TraceEvent.h"
85 #include "wtf/GetPtr.h"
86 #include "wtf/RefPtr.h"
90 static void initializeScriptWrappableForInterface(TestObjectPython* object)
92 if (ScriptWrappable::wrapperCanBeStoredInObject(object))
93 ScriptWrappable::setTypeInfoInObject(object, &V8TestObjectPython::wrapperTypeInfo);
98 } // namespace WebCore
100 // In ScriptWrappable::init, the use of a local function declaration has an issue on Windows:
101 // the local declaration does not pick up the surrounding namespace. Therefore, we provide this function
102 // in the global namespace.
103 // (More info on the MSVC bug here: http://connect.microsoft.com/VisualStudio/feedback/details/664619/the-namespace-of-local-function-declarations-in-c)
104 void webCoreInitializeScriptWrappableForInterface(WebCore::TestObjectPython* object)
106 WebCore::initializeScriptWrappableForInterface(object);
110 const WrapperTypeInfo V8TestObjectPython::wrapperTypeInfo = { gin::kEmbedderBlink, V8TestObjectPython::domTemplate, V8TestObjectPython::derefObject, 0, 0, 0, V8TestObjectPython::installPerContextEnabledMethods, 0, WrapperTypeObjectPrototype, false };
112 namespace TestObjectPythonV8Internal {
114 template <typename T> void V8_USE(T) { }
116 static void readonlyStringAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
118 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
119 v8SetReturnValueString(info, imp->readonlyStringAttribute(), info.GetIsolate());
122 static void readonlyStringAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
124 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
125 TestObjectPythonV8Internal::readonlyStringAttributeAttributeGetter(info);
126 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
129 static void readonlyTestInterfaceEmptyAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
131 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
132 RefPtr<TestInterfaceEmpty> result = imp->readonlyTestInterfaceEmptyAttribute();
133 if (result && DOMDataStore::setReturnValueFromWrapper<V8TestInterfaceEmpty>(info.GetReturnValue(), result.get()))
135 v8::Handle<v8::Value> wrapper = toV8(result.get(), info.Holder(), info.GetIsolate());
136 if (!wrapper.IsEmpty()) {
137 setHiddenValue(info.GetIsolate(), info.Holder(), "readonlyTestInterfaceEmptyAttribute", wrapper);
138 v8SetReturnValue(info, wrapper);
142 static void readonlyTestInterfaceEmptyAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
144 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
145 TestObjectPythonV8Internal::readonlyTestInterfaceEmptyAttributeAttributeGetter(info);
146 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
149 static void readonlyLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
151 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
152 v8SetReturnValueInt(info, imp->readonlyLongAttribute());
155 static void readonlyLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
157 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
158 TestObjectPythonV8Internal::readonlyLongAttributeAttributeGetter(info);
159 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
162 static void dateAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
164 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
165 v8SetReturnValue(info, v8DateOrNull(imp->dateAttribute(), info.GetIsolate()));
168 static void dateAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
170 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
171 TestObjectPythonV8Internal::dateAttributeAttributeGetter(info);
172 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
175 static void dateAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
177 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
178 V8TRYCATCH_VOID(double, cppValue, toCoreDate(jsValue));
179 imp->setDateAttribute(cppValue);
182 static void dateAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
184 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
185 TestObjectPythonV8Internal::dateAttributeAttributeSetter(jsValue, info);
186 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
189 static void stringAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
191 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
192 v8SetReturnValueString(info, imp->stringAttribute(), info.GetIsolate());
195 static void stringAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
197 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
198 TestObjectPythonV8Internal::stringAttributeAttributeGetter(info);
199 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
202 static void stringAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
204 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
205 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue);
206 imp->setStringAttribute(cppValue);
209 static void stringAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
211 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
212 TestObjectPythonV8Internal::stringAttributeAttributeSetter(jsValue, info);
213 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
216 static void readonlyDOMTimeStampAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
218 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
219 v8SetReturnValue(info, static_cast<double>(imp->readonlyDOMTimeStampAttribute()));
222 static void readonlyDOMTimeStampAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
224 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
225 TestObjectPythonV8Internal::readonlyDOMTimeStampAttributeAttributeGetter(info);
226 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
229 static void booleanAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
231 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
232 v8SetReturnValueBool(info, imp->booleanAttribute());
235 static void booleanAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
237 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
238 TestObjectPythonV8Internal::booleanAttributeAttributeGetter(info);
239 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
242 static void booleanAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
244 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
245 V8TRYCATCH_VOID(bool, cppValue, jsValue->BooleanValue());
246 imp->setBooleanAttribute(cppValue);
249 static void booleanAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
251 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
252 TestObjectPythonV8Internal::booleanAttributeAttributeSetter(jsValue, info);
253 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
256 static void byteAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
258 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
259 v8SetReturnValueInt(info, imp->byteAttribute());
262 static void byteAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
264 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
265 TestObjectPythonV8Internal::byteAttributeAttributeGetter(info);
266 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
269 static void byteAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
271 ExceptionState exceptionState(ExceptionState::SetterContext, "byteAttribute", "TestObjectPython", info.Holder(), info.GetIsolate());
272 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
273 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt8(jsValue, exceptionState), exceptionState);
274 imp->setByteAttribute(cppValue);
277 static void byteAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
279 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
280 TestObjectPythonV8Internal::byteAttributeAttributeSetter(jsValue, info);
281 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
284 static void doubleAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
286 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
287 v8SetReturnValue(info, imp->doubleAttribute());
290 static void doubleAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
292 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
293 TestObjectPythonV8Internal::doubleAttributeAttributeGetter(info);
294 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
297 static void doubleAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
299 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
300 V8TRYCATCH_VOID(double, cppValue, static_cast<double>(jsValue->NumberValue()));
301 imp->setDoubleAttribute(cppValue);
304 static void doubleAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
306 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
307 TestObjectPythonV8Internal::doubleAttributeAttributeSetter(jsValue, info);
308 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
311 static void floatAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
313 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
314 v8SetReturnValue(info, imp->floatAttribute());
317 static void floatAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
319 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
320 TestObjectPythonV8Internal::floatAttributeAttributeGetter(info);
321 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
324 static void floatAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
326 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
327 V8TRYCATCH_VOID(float, cppValue, static_cast<float>(jsValue->NumberValue()));
328 imp->setFloatAttribute(cppValue);
331 static void floatAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
333 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
334 TestObjectPythonV8Internal::floatAttributeAttributeSetter(jsValue, info);
335 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
338 static void longAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
340 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
341 v8SetReturnValueInt(info, imp->longAttribute());
344 static void longAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
346 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
347 TestObjectPythonV8Internal::longAttributeAttributeGetter(info);
348 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
351 static void longAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
353 ExceptionState exceptionState(ExceptionState::SetterContext, "longAttribute", "TestObjectPython", info.Holder(), info.GetIsolate());
354 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
355 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), exceptionState);
356 imp->setLongAttribute(cppValue);
359 static void longAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
361 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
362 TestObjectPythonV8Internal::longAttributeAttributeSetter(jsValue, info);
363 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
366 static void longLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
368 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
369 v8SetReturnValue(info, static_cast<double>(imp->longLongAttribute()));
372 static void longLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
374 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
375 TestObjectPythonV8Internal::longLongAttributeAttributeGetter(info);
376 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
379 static void longLongAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
381 ExceptionState exceptionState(ExceptionState::SetterContext, "longLongAttribute", "TestObjectPython", info.Holder(), info.GetIsolate());
382 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
383 V8TRYCATCH_EXCEPTION_VOID(long long, cppValue, toInt64(jsValue, exceptionState), exceptionState);
384 imp->setLongLongAttribute(cppValue);
387 static void longLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
389 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
390 TestObjectPythonV8Internal::longLongAttributeAttributeSetter(jsValue, info);
391 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
394 static void octetAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
396 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
397 v8SetReturnValueUnsigned(info, imp->octetAttribute());
400 static void octetAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
402 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
403 TestObjectPythonV8Internal::octetAttributeAttributeGetter(info);
404 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
407 static void octetAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
409 ExceptionState exceptionState(ExceptionState::SetterContext, "octetAttribute", "TestObjectPython", info.Holder(), info.GetIsolate());
410 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
411 V8TRYCATCH_EXCEPTION_VOID(unsigned, cppValue, toUInt8(jsValue, exceptionState), exceptionState);
412 imp->setOctetAttribute(cppValue);
415 static void octetAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
417 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
418 TestObjectPythonV8Internal::octetAttributeAttributeSetter(jsValue, info);
419 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
422 static void shortAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
424 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
425 v8SetReturnValueInt(info, imp->shortAttribute());
428 static void shortAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
430 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
431 TestObjectPythonV8Internal::shortAttributeAttributeGetter(info);
432 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
435 static void shortAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
437 ExceptionState exceptionState(ExceptionState::SetterContext, "shortAttribute", "TestObjectPython", info.Holder(), info.GetIsolate());
438 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
439 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt16(jsValue, exceptionState), exceptionState);
440 imp->setShortAttribute(cppValue);
443 static void shortAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
445 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
446 TestObjectPythonV8Internal::shortAttributeAttributeSetter(jsValue, info);
447 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
450 static void unsignedLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
452 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
453 v8SetReturnValueUnsigned(info, imp->unsignedLongAttribute());
456 static void unsignedLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
458 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
459 TestObjectPythonV8Internal::unsignedLongAttributeAttributeGetter(info);
460 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
463 static void unsignedLongAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
465 ExceptionState exceptionState(ExceptionState::SetterContext, "unsignedLongAttribute", "TestObjectPython", info.Holder(), info.GetIsolate());
466 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
467 V8TRYCATCH_EXCEPTION_VOID(unsigned, cppValue, toUInt32(jsValue, exceptionState), exceptionState);
468 imp->setUnsignedLongAttribute(cppValue);
471 static void unsignedLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
473 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
474 TestObjectPythonV8Internal::unsignedLongAttributeAttributeSetter(jsValue, info);
475 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
478 static void unsignedLongLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
480 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
481 v8SetReturnValue(info, static_cast<double>(imp->unsignedLongLongAttribute()));
484 static void unsignedLongLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
486 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
487 TestObjectPythonV8Internal::unsignedLongLongAttributeAttributeGetter(info);
488 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
491 static void unsignedLongLongAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
493 ExceptionState exceptionState(ExceptionState::SetterContext, "unsignedLongLongAttribute", "TestObjectPython", info.Holder(), info.GetIsolate());
494 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
495 V8TRYCATCH_EXCEPTION_VOID(unsigned long long, cppValue, toUInt64(jsValue, exceptionState), exceptionState);
496 imp->setUnsignedLongLongAttribute(cppValue);
499 static void unsignedLongLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
501 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
502 TestObjectPythonV8Internal::unsignedLongLongAttributeAttributeSetter(jsValue, info);
503 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
506 static void unsignedShortAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
508 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
509 v8SetReturnValueUnsigned(info, imp->unsignedShortAttribute());
512 static void unsignedShortAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
514 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
515 TestObjectPythonV8Internal::unsignedShortAttributeAttributeGetter(info);
516 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
519 static void unsignedShortAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
521 ExceptionState exceptionState(ExceptionState::SetterContext, "unsignedShortAttribute", "TestObjectPython", info.Holder(), info.GetIsolate());
522 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
523 V8TRYCATCH_EXCEPTION_VOID(unsigned, cppValue, toUInt16(jsValue, exceptionState), exceptionState);
524 imp->setUnsignedShortAttribute(cppValue);
527 static void unsignedShortAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
529 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
530 TestObjectPythonV8Internal::unsignedShortAttributeAttributeSetter(jsValue, info);
531 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
534 static void testInterfaceEmptyAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
536 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
537 v8SetReturnValueFast(info, imp->testInterfaceEmptyAttribute(), imp);
540 static void testInterfaceEmptyAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
542 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
543 TestObjectPythonV8Internal::testInterfaceEmptyAttributeAttributeGetter(info);
544 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
547 static void testInterfaceEmptyAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
549 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
550 V8TRYCATCH_VOID(TestInterfaceEmpty*, cppValue, V8TestInterfaceEmpty::hasInstance(jsValue, info.GetIsolate()) ? V8TestInterfaceEmpty::toNative(v8::Handle<v8::Object>::Cast(jsValue)) : 0);
551 imp->setTestInterfaceEmptyAttribute(WTF::getPtr(cppValue));
554 static void testInterfaceEmptyAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
556 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
557 TestObjectPythonV8Internal::testInterfaceEmptyAttributeAttributeSetter(jsValue, info);
558 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
561 static void testObjectPythonAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
563 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
564 v8SetReturnValueFast(info, imp->testObjectPythonAttribute(), imp);
567 static void testObjectPythonAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
569 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
570 TestObjectPythonV8Internal::testObjectPythonAttributeAttributeGetter(info);
571 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
574 static void testObjectPythonAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
576 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
577 V8TRYCATCH_VOID(TestObjectPython*, cppValue, V8TestObjectPython::hasInstance(jsValue, info.GetIsolate()) ? V8TestObjectPython::toNative(v8::Handle<v8::Object>::Cast(jsValue)) : 0);
578 imp->setTestObjectPythonAttribute(WTF::getPtr(cppValue));
581 static void testObjectPythonAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
583 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
584 TestObjectPythonV8Internal::testObjectPythonAttributeAttributeSetter(jsValue, info);
585 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
588 static void voidCallbackFunctionAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
590 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
591 v8SetReturnValue(info, imp->voidCallbackFunctionAttribute().v8Value());
594 static void voidCallbackFunctionAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
596 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
597 TestObjectPythonV8Internal::voidCallbackFunctionAttributeAttributeGetter(info);
598 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
601 static void voidCallbackFunctionAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
603 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
604 V8TRYCATCH_VOID(ScriptValue, cppValue, ScriptValue(jsValue, info.GetIsolate()));
605 imp->setVoidCallbackFunctionAttribute(cppValue);
608 static void voidCallbackFunctionAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
610 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
611 TestObjectPythonV8Internal::voidCallbackFunctionAttributeAttributeSetter(jsValue, info);
612 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
615 static void anyCallbackFunctionOptionalAnyArgAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
617 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
618 v8SetReturnValue(info, imp->anyCallbackFunctionOptionalAnyArgAttribute().v8Value());
621 static void anyCallbackFunctionOptionalAnyArgAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
623 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
624 TestObjectPythonV8Internal::anyCallbackFunctionOptionalAnyArgAttributeAttributeGetter(info);
625 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
628 static void anyCallbackFunctionOptionalAnyArgAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
630 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
631 V8TRYCATCH_VOID(ScriptValue, cppValue, ScriptValue(jsValue, info.GetIsolate()));
632 imp->setAnyCallbackFunctionOptionalAnyArgAttribute(cppValue);
635 static void anyCallbackFunctionOptionalAnyArgAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
637 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
638 TestObjectPythonV8Internal::anyCallbackFunctionOptionalAnyArgAttributeAttributeSetter(jsValue, info);
639 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
642 static void cssAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
644 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
645 v8SetReturnValueInt(info, imp->cssAttribute());
648 static void cssAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
650 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
651 TestObjectPythonV8Internal::cssAttributeAttributeGetter(info);
652 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
655 static void cssAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
657 ExceptionState exceptionState(ExceptionState::SetterContext, "cssAttribute", "TestObjectPython", info.Holder(), info.GetIsolate());
658 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
659 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), exceptionState);
660 imp->setCSSAttribute(cppValue);
663 static void cssAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
665 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
666 TestObjectPythonV8Internal::cssAttributeAttributeSetter(jsValue, info);
667 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
670 static void imeAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
672 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
673 v8SetReturnValueInt(info, imp->imeAttribute());
676 static void imeAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
678 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
679 TestObjectPythonV8Internal::imeAttributeAttributeGetter(info);
680 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
683 static void imeAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
685 ExceptionState exceptionState(ExceptionState::SetterContext, "imeAttribute", "TestObjectPython", info.Holder(), info.GetIsolate());
686 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
687 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), exceptionState);
688 imp->setIMEAttribute(cppValue);
691 static void imeAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
693 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
694 TestObjectPythonV8Internal::imeAttributeAttributeSetter(jsValue, info);
695 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
698 static void svgAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
700 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
701 v8SetReturnValueInt(info, imp->svgAttribute());
704 static void svgAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
706 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
707 TestObjectPythonV8Internal::svgAttributeAttributeGetter(info);
708 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
711 static void svgAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
713 ExceptionState exceptionState(ExceptionState::SetterContext, "svgAttribute", "TestObjectPython", info.Holder(), info.GetIsolate());
714 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
715 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), exceptionState);
716 imp->setSVGAttribute(cppValue);
719 static void svgAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
721 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
722 TestObjectPythonV8Internal::svgAttributeAttributeSetter(jsValue, info);
723 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
726 static void xmlAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
728 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
729 v8SetReturnValueInt(info, imp->xmlAttribute());
732 static void xmlAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
734 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
735 TestObjectPythonV8Internal::xmlAttributeAttributeGetter(info);
736 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
739 static void xmlAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
741 ExceptionState exceptionState(ExceptionState::SetterContext, "xmlAttribute", "TestObjectPython", info.Holder(), info.GetIsolate());
742 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
743 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), exceptionState);
744 imp->setXMLAttribute(cppValue);
747 static void xmlAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
749 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
750 TestObjectPythonV8Internal::xmlAttributeAttributeSetter(jsValue, info);
751 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
754 static void nodeFilterAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
756 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
757 v8SetReturnValueFast(info, imp->nodeFilterAttribute(), imp);
760 static void nodeFilterAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
762 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
763 TestObjectPythonV8Internal::nodeFilterAttributeAttributeGetter(info);
764 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
767 static void nodeFilterAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
769 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
770 V8TRYCATCH_VOID(RefPtr<NodeFilter>, cppValue, toNodeFilter(jsValue, info.GetIsolate()));
771 imp->setNodeFilterAttribute(WTF::getPtr(cppValue));
774 static void nodeFilterAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
776 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
777 TestObjectPythonV8Internal::nodeFilterAttributeAttributeSetter(jsValue, info);
778 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
781 static void serializedScriptValueAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
783 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
784 v8SetReturnValue(info, imp->serializedScriptValueAttribute() ? imp->serializedScriptValueAttribute()->deserialize() : v8::Handle<v8::Value>(v8::Null(info.GetIsolate())));
787 static void serializedScriptValueAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
789 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
790 TestObjectPythonV8Internal::serializedScriptValueAttributeAttributeGetter(info);
791 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
794 static void serializedScriptValueAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
796 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
797 V8TRYCATCH_VOID(RefPtr<SerializedScriptValue>, cppValue, SerializedScriptValue::create(jsValue, info.GetIsolate()));
798 imp->setSerializedScriptValueAttribute(WTF::getPtr(cppValue));
801 static void serializedScriptValueAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
803 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
804 TestObjectPythonV8Internal::serializedScriptValueAttributeAttributeSetter(jsValue, info);
805 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
808 static void anyAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
810 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
811 v8SetReturnValue(info, imp->anyAttribute().v8Value());
814 static void anyAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
816 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
817 TestObjectPythonV8Internal::anyAttributeAttributeGetter(info);
818 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
821 static void anyAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
823 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
824 V8TRYCATCH_VOID(ScriptValue, cppValue, ScriptValue(jsValue, info.GetIsolate()));
825 imp->setAnyAttribute(cppValue);
828 static void anyAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
830 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
831 TestObjectPythonV8Internal::anyAttributeAttributeSetter(jsValue, info);
832 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
835 static void promiseAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
837 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
838 v8SetReturnValue(info, imp->promiseAttribute().v8Value());
841 static void promiseAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
843 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
844 TestObjectPythonV8Internal::promiseAttributeAttributeGetter(info);
845 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
848 static void promiseAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
850 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
851 V8TRYCATCH_VOID(ScriptPromise, cppValue, ScriptPromise(jsValue, info.GetIsolate()));
852 imp->setPromiseAttribute(cppValue);
855 static void promiseAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
857 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
858 TestObjectPythonV8Internal::promiseAttributeAttributeSetter(jsValue, info);
859 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
862 static void windowAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
864 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
865 v8SetReturnValueFast(info, imp->windowAttribute(), imp);
868 static void windowAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
870 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
871 TestObjectPythonV8Internal::windowAttributeAttributeGetter(info);
872 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
875 static void windowAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
877 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
878 V8TRYCATCH_VOID(DOMWindow*, cppValue, toDOMWindow(jsValue, info.GetIsolate()));
879 imp->setWindowAttribute(WTF::getPtr(cppValue));
882 static void windowAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
884 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
885 TestObjectPythonV8Internal::windowAttributeAttributeSetter(jsValue, info);
886 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
889 static void documentAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
891 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
892 v8SetReturnValueFast(info, imp->documentAttribute(), imp);
895 static void documentAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
897 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
898 TestObjectPythonV8Internal::documentAttributeAttributeGetter(info);
899 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
902 static void documentAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
904 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
905 V8TRYCATCH_VOID(Document*, cppValue, V8Document::hasInstance(jsValue, info.GetIsolate()) ? V8Document::toNative(v8::Handle<v8::Object>::Cast(jsValue)) : 0);
906 imp->setDocumentAttribute(WTF::getPtr(cppValue));
909 static void documentAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
911 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
912 TestObjectPythonV8Internal::documentAttributeAttributeSetter(jsValue, info);
913 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
916 static void documentFragmentAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
918 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
919 v8SetReturnValueFast(info, imp->documentFragmentAttribute(), imp);
922 static void documentFragmentAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
924 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
925 TestObjectPythonV8Internal::documentFragmentAttributeAttributeGetter(info);
926 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
929 static void documentFragmentAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
931 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
932 V8TRYCATCH_VOID(DocumentFragment*, cppValue, V8DocumentFragment::hasInstance(jsValue, info.GetIsolate()) ? V8DocumentFragment::toNative(v8::Handle<v8::Object>::Cast(jsValue)) : 0);
933 imp->setDocumentFragmentAttribute(WTF::getPtr(cppValue));
936 static void documentFragmentAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
938 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
939 TestObjectPythonV8Internal::documentFragmentAttributeAttributeSetter(jsValue, info);
940 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
943 static void documentTypeAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
945 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
946 v8SetReturnValueFast(info, imp->documentTypeAttribute(), imp);
949 static void documentTypeAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
951 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
952 TestObjectPythonV8Internal::documentTypeAttributeAttributeGetter(info);
953 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
956 static void documentTypeAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
958 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
959 V8TRYCATCH_VOID(DocumentType*, cppValue, V8DocumentType::hasInstance(jsValue, info.GetIsolate()) ? V8DocumentType::toNative(v8::Handle<v8::Object>::Cast(jsValue)) : 0);
960 imp->setDocumentTypeAttribute(WTF::getPtr(cppValue));
963 static void documentTypeAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
965 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
966 TestObjectPythonV8Internal::documentTypeAttributeAttributeSetter(jsValue, info);
967 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
970 static void elementAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
972 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
973 v8SetReturnValueFast(info, imp->elementAttribute(), imp);
976 static void elementAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
978 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
979 TestObjectPythonV8Internal::elementAttributeAttributeGetter(info);
980 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
983 static void elementAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
985 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
986 V8TRYCATCH_VOID(Element*, cppValue, V8Element::hasInstance(jsValue, info.GetIsolate()) ? V8Element::toNative(v8::Handle<v8::Object>::Cast(jsValue)) : 0);
987 imp->setElementAttribute(WTF::getPtr(cppValue));
990 static void elementAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
992 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
993 TestObjectPythonV8Internal::elementAttributeAttributeSetter(jsValue, info);
994 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
997 static void nodeAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
999 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
1000 v8SetReturnValueFast(info, imp->nodeAttribute(), imp);
1003 static void nodeAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1005 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1006 TestObjectPythonV8Internal::nodeAttributeAttributeGetter(info);
1007 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1010 static void nodeAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1012 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
1013 V8TRYCATCH_VOID(Node*, cppValue, V8Node::hasInstance(jsValue, info.GetIsolate()) ? V8Node::toNative(v8::Handle<v8::Object>::Cast(jsValue)) : 0);
1014 imp->setNodeAttribute(WTF::getPtr(cppValue));
1017 static void nodeAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1019 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1020 TestObjectPythonV8Internal::nodeAttributeAttributeSetter(jsValue, info);
1021 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1024 static void shadowRootAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
1026 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
1027 v8SetReturnValueFast(info, imp->shadowRootAttribute(), imp);
1030 static void shadowRootAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1032 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1033 TestObjectPythonV8Internal::shadowRootAttributeAttributeGetter(info);
1034 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1037 static void shadowRootAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1039 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
1040 V8TRYCATCH_VOID(ShadowRoot*, cppValue, V8ShadowRoot::hasInstance(jsValue, info.GetIsolate()) ? V8ShadowRoot::toNative(v8::Handle<v8::Object>::Cast(jsValue)) : 0);
1041 imp->setShadowRootAttribute(WTF::getPtr(cppValue));
1044 static void shadowRootAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1046 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1047 TestObjectPythonV8Internal::shadowRootAttributeAttributeSetter(jsValue, info);
1048 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1051 static void arrayBufferAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
1053 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
1054 v8SetReturnValueFast(info, imp->arrayBufferAttribute(), imp);
1057 static void arrayBufferAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1059 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1060 TestObjectPythonV8Internal::arrayBufferAttributeAttributeGetter(info);
1061 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1064 static void arrayBufferAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1066 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
1067 V8TRYCATCH_VOID(ArrayBuffer*, cppValue, jsValue->IsArrayBuffer() ? V8ArrayBuffer::toNative(v8::Handle<v8::ArrayBuffer>::Cast(jsValue)) : 0);
1068 imp->setArrayBufferAttribute(WTF::getPtr(cppValue));
1071 static void arrayBufferAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1073 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1074 TestObjectPythonV8Internal::arrayBufferAttributeAttributeSetter(jsValue, info);
1075 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1078 static void float32ArrayAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
1080 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
1081 v8SetReturnValueFast(info, imp->float32ArrayAttribute(), imp);
1084 static void float32ArrayAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1086 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1087 TestObjectPythonV8Internal::float32ArrayAttributeAttributeGetter(info);
1088 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1091 static void float32ArrayAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1093 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
1094 V8TRYCATCH_VOID(Float32Array*, cppValue, jsValue->IsFloat32Array() ? V8Float32Array::toNative(v8::Handle<v8::Float32Array>::Cast(jsValue)) : 0);
1095 imp->setFloat32ArrayAttribute(WTF::getPtr(cppValue));
1098 static void float32ArrayAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1100 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1101 TestObjectPythonV8Internal::float32ArrayAttributeAttributeSetter(jsValue, info);
1102 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1105 static void uint8ArrayAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
1107 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
1108 v8SetReturnValueFast(info, imp->uint8ArrayAttribute(), imp);
1111 static void uint8ArrayAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1113 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1114 TestObjectPythonV8Internal::uint8ArrayAttributeAttributeGetter(info);
1115 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1118 static void uint8ArrayAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1120 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
1121 V8TRYCATCH_VOID(Uint8Array*, cppValue, jsValue->IsUint8Array() ? V8Uint8Array::toNative(v8::Handle<v8::Uint8Array>::Cast(jsValue)) : 0);
1122 imp->setUint8ArrayAttribute(WTF::getPtr(cppValue));
1125 static void uint8ArrayAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1127 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1128 TestObjectPythonV8Internal::uint8ArrayAttributeAttributeSetter(jsValue, info);
1129 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1132 static void selfAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
1134 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
1135 v8SetReturnValueFast(info, imp->self(), imp);
1138 static void selfAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1140 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1141 TestObjectPythonV8Internal::selfAttributeGetter(info);
1142 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1145 static void readonlyEventTargetAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
1147 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
1148 v8SetReturnValueFast(info, imp->readonlyEventTargetAttribute(), imp);
1151 static void readonlyEventTargetAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1153 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1154 TestObjectPythonV8Internal::readonlyEventTargetAttributeAttributeGetter(info);
1155 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1158 static void readonlyWindowAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
1160 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
1161 v8SetReturnValueFast(info, imp->readonlyWindowAttribute(), imp);
1164 static void readonlyWindowAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1166 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1167 TestObjectPythonV8Internal::readonlyWindowAttributeAttributeGetter(info);
1168 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1171 static void htmlCollectionAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
1173 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
1174 v8SetReturnValueFast(info, imp->htmlCollectionAttribute(), imp);
1177 static void htmlCollectionAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1179 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1180 TestObjectPythonV8Internal::htmlCollectionAttributeAttributeGetter(info);
1181 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1184 static void htmlElementAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
1186 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
1187 v8SetReturnValueFast(info, imp->htmlElementAttribute(), imp);
1190 static void htmlElementAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1192 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1193 TestObjectPythonV8Internal::htmlElementAttributeAttributeGetter(info);
1194 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1197 static void stringArrayAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
1199 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
1200 v8SetReturnValue(info, v8Array(imp->stringArrayAttribute(), info.GetIsolate()));
1203 static void stringArrayAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1205 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1206 TestObjectPythonV8Internal::stringArrayAttributeAttributeGetter(info);
1207 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1210 static void stringArrayAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1212 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
1213 V8TRYCATCH_VOID(Vector<String>, cppValue, toNativeArray<String>(jsValue, 0, info.GetIsolate()));
1214 imp->setStringArrayAttribute(cppValue);
1217 static void stringArrayAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1219 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1220 TestObjectPythonV8Internal::stringArrayAttributeAttributeSetter(jsValue, info);
1221 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1224 static void testInterfaceEmptyArrayAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
1226 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
1227 v8SetReturnValue(info, v8Array(imp->testInterfaceEmptyArrayAttribute(), info.GetIsolate()));
1230 static void testInterfaceEmptyArrayAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1232 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1233 TestObjectPythonV8Internal::testInterfaceEmptyArrayAttributeAttributeGetter(info);
1234 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1237 static void testInterfaceEmptyArrayAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1239 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
1240 V8TRYCATCH_VOID(Vector<RefPtr<TestInterfaceEmpty> >, cppValue, (toRefPtrNativeArray<TestInterfaceEmpty, V8TestInterfaceEmpty>(jsValue, 0, info.GetIsolate())));
1241 imp->setTestInterfaceEmptyArrayAttribute(cppValue);
1244 static void testInterfaceEmptyArrayAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1246 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1247 TestObjectPythonV8Internal::testInterfaceEmptyArrayAttributeAttributeSetter(jsValue, info);
1248 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1251 static void floatArrayAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
1253 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
1254 v8SetReturnValue(info, v8Array(imp->floatArrayAttribute(), info.GetIsolate()));
1257 static void floatArrayAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1259 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1260 TestObjectPythonV8Internal::floatArrayAttributeAttributeGetter(info);
1261 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1264 static void floatArrayAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1266 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
1267 V8TRYCATCH_VOID(Vector<float>, cppValue, toNativeArray<float>(jsValue, 0, info.GetIsolate()));
1268 imp->setFloatArrayAttribute(cppValue);
1271 static void floatArrayAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1273 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1274 TestObjectPythonV8Internal::floatArrayAttributeAttributeSetter(jsValue, info);
1275 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1278 static void nullableStringAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
1280 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
1281 bool isNull = false;
1282 String jsValue = imp->nullableStringAttribute(isNull);
1284 v8SetReturnValueNull(info);
1287 v8SetReturnValueString(info, jsValue, info.GetIsolate());
1290 static void nullableStringAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1292 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1293 TestObjectPythonV8Internal::nullableStringAttributeAttributeGetter(info);
1294 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1297 static void nullableStringAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1299 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
1300 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue);
1301 imp->setNullableStringAttribute(cppValue);
1304 static void nullableStringAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1306 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1307 TestObjectPythonV8Internal::nullableStringAttributeAttributeSetter(jsValue, info);
1308 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1311 static void nullableLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
1313 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
1314 bool isNull = false;
1315 int jsValue = imp->nullableLongAttribute(isNull);
1317 v8SetReturnValueNull(info);
1320 v8SetReturnValueInt(info, jsValue);
1323 static void nullableLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1325 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1326 TestObjectPythonV8Internal::nullableLongAttributeAttributeGetter(info);
1327 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1330 static void nullableLongAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1332 ExceptionState exceptionState(ExceptionState::SetterContext, "nullableLongAttribute", "TestObjectPython", info.Holder(), info.GetIsolate());
1333 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
1334 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), exceptionState);
1335 imp->setNullableLongAttribute(cppValue);
1338 static void nullableLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1340 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1341 TestObjectPythonV8Internal::nullableLongAttributeAttributeSetter(jsValue, info);
1342 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1345 static void nullableTestInterfaceAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
1347 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
1348 bool isNull = false;
1349 RefPtr<TestInterface> jsValue = imp->nullableTestInterfaceAttribute(isNull);
1351 v8SetReturnValueNull(info);
1354 v8SetReturnValueFast(info, jsValue.release(), imp);
1357 static void nullableTestInterfaceAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1359 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1360 TestObjectPythonV8Internal::nullableTestInterfaceAttributeAttributeGetter(info);
1361 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1364 static void nullableTestInterfaceAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1366 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
1367 V8TRYCATCH_VOID(TestInterface*, cppValue, V8TestInterface::hasInstance(jsValue, info.GetIsolate()) ? V8TestInterface::toNative(v8::Handle<v8::Object>::Cast(jsValue)) : 0);
1368 imp->setNullableTestInterfaceAttribute(WTF::getPtr(cppValue));
1371 static void nullableTestInterfaceAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1373 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1374 TestObjectPythonV8Internal::nullableTestInterfaceAttributeAttributeSetter(jsValue, info);
1375 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1378 static void testEnumAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
1380 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
1381 v8SetReturnValueString(info, imp->testEnumAttribute(), info.GetIsolate());
1384 static void testEnumAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1386 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1387 TestObjectPythonV8Internal::testEnumAttributeAttributeGetter(info);
1388 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1391 static void testEnumAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1393 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
1394 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue);
1395 String string = cppValue;
1396 if (!(string == "" || string == "EnumValue1" || string == "EnumValue2" || string == "EnumValue3"))
1398 imp->setTestEnumAttribute(cppValue);
1401 static void testEnumAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1403 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1404 TestObjectPythonV8Internal::testEnumAttributeAttributeSetter(jsValue, info);
1405 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1408 static void staticStringAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
1410 v8SetReturnValueString(info, TestObjectPython::staticStringAttribute(), info.GetIsolate());
1413 static void staticStringAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1415 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1416 TestObjectPythonV8Internal::staticStringAttributeAttributeGetter(info);
1417 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1420 static void staticStringAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1422 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue);
1423 TestObjectPython::setStaticStringAttribute(cppValue);
1426 static void staticStringAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1428 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1429 TestObjectPythonV8Internal::staticStringAttributeAttributeSetter(jsValue, info);
1430 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1433 static void staticLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
1435 v8SetReturnValueInt(info, TestObjectPython::staticLongAttribute());
1438 static void staticLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1440 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1441 TestObjectPythonV8Internal::staticLongAttributeAttributeGetter(info);
1442 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1445 static void staticLongAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1447 ExceptionState exceptionState(ExceptionState::SetterContext, "staticLongAttribute", "TestObjectPython", info.Holder(), info.GetIsolate());
1448 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), exceptionState);
1449 TestObjectPython::setStaticLongAttribute(cppValue);
1452 static void staticLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1454 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1455 TestObjectPythonV8Internal::staticLongAttributeAttributeSetter(jsValue, info);
1456 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1459 static void eventHandlerAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
1461 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
1462 EventListener* jsValue = imp->eventHandlerAttribute();
1463 v8SetReturnValue(info, jsValue ? v8::Handle<v8::Value>(V8AbstractEventListener::cast(jsValue)->getListenerObject(imp->executionContext())) : v8::Handle<v8::Value>(v8::Null(info.GetIsolate())));
1466 static void eventHandlerAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1468 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1469 TestObjectPythonV8Internal::eventHandlerAttributeAttributeGetter(info);
1470 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1473 static void eventHandlerAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1475 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
1476 moveEventListenerToNewWrapper(info.Holder(), imp->eventHandlerAttribute(), jsValue, V8TestObjectPython::eventListenerCacheIndex, info.GetIsolate());
1477 imp->setEventHandlerAttribute(V8EventListenerList::getEventListener(jsValue, true, ListenerFindOrCreate));
1480 static void eventHandlerAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1482 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1483 TestObjectPythonV8Internal::eventHandlerAttributeAttributeSetter(jsValue, info);
1484 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1487 static void activityLoggingAccessForAllWorldsLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
1489 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
1490 v8SetReturnValueInt(info, imp->activityLoggingAccessForAllWorldsLongAttribute());
1493 static void activityLoggingAccessForAllWorldsLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1495 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1496 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->GetCurrentContext());
1497 if (contextData && contextData->activityLogger())
1498 contextData->activityLogger()->log("TestObjectPython.activityLoggingAccessForAllWorldsLongAttribute", 0, 0, "Getter");
1499 TestObjectPythonV8Internal::activityLoggingAccessForAllWorldsLongAttributeAttributeGetter(info);
1500 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1503 static void activityLoggingAccessForAllWorldsLongAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1505 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggingAccessForAllWorldsLongAttribute", "TestObjectPython", info.Holder(), info.GetIsolate());
1506 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
1507 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), exceptionState);
1508 imp->setActivityLoggingAccessForAllWorldsLongAttribute(cppValue);
1511 static void activityLoggingAccessForAllWorldsLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1513 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1514 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->GetCurrentContext());
1515 if (contextData && contextData->activityLogger()) {
1516 v8::Handle<v8::Value> loggerArg[] = { jsValue };
1517 contextData->activityLogger()->log("TestObjectPython.activityLoggingAccessForAllWorldsLongAttribute", 1, &loggerArg[0], "Setter");
1519 TestObjectPythonV8Internal::activityLoggingAccessForAllWorldsLongAttributeAttributeSetter(jsValue, info);
1520 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1523 static void activityLoggingGetterForAllWorldsLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
1525 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
1526 v8SetReturnValueInt(info, imp->activityLoggingGetterForAllWorldsLongAttribute());
1529 static void activityLoggingGetterForAllWorldsLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1531 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1532 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->GetCurrentContext());
1533 if (contextData && contextData->activityLogger())
1534 contextData->activityLogger()->log("TestObjectPython.activityLoggingGetterForAllWorldsLongAttribute", 0, 0, "Getter");
1535 TestObjectPythonV8Internal::activityLoggingGetterForAllWorldsLongAttributeAttributeGetter(info);
1536 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1539 static void activityLoggingGetterForAllWorldsLongAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1541 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggingGetterForAllWorldsLongAttribute", "TestObjectPython", info.Holder(), info.GetIsolate());
1542 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
1543 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), exceptionState);
1544 imp->setActivityLoggingGetterForAllWorldsLongAttribute(cppValue);
1547 static void activityLoggingGetterForAllWorldsLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1549 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1550 TestObjectPythonV8Internal::activityLoggingGetterForAllWorldsLongAttributeAttributeSetter(jsValue, info);
1551 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1554 static void activityLoggingSetterForAllWorldsLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
1556 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
1557 v8SetReturnValueInt(info, imp->activityLoggingSetterForAllWorldsLongAttribute());
1560 static void activityLoggingSetterForAllWorldsLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1562 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1563 TestObjectPythonV8Internal::activityLoggingSetterForAllWorldsLongAttributeAttributeGetter(info);
1564 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1567 static void activityLoggingSetterForAllWorldsLongAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1569 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggingSetterForAllWorldsLongAttribute", "TestObjectPython", info.Holder(), info.GetIsolate());
1570 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
1571 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), exceptionState);
1572 imp->setActivityLoggingSetterForAllWorldsLongAttribute(cppValue);
1575 static void activityLoggingSetterForAllWorldsLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1577 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1578 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->GetCurrentContext());
1579 if (contextData && contextData->activityLogger()) {
1580 v8::Handle<v8::Value> loggerArg[] = { jsValue };
1581 contextData->activityLogger()->log("TestObjectPython.activityLoggingSetterForAllWorldsLongAttribute", 1, &loggerArg[0], "Setter");
1583 TestObjectPythonV8Internal::activityLoggingSetterForAllWorldsLongAttributeAttributeSetter(jsValue, info);
1584 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1587 static void cachedAttributeAnyAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
1589 v8::Handle<v8::String> propertyName = v8AtomicString(info.GetIsolate(), "cachedAttributeAnyAttribute");
1590 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
1591 if (!imp->isValueDirty()) {
1592 v8::Handle<v8::Value> jsValue = getHiddenValue(info.GetIsolate(), info.Holder(), propertyName);
1593 if (!jsValue.IsEmpty()) {
1594 v8SetReturnValue(info, jsValue);
1598 ScriptValue jsValue = imp->cachedAttributeAnyAttribute();
1599 setHiddenValue(info.GetIsolate(), info.Holder(), propertyName, jsValue.v8Value());
1600 v8SetReturnValue(info, jsValue.v8Value());
1603 static void cachedAttributeAnyAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1605 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1606 TestObjectPythonV8Internal::cachedAttributeAnyAttributeAttributeGetter(info);
1607 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1610 static void cachedAttributeAnyAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1612 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
1613 V8TRYCATCH_VOID(ScriptValue, cppValue, ScriptValue(jsValue, info.GetIsolate()));
1614 imp->setCachedAttributeAnyAttribute(cppValue);
1615 deleteHiddenValue(info.GetIsolate(), info.Holder(), "cachedAttributeAnyAttribute"); // Invalidate the cached value.
1618 static void cachedAttributeAnyAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1620 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1621 TestObjectPythonV8Internal::cachedAttributeAnyAttributeAttributeSetter(jsValue, info);
1622 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1625 static void callWithExecutionContextAnyAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
1627 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
1628 ExecutionContext* scriptContext = currentExecutionContext(info.GetIsolate());
1629 v8SetReturnValue(info, imp->callWithExecutionContextAnyAttribute(scriptContext).v8Value());
1632 static void callWithExecutionContextAnyAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1634 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1635 TestObjectPythonV8Internal::callWithExecutionContextAnyAttributeAttributeGetter(info);
1636 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1639 static void callWithExecutionContextAnyAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1641 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
1642 V8TRYCATCH_VOID(ScriptValue, cppValue, ScriptValue(jsValue, info.GetIsolate()));
1643 ExecutionContext* scriptContext = currentExecutionContext(info.GetIsolate());
1644 imp->setCallWithExecutionContextAnyAttribute(scriptContext, cppValue);
1647 static void callWithExecutionContextAnyAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1649 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1650 TestObjectPythonV8Internal::callWithExecutionContextAnyAttributeAttributeSetter(jsValue, info);
1651 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1654 static void checkSecurityForNodeReadonlyDocumentAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
1656 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
1657 ExceptionState exceptionState(ExceptionState::GetterContext, "checkSecurityForNodeReadonlyDocumentAttribute", "TestObjectPython", info.Holder(), info.GetIsolate());
1658 if (!BindingSecurity::shouldAllowAccessToNode(info.GetIsolate(), imp->checkSecurityForNodeReadonlyDocumentAttribute(), exceptionState)) {
1659 v8SetReturnValueNull(info);
1660 exceptionState.throwIfNeeded();
1663 v8SetReturnValueFast(info, imp->checkSecurityForNodeReadonlyDocumentAttribute(), imp);
1666 static void checkSecurityForNodeReadonlyDocumentAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1668 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1669 TestObjectPythonV8Internal::checkSecurityForNodeReadonlyDocumentAttributeAttributeGetter(info);
1670 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1673 #if ENABLE(CONDITION)
1674 static void conditionalLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
1676 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
1677 v8SetReturnValueInt(info, imp->conditionalLongAttribute());
1679 #endif // ENABLE(CONDITION)
1681 #if ENABLE(CONDITION)
1682 static void conditionalLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1684 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1685 TestObjectPythonV8Internal::conditionalLongAttributeAttributeGetter(info);
1686 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1688 #endif // ENABLE(CONDITION)
1690 #if ENABLE(CONDITION)
1691 static void conditionalLongAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1693 ExceptionState exceptionState(ExceptionState::SetterContext, "conditionalLongAttribute", "TestObjectPython", info.Holder(), info.GetIsolate());
1694 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
1695 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), exceptionState);
1696 imp->setConditionalLongAttribute(cppValue);
1698 #endif // ENABLE(CONDITION)
1700 #if ENABLE(CONDITION)
1701 static void conditionalLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1703 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1704 TestObjectPythonV8Internal::conditionalLongAttributeAttributeSetter(jsValue, info);
1705 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1707 #endif // ENABLE(CONDITION)
1709 #if ENABLE(CONDITION_1) && ENABLE(CONDITION_2)
1710 static void conditionalAndLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
1712 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
1713 v8SetReturnValueInt(info, imp->conditionalAndLongAttribute());
1715 #endif // ENABLE(CONDITION_1) && ENABLE(CONDITION_2)
1717 #if ENABLE(CONDITION_1) && ENABLE(CONDITION_2)
1718 static void conditionalAndLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1720 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1721 TestObjectPythonV8Internal::conditionalAndLongAttributeAttributeGetter(info);
1722 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1724 #endif // ENABLE(CONDITION_1) && ENABLE(CONDITION_2)
1726 #if ENABLE(CONDITION_1) && ENABLE(CONDITION_2)
1727 static void conditionalAndLongAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1729 ExceptionState exceptionState(ExceptionState::SetterContext, "conditionalAndLongAttribute", "TestObjectPython", info.Holder(), info.GetIsolate());
1730 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
1731 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), exceptionState);
1732 imp->setConditionalAndLongAttribute(cppValue);
1734 #endif // ENABLE(CONDITION_1) && ENABLE(CONDITION_2)
1736 #if ENABLE(CONDITION_1) && ENABLE(CONDITION_2)
1737 static void conditionalAndLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1739 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1740 TestObjectPythonV8Internal::conditionalAndLongAttributeAttributeSetter(jsValue, info);
1741 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1743 #endif // ENABLE(CONDITION_1) && ENABLE(CONDITION_2)
1745 #if ENABLE(CONDITION_1) || ENABLE(CONDITION_2)
1746 static void conditionalOrLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
1748 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
1749 v8SetReturnValueInt(info, imp->conditionalOrLongAttribute());
1751 #endif // ENABLE(CONDITION_1) || ENABLE(CONDITION_2)
1753 #if ENABLE(CONDITION_1) || ENABLE(CONDITION_2)
1754 static void conditionalOrLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1756 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1757 TestObjectPythonV8Internal::conditionalOrLongAttributeAttributeGetter(info);
1758 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1760 #endif // ENABLE(CONDITION_1) || ENABLE(CONDITION_2)
1762 #if ENABLE(CONDITION_1) || ENABLE(CONDITION_2)
1763 static void conditionalOrLongAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1765 ExceptionState exceptionState(ExceptionState::SetterContext, "conditionalOrLongAttribute", "TestObjectPython", info.Holder(), info.GetIsolate());
1766 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
1767 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), exceptionState);
1768 imp->setConditionalOrLongAttribute(cppValue);
1770 #endif // ENABLE(CONDITION_1) || ENABLE(CONDITION_2)
1772 #if ENABLE(CONDITION_1) || ENABLE(CONDITION_2)
1773 static void conditionalOrLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1775 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1776 TestObjectPythonV8Internal::conditionalOrLongAttributeAttributeSetter(jsValue, info);
1777 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1779 #endif // ENABLE(CONDITION_1) || ENABLE(CONDITION_2)
1781 static void customObjectAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1783 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1784 V8TestObjectPython::customObjectAttributeAttributeGetterCustom(info);
1785 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1788 static void customObjectAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1790 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1791 V8TestObjectPython::customObjectAttributeAttributeSetterCustom(jsValue, info);
1792 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1795 static void customGetterLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1797 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1798 V8TestObjectPython::customGetterLongAttributeAttributeGetterCustom(info);
1799 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1802 static void customGetterLongAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1804 ExceptionState exceptionState(ExceptionState::SetterContext, "customGetterLongAttribute", "TestObjectPython", info.Holder(), info.GetIsolate());
1805 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
1806 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), exceptionState);
1807 imp->setCustomGetterLongAttribute(cppValue);
1810 static void customGetterLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1812 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1813 TestObjectPythonV8Internal::customGetterLongAttributeAttributeSetter(jsValue, info);
1814 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1817 static void customGetterReadonlyObjectAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1819 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1820 V8TestObjectPython::customGetterReadonlyObjectAttributeAttributeGetterCustom(info);
1821 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1824 static void customSetterLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
1826 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
1827 v8SetReturnValueInt(info, imp->customSetterLongAttribute());
1830 static void customSetterLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1832 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1833 TestObjectPythonV8Internal::customSetterLongAttributeAttributeGetter(info);
1834 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1837 static void customSetterLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1839 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1840 V8TestObjectPython::customSetterLongAttributeAttributeSetterCustom(jsValue, info);
1841 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1844 #if ENABLE(CONDITION)
1845 static void customLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1847 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1848 V8TestObjectPython::customLongAttributeAttributeGetterCustom(info);
1849 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1851 #endif // ENABLE(CONDITION)
1853 #if ENABLE(CONDITION)
1854 static void customLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1856 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1857 V8TestObjectPython::customLongAttributeAttributeSetterCustom(jsValue, info);
1858 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1860 #endif // ENABLE(CONDITION)
1862 static void customElementsCallbacksReadonlyLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
1864 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
1865 v8SetReturnValueInt(info, imp->customElementsCallbacksReadonlyLongAttribute());
1868 static void customElementsCallbacksReadonlyLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1870 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1871 TestObjectPythonV8Internal::customElementsCallbacksReadonlyLongAttributeAttributeGetter(info);
1872 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1875 static void deprecatedLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
1877 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
1878 v8SetReturnValueInt(info, imp->deprecatedLongAttribute());
1881 static void deprecatedLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1883 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1884 UseCounter::countDeprecation(activeExecutionContext(info.GetIsolate()), UseCounter::LongAttribute);
1885 TestObjectPythonV8Internal::deprecatedLongAttributeAttributeGetter(info);
1886 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1889 static void deprecatedLongAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1891 ExceptionState exceptionState(ExceptionState::SetterContext, "deprecatedLongAttribute", "TestObjectPython", info.Holder(), info.GetIsolate());
1892 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
1893 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), exceptionState);
1894 imp->setDeprecatedLongAttribute(cppValue);
1897 static void deprecatedLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1899 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1900 UseCounter::countDeprecation(activeExecutionContext(info.GetIsolate()), UseCounter::LongAttribute);
1901 TestObjectPythonV8Internal::deprecatedLongAttributeAttributeSetter(jsValue, info);
1902 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1905 static void enforceRangeLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
1907 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
1908 v8SetReturnValueInt(info, imp->enforceRangeLongAttribute());
1911 static void enforceRangeLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1913 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1914 TestObjectPythonV8Internal::enforceRangeLongAttributeAttributeGetter(info);
1915 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1918 static void enforceRangeLongAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1920 ExceptionState exceptionState(ExceptionState::SetterContext, "enforceRangeLongAttribute", "TestObjectPython", info.Holder(), info.GetIsolate());
1921 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
1922 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, EnforceRange, exceptionState), exceptionState);
1923 imp->setEnforceRangeLongAttribute(cppValue);
1926 static void enforceRangeLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1928 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1929 TestObjectPythonV8Internal::enforceRangeLongAttributeAttributeSetter(jsValue, info);
1930 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1933 static void exposeJSAccessorsLongAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
1935 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
1936 v8SetReturnValueInt(info, imp->exposeJSAccessorsLongAttribute());
1939 static void exposeJSAccessorsLongAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
1941 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1942 TestObjectPythonV8Internal::exposeJSAccessorsLongAttributeAttributeGetter(info);
1943 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1946 static void exposeJSAccessorsLongAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::FunctionCallbackInfo<v8::Value>& info)
1948 ExceptionState exceptionState(ExceptionState::SetterContext, "exposeJSAccessorsLongAttribute", "TestObjectPython", info.Holder(), info.GetIsolate());
1949 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
1950 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), exceptionState);
1951 imp->setExposeJSAccessorsLongAttribute(cppValue);
1954 static void exposeJSAccessorsLongAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
1956 v8::Local<v8::Value> jsValue = info[0];
1957 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1958 TestObjectPythonV8Internal::exposeJSAccessorsLongAttributeAttributeSetter(jsValue, info);
1959 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1962 static void implementedAsLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
1964 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
1965 v8SetReturnValueInt(info, imp->implementedAsName());
1968 static void implementedAsLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1970 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1971 TestObjectPythonV8Internal::implementedAsLongAttributeAttributeGetter(info);
1972 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1975 static void implementedAsLongAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1977 ExceptionState exceptionState(ExceptionState::SetterContext, "implementedAsLongAttribute", "TestObjectPython", info.Holder(), info.GetIsolate());
1978 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
1979 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), exceptionState);
1980 imp->setImplementedAsName(cppValue);
1983 static void implementedAsLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1985 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1986 TestObjectPythonV8Internal::implementedAsLongAttributeAttributeSetter(jsValue, info);
1987 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1990 static void customImplementedAsLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1992 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1993 V8TestObjectPython::customImplementedAsLongAttributeAttributeGetterCustom(info);
1994 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1997 static void customImplementedAsLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1999 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2000 V8TestObjectPython::customImplementedAsLongAttributeAttributeSetterCustom(jsValue, info);
2001 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2004 static void customGetterImplementedAsLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2006 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2007 V8TestObjectPython::customGetterImplementedAsLongAttributeAttributeGetterCustom(info);
2008 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2011 static void customGetterImplementedAsLongAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2013 ExceptionState exceptionState(ExceptionState::SetterContext, "customGetterImplementedAsLongAttribute", "TestObjectPython", info.Holder(), info.GetIsolate());
2014 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
2015 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), exceptionState);
2016 imp->setImplementedAsNameWithCustomGetter(cppValue);
2019 static void customGetterImplementedAsLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2021 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2022 TestObjectPythonV8Internal::customGetterImplementedAsLongAttributeAttributeSetter(jsValue, info);
2023 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2026 static void customSetterImplementedAsLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
2028 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
2029 v8SetReturnValueInt(info, imp->implementedAsNameWithCustomGetter());
2032 static void customSetterImplementedAsLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2034 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2035 TestObjectPythonV8Internal::customSetterImplementedAsLongAttributeAttributeGetter(info);
2036 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2039 static void customSetterImplementedAsLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2041 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2042 V8TestObjectPython::customSetterImplementedAsLongAttributeAttributeSetterCustom(jsValue, info);
2043 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2046 static void measureAsLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
2048 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
2049 v8SetReturnValueInt(info, imp->measureAsLongAttribute());
2052 static void measureAsLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2054 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2055 UseCounter::count(activeExecutionContext(info.GetIsolate()), UseCounter::TestFeature);
2056 TestObjectPythonV8Internal::measureAsLongAttributeAttributeGetter(info);
2057 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2060 static void measureAsLongAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2062 ExceptionState exceptionState(ExceptionState::SetterContext, "measureAsLongAttribute", "TestObjectPython", info.Holder(), info.GetIsolate());
2063 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
2064 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), exceptionState);
2065 imp->setMeasureAsLongAttribute(cppValue);
2068 static void measureAsLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2070 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2071 UseCounter::count(activeExecutionContext(info.GetIsolate()), UseCounter::TestFeature);
2072 TestObjectPythonV8Internal::measureAsLongAttributeAttributeSetter(jsValue, info);
2073 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2076 static void notEnumerableLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
2078 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
2079 v8SetReturnValueInt(info, imp->notEnumerableLongAttribute());
2082 static void notEnumerableLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2084 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2085 TestObjectPythonV8Internal::notEnumerableLongAttributeAttributeGetter(info);
2086 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2089 static void notEnumerableLongAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2091 ExceptionState exceptionState(ExceptionState::SetterContext, "notEnumerableLongAttribute", "TestObjectPython", info.Holder(), info.GetIsolate());
2092 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
2093 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), exceptionState);
2094 imp->setNotEnumerableLongAttribute(cppValue);
2097 static void notEnumerableLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2099 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2100 TestObjectPythonV8Internal::notEnumerableLongAttributeAttributeSetter(jsValue, info);
2101 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2104 static void perContextEnabledLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
2106 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
2107 v8SetReturnValueInt(info, imp->perContextEnabledLongAttribute());
2110 static void perContextEnabledLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2112 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2113 TestObjectPythonV8Internal::perContextEnabledLongAttributeAttributeGetter(info);
2114 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2117 static void perContextEnabledLongAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2119 ExceptionState exceptionState(ExceptionState::SetterContext, "perContextEnabledLongAttribute", "TestObjectPython", info.Holder(), info.GetIsolate());
2120 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
2121 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), exceptionState);
2122 imp->setPerContextEnabledLongAttribute(cppValue);
2125 static void perContextEnabledLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2127 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2128 TestObjectPythonV8Internal::perContextEnabledLongAttributeAttributeSetter(jsValue, info);
2129 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2132 static void perWorldBindingsLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
2134 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
2135 v8SetReturnValueInt(info, imp->perWorldBindingsLongAttribute());
2138 static void perWorldBindingsLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2140 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2141 TestObjectPythonV8Internal::perWorldBindingsLongAttributeAttributeGetter(info);
2142 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2145 static void perWorldBindingsLongAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2147 ExceptionState exceptionState(ExceptionState::SetterContext, "perWorldBindingsLongAttribute", "TestObjectPython", info.Holder(), info.GetIsolate());
2148 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
2149 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), exceptionState);
2150 imp->setPerWorldBindingsLongAttribute(cppValue);
2153 static void perWorldBindingsLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2155 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2156 TestObjectPythonV8Internal::perWorldBindingsLongAttributeAttributeSetter(jsValue, info);
2157 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2160 static void perWorldBindingsLongAttributeAttributeGetterForMainWorld(const v8::PropertyCallbackInfo<v8::Value>& info)
2162 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
2163 v8SetReturnValueInt(info, imp->perWorldBindingsLongAttribute());
2166 static void perWorldBindingsLongAttributeAttributeGetterCallbackForMainWorld(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2168 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2169 TestObjectPythonV8Internal::perWorldBindingsLongAttributeAttributeGetterForMainWorld(info);
2170 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2173 static void perWorldBindingsLongAttributeAttributeSetterForMainWorld(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2175 ExceptionState exceptionState(ExceptionState::SetterContext, "perWorldBindingsLongAttribute", "TestObjectPython", info.Holder(), info.GetIsolate());
2176 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
2177 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), exceptionState);
2178 imp->setPerWorldBindingsLongAttribute(cppValue);
2181 static void perWorldBindingsLongAttributeAttributeSetterCallbackForMainWorld(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2183 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2184 TestObjectPythonV8Internal::perWorldBindingsLongAttributeAttributeSetterForMainWorld(jsValue, info);
2185 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2188 static void perWorldBindingsReadonlyLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
2190 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
2191 v8SetReturnValueInt(info, imp->perWorldBindingsReadonlyLongAttribute());
2194 static void perWorldBindingsReadonlyLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2196 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2197 TestObjectPythonV8Internal::perWorldBindingsReadonlyLongAttributeAttributeGetter(info);
2198 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2201 static void perWorldBindingsReadonlyLongAttributeAttributeGetterForMainWorld(const v8::PropertyCallbackInfo<v8::Value>& info)
2203 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
2204 v8SetReturnValueInt(info, imp->perWorldBindingsReadonlyLongAttribute());
2207 static void perWorldBindingsReadonlyLongAttributeAttributeGetterCallbackForMainWorld(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2209 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2210 TestObjectPythonV8Internal::perWorldBindingsReadonlyLongAttributeAttributeGetterForMainWorld(info);
2211 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2214 static void perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
2216 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
2217 RefPtr<TestInterfaceEmpty> result = imp->perWorldBindingsReadonlyTestInterfaceEmptyAttribute();
2218 if (result && DOMDataStore::setReturnValueFromWrapper<V8TestInterfaceEmpty>(info.GetReturnValue(), result.get()))
2220 v8::Handle<v8::Value> wrapper = toV8(result.get(), info.Holder(), info.GetIsolate());
2221 if (!wrapper.IsEmpty()) {
2222 setHiddenValue(info.GetIsolate(), info.Holder(), "perWorldBindingsReadonlyTestInterfaceEmptyAttribute", wrapper);
2223 v8SetReturnValue(info, wrapper);
2227 static void perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2229 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2230 TestObjectPythonV8Internal::perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetter(info);
2231 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2234 static void perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetterForMainWorld(const v8::PropertyCallbackInfo<v8::Value>& info)
2236 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
2237 RefPtr<TestInterfaceEmpty> result = imp->perWorldBindingsReadonlyTestInterfaceEmptyAttribute();
2238 if (result && DOMDataStore::setReturnValueFromWrapperForMainWorld<V8TestInterfaceEmpty>(info.GetReturnValue(), result.get()))
2240 v8::Handle<v8::Value> wrapper = toV8(result.get(), info.Holder(), info.GetIsolate());
2241 if (!wrapper.IsEmpty()) {
2242 setHiddenValue(info.GetIsolate(), info.Holder(), "perWorldBindingsReadonlyTestInterfaceEmptyAttribute", wrapper);
2243 v8SetReturnValue(info, wrapper);
2247 static void perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetterCallbackForMainWorld(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2249 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2250 TestObjectPythonV8Internal::perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetterForMainWorld(info);
2251 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2254 static void activityLoggingAccessPerWorldBindingsLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
2256 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
2257 v8SetReturnValueInt(info, imp->activityLoggingAccessPerWorldBindingsLongAttribute());
2260 static void activityLoggingAccessPerWorldBindingsLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2262 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2263 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->GetCurrentContext());
2264 if (contextData && contextData->activityLogger())
2265 contextData->activityLogger()->log("TestObjectPython.activityLoggingAccessPerWorldBindingsLongAttribute", 0, 0, "Getter");
2266 TestObjectPythonV8Internal::activityLoggingAccessPerWorldBindingsLongAttributeAttributeGetter(info);
2267 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2270 static void activityLoggingAccessPerWorldBindingsLongAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2272 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggingAccessPerWorldBindingsLongAttribute", "TestObjectPython", info.Holder(), info.GetIsolate());
2273 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
2274 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), exceptionState);
2275 imp->setActivityLoggingAccessPerWorldBindingsLongAttribute(cppValue);
2278 static void activityLoggingAccessPerWorldBindingsLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2280 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2281 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->GetCurrentContext());
2282 if (contextData && contextData->activityLogger()) {
2283 v8::Handle<v8::Value> loggerArg[] = { jsValue };
2284 contextData->activityLogger()->log("TestObjectPython.activityLoggingAccessPerWorldBindingsLongAttribute", 1, &loggerArg[0], "Setter");
2286 TestObjectPythonV8Internal::activityLoggingAccessPerWorldBindingsLongAttributeAttributeSetter(jsValue, info);
2287 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2290 static void activityLoggingAccessPerWorldBindingsLongAttributeAttributeGetterForMainWorld(const v8::PropertyCallbackInfo<v8::Value>& info)
2292 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
2293 v8SetReturnValueInt(info, imp->activityLoggingAccessPerWorldBindingsLongAttribute());
2296 static void activityLoggingAccessPerWorldBindingsLongAttributeAttributeGetterCallbackForMainWorld(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2298 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2299 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->GetCurrentContext());
2300 if (contextData && contextData->activityLogger())
2301 contextData->activityLogger()->log("TestObjectPython.activityLoggingAccessPerWorldBindingsLongAttribute", 0, 0, "Getter");
2302 TestObjectPythonV8Internal::activityLoggingAccessPerWorldBindingsLongAttributeAttributeGetterForMainWorld(info);
2303 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2306 static void activityLoggingAccessPerWorldBindingsLongAttributeAttributeSetterForMainWorld(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2308 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggingAccessPerWorldBindingsLongAttribute", "TestObjectPython", info.Holder(), info.GetIsolate());
2309 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
2310 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), exceptionState);
2311 imp->setActivityLoggingAccessPerWorldBindingsLongAttribute(cppValue);
2314 static void activityLoggingAccessPerWorldBindingsLongAttributeAttributeSetterCallbackForMainWorld(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2316 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2317 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->GetCurrentContext());
2318 if (contextData && contextData->activityLogger()) {
2319 v8::Handle<v8::Value> loggerArg[] = { jsValue };
2320 contextData->activityLogger()->log("TestObjectPython.activityLoggingAccessPerWorldBindingsLongAttribute", 1, &loggerArg[0], "Setter");
2322 TestObjectPythonV8Internal::activityLoggingAccessPerWorldBindingsLongAttributeAttributeSetterForMainWorld(jsValue, info);
2323 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2326 static void activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
2328 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
2329 v8SetReturnValueInt(info, imp->activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttribute());
2332 static void activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2334 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2335 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->GetCurrentContext());
2336 if (contextData && contextData->activityLogger())
2337 contextData->activityLogger()->log("TestObjectPython.activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttribute", 0, 0, "Getter");
2338 TestObjectPythonV8Internal::activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeAttributeGetter(info);
2339 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2342 static void activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2344 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttribute", "TestObjectPython", info.Holder(), info.GetIsolate());
2345 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
2346 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), exceptionState);
2347 imp->setActivityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttribute(cppValue);
2350 static void activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2352 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2353 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->GetCurrentContext());
2354 if (contextData && contextData->activityLogger()) {
2355 v8::Handle<v8::Value> loggerArg[] = { jsValue };
2356 contextData->activityLogger()->log("TestObjectPython.activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttribute", 1, &loggerArg[0], "Setter");
2358 TestObjectPythonV8Internal::activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeAttributeSetter(jsValue, info);
2359 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2362 static void activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeAttributeGetterForMainWorld(const v8::PropertyCallbackInfo<v8::Value>& info)
2364 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
2365 v8SetReturnValueInt(info, imp->activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttribute());
2368 static void activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeAttributeGetterCallbackForMainWorld(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2370 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2371 TestObjectPythonV8Internal::activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeAttributeGetterForMainWorld(info);
2372 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2375 static void activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeAttributeSetterForMainWorld(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2377 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttribute", "TestObjectPython", info.Holder(), info.GetIsolate());
2378 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
2379 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), exceptionState);
2380 imp->setActivityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttribute(cppValue);
2383 static void activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeAttributeSetterCallbackForMainWorld(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2385 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2386 TestObjectPythonV8Internal::activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeAttributeSetterForMainWorld(jsValue, info);
2387 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2390 static void activityLoggingGetterPerWorldBindingsLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
2392 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
2393 v8SetReturnValueInt(info, imp->activityLoggingGetterPerWorldBindingsLongAttribute());
2396 static void activityLoggingGetterPerWorldBindingsLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2398 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2399 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->GetCurrentContext());
2400 if (contextData && contextData->activityLogger())
2401 contextData->activityLogger()->log("TestObjectPython.activityLoggingGetterPerWorldBindingsLongAttribute", 0, 0, "Getter");
2402 TestObjectPythonV8Internal::activityLoggingGetterPerWorldBindingsLongAttributeAttributeGetter(info);
2403 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2406 static void activityLoggingGetterPerWorldBindingsLongAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2408 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggingGetterPerWorldBindingsLongAttribute", "TestObjectPython", info.Holder(), info.GetIsolate());
2409 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
2410 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), exceptionState);
2411 imp->setActivityLoggingGetterPerWorldBindingsLongAttribute(cppValue);
2414 static void activityLoggingGetterPerWorldBindingsLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2416 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2417 TestObjectPythonV8Internal::activityLoggingGetterPerWorldBindingsLongAttributeAttributeSetter(jsValue, info);
2418 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2421 static void activityLoggingGetterPerWorldBindingsLongAttributeAttributeGetterForMainWorld(const v8::PropertyCallbackInfo<v8::Value>& info)
2423 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
2424 v8SetReturnValueInt(info, imp->activityLoggingGetterPerWorldBindingsLongAttribute());
2427 static void activityLoggingGetterPerWorldBindingsLongAttributeAttributeGetterCallbackForMainWorld(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2429 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2430 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->GetCurrentContext());
2431 if (contextData && contextData->activityLogger())
2432 contextData->activityLogger()->log("TestObjectPython.activityLoggingGetterPerWorldBindingsLongAttribute", 0, 0, "Getter");
2433 TestObjectPythonV8Internal::activityLoggingGetterPerWorldBindingsLongAttributeAttributeGetterForMainWorld(info);
2434 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2437 static void activityLoggingGetterPerWorldBindingsLongAttributeAttributeSetterForMainWorld(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2439 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggingGetterPerWorldBindingsLongAttribute", "TestObjectPython", info.Holder(), info.GetIsolate());
2440 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
2441 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), exceptionState);
2442 imp->setActivityLoggingGetterPerWorldBindingsLongAttribute(cppValue);
2445 static void activityLoggingGetterPerWorldBindingsLongAttributeAttributeSetterCallbackForMainWorld(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2447 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2448 TestObjectPythonV8Internal::activityLoggingGetterPerWorldBindingsLongAttributeAttributeSetterForMainWorld(jsValue, info);
2449 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2452 static void activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
2454 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
2455 v8SetReturnValueInt(info, imp->activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttribute());
2458 static void activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2460 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2461 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->GetCurrentContext());
2462 if (contextData && contextData->activityLogger())
2463 contextData->activityLogger()->log("TestObjectPython.activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttribute", 0, 0, "Getter");
2464 TestObjectPythonV8Internal::activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeAttributeGetter(info);
2465 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2468 static void activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2470 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttribute", "TestObjectPython", info.Holder(), info.GetIsolate());
2471 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
2472 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), exceptionState);
2473 imp->setActivityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttribute(cppValue);
2476 static void activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2478 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2479 TestObjectPythonV8Internal::activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeAttributeSetter(jsValue, info);
2480 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2483 static void activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeAttributeGetterForMainWorld(const v8::PropertyCallbackInfo<v8::Value>& info)
2485 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
2486 v8SetReturnValueInt(info, imp->activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttribute());
2489 static void activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeAttributeGetterCallbackForMainWorld(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2491 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2492 TestObjectPythonV8Internal::activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeAttributeGetterForMainWorld(info);
2493 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2496 static void activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeAttributeSetterForMainWorld(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2498 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttribute", "TestObjectPython", info.Holder(), info.GetIsolate());
2499 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
2500 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), exceptionState);
2501 imp->setActivityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttribute(cppValue);
2504 static void activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeAttributeSetterCallbackForMainWorld(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2506 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2507 TestObjectPythonV8Internal::activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeAttributeSetterForMainWorld(jsValue, info);
2508 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2511 static void locationAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
2513 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
2514 v8SetReturnValueFast(info, imp->location(), imp);
2517 static void locationAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2519 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2520 TestObjectPythonV8Internal::locationAttributeGetter(info);
2521 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2524 static void locationAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2526 TestObjectPython* proxyImp = V8TestObjectPython::toNative(info.Holder());
2527 TestNode* imp = proxyImp->location();
2530 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue);
2531 imp->setHref(cppValue);
2534 static void locationAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2536 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2537 TestObjectPythonV8Internal::locationAttributeSetter(jsValue, info);
2538 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2541 static void locationWithExceptionAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
2543 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
2544 v8SetReturnValueFast(info, imp->locationWithException(), imp);
2547 static void locationWithExceptionAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2549 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2550 TestObjectPythonV8Internal::locationWithExceptionAttributeGetter(info);
2551 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2554 static void locationWithExceptionAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2556 TestObjectPython* proxyImp = V8TestObjectPython::toNative(info.Holder());
2557 TestNode* imp = proxyImp->locationWithException();
2560 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue);
2561 imp->setHrefThrows(cppValue);
2564 static void locationWithExceptionAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2566 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2567 TestObjectPythonV8Internal::locationWithExceptionAttributeSetter(jsValue, info);
2568 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2571 static void locationWithCallWithAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
2573 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
2574 v8SetReturnValueFast(info, imp->locationWithCallWith(), imp);
2577 static void locationWithCallWithAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2579 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2580 TestObjectPythonV8Internal::locationWithCallWithAttributeGetter(info);
2581 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2584 static void locationWithCallWithAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2586 TestObjectPython* proxyImp = V8TestObjectPython::toNative(info.Holder());
2587 TestNode* imp = proxyImp->locationWithCallWith();
2590 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue);
2591 imp->setHrefCallWith(activeDOMWindow(info.GetIsolate()), firstDOMWindow(info.GetIsolate()), cppValue);
2594 static void locationWithCallWithAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2596 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2597 TestObjectPythonV8Internal::locationWithCallWithAttributeSetter(jsValue, info);
2598 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2601 static void locationWithPerWorldBindingsAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
2603 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
2604 v8SetReturnValueFast(info, imp->locationWithPerWorldBindings(), imp);
2607 static void locationWithPerWorldBindingsAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2609 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2610 TestObjectPythonV8Internal::locationWithPerWorldBindingsAttributeGetter(info);
2611 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2614 static void locationWithPerWorldBindingsAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2616 TestObjectPython* proxyImp = V8TestObjectPython::toNative(info.Holder());
2617 TestNode* imp = proxyImp->locationWithPerWorldBindings();
2620 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue);
2621 imp->setHref(cppValue);
2624 static void locationWithPerWorldBindingsAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2626 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2627 TestObjectPythonV8Internal::locationWithPerWorldBindingsAttributeSetter(jsValue, info);
2628 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2631 static void locationWithPerWorldBindingsAttributeGetterForMainWorld(const v8::PropertyCallbackInfo<v8::Value>& info)
2633 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
2634 v8SetReturnValueForMainWorld(info, imp->locationWithPerWorldBindings());
2637 static void locationWithPerWorldBindingsAttributeGetterCallbackForMainWorld(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2639 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2640 TestObjectPythonV8Internal::locationWithPerWorldBindingsAttributeGetterForMainWorld(info);
2641 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2644 static void locationWithPerWorldBindingsAttributeSetterForMainWorld(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2646 TestObjectPython* proxyImp = V8TestObjectPython::toNative(info.Holder());
2647 TestNode* imp = proxyImp->locationWithPerWorldBindings();
2650 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue);
2651 imp->setHref(cppValue);
2654 static void locationWithPerWorldBindingsAttributeSetterCallbackForMainWorld(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2656 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2657 TestObjectPythonV8Internal::locationWithPerWorldBindingsAttributeSetterForMainWorld(jsValue, info);
2658 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2661 static void raisesExceptionLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
2663 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
2664 ExceptionState exceptionState(ExceptionState::GetterContext, "raisesExceptionLongAttribute", "TestObjectPython", info.Holder(), info.GetIsolate());
2665 int jsValue = imp->raisesExceptionLongAttribute(exceptionState);
2666 if (UNLIKELY(exceptionState.throwIfNeeded()))
2668 v8SetReturnValueInt(info, jsValue);
2671 static void raisesExceptionLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2673 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2674 TestObjectPythonV8Internal::raisesExceptionLongAttributeAttributeGetter(info);
2675 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2678 static void raisesExceptionLongAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2680 ExceptionState exceptionState(ExceptionState::SetterContext, "raisesExceptionLongAttribute", "TestObjectPython", info.Holder(), info.GetIsolate());
2681 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
2682 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), exceptionState);
2683 imp->setRaisesExceptionLongAttribute(cppValue, exceptionState);
2684 exceptionState.throwIfNeeded();
2687 static void raisesExceptionLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2689 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2690 TestObjectPythonV8Internal::raisesExceptionLongAttributeAttributeSetter(jsValue, info);
2691 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2694 static void raisesExceptionGetterLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
2696 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
2697 ExceptionState exceptionState(ExceptionState::GetterContext, "raisesExceptionGetterLongAttribute", "TestObjectPython", info.Holder(), info.GetIsolate());
2698 int jsValue = imp->raisesExceptionGetterLongAttribute(exceptionState);
2699 if (UNLIKELY(exceptionState.throwIfNeeded()))
2701 v8SetReturnValueInt(info, jsValue);
2704 static void raisesExceptionGetterLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2706 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2707 TestObjectPythonV8Internal::raisesExceptionGetterLongAttributeAttributeGetter(info);
2708 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2711 static void raisesExceptionGetterLongAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2713 ExceptionState exceptionState(ExceptionState::SetterContext, "raisesExceptionGetterLongAttribute", "TestObjectPython", info.Holder(), info.GetIsolate());
2714 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
2715 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), exceptionState);
2716 imp->setRaisesExceptionGetterLongAttribute(cppValue);
2719 static void raisesExceptionGetterLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2721 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2722 TestObjectPythonV8Internal::raisesExceptionGetterLongAttributeAttributeSetter(jsValue, info);
2723 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2726 static void setterRaisesExceptionLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
2728 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
2729 v8SetReturnValueInt(info, imp->setterRaisesExceptionLongAttribute());
2732 static void setterRaisesExceptionLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2734 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2735 TestObjectPythonV8Internal::setterRaisesExceptionLongAttributeAttributeGetter(info);
2736 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2739 static void setterRaisesExceptionLongAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2741 ExceptionState exceptionState(ExceptionState::SetterContext, "setterRaisesExceptionLongAttribute", "TestObjectPython", info.Holder(), info.GetIsolate());
2742 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
2743 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), exceptionState);
2744 imp->setSetterRaisesExceptionLongAttribute(cppValue, exceptionState);
2745 exceptionState.throwIfNeeded();
2748 static void setterRaisesExceptionLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2750 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2751 TestObjectPythonV8Internal::setterRaisesExceptionLongAttributeAttributeSetter(jsValue, info);
2752 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2755 static void raisesExceptionTestInterfaceEmptyAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
2757 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
2758 ExceptionState exceptionState(ExceptionState::GetterContext, "raisesExceptionTestInterfaceEmptyAttribute", "TestObjectPython", info.Holder(), info.GetIsolate());
2759 RefPtr<TestInterfaceEmpty> jsValue = imp->raisesExceptionTestInterfaceEmptyAttribute(exceptionState);
2760 if (UNLIKELY(exceptionState.throwIfNeeded()))
2762 v8SetReturnValueFast(info, jsValue.release(), imp);
2765 static void raisesExceptionTestInterfaceEmptyAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2767 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2768 TestObjectPythonV8Internal::raisesExceptionTestInterfaceEmptyAttributeAttributeGetter(info);
2769 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2772 static void raisesExceptionTestInterfaceEmptyAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2774 ExceptionState exceptionState(ExceptionState::SetterContext, "raisesExceptionTestInterfaceEmptyAttribute", "TestObjectPython", info.Holder(), info.GetIsolate());
2775 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
2776 V8TRYCATCH_VOID(TestInterfaceEmpty*, cppValue, V8TestInterfaceEmpty::hasInstance(jsValue, info.GetIsolate()) ? V8TestInterfaceEmpty::toNative(v8::Handle<v8::Object>::Cast(jsValue)) : 0);
2777 imp->setRaisesExceptionTestInterfaceEmptyAttribute(WTF::getPtr(cppValue), exceptionState);
2778 exceptionState.throwIfNeeded();
2781 static void raisesExceptionTestInterfaceEmptyAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2783 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2784 TestObjectPythonV8Internal::raisesExceptionTestInterfaceEmptyAttributeAttributeSetter(jsValue, info);
2785 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2788 static void cachedAttributeRaisesExceptionGetterAnyAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
2790 v8::Handle<v8::String> propertyName = v8AtomicString(info.GetIsolate(), "cachedAttributeRaisesExceptionGetterAnyAttribute");
2791 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
2792 if (!imp->isValueDirty()) {
2793 v8::Handle<v8::Value> jsValue = getHiddenValue(info.GetIsolate(), info.Holder(), propertyName);
2794 if (!jsValue.IsEmpty()) {
2795 v8SetReturnValue(info, jsValue);
2799 ExceptionState exceptionState(ExceptionState::GetterContext, "cachedAttributeRaisesExceptionGetterAnyAttribute", "TestObjectPython", info.Holder(), info.GetIsolate());
2800 ScriptValue jsValue = imp->cachedAttributeRaisesExceptionGetterAnyAttribute(exceptionState);
2801 if (UNLIKELY(exceptionState.throwIfNeeded()))
2803 setHiddenValue(info.GetIsolate(), info.Holder(), propertyName, jsValue.v8Value());
2804 v8SetReturnValue(info, jsValue.v8Value());
2807 static void cachedAttributeRaisesExceptionGetterAnyAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2809 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2810 TestObjectPythonV8Internal::cachedAttributeRaisesExceptionGetterAnyAttributeAttributeGetter(info);
2811 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2814 static void cachedAttributeRaisesExceptionGetterAnyAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2816 ExceptionState exceptionState(ExceptionState::SetterContext, "cachedAttributeRaisesExceptionGetterAnyAttribute", "TestObjectPython", info.Holder(), info.GetIsolate());
2817 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
2818 V8TRYCATCH_VOID(ScriptValue, cppValue, ScriptValue(jsValue, info.GetIsolate()));
2819 imp->setCachedAttributeRaisesExceptionGetterAnyAttribute(cppValue, exceptionState);
2820 exceptionState.throwIfNeeded();
2821 deleteHiddenValue(info.GetIsolate(), info.Holder(), "cachedAttributeRaisesExceptionGetterAnyAttribute"); // Invalidate the cached value.
2824 static void cachedAttributeRaisesExceptionGetterAnyAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2826 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2827 TestObjectPythonV8Internal::cachedAttributeRaisesExceptionGetterAnyAttributeAttributeSetter(jsValue, info);
2828 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2831 static void reflectTestInterfaceAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
2833 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
2834 v8SetReturnValueFast(info, imp->fastGetAttribute(HTMLNames::reflecttestinterfaceattributeAttr), imp);
2837 static void reflectTestInterfaceAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2839 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2840 TestObjectPythonV8Internal::reflectTestInterfaceAttributeAttributeGetter(info);
2841 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2844 static void reflectTestInterfaceAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2846 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
2847 V8TRYCATCH_VOID(TestInterface*, cppValue, V8TestInterface::hasInstance(jsValue, info.GetIsolate()) ? V8TestInterface::toNative(v8::Handle<v8::Object>::Cast(jsValue)) : 0);
2848 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
2849 imp->setAttribute(HTMLNames::reflecttestinterfaceattributeAttr, WTF::getPtr(cppValue));
2852 static void reflectTestInterfaceAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2854 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2855 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
2856 TestObjectPythonV8Internal::reflectTestInterfaceAttributeAttributeSetter(jsValue, info);
2857 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2860 static void reflectReflectedNameAttributeTestAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
2862 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
2863 v8SetReturnValueFast(info, imp->fastGetAttribute(HTMLNames::reflectedNameAttributeAttr), imp);
2866 static void reflectReflectedNameAttributeTestAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2868 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2869 TestObjectPythonV8Internal::reflectReflectedNameAttributeTestAttributeAttributeGetter(info);
2870 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2873 static void reflectReflectedNameAttributeTestAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2875 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
2876 V8TRYCATCH_VOID(TestInterface*, cppValue, V8TestInterface::hasInstance(jsValue, info.GetIsolate()) ? V8TestInterface::toNative(v8::Handle<v8::Object>::Cast(jsValue)) : 0);
2877 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
2878 imp->setAttribute(HTMLNames::reflectedNameAttributeAttr, WTF::getPtr(cppValue));
2881 static void reflectReflectedNameAttributeTestAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2883 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2884 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
2885 TestObjectPythonV8Internal::reflectReflectedNameAttributeTestAttributeAttributeSetter(jsValue, info);
2886 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2889 static void reflectBooleanAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
2891 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
2892 v8SetReturnValueBool(info, imp->fastHasAttribute(HTMLNames::reflectbooleanattributeAttr));
2895 static void reflectBooleanAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2897 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2898 TestObjectPythonV8Internal::reflectBooleanAttributeAttributeGetter(info);
2899 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2902 static void reflectBooleanAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2904 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
2905 V8TRYCATCH_VOID(bool, cppValue, jsValue->BooleanValue());
2906 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
2907 imp->setBooleanAttribute(HTMLNames::reflectbooleanattributeAttr, cppValue);
2910 static void reflectBooleanAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2912 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2913 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
2914 TestObjectPythonV8Internal::reflectBooleanAttributeAttributeSetter(jsValue, info);
2915 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2918 static void reflectLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
2920 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
2921 v8SetReturnValueInt(info, imp->getIntegralAttribute(HTMLNames::reflectlongattributeAttr));
2924 static void reflectLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2926 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2927 TestObjectPythonV8Internal::reflectLongAttributeAttributeGetter(info);
2928 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2931 static void reflectLongAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2933 ExceptionState exceptionState(ExceptionState::SetterContext, "reflectLongAttribute", "TestObjectPython", info.Holder(), info.GetIsolate());
2934 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
2935 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), exceptionState);
2936 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
2937 imp->setIntegralAttribute(HTMLNames::reflectlongattributeAttr, cppValue);
2940 static void reflectLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2942 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2943 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
2944 TestObjectPythonV8Internal::reflectLongAttributeAttributeSetter(jsValue, info);
2945 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2948 static void reflectUnsignedShortAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
2950 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
2951 v8SetReturnValueUnsigned(info, std::max(0, imp->fastGetAttribute(HTMLNames::reflectunsignedshortattributeAttr)));
2954 static void reflectUnsignedShortAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2956 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2957 TestObjectPythonV8Internal::reflectUnsignedShortAttributeAttributeGetter(info);
2958 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2961 static void reflectUnsignedShortAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2963 ExceptionState exceptionState(ExceptionState::SetterContext, "reflectUnsignedShortAttribute", "TestObjectPython", info.Holder(), info.GetIsolate());
2964 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
2965 V8TRYCATCH_EXCEPTION_VOID(unsigned, cppValue, toUInt16(jsValue, exceptionState), exceptionState);
2966 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
2967 imp->setAttribute(HTMLNames::reflectunsignedshortattributeAttr, cppValue);
2970 static void reflectUnsignedShortAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2972 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2973 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
2974 TestObjectPythonV8Internal::reflectUnsignedShortAttributeAttributeSetter(jsValue, info);
2975 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2978 static void reflectUnsignedLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
2980 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
2981 v8SetReturnValueUnsigned(info, std::max(0, imp->getIntegralAttribute(HTMLNames::reflectunsignedlongattributeAttr)));
2984 static void reflectUnsignedLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2986 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2987 TestObjectPythonV8Internal::reflectUnsignedLongAttributeAttributeGetter(info);
2988 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2991 static void reflectUnsignedLongAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2993 ExceptionState exceptionState(ExceptionState::SetterContext, "reflectUnsignedLongAttribute", "TestObjectPython", info.Holder(), info.GetIsolate());
2994 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
2995 V8TRYCATCH_EXCEPTION_VOID(unsigned, cppValue, toUInt32(jsValue, exceptionState), exceptionState);
2996 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
2997 imp->setUnsignedIntegralAttribute(HTMLNames::reflectunsignedlongattributeAttr, cppValue);
3000 static void reflectUnsignedLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
3002 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
3003 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
3004 TestObjectPythonV8Internal::reflectUnsignedLongAttributeAttributeSetter(jsValue, info);
3005 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3008 static void idAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
3010 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
3011 v8SetReturnValueString(info, imp->getIdAttribute(), info.GetIsolate());
3014 static void idAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3016 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3017 TestObjectPythonV8Internal::idAttributeGetter(info);
3018 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3021 static void idAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
3023 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
3024 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue);
3025 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
3026 imp->setAttribute(HTMLNames::idAttr, cppValue);
3029 static void idAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
3031 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
3032 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
3033 TestObjectPythonV8Internal::idAttributeSetter(jsValue, info);
3034 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3037 static void nameAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
3039 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
3040 v8SetReturnValueString(info, imp->getNameAttribute(), info.GetIsolate());
3043 static void nameAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3045 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3046 TestObjectPythonV8Internal::nameAttributeGetter(info);
3047 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3050 static void nameAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
3052 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
3053 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue);
3054 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
3055 imp->setAttribute(HTMLNames::nameAttr, cppValue);
3058 static void nameAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
3060 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
3061 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
3062 TestObjectPythonV8Internal::nameAttributeSetter(jsValue, info);
3063 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3066 static void classAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
3068 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
3069 v8SetReturnValueString(info, imp->getClassAttribute(), info.GetIsolate());
3072 static void classAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3074 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3075 TestObjectPythonV8Internal::classAttributeGetter(info);
3076 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3079 static void classAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
3081 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
3082 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue);
3083 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
3084 imp->setAttribute(HTMLNames::classAttr, cppValue);
3087 static void classAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
3089 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
3090 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
3091 TestObjectPythonV8Internal::classAttributeSetter(jsValue, info);
3092 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3095 static void reflectedIdAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
3097 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
3098 v8SetReturnValueString(info, imp->getIdAttribute(), info.GetIsolate());
3101 static void reflectedIdAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3103 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3104 TestObjectPythonV8Internal::reflectedIdAttributeGetter(info);
3105 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3108 static void reflectedIdAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
3110 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
3111 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue);
3112 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
3113 imp->setAttribute(HTMLNames::idAttr, cppValue);
3116 static void reflectedIdAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
3118 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
3119 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
3120 TestObjectPythonV8Internal::reflectedIdAttributeSetter(jsValue, info);
3121 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3124 static void reflectedNameAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
3126 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
3127 v8SetReturnValueString(info, imp->getNameAttribute(), info.GetIsolate());
3130 static void reflectedNameAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3132 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3133 TestObjectPythonV8Internal::reflectedNameAttributeGetter(info);
3134 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3137 static void reflectedNameAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
3139 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
3140 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue);
3141 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
3142 imp->setAttribute(HTMLNames::nameAttr, cppValue);
3145 static void reflectedNameAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
3147 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
3148 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
3149 TestObjectPythonV8Internal::reflectedNameAttributeSetter(jsValue, info);
3150 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3153 static void reflectedClassAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
3155 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
3156 v8SetReturnValueString(info, imp->getClassAttribute(), info.GetIsolate());
3159 static void reflectedClassAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3161 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3162 TestObjectPythonV8Internal::reflectedClassAttributeGetter(info);
3163 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3166 static void reflectedClassAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
3168 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
3169 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue);
3170 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
3171 imp->setAttribute(HTMLNames::classAttr, cppValue);
3174 static void reflectedClassAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
3176 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
3177 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
3178 TestObjectPythonV8Internal::reflectedClassAttributeSetter(jsValue, info);
3179 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3182 static void limitedToOnlyOneAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
3184 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
3185 String resultValue = imp->fastGetAttribute(HTMLNames::limitedtoonlyoneattributeAttr);
3186 if (resultValue.isEmpty()) {
3188 } else if (equalIgnoringCase(resultValue, "unique")) {
3189 resultValue = "unique";
3193 v8SetReturnValueString(info, resultValue, info.GetIsolate());
3196 static void limitedToOnlyOneAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3198 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3199 TestObjectPythonV8Internal::limitedToOnlyOneAttributeAttributeGetter(info);
3200 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3203 static void limitedToOnlyOneAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
3205 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
3206 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue);
3207 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
3208 imp->setAttribute(HTMLNames::limitedtoonlyoneattributeAttr, cppValue);
3211 static void limitedToOnlyOneAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
3213 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
3214 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
3215 TestObjectPythonV8Internal::limitedToOnlyOneAttributeAttributeSetter(jsValue, info);
3216 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3219 static void limitedToOnlyAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
3221 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
3222 String resultValue = imp->fastGetAttribute(HTMLNames::limitedtoonlyattributeAttr);
3223 if (resultValue.isEmpty()) {
3225 } else if (equalIgnoringCase(resultValue, "Per")) {
3226 resultValue = "Per";
3227 } else if (equalIgnoringCase(resultValue, "Paal")) {
3228 resultValue = "Paal";
3229 } else if (equalIgnoringCase(resultValue, "Espen")) {
3230 resultValue = "Espen";
3234 v8SetReturnValueString(info, resultValue, info.GetIsolate());
3237 static void limitedToOnlyAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3239 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3240 TestObjectPythonV8Internal::limitedToOnlyAttributeAttributeGetter(info);
3241 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3244 static void limitedToOnlyAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
3246 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
3247 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue);
3248 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
3249 imp->setAttribute(HTMLNames::limitedtoonlyattributeAttr, cppValue);
3252 static void limitedToOnlyAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
3254 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
3255 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
3256 TestObjectPythonV8Internal::limitedToOnlyAttributeAttributeSetter(jsValue, info);
3257 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3260 static void limitedToOnlyOtherAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
3262 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
3263 String resultValue = imp->fastGetAttribute(HTMLNames::OtherAttr);
3264 if (resultValue.isEmpty()) {
3266 } else if (equalIgnoringCase(resultValue, "Value1")) {
3267 resultValue = "Value1";
3268 } else if (equalIgnoringCase(resultValue, "Value2")) {
3269 resultValue = "Value2";
3273 v8SetReturnValueString(info, resultValue, info.GetIsolate());
3276 static void limitedToOnlyOtherAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3278 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3279 TestObjectPythonV8Internal::limitedToOnlyOtherAttributeAttributeGetter(info);
3280 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3283 static void limitedToOnlyOtherAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
3285 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
3286 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue);
3287 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
3288 imp->setAttribute(HTMLNames::OtherAttr, cppValue);
3291 static void limitedToOnlyOtherAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
3293 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
3294 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
3295 TestObjectPythonV8Internal::limitedToOnlyOtherAttributeAttributeSetter(jsValue, info);
3296 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3299 static void limitedWithMissingDefaultAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
3301 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
3302 String resultValue = imp->fastGetAttribute(HTMLNames::limitedwithmissingdefaultattributeAttr);
3303 if (resultValue.isEmpty()) {
3304 resultValue = "rsa";
3305 } else if (equalIgnoringCase(resultValue, "rsa")) {
3306 resultValue = "rsa";
3307 } else if (equalIgnoringCase(resultValue, "dsa")) {
3308 resultValue = "dsa";
3312 v8SetReturnValueString(info, resultValue, info.GetIsolate());
3315 static void limitedWithMissingDefaultAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3317 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3318 TestObjectPythonV8Internal::limitedWithMissingDefaultAttributeAttributeGetter(info);
3319 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3322 static void limitedWithMissingDefaultAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
3324 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
3325 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue);
3326 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
3327 imp->setAttribute(HTMLNames::limitedwithmissingdefaultattributeAttr, cppValue);
3330 static void limitedWithMissingDefaultAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
3332 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
3333 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
3334 TestObjectPythonV8Internal::limitedWithMissingDefaultAttributeAttributeSetter(jsValue, info);
3335 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3338 static void limitedWithInvalidMissingDefaultAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
3340 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
3341 String resultValue = imp->fastGetAttribute(HTMLNames::limitedwithinvalidmissingdefaultattributeAttr);
3342 if (resultValue.isEmpty()) {
3343 resultValue = "auto";
3344 } else if (equalIgnoringCase(resultValue, "ltr")) {
3345 resultValue = "ltr";
3346 } else if (equalIgnoringCase(resultValue, "rtl")) {
3347 resultValue = "rtl";
3348 } else if (equalIgnoringCase(resultValue, "auto")) {
3349 resultValue = "auto";
3351 resultValue = "ltr";
3353 v8SetReturnValueString(info, resultValue, info.GetIsolate());
3356 static void limitedWithInvalidMissingDefaultAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3358 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3359 TestObjectPythonV8Internal::limitedWithInvalidMissingDefaultAttributeAttributeGetter(info);
3360 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3363 static void limitedWithInvalidMissingDefaultAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
3365 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
3366 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue);
3367 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
3368 imp->setAttribute(HTMLNames::limitedwithinvalidmissingdefaultattributeAttr, cppValue);
3371 static void limitedWithInvalidMissingDefaultAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
3373 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
3374 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
3375 TestObjectPythonV8Internal::limitedWithInvalidMissingDefaultAttributeAttributeSetter(jsValue, info);
3376 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3379 static void corsSettingAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
3381 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
3382 String resultValue = imp->fastGetAttribute(HTMLNames::corssettingattributeAttr);
3383 if (resultValue.isNull()) {
3385 } else if (resultValue.isEmpty()) {
3386 resultValue = "anonymous";
3387 } else if (equalIgnoringCase(resultValue, "anonymous")) {
3388 resultValue = "anonymous";
3389 } else if (equalIgnoringCase(resultValue, "use-credentials")) {
3390 resultValue = "use-credentials";
3392 resultValue = "anonymous";
3394 v8SetReturnValueString(info, resultValue, info.GetIsolate());
3397 static void corsSettingAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3399 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3400 TestObjectPythonV8Internal::corsSettingAttributeAttributeGetter(info);
3401 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3404 static void limitedWithEmptyMissingInvalidAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
3406 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
3407 String resultValue = imp->fastGetAttribute(HTMLNames::limitedwithemptymissinginvalidattributeAttr);
3408 if (resultValue.isNull()) {
3409 resultValue = "missing";
3410 } else if (resultValue.isEmpty()) {
3411 resultValue = "empty";
3412 } else if (equalIgnoringCase(resultValue, "empty")) {
3413 resultValue = "empty";
3414 } else if (equalIgnoringCase(resultValue, "missing")) {
3415 resultValue = "missing";
3416 } else if (equalIgnoringCase(resultValue, "invalid")) {
3417 resultValue = "invalid";
3418 } else if (equalIgnoringCase(resultValue, "a-normal")) {
3419 resultValue = "a-normal";
3421 resultValue = "invalid";
3423 v8SetReturnValueString(info, resultValue, info.GetIsolate());
3426 static void limitedWithEmptyMissingInvalidAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3428 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3429 TestObjectPythonV8Internal::limitedWithEmptyMissingInvalidAttributeAttributeGetter(info);
3430 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3433 static void replaceableReadonlyLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
3435 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
3436 v8SetReturnValueInt(info, imp->replaceableReadonlyLongAttribute());
3439 static void replaceableReadonlyLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3441 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3442 TestObjectPythonV8Internal::replaceableReadonlyLongAttributeAttributeGetter(info);
3443 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3446 static void locationReplaceableAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
3448 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
3449 v8SetReturnValueFast(info, imp->locationReplaceable(), imp);
3452 static void locationReplaceableAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3454 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3455 TestObjectPythonV8Internal::locationReplaceableAttributeGetter(info);
3456 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3459 static void locationReplaceableAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
3461 TestObjectPython* proxyImp = V8TestObjectPython::toNative(info.Holder());
3462 TestNode* imp = proxyImp->locationReplaceable();
3465 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue);
3466 imp->setHref(cppValue);
3469 static void locationReplaceableAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
3471 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
3472 TestObjectPythonV8Internal::locationReplaceableAttributeSetter(jsValue, info);
3473 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3476 static void runtimeEnabledLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
3478 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
3479 v8SetReturnValueInt(info, imp->runtimeEnabledLongAttribute());
3482 static void runtimeEnabledLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3484 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3485 TestObjectPythonV8Internal::runtimeEnabledLongAttributeAttributeGetter(info);
3486 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3489 static void runtimeEnabledLongAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
3491 ExceptionState exceptionState(ExceptionState::SetterContext, "runtimeEnabledLongAttribute", "TestObjectPython", info.Holder(), info.GetIsolate());
3492 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
3493 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), exceptionState);
3494 imp->setRuntimeEnabledLongAttribute(cppValue);
3497 static void runtimeEnabledLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
3499 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
3500 TestObjectPythonV8Internal::runtimeEnabledLongAttributeAttributeSetter(jsValue, info);
3501 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3504 static void perContextEnabledRuntimeEnabledLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
3506 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
3507 v8SetReturnValueInt(info, imp->perContextEnabledRuntimeEnabledLongAttribute());
3510 static void perContextEnabledRuntimeEnabledLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3512 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3513 TestObjectPythonV8Internal::perContextEnabledRuntimeEnabledLongAttributeAttributeGetter(info);
3514 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3517 static void perContextEnabledRuntimeEnabledLongAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
3519 ExceptionState exceptionState(ExceptionState::SetterContext, "perContextEnabledRuntimeEnabledLongAttribute", "TestObjectPython", info.Holder(), info.GetIsolate());
3520 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
3521 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), exceptionState);
3522 imp->setPerContextEnabledRuntimeEnabledLongAttribute(cppValue);
3525 static void perContextEnabledRuntimeEnabledLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
3527 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
3528 TestObjectPythonV8Internal::perContextEnabledRuntimeEnabledLongAttributeAttributeSetter(jsValue, info);
3529 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3532 #if ENABLE(CONDITION)
3533 static void conditionalRuntimeEnabledLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
3535 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
3536 v8SetReturnValueInt(info, imp->conditionalRuntimeEnabledLongAttribute());
3538 #endif // ENABLE(CONDITION)
3540 #if ENABLE(CONDITION)
3541 static void conditionalRuntimeEnabledLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3543 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3544 TestObjectPythonV8Internal::conditionalRuntimeEnabledLongAttributeAttributeGetter(info);
3545 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3547 #endif // ENABLE(CONDITION)
3549 #if ENABLE(CONDITION)
3550 static void conditionalRuntimeEnabledLongAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
3552 ExceptionState exceptionState(ExceptionState::SetterContext, "conditionalRuntimeEnabledLongAttribute", "TestObjectPython", info.Holder(), info.GetIsolate());
3553 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
3554 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), exceptionState);
3555 imp->setConditionalRuntimeEnabledLongAttribute(cppValue);
3557 #endif // ENABLE(CONDITION)
3559 #if ENABLE(CONDITION)
3560 static void conditionalRuntimeEnabledLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
3562 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
3563 TestObjectPythonV8Internal::conditionalRuntimeEnabledLongAttributeAttributeSetter(jsValue, info);
3564 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3566 #endif // ENABLE(CONDITION)
3568 static void setterCallWithActiveWindowAndFirstWindowStringAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
3570 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
3571 v8SetReturnValueString(info, imp->setterCallWithActiveWindowAndFirstWindowStringAttribute(), info.GetIsolate());
3574 static void setterCallWithActiveWindowAndFirstWindowStringAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3576 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3577 TestObjectPythonV8Internal::setterCallWithActiveWindowAndFirstWindowStringAttributeAttributeGetter(info);
3578 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3581 static void setterCallWithActiveWindowAndFirstWindowStringAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
3583 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
3584 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue);
3585 imp->setSetterCallWithActiveWindowAndFirstWindowStringAttribute(activeDOMWindow(info.GetIsolate()), firstDOMWindow(info.GetIsolate()), cppValue);
3588 static void setterCallWithActiveWindowAndFirstWindowStringAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
3590 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
3591 TestObjectPythonV8Internal::setterCallWithActiveWindowAndFirstWindowStringAttributeAttributeSetter(jsValue, info);
3592 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3595 static void setterCallWithExecutionContextStringAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
3597 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
3598 v8SetReturnValueString(info, imp->setterCallWithExecutionContextStringAttribute(), info.GetIsolate());
3601 static void setterCallWithExecutionContextStringAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3603 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3604 TestObjectPythonV8Internal::setterCallWithExecutionContextStringAttributeAttributeGetter(info);
3605 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3608 static void setterCallWithExecutionContextStringAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
3610 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
3611 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue);
3612 ExecutionContext* scriptContext = currentExecutionContext(info.GetIsolate());
3613 imp->setSetterCallWithExecutionContextStringAttribute(scriptContext, cppValue);
3616 static void setterCallWithExecutionContextStringAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
3618 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
3619 TestObjectPythonV8Internal::setterCallWithExecutionContextStringAttributeAttributeSetter(jsValue, info);
3620 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3623 static void strictTypeCheckingFloatAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
3625 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
3626 v8SetReturnValue(info, imp->strictTypeCheckingFloatAttribute());
3629 static void strictTypeCheckingFloatAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3631 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3632 TestObjectPythonV8Internal::strictTypeCheckingFloatAttributeAttributeGetter(info);
3633 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3636 static void strictTypeCheckingFloatAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
3638 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
3639 V8TRYCATCH_VOID(float, cppValue, static_cast<float>(jsValue->NumberValue()));
3640 imp->setStrictTypeCheckingFloatAttribute(cppValue);
3643 static void strictTypeCheckingFloatAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
3645 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
3646 TestObjectPythonV8Internal::strictTypeCheckingFloatAttributeAttributeSetter(jsValue, info);
3647 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3650 static void strictTypeCheckingTestInterfaceAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
3652 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
3653 v8SetReturnValueFast(info, imp->strictTypeCheckingTestInterfaceAttribute(), imp);
3656 static void strictTypeCheckingTestInterfaceAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3658 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3659 TestObjectPythonV8Internal::strictTypeCheckingTestInterfaceAttributeAttributeGetter(info);
3660 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3663 static void strictTypeCheckingTestInterfaceAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
3665 ExceptionState exceptionState(ExceptionState::SetterContext, "strictTypeCheckingTestInterfaceAttribute", "TestObjectPython", info.Holder(), info.GetIsolate());
3666 if (!isUndefinedOrNull(jsValue) && !V8TestInterface::hasInstance(jsValue, info.GetIsolate())) {
3667 exceptionState.throwTypeError("The provided value is not of type 'TestInterface'.");
3668 exceptionState.throwIfNeeded();
3671 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
3672 V8TRYCATCH_VOID(TestInterface*, cppValue, V8TestInterface::hasInstance(jsValue, info.GetIsolate()) ? V8TestInterface::toNative(v8::Handle<v8::Object>::Cast(jsValue)) : 0);
3673 imp->setStrictTypeCheckingTestInterfaceAttribute(WTF::getPtr(cppValue));
3676 static void strictTypeCheckingTestInterfaceAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
3678 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
3679 TestObjectPythonV8Internal::strictTypeCheckingTestInterfaceAttributeAttributeSetter(jsValue, info);
3680 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3683 static void treatNullAsNullStringStringAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
3685 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
3686 v8SetReturnValueString(info, imp->treatNullAsNullStringStringAttribute(), info.GetIsolate());
3689 static void treatNullAsNullStringStringAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3691 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3692 TestObjectPythonV8Internal::treatNullAsNullStringStringAttributeAttributeGetter(info);
3693 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3696 static void treatNullAsNullStringStringAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
3698 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
3699 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithNullCheck>, cppValue, jsValue);
3700 imp->setTreatNullAsNullStringStringAttribute(cppValue);
3703 static void treatNullAsNullStringStringAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
3705 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
3706 TestObjectPythonV8Internal::treatNullAsNullStringStringAttributeAttributeSetter(jsValue, info);
3707 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3710 static void treatReturnedNullStringAsNullStringAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
3712 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
3713 v8SetReturnValueStringOrNull(info, imp->treatReturnedNullStringAsNullStringAttribute(), info.GetIsolate());
3716 static void treatReturnedNullStringAsNullStringAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3718 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3719 TestObjectPythonV8Internal::treatReturnedNullStringAsNullStringAttributeAttributeGetter(info);
3720 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3723 static void treatReturnedNullStringAsNullStringAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
3725 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
3726 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue);
3727 imp->setTreatReturnedNullStringAsNullStringAttribute(cppValue);
3730 static void treatReturnedNullStringAsNullStringAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
3732 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
3733 TestObjectPythonV8Internal::treatReturnedNullStringAsNullStringAttributeAttributeSetter(jsValue, info);
3734 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3737 static void treatReturnedNullStringAsUndefinedStringAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
3739 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
3740 v8SetReturnValueStringOrUndefined(info, imp->treatReturnedNullStringAsUndefinedStringAttribute(), info.GetIsolate());
3743 static void treatReturnedNullStringAsUndefinedStringAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3745 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3746 TestObjectPythonV8Internal::treatReturnedNullStringAsUndefinedStringAttributeAttributeGetter(info);
3747 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3750 static void treatReturnedNullStringAsUndefinedStringAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
3752 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
3753 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue);
3754 imp->setTreatReturnedNullStringAsUndefinedStringAttribute(cppValue);
3757 static void treatReturnedNullStringAsUndefinedStringAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
3759 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
3760 TestObjectPythonV8Internal::treatReturnedNullStringAsUndefinedStringAttributeAttributeSetter(jsValue, info);
3761 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3764 static void urlStringAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
3766 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
3767 v8SetReturnValueString(info, imp->getURLAttribute(HTMLNames::urlstringattributeAttr), info.GetIsolate());
3770 static void urlStringAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3772 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3773 TestObjectPythonV8Internal::urlStringAttributeAttributeGetter(info);
3774 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3777 static void urlStringAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
3779 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
3780 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue);
3781 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
3782 imp->setAttribute(HTMLNames::urlstringattributeAttr, cppValue);
3785 static void urlStringAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
3787 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
3788 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
3789 TestObjectPythonV8Internal::urlStringAttributeAttributeSetter(jsValue, info);
3790 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3793 static void urlStringAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
3795 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
3796 v8SetReturnValueString(info, imp->getURLAttribute(HTMLNames::ReflectUrlAttributeAttr), info.GetIsolate());
3799 static void urlStringAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3801 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3802 TestObjectPythonV8Internal::urlStringAttributeAttributeGetter(info);
3803 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3806 static void urlStringAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
3808 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
3809 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue);
3810 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
3811 imp->setAttribute(HTMLNames::ReflectUrlAttributeAttr, cppValue);
3814 static void urlStringAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
3816 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
3817 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
3818 TestObjectPythonV8Internal::urlStringAttributeAttributeSetter(jsValue, info);
3819 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3822 static void unforgeableLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
3824 v8::Handle<v8::Object> holder = info.This()->FindInstanceInPrototypeChain(V8TestObjectPython::domTemplate(info.GetIsolate(), worldType(info.GetIsolate())));
3825 if (holder.IsEmpty())
3827 TestObjectPython* imp = V8TestObjectPython::toNative(holder);
3828 v8SetReturnValueInt(info, imp->unforgeableLongAttribute());
3831 static void unforgeableLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3833 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3834 TestObjectPythonV8Internal::unforgeableLongAttributeAttributeGetter(info);
3835 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3838 static void unforgeableLongAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
3840 ExceptionState exceptionState(ExceptionState::SetterContext, "unforgeableLongAttribute", "TestObjectPython", info.Holder(), info.GetIsolate());
3841 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
3842 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), exceptionState);
3843 imp->setUnforgeableLongAttribute(cppValue);
3846 static void unforgeableLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
3848 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
3849 TestObjectPythonV8Internal::unforgeableLongAttributeAttributeSetter(jsValue, info);
3850 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3853 static void anotherStringAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
3855 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
3856 v8SetReturnValueString(info, imp->fastGetAttribute(HTMLNames::ReflectUrlAttributeAsAStringAttr), info.GetIsolate());
3859 static void anotherStringAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3861 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3862 TestObjectPythonV8Internal::anotherStringAttributeAttributeGetter(info);
3863 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3866 static void anotherStringAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
3868 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
3869 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue);
3870 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
3871 imp->setAttribute(HTMLNames::ReflectUrlAttributeAsAStringAttr, cppValue);
3874 static void anotherStringAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
3876 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
3877 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
3878 TestObjectPythonV8Internal::anotherStringAttributeAttributeSetter(jsValue, info);
3879 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3882 static void testInterfacePythonAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
3884 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
3885 v8SetReturnValueFast(info, imp->testInterfacePythonAttribute(), imp);
3888 static void testInterfacePythonAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3890 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3891 TestObjectPythonV8Internal::testInterfacePythonAttributeAttributeGetter(info);
3892 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3895 static void testInterfacePythonAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
3897 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
3898 V8TRYCATCH_VOID(TestInterfacePythonImplementation*, cppValue, V8TestInterfacePython::hasInstance(jsValue, info.GetIsolate()) ? V8TestInterfacePython::toNative(v8::Handle<v8::Object>::Cast(jsValue)) : 0);
3899 imp->setTestInterfacePythonAttribute(WTF::getPtr(cppValue));
3902 static void testInterfacePythonAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
3904 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
3905 TestObjectPythonV8Internal::testInterfacePythonAttributeAttributeSetter(jsValue, info);
3906 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3909 static void testInterfaceWillBeGarbageCollectedAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
3911 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
3912 bool isNull = false;
3913 RefPtrWillBeRawPtr<TestInterfaceWillBeGarbageCollected> jsValue = imp->testInterfaceWillBeGarbageCollectedAttribute(isNull);
3915 v8SetReturnValueNull(info);
3918 v8SetReturnValueFast(info, jsValue.release(), imp);
3921 static void testInterfaceWillBeGarbageCollectedAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3923 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3924 TestObjectPythonV8Internal::testInterfaceWillBeGarbageCollectedAttributeAttributeGetter(info);
3925 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3928 static void testInterfaceWillBeGarbageCollectedAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
3930 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
3931 V8TRYCATCH_VOID(TestInterfaceWillBeGarbageCollected*, cppValue, V8TestInterfaceWillBeGarbageCollected::hasInstance(jsValue, info.GetIsolate()) ? V8TestInterfaceWillBeGarbageCollected::toNative(v8::Handle<v8::Object>::Cast(jsValue)) : 0);
3932 imp->setTestInterfaceWillBeGarbageCollectedAttribute(WTF::getPtr(cppValue));
3935 static void testInterfaceWillBeGarbageCollectedAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
3937 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
3938 TestObjectPythonV8Internal::testInterfaceWillBeGarbageCollectedAttributeAttributeSetter(jsValue, info);
3939 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3942 static void TestObjectPythonConstructorGetter(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3944 v8::Handle<v8::Value> data = info.Data();
3945 ASSERT(data->IsExternal());
3946 V8PerContextData* perContextData = V8PerContextData::from(info.Holder()->CreationContext());
3947 if (!perContextData)
3949 v8SetReturnValue(info, perContextData->constructorForType(WrapperTypeInfo::unwrap(data)));
3952 static void TestObjectPythonReplaceableAttributeSetter(v8::Local<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
3954 info.This()->ForceSet(name, jsValue);
3957 static void TestObjectPythonReplaceableAttributeSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
3959 TestObjectPythonV8Internal::TestObjectPythonReplaceableAttributeSetter(name, jsValue, info);
3962 static void voidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
3964 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
3968 static void voidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
3970 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3971 TestObjectPythonV8Internal::voidMethodMethod(info);
3972 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3975 static void staticVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
3977 TestObjectPython::staticVoidMethod();
3980 static void staticVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
3982 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3983 TestObjectPythonV8Internal::staticVoidMethodMethod(info);
3984 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3987 static void dateMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
3989 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
3990 v8SetReturnValue(info, v8DateOrNull(imp->dateMethod(), info.GetIsolate()));
3993 static void dateMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
3995 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3996 TestObjectPythonV8Internal::dateMethodMethod(info);
3997 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4000 static void stringMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4002 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
4003 v8SetReturnValueString(info, imp->stringMethod(), info.GetIsolate());
4006 static void stringMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4008 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4009 TestObjectPythonV8Internal::stringMethodMethod(info);
4010 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4013 static void readonlyDOMTimeStampMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4015 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
4016 v8SetReturnValue(info, static_cast<double>(imp->readonlyDOMTimeStampMethod()));
4019 static void readonlyDOMTimeStampMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4021 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4022 TestObjectPythonV8Internal::readonlyDOMTimeStampMethodMethod(info);
4023 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4026 static void booleanMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4028 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
4029 v8SetReturnValueBool(info, imp->booleanMethod());
4032 static void booleanMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4034 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4035 TestObjectPythonV8Internal::booleanMethodMethod(info);
4036 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4039 static void byteMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4041 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
4042 v8SetReturnValueInt(info, imp->byteMethod());
4045 static void byteMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4047 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4048 TestObjectPythonV8Internal::byteMethodMethod(info);
4049 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4052 static void doubleMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4054 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
4055 v8SetReturnValue(info, imp->doubleMethod());
4058 static void doubleMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4060 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4061 TestObjectPythonV8Internal::doubleMethodMethod(info);
4062 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4065 static void floatMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4067 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
4068 v8SetReturnValue(info, imp->floatMethod());
4071 static void floatMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4073 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4074 TestObjectPythonV8Internal::floatMethodMethod(info);
4075 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4078 static void longMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4080 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
4081 v8SetReturnValueInt(info, imp->longMethod());
4084 static void longMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4086 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4087 TestObjectPythonV8Internal::longMethodMethod(info);
4088 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4091 static void longLongMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4093 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
4094 v8SetReturnValue(info, static_cast<double>(imp->longLongMethod()));
4097 static void longLongMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4099 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4100 TestObjectPythonV8Internal::longLongMethodMethod(info);
4101 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4104 static void octetMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4106 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
4107 v8SetReturnValueUnsigned(info, imp->octetMethod());
4110 static void octetMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4112 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4113 TestObjectPythonV8Internal::octetMethodMethod(info);
4114 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4117 static void shortMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4119 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
4120 v8SetReturnValueInt(info, imp->shortMethod());
4123 static void shortMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4125 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4126 TestObjectPythonV8Internal::shortMethodMethod(info);
4127 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4130 static void unsignedLongMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4132 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
4133 v8SetReturnValueUnsigned(info, imp->unsignedLongMethod());
4136 static void unsignedLongMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4138 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4139 TestObjectPythonV8Internal::unsignedLongMethodMethod(info);
4140 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4143 static void unsignedLongLongMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4145 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
4146 v8SetReturnValue(info, static_cast<double>(imp->unsignedLongLongMethod()));
4149 static void unsignedLongLongMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4151 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4152 TestObjectPythonV8Internal::unsignedLongLongMethodMethod(info);
4153 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4156 static void unsignedShortMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4158 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
4159 v8SetReturnValueUnsigned(info, imp->unsignedShortMethod());
4162 static void unsignedShortMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4164 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4165 TestObjectPythonV8Internal::unsignedShortMethodMethod(info);
4166 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4169 static void voidMethodDateArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4171 if (UNLIKELY(info.Length() < 1)) {
4172 throwTypeError(ExceptionMessages::failedToExecute("voidMethodDateArg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
4175 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
4176 V8TRYCATCH_VOID(double, dateArg, toCoreDate(info[0]));
4177 imp->voidMethodDateArg(dateArg);
4180 static void voidMethodDateArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4182 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4183 TestObjectPythonV8Internal::voidMethodDateArgMethod(info);
4184 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4187 static void voidMethodStringArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4189 if (UNLIKELY(info.Length() < 1)) {
4190 throwTypeError(ExceptionMessages::failedToExecute("voidMethodStringArg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
4193 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
4194 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, stringArg, info[0]);
4195 imp->voidMethodStringArg(stringArg);
4198 static void voidMethodStringArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4200 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4201 TestObjectPythonV8Internal::voidMethodStringArgMethod(info);
4202 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4205 static void voidMethodBooleanArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4207 if (UNLIKELY(info.Length() < 1)) {
4208 throwTypeError(ExceptionMessages::failedToExecute("voidMethodBooleanArg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
4211 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
4212 V8TRYCATCH_VOID(bool, booleanArg, info[0]->BooleanValue());
4213 imp->voidMethodBooleanArg(booleanArg);
4216 static void voidMethodBooleanArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4218 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4219 TestObjectPythonV8Internal::voidMethodBooleanArgMethod(info);
4220 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4223 static void voidMethodByteArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4225 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodByteArg", "TestObjectPython", info.Holder(), info.GetIsolate());
4226 if (UNLIKELY(info.Length() < 1)) {
4227 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, info.Length()));
4228 exceptionState.throwIfNeeded();
4231 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
4232 V8TRYCATCH_EXCEPTION_VOID(int, byteArg, toInt8(info[0], exceptionState), exceptionState);
4233 imp->voidMethodByteArg(byteArg);
4236 static void voidMethodByteArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4238 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4239 TestObjectPythonV8Internal::voidMethodByteArgMethod(info);
4240 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4243 static void voidMethodDoubleArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4245 if (UNLIKELY(info.Length() < 1)) {
4246 throwTypeError(ExceptionMessages::failedToExecute("voidMethodDoubleArg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
4249 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
4250 V8TRYCATCH_VOID(double, doubleArg, static_cast<double>(info[0]->NumberValue()));
4251 imp->voidMethodDoubleArg(doubleArg);
4254 static void voidMethodDoubleArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4256 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4257 TestObjectPythonV8Internal::voidMethodDoubleArgMethod(info);
4258 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4261 static void voidMethodFloatArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4263 if (UNLIKELY(info.Length() < 1)) {
4264 throwTypeError(ExceptionMessages::failedToExecute("voidMethodFloatArg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
4267 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
4268 V8TRYCATCH_VOID(float, floatArg, static_cast<float>(info[0]->NumberValue()));
4269 imp->voidMethodFloatArg(floatArg);
4272 static void voidMethodFloatArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4274 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4275 TestObjectPythonV8Internal::voidMethodFloatArgMethod(info);
4276 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4279 static void voidMethodLongArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4281 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodLongArg", "TestObjectPython", info.Holder(), info.GetIsolate());
4282 if (UNLIKELY(info.Length() < 1)) {
4283 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, info.Length()));
4284 exceptionState.throwIfNeeded();
4287 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
4288 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), exceptionState);
4289 imp->voidMethodLongArg(longArg);
4292 static void voidMethodLongArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4294 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4295 TestObjectPythonV8Internal::voidMethodLongArgMethod(info);
4296 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4299 static void voidMethodLongLongArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4301 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodLongLongArg", "TestObjectPython", info.Holder(), info.GetIsolate());
4302 if (UNLIKELY(info.Length() < 1)) {
4303 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, info.Length()));
4304 exceptionState.throwIfNeeded();
4307 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
4308 V8TRYCATCH_EXCEPTION_VOID(long long, longLongArg, toInt64(info[0], exceptionState), exceptionState);
4309 imp->voidMethodLongLongArg(longLongArg);
4312 static void voidMethodLongLongArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4314 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4315 TestObjectPythonV8Internal::voidMethodLongLongArgMethod(info);
4316 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4319 static void voidMethodOctetArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4321 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodOctetArg", "TestObjectPython", info.Holder(), info.GetIsolate());
4322 if (UNLIKELY(info.Length() < 1)) {
4323 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, info.Length()));
4324 exceptionState.throwIfNeeded();
4327 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
4328 V8TRYCATCH_EXCEPTION_VOID(unsigned, octetArg, toUInt8(info[0], exceptionState), exceptionState);
4329 imp->voidMethodOctetArg(octetArg);
4332 static void voidMethodOctetArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4334 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4335 TestObjectPythonV8Internal::voidMethodOctetArgMethod(info);
4336 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4339 static void voidMethodShortArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4341 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodShortArg", "TestObjectPython", info.Holder(), info.GetIsolate());
4342 if (UNLIKELY(info.Length() < 1)) {
4343 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, info.Length()));
4344 exceptionState.throwIfNeeded();
4347 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
4348 V8TRYCATCH_EXCEPTION_VOID(int, shortArg, toInt16(info[0], exceptionState), exceptionState);
4349 imp->voidMethodShortArg(shortArg);
4352 static void voidMethodShortArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4354 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4355 TestObjectPythonV8Internal::voidMethodShortArgMethod(info);
4356 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4359 static void voidMethodUnsignedLongArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4361 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodUnsignedLongArg", "TestObjectPython", info.Holder(), info.GetIsolate());
4362 if (UNLIKELY(info.Length() < 1)) {
4363 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, info.Length()));
4364 exceptionState.throwIfNeeded();
4367 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
4368 V8TRYCATCH_EXCEPTION_VOID(unsigned, unsignedLongArg, toUInt32(info[0], exceptionState), exceptionState);
4369 imp->voidMethodUnsignedLongArg(unsignedLongArg);
4372 static void voidMethodUnsignedLongArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4374 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4375 TestObjectPythonV8Internal::voidMethodUnsignedLongArgMethod(info);
4376 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4379 static void voidMethodUnsignedLongLongArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4381 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodUnsignedLongLongArg", "TestObjectPython", info.Holder(), info.GetIsolate());
4382 if (UNLIKELY(info.Length() < 1)) {
4383 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, info.Length()));
4384 exceptionState.throwIfNeeded();
4387 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
4388 V8TRYCATCH_EXCEPTION_VOID(unsigned long long, unsignedLongLongArg, toUInt64(info[0], exceptionState), exceptionState);
4389 imp->voidMethodUnsignedLongLongArg(unsignedLongLongArg);
4392 static void voidMethodUnsignedLongLongArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4394 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4395 TestObjectPythonV8Internal::voidMethodUnsignedLongLongArgMethod(info);
4396 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4399 static void voidMethodUnsignedShortArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4401 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodUnsignedShortArg", "TestObjectPython", info.Holder(), info.GetIsolate());
4402 if (UNLIKELY(info.Length() < 1)) {
4403 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, info.Length()));
4404 exceptionState.throwIfNeeded();
4407 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
4408 V8TRYCATCH_EXCEPTION_VOID(unsigned, unsignedShortArg, toUInt16(info[0], exceptionState), exceptionState);
4409 imp->voidMethodUnsignedShortArg(unsignedShortArg);
4412 static void voidMethodUnsignedShortArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4414 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4415 TestObjectPythonV8Internal::voidMethodUnsignedShortArgMethod(info);
4416 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4419 static void testInterfaceEmptyMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4421 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
4422 v8SetReturnValue(info, imp->testInterfaceEmptyMethod());
4425 static void testInterfaceEmptyMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4427 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4428 TestObjectPythonV8Internal::testInterfaceEmptyMethodMethod(info);
4429 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4432 static void voidMethodTestInterfaceEmptyArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4434 if (UNLIKELY(info.Length() < 1)) {
4435 throwTypeError(ExceptionMessages::failedToExecute("voidMethodTestInterfaceEmptyArg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
4438 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
4439 V8TRYCATCH_VOID(TestInterfaceEmpty*, testInterfaceEmptyArg, V8TestInterfaceEmpty::hasInstance(info[0], info.GetIsolate()) ? V8TestInterfaceEmpty::toNative(v8::Handle<v8::Object>::Cast(info[0])) : 0);
4440 imp->voidMethodTestInterfaceEmptyArg(testInterfaceEmptyArg);
4443 static void voidMethodTestInterfaceEmptyArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4445 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4446 TestObjectPythonV8Internal::voidMethodTestInterfaceEmptyArgMethod(info);
4447 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4450 static void voidMethodLongArgTestInterfaceEmptyArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4452 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodLongArgTestInterfaceEmptyArg", "TestObjectPython", info.Holder(), info.GetIsolate());
4453 if (UNLIKELY(info.Length() < 2)) {
4454 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(2, info.Length()));
4455 exceptionState.throwIfNeeded();
4458 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
4459 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), exceptionState);
4460 V8TRYCATCH_VOID(TestInterfaceEmpty*, testInterfaceEmptyArg, V8TestInterfaceEmpty::hasInstance(info[1], info.GetIsolate()) ? V8TestInterfaceEmpty::toNative(v8::Handle<v8::Object>::Cast(info[1])) : 0);
4461 imp->voidMethodLongArgTestInterfaceEmptyArg(longArg, testInterfaceEmptyArg);
4464 static void voidMethodLongArgTestInterfaceEmptyArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4466 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4467 TestObjectPythonV8Internal::voidMethodLongArgTestInterfaceEmptyArgMethod(info);
4468 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4471 static void voidCallbackFunctionMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4473 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
4474 v8SetReturnValue(info, imp->voidCallbackFunctionMethod().v8Value());
4477 static void voidCallbackFunctionMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4479 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4480 TestObjectPythonV8Internal::voidCallbackFunctionMethodMethod(info);
4481 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4484 static void anyCallbackFunctionOptionalAnyArgMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4486 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
4487 v8SetReturnValue(info, imp->anyCallbackFunctionOptionalAnyArgMethod().v8Value());
4490 static void anyCallbackFunctionOptionalAnyArgMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4492 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4493 TestObjectPythonV8Internal::anyCallbackFunctionOptionalAnyArgMethodMethod(info);
4494 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4497 static void voidMethodVoidCallbackFunctionArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4499 if (UNLIKELY(info.Length() < 1)) {
4500 throwTypeError(ExceptionMessages::failedToExecute("voidMethodVoidCallbackFunctionArg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
4503 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
4504 V8TRYCATCH_VOID(ScriptValue, voidCallbackFunctionArg, ScriptValue(info[0], info.GetIsolate()));
4505 imp->voidMethodVoidCallbackFunctionArg(voidCallbackFunctionArg);
4508 static void voidMethodVoidCallbackFunctionArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4510 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4511 TestObjectPythonV8Internal::voidMethodVoidCallbackFunctionArgMethod(info);
4512 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4515 static void voidMethodAnyCallbackFunctionOptionalAnyArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4517 if (UNLIKELY(info.Length() < 1)) {
4518 throwTypeError(ExceptionMessages::failedToExecute("voidMethodAnyCallbackFunctionOptionalAnyArg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
4521 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
4522 V8TRYCATCH_VOID(ScriptValue, anyCallbackFunctionOptionalAnyArgArg, ScriptValue(info[0], info.GetIsolate()));
4523 imp->voidMethodAnyCallbackFunctionOptionalAnyArg(anyCallbackFunctionOptionalAnyArgArg);
4526 static void voidMethodAnyCallbackFunctionOptionalAnyArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4528 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4529 TestObjectPythonV8Internal::voidMethodAnyCallbackFunctionOptionalAnyArgMethod(info);
4530 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4533 static void compareHowMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4535 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
4536 v8SetReturnValue(info, imp->compareHowMethod());
4539 static void compareHowMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4541 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4542 TestObjectPythonV8Internal::compareHowMethodMethod(info);
4543 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4546 static void anyMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4548 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
4549 v8SetReturnValue(info, imp->anyMethod().v8Value());
4552 static void anyMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4554 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4555 TestObjectPythonV8Internal::anyMethodMethod(info);
4556 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4559 static void voidMethodCompareHowArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4561 if (UNLIKELY(info.Length() < 1)) {
4562 throwTypeError(ExceptionMessages::failedToExecute("voidMethodCompareHowArg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
4565 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
4566 V8TRYCATCH_VOID(Range::CompareHow, compareHowArg, static_cast<Range::CompareHow>(info[0]->Int32Value()));
4567 imp->voidMethodCompareHowArg(compareHowArg);
4570 static void voidMethodCompareHowArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4572 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4573 TestObjectPythonV8Internal::voidMethodCompareHowArgMethod(info);
4574 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4577 static void voidMethodEventTargetArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4579 if (UNLIKELY(info.Length() < 1)) {
4580 throwTypeError(ExceptionMessages::failedToExecute("voidMethodEventTargetArg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
4583 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
4584 V8TRYCATCH_VOID(EventTarget*, eventTargetArg, V8DOMWrapper::isDOMWrapper(info[0]) ? toWrapperTypeInfo(v8::Handle<v8::Object>::Cast(info[0]))->toEventTarget(v8::Handle<v8::Object>::Cast(info[0])) : 0);
4585 imp->voidMethodEventTargetArg(eventTargetArg);
4588 static void voidMethodEventTargetArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4590 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4591 TestObjectPythonV8Internal::voidMethodEventTargetArgMethod(info);
4592 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4595 static void voidMethodMediaQueryListListenerArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4597 if (UNLIKELY(info.Length() < 1)) {
4598 throwTypeError(ExceptionMessages::failedToExecute("voidMethodMediaQueryListListenerArg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
4601 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
4602 V8TRYCATCH_VOID(RefPtr<MediaQueryListListener>, mediaQueryListListenerArg, MediaQueryListListener::create(ScriptValue(info[0], info.GetIsolate())));
4603 imp->voidMethodMediaQueryListListenerArg(mediaQueryListListenerArg);
4606 static void voidMethodMediaQueryListListenerArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4608 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4609 TestObjectPythonV8Internal::voidMethodMediaQueryListListenerArgMethod(info);
4610 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4613 static void voidMethodAnyArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4615 if (UNLIKELY(info.Length() < 1)) {
4616 throwTypeError(ExceptionMessages::failedToExecute("voidMethodAnyArg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
4619 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
4620 V8TRYCATCH_VOID(ScriptValue, anyArg, ScriptValue(info[0], info.GetIsolate()));
4621 imp->voidMethodAnyArg(anyArg);
4624 static void voidMethodAnyArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4626 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4627 TestObjectPythonV8Internal::voidMethodAnyArgMethod(info);
4628 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4631 static void voidMethodAttrArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4633 if (UNLIKELY(info.Length() < 1)) {
4634 throwTypeError(ExceptionMessages::failedToExecute("voidMethodAttrArg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
4637 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
4638 V8TRYCATCH_VOID(Attr*, attrArg, V8Attr::hasInstance(info[0], info.GetIsolate()) ? V8Attr::toNative(v8::Handle<v8::Object>::Cast(info[0])) : 0);
4639 imp->voidMethodAttrArg(attrArg);
4642 static void voidMethodAttrArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4644 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4645 TestObjectPythonV8Internal::voidMethodAttrArgMethod(info);
4646 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4649 static void voidMethodDocumentArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4651 if (UNLIKELY(info.Length() < 1)) {
4652 throwTypeError(ExceptionMessages::failedToExecute("voidMethodDocumentArg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
4655 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
4656 V8TRYCATCH_VOID(Document*, documentArg, V8Document::hasInstance(info[0], info.GetIsolate()) ? V8Document::toNative(v8::Handle<v8::Object>::Cast(info[0])) : 0);
4657 imp->voidMethodDocumentArg(documentArg);
4660 static void voidMethodDocumentArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4662 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4663 TestObjectPythonV8Internal::voidMethodDocumentArgMethod(info);
4664 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4667 static void voidMethodDocumentTypeArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4669 if (UNLIKELY(info.Length() < 1)) {
4670 throwTypeError(ExceptionMessages::failedToExecute("voidMethodDocumentTypeArg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
4673 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
4674 V8TRYCATCH_VOID(DocumentType*, documentTypeArg, V8DocumentType::hasInstance(info[0], info.GetIsolate()) ? V8DocumentType::toNative(v8::Handle<v8::Object>::Cast(info[0])) : 0);
4675 imp->voidMethodDocumentTypeArg(documentTypeArg);
4678 static void voidMethodDocumentTypeArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4680 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4681 TestObjectPythonV8Internal::voidMethodDocumentTypeArgMethod(info);
4682 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4685 static void voidMethodElementArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4687 if (UNLIKELY(info.Length() < 1)) {
4688 throwTypeError(ExceptionMessages::failedToExecute("voidMethodElementArg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
4691 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
4692 V8TRYCATCH_VOID(Element*, elementArg, V8Element::hasInstance(info[0], info.GetIsolate()) ? V8Element::toNative(v8::Handle<v8::Object>::Cast(info[0])) : 0);
4693 imp->voidMethodElementArg(elementArg);
4696 static void voidMethodElementArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4698 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4699 TestObjectPythonV8Internal::voidMethodElementArgMethod(info);
4700 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4703 static void voidMethodNodeArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4705 if (UNLIKELY(info.Length() < 1)) {
4706 throwTypeError(ExceptionMessages::failedToExecute("voidMethodNodeArg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
4709 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
4710 V8TRYCATCH_VOID(Node*, nodeArg, V8Node::hasInstance(info[0], info.GetIsolate()) ? V8Node::toNative(v8::Handle<v8::Object>::Cast(info[0])) : 0);
4711 imp->voidMethodNodeArg(nodeArg);
4714 static void voidMethodNodeArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4716 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4717 TestObjectPythonV8Internal::voidMethodNodeArgMethod(info);
4718 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4721 static void arrayBufferMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4723 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
4724 v8SetReturnValue(info, imp->arrayBufferMethod());
4727 static void arrayBufferMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4729 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4730 TestObjectPythonV8Internal::arrayBufferMethodMethod(info);
4731 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4734 static void arrayBufferViewMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4736 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
4737 v8SetReturnValue(info, imp->arrayBufferViewMethod());
4740 static void arrayBufferViewMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4742 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4743 TestObjectPythonV8Internal::arrayBufferViewMethodMethod(info);
4744 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4747 static void float32ArrayMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4749 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
4750 v8SetReturnValue(info, imp->float32ArrayMethod());
4753 static void float32ArrayMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4755 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4756 TestObjectPythonV8Internal::float32ArrayMethodMethod(info);
4757 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4760 static void int32ArrayMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4762 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
4763 v8SetReturnValue(info, imp->int32ArrayMethod());
4766 static void int32ArrayMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4768 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4769 TestObjectPythonV8Internal::int32ArrayMethodMethod(info);
4770 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4773 static void uint8ArrayMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4775 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
4776 v8SetReturnValue(info, imp->uint8ArrayMethod());
4779 static void uint8ArrayMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4781 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4782 TestObjectPythonV8Internal::uint8ArrayMethodMethod(info);
4783 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4786 static void voidMethodArrayBufferArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4788 if (UNLIKELY(info.Length() < 1)) {
4789 throwTypeError(ExceptionMessages::failedToExecute("voidMethodArrayBufferArg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
4792 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
4793 V8TRYCATCH_VOID(ArrayBuffer*, arrayBufferArg, info[0]->IsArrayBuffer() ? V8ArrayBuffer::toNative(v8::Handle<v8::ArrayBuffer>::Cast(info[0])) : 0);
4794 imp->voidMethodArrayBufferArg(arrayBufferArg);
4797 static void voidMethodArrayBufferArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4799 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4800 TestObjectPythonV8Internal::voidMethodArrayBufferArgMethod(info);
4801 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4804 static void voidMethodArrayBufferViewArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4806 if (UNLIKELY(info.Length() < 1)) {
4807 throwTypeError(ExceptionMessages::failedToExecute("voidMethodArrayBufferViewArg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
4810 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
4811 V8TRYCATCH_VOID(ArrayBufferView*, arrayBufferViewArg, info[0]->IsArrayBufferView() ? V8ArrayBufferView::toNative(v8::Handle<v8::ArrayBufferView>::Cast(info[0])) : 0);
4812 imp->voidMethodArrayBufferViewArg(arrayBufferViewArg);
4815 static void voidMethodArrayBufferViewArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4817 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4818 TestObjectPythonV8Internal::voidMethodArrayBufferViewArgMethod(info);
4819 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4822 static void voidMethodFloat32ArrayArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4824 if (UNLIKELY(info.Length() < 1)) {
4825 throwTypeError(ExceptionMessages::failedToExecute("voidMethodFloat32ArrayArg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
4828 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
4829 V8TRYCATCH_VOID(Float32Array*, float32ArrayArg, info[0]->IsFloat32Array() ? V8Float32Array::toNative(v8::Handle<v8::Float32Array>::Cast(info[0])) : 0);
4830 imp->voidMethodFloat32ArrayArg(float32ArrayArg);
4833 static void voidMethodFloat32ArrayArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4835 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4836 TestObjectPythonV8Internal::voidMethodFloat32ArrayArgMethod(info);
4837 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4840 static void voidMethodInt32ArrayArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4842 if (UNLIKELY(info.Length() < 1)) {
4843 throwTypeError(ExceptionMessages::failedToExecute("voidMethodInt32ArrayArg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
4846 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
4847 V8TRYCATCH_VOID(Int32Array*, int32ArrayArg, info[0]->IsInt32Array() ? V8Int32Array::toNative(v8::Handle<v8::Int32Array>::Cast(info[0])) : 0);
4848 imp->voidMethodInt32ArrayArg(int32ArrayArg);
4851 static void voidMethodInt32ArrayArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4853 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4854 TestObjectPythonV8Internal::voidMethodInt32ArrayArgMethod(info);
4855 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4858 static void voidMethodUint8ArrayArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4860 if (UNLIKELY(info.Length() < 1)) {
4861 throwTypeError(ExceptionMessages::failedToExecute("voidMethodUint8ArrayArg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
4864 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
4865 V8TRYCATCH_VOID(Uint8Array*, uint8ArrayArg, info[0]->IsUint8Array() ? V8Uint8Array::toNative(v8::Handle<v8::Uint8Array>::Cast(info[0])) : 0);
4866 imp->voidMethodUint8ArrayArg(uint8ArrayArg);
4869 static void voidMethodUint8ArrayArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4871 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4872 TestObjectPythonV8Internal::voidMethodUint8ArrayArgMethod(info);
4873 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4876 static void longArrayMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4878 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
4879 v8SetReturnValue(info, v8Array(imp->longArrayMethod(), info.GetIsolate()));
4882 static void longArrayMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4884 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4885 TestObjectPythonV8Internal::longArrayMethodMethod(info);
4886 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4889 static void stringArrayMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4891 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
4892 v8SetReturnValue(info, v8Array(imp->stringArrayMethod(), info.GetIsolate()));
4895 static void stringArrayMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4897 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4898 TestObjectPythonV8Internal::stringArrayMethodMethod(info);
4899 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4902 static void testInterfaceEmptyArrayMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4904 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
4905 v8SetReturnValue(info, v8Array(imp->testInterfaceEmptyArrayMethod(), info.GetIsolate()));
4908 static void testInterfaceEmptyArrayMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4910 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4911 TestObjectPythonV8Internal::testInterfaceEmptyArrayMethodMethod(info);
4912 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4915 static void voidMethodArrayLongArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4917 if (UNLIKELY(info.Length() < 1)) {
4918 throwTypeError(ExceptionMessages::failedToExecute("voidMethodArrayLongArg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
4921 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
4922 V8TRYCATCH_VOID(Vector<int>, arrayLongArg, toNativeArray<int>(info[0], 1, info.GetIsolate()));
4923 imp->voidMethodArrayLongArg(arrayLongArg);
4926 static void voidMethodArrayLongArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4928 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4929 TestObjectPythonV8Internal::voidMethodArrayLongArgMethod(info);
4930 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4933 static void voidMethodArrayStringArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4935 if (UNLIKELY(info.Length() < 1)) {
4936 throwTypeError(ExceptionMessages::failedToExecute("voidMethodArrayStringArg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
4939 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
4940 V8TRYCATCH_VOID(Vector<String>, arrayStringArg, toNativeArray<String>(info[0], 1, info.GetIsolate()));
4941 imp->voidMethodArrayStringArg(arrayStringArg);
4944 static void voidMethodArrayStringArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4946 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4947 TestObjectPythonV8Internal::voidMethodArrayStringArgMethod(info);
4948 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4951 static void voidMethodArrayTestInterfaceEmptyArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4953 if (UNLIKELY(info.Length() < 1)) {
4954 throwTypeError(ExceptionMessages::failedToExecute("voidMethodArrayTestInterfaceEmptyArg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
4957 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
4958 V8TRYCATCH_VOID(Vector<RefPtr<TestInterfaceEmpty> >, arrayTestInterfaceEmptyArg, (toRefPtrNativeArray<TestInterfaceEmpty, V8TestInterfaceEmpty>(info[0], 1, info.GetIsolate())));
4959 imp->voidMethodArrayTestInterfaceEmptyArg(arrayTestInterfaceEmptyArg);
4962 static void voidMethodArrayTestInterfaceEmptyArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4964 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4965 TestObjectPythonV8Internal::voidMethodArrayTestInterfaceEmptyArgMethod(info);
4966 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4969 static void sequenceLongMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4971 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
4972 v8SetReturnValue(info, v8Array(imp->sequenceLongMethod(), info.GetIsolate()));
4975 static void sequenceLongMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4977 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4978 TestObjectPythonV8Internal::sequenceLongMethodMethod(info);
4979 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4982 static void sequenceStringMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4984 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
4985 v8SetReturnValue(info, v8Array(imp->sequenceStringMethod(), info.GetIsolate()));
4988 static void sequenceStringMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4990 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4991 TestObjectPythonV8Internal::sequenceStringMethodMethod(info);
4992 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4995 static void sequenceTestInterfaceEmptyMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4997 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
4998 v8SetReturnValue(info, v8Array(imp->sequenceTestInterfaceEmptyMethod(), info.GetIsolate()));
5001 static void sequenceTestInterfaceEmptyMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5003 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5004 TestObjectPythonV8Internal::sequenceTestInterfaceEmptyMethodMethod(info);
5005 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5008 static void voidMethodSequenceLongArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5010 if (UNLIKELY(info.Length() < 1)) {
5011 throwTypeError(ExceptionMessages::failedToExecute("voidMethodSequenceLongArg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
5014 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
5015 V8TRYCATCH_VOID(Vector<int>, sequenceLongArg, toNativeArray<int>(info[0], 1, info.GetIsolate()));
5016 imp->voidMethodSequenceLongArg(sequenceLongArg);
5019 static void voidMethodSequenceLongArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5021 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5022 TestObjectPythonV8Internal::voidMethodSequenceLongArgMethod(info);
5023 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5026 static void voidMethodSequenceStringArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5028 if (UNLIKELY(info.Length() < 1)) {
5029 throwTypeError(ExceptionMessages::failedToExecute("voidMethodSequenceStringArg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
5032 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
5033 V8TRYCATCH_VOID(Vector<String>, sequenceStringArg, toNativeArray<String>(info[0], 1, info.GetIsolate()));
5034 imp->voidMethodSequenceStringArg(sequenceStringArg);
5037 static void voidMethodSequenceStringArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5039 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5040 TestObjectPythonV8Internal::voidMethodSequenceStringArgMethod(info);
5041 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5044 static void voidMethodSequenceTestInterfaceEmptyArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5046 if (UNLIKELY(info.Length() < 1)) {
5047 throwTypeError(ExceptionMessages::failedToExecute("voidMethodSequenceTestInterfaceEmptyArg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
5050 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
5051 V8TRYCATCH_VOID(Vector<RefPtr<TestInterfaceEmpty> >, sequenceTestInterfaceEmptyArg, (toRefPtrNativeArray<TestInterfaceEmpty, V8TestInterfaceEmpty>(info[0], 1, info.GetIsolate())));
5052 imp->voidMethodSequenceTestInterfaceEmptyArg(sequenceTestInterfaceEmptyArg);
5055 static void voidMethodSequenceTestInterfaceEmptyArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5057 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5058 TestObjectPythonV8Internal::voidMethodSequenceTestInterfaceEmptyArgMethod(info);
5059 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5062 static void voidMethodNullableStringArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5064 if (UNLIKELY(info.Length() < 1)) {
5065 throwTypeError(ExceptionMessages::failedToExecute("voidMethodNullableStringArg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
5068 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
5069 V8TRYCATCH_VOID(TestInterfaceEmpty*, nullableTestInterfaceEmptyArg, V8TestInterfaceEmpty::hasInstance(info[0], info.GetIsolate()) ? V8TestInterfaceEmpty::toNative(v8::Handle<v8::Object>::Cast(info[0])) : 0);
5070 imp->voidMethodNullableStringArg(nullableTestInterfaceEmptyArg);
5073 static void voidMethodNullableStringArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5075 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5076 TestObjectPythonV8Internal::voidMethodNullableStringArgMethod(info);
5077 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5080 static void voidMethodTestCallbackInterfaceArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5082 if (UNLIKELY(info.Length() < 1)) {
5083 throwTypeError(ExceptionMessages::failedToExecute("voidMethodTestCallbackInterfaceArg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
5086 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
5087 if (info.Length() <= 0 || !info[0]->IsFunction()) {
5088 throwTypeError(ExceptionMessages::failedToExecute("voidMethodTestCallbackInterfaceArg", "TestObjectPython", "The callback provided as parameter 1 is not a function."), info.GetIsolate());
5091 OwnPtr<TestCallbackInterface> testCallbackInterfaceArg = V8TestCallbackInterface::create(v8::Handle<v8::Function>::Cast(info[0]), currentExecutionContext(info.GetIsolate()));
5092 imp->voidMethodTestCallbackInterfaceArg(testCallbackInterfaceArg.release());
5095 static void voidMethodTestCallbackInterfaceArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5097 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5098 TestObjectPythonV8Internal::voidMethodTestCallbackInterfaceArgMethod(info);
5099 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5102 static void voidMethodOptionalTestCallbackInterfaceArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5104 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
5105 OwnPtr<TestCallbackInterface> optionalTestCallbackInterfaceArg;
5106 if (info.Length() > 0 && !isUndefinedOrNull(info[0])) {
5107 if (!info[0]->IsFunction()) {
5108 throwTypeError(ExceptionMessages::failedToExecute("voidMethodOptionalTestCallbackInterfaceArg", "TestObjectPython", "The callback provided as parameter 1 is not a function."), info.GetIsolate());
5111 optionalTestCallbackInterfaceArg = V8TestCallbackInterface::create(v8::Handle<v8::Function>::Cast(info[0]), currentExecutionContext(info.GetIsolate()));
5113 imp->voidMethodOptionalTestCallbackInterfaceArg(optionalTestCallbackInterfaceArg.release());
5116 static void voidMethodOptionalTestCallbackInterfaceArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5118 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5119 TestObjectPythonV8Internal::voidMethodOptionalTestCallbackInterfaceArgMethod(info);
5120 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5123 static void voidMethodNullableTestCallbackInterfaceArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5125 if (UNLIKELY(info.Length() < 1)) {
5126 throwTypeError(ExceptionMessages::failedToExecute("voidMethodNullableTestCallbackInterfaceArg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
5129 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
5130 if (info.Length() <= 0 || !(info[0]->IsFunction() || info[0]->IsNull())) {
5131 throwTypeError(ExceptionMessages::failedToExecute("voidMethodNullableTestCallbackInterfaceArg", "TestObjectPython", "The callback provided as parameter 1 is not a function."), info.GetIsolate());
5134 OwnPtr<TestCallbackInterface> testCallbackInterfaceArg = info[0]->IsNull() ? nullptr : V8TestCallbackInterface::create(v8::Handle<v8::Function>::Cast(info[0]), currentExecutionContext(info.GetIsolate()));
5135 imp->voidMethodNullableTestCallbackInterfaceArg(testCallbackInterfaceArg.release());
5138 static void voidMethodNullableTestCallbackInterfaceArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5140 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5141 TestObjectPythonV8Internal::voidMethodNullableTestCallbackInterfaceArgMethod(info);
5142 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5145 static void testEnumMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5147 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
5148 v8SetReturnValueString(info, imp->testEnumMethod(), info.GetIsolate());
5151 static void testEnumMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5153 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5154 TestObjectPythonV8Internal::testEnumMethodMethod(info);
5155 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5158 static void voidMethodTestEnumArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5160 if (UNLIKELY(info.Length() < 1)) {
5161 throwTypeError(ExceptionMessages::failedToExecute("voidMethodTestEnumArg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
5164 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
5165 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, testEnumTypeArg, info[0]);
5166 String string = testEnumTypeArg;
5167 if (!(string == "" || string == "EnumValue1" || string == "EnumValue2" || string == "EnumValue3")) {
5168 throwTypeError(ExceptionMessages::failedToExecute("voidMethodTestEnumArg", "TestObjectPython", "parameter 1 ('" + string + "') is not a valid enum value."), info.GetIsolate());
5171 imp->voidMethodTestEnumArg(testEnumTypeArg);
5174 static void voidMethodTestEnumArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5176 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5177 TestObjectPythonV8Internal::voidMethodTestEnumArgMethod(info);
5178 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5181 static void dictionaryMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5183 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
5184 v8SetReturnValue(info, imp->dictionaryMethod());
5187 static void dictionaryMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5189 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5190 TestObjectPythonV8Internal::dictionaryMethodMethod(info);
5191 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5194 static void nodeFilterMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5196 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
5197 v8SetReturnValue(info, imp->nodeFilterMethod());
5200 static void nodeFilterMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5202 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5203 TestObjectPythonV8Internal::nodeFilterMethodMethod(info);
5204 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5207 static void promiseMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5209 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
5210 v8SetReturnValue(info, imp->promiseMethod().v8Value());
5213 static void promiseMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5215 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5216 TestObjectPythonV8Internal::promiseMethodMethod(info);
5217 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5220 static void serializedScriptValueMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5222 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
5223 v8SetReturnValue(info, imp->serializedScriptValueMethod() ? imp->serializedScriptValueMethod()->deserialize() : v8::Handle<v8::Value>(v8::Null(info.GetIsolate())));
5226 static void serializedScriptValueMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5228 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5229 TestObjectPythonV8Internal::serializedScriptValueMethodMethod(info);
5230 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5233 static void xPathNSResolverMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5235 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
5236 v8SetReturnValue(info, imp->xPathNSResolverMethod());
5239 static void xPathNSResolverMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5241 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5242 TestObjectPythonV8Internal::xPathNSResolverMethodMethod(info);
5243 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5246 static void voidMethodDictionaryArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5248 if (UNLIKELY(info.Length() < 1)) {
5249 throwTypeError(ExceptionMessages::failedToExecute("voidMethodDictionaryArg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
5252 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
5253 V8TRYCATCH_VOID(Dictionary, dictionaryArg, Dictionary(info[0], info.GetIsolate()));
5254 if (!dictionaryArg.isUndefinedOrNull() && !dictionaryArg.isObject()) {
5255 throwTypeError(ExceptionMessages::failedToExecute("voidMethodDictionaryArg", "TestObjectPython", "parameter 1 ('dictionaryArg') is not an object."), info.GetIsolate());
5258 imp->voidMethodDictionaryArg(dictionaryArg);
5261 static void voidMethodDictionaryArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5263 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5264 TestObjectPythonV8Internal::voidMethodDictionaryArgMethod(info);
5265 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5268 static void voidMethodNodeFilterArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5270 if (UNLIKELY(info.Length() < 1)) {
5271 throwTypeError(ExceptionMessages::failedToExecute("voidMethodNodeFilterArg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
5274 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
5275 V8TRYCATCH_VOID(RefPtr<NodeFilter>, nodeFilterArg, toNodeFilter(info[0], info.GetIsolate()));
5276 imp->voidMethodNodeFilterArg(nodeFilterArg.release());
5279 static void voidMethodNodeFilterArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5281 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5282 TestObjectPythonV8Internal::voidMethodNodeFilterArgMethod(info);
5283 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5286 static void voidMethodPromiseArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5288 if (UNLIKELY(info.Length() < 1)) {
5289 throwTypeError(ExceptionMessages::failedToExecute("voidMethodPromiseArg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
5292 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
5293 V8TRYCATCH_VOID(ScriptPromise, promiseArg, ScriptPromise(info[0], info.GetIsolate()));
5294 if (!promiseArg.isUndefinedOrNull() && !promiseArg.isObject()) {
5295 throwTypeError(ExceptionMessages::failedToExecute("voidMethodPromiseArg", "TestObjectPython", "parameter 1 ('promiseArg') is not an object."), info.GetIsolate());
5298 imp->voidMethodPromiseArg(promiseArg);
5301 static void voidMethodPromiseArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5303 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5304 TestObjectPythonV8Internal::voidMethodPromiseArgMethod(info);
5305 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5308 static void voidMethodSerializedScriptValueArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5310 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodSerializedScriptValueArg", "TestObjectPython", info.Holder(), info.GetIsolate());
5311 if (UNLIKELY(info.Length() < 1)) {
5312 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, info.Length()));
5313 exceptionState.throwIfNeeded();
5316 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
5317 RefPtr<SerializedScriptValue> serializedScriptValueArg = SerializedScriptValue::create(info[0], 0, 0, exceptionState, info.GetIsolate());
5318 if (exceptionState.throwIfNeeded())
5320 imp->voidMethodSerializedScriptValueArg(serializedScriptValueArg);
5323 static void voidMethodSerializedScriptValueArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5325 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5326 TestObjectPythonV8Internal::voidMethodSerializedScriptValueArgMethod(info);
5327 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5330 static void voidMethodXPathNSResolverArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5332 if (UNLIKELY(info.Length() < 1)) {
5333 throwTypeError(ExceptionMessages::failedToExecute("voidMethodXPathNSResolverArg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
5336 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
5337 V8TRYCATCH_VOID(RefPtr<XPathNSResolver>, xPathNSResolverArg, toXPathNSResolver(info[0], info.GetIsolate()));
5338 imp->voidMethodXPathNSResolverArg(xPathNSResolverArg.release());
5341 static void voidMethodXPathNSResolverArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5343 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5344 TestObjectPythonV8Internal::voidMethodXPathNSResolverArgMethod(info);
5345 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5348 static void voidMethodSequenceDictionaryArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5350 if (UNLIKELY(info.Length() < 1)) {
5351 throwTypeError(ExceptionMessages::failedToExecute("voidMethodSequenceDictionaryArg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
5354 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
5355 V8TRYCATCH_VOID(Vector<Dictionary>, sequenceDictionaryArg, toNativeArray<Dictionary>(info[0], 1, info.GetIsolate()));
5356 imp->voidMethodSequenceDictionaryArg(sequenceDictionaryArg);
5359 static void voidMethodSequenceDictionaryArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5361 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5362 TestObjectPythonV8Internal::voidMethodSequenceDictionaryArgMethod(info);
5363 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5366 static void voidMethodStringArgLongArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5368 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodStringArgLongArg", "TestObjectPython", info.Holder(), info.GetIsolate());
5369 if (UNLIKELY(info.Length() < 2)) {
5370 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(2, info.Length()));
5371 exceptionState.throwIfNeeded();
5374 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
5375 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, stringArg, info[0]);
5376 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[1], exceptionState), exceptionState);
5377 imp->voidMethodStringArgLongArg(stringArg, longArg);
5380 static void voidMethodStringArgLongArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5382 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5383 TestObjectPythonV8Internal::voidMethodStringArgLongArgMethod(info);
5384 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5387 static void voidMethodOptionalStringArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5389 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
5390 if (UNLIKELY(info.Length() <= 0)) {
5391 imp->voidMethodOptionalStringArg();
5394 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, optionalStringArg, info[0]);
5395 imp->voidMethodOptionalStringArg(optionalStringArg);
5398 static void voidMethodOptionalStringArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5400 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5401 TestObjectPythonV8Internal::voidMethodOptionalStringArgMethod(info);
5402 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5405 static void voidMethodOptionalTestInterfaceEmptyArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5407 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
5408 if (UNLIKELY(info.Length() <= 0)) {
5409 imp->voidMethodOptionalTestInterfaceEmptyArg();
5412 V8TRYCATCH_VOID(TestInterfaceEmpty*, optionalTestInterfaceEmptyArg, V8TestInterfaceEmpty::hasInstance(info[0], info.GetIsolate()) ? V8TestInterfaceEmpty::toNative(v8::Handle<v8::Object>::Cast(info[0])) : 0);
5413 imp->voidMethodOptionalTestInterfaceEmptyArg(optionalTestInterfaceEmptyArg);
5416 static void voidMethodOptionalTestInterfaceEmptyArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5418 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5419 TestObjectPythonV8Internal::voidMethodOptionalTestInterfaceEmptyArgMethod(info);
5420 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5423 static void voidMethodOptionalLongArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5425 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodOptionalLongArg", "TestObjectPython", info.Holder(), info.GetIsolate());
5426 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
5427 if (UNLIKELY(info.Length() <= 0)) {
5428 imp->voidMethodOptionalLongArg();
5431 V8TRYCATCH_EXCEPTION_VOID(int, optionalLongArg, toInt32(info[0], exceptionState), exceptionState);
5432 imp->voidMethodOptionalLongArg(optionalLongArg);
5435 static void voidMethodOptionalLongArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5437 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5438 TestObjectPythonV8Internal::voidMethodOptionalLongArgMethod(info);
5439 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5442 static void stringMethodOptionalLongArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5444 ExceptionState exceptionState(ExceptionState::ExecutionContext, "stringMethodOptionalLongArg", "TestObjectPython", info.Holder(), info.GetIsolate());
5445 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
5446 if (UNLIKELY(info.Length() <= 0)) {
5447 v8SetReturnValueString(info, imp->stringMethodOptionalLongArg(), info.GetIsolate());
5450 V8TRYCATCH_EXCEPTION_VOID(int, optionalLongArg, toInt32(info[0], exceptionState), exceptionState);
5451 v8SetReturnValueString(info, imp->stringMethodOptionalLongArg(optionalLongArg), info.GetIsolate());
5454 static void stringMethodOptionalLongArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5456 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5457 TestObjectPythonV8Internal::stringMethodOptionalLongArgMethod(info);
5458 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5461 static void testInterfaceEmptyMethodOptionalLongArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5463 ExceptionState exceptionState(ExceptionState::ExecutionContext, "testInterfaceEmptyMethodOptionalLongArg", "TestObjectPython", info.Holder(), info.GetIsolate());
5464 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
5465 if (UNLIKELY(info.Length() <= 0)) {
5466 v8SetReturnValue(info, imp->testInterfaceEmptyMethodOptionalLongArg());
5469 V8TRYCATCH_EXCEPTION_VOID(int, optionalLongArg, toInt32(info[0], exceptionState), exceptionState);
5470 v8SetReturnValue(info, imp->testInterfaceEmptyMethodOptionalLongArg(optionalLongArg));
5473 static void testInterfaceEmptyMethodOptionalLongArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5475 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5476 TestObjectPythonV8Internal::testInterfaceEmptyMethodOptionalLongArgMethod(info);
5477 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5480 static void longMethodOptionalLongArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5482 ExceptionState exceptionState(ExceptionState::ExecutionContext, "longMethodOptionalLongArg", "TestObjectPython", info.Holder(), info.GetIsolate());
5483 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
5484 if (UNLIKELY(info.Length() <= 0)) {
5485 v8SetReturnValueInt(info, imp->longMethodOptionalLongArg());
5488 V8TRYCATCH_EXCEPTION_VOID(int, optionalLongArg, toInt32(info[0], exceptionState), exceptionState);
5489 v8SetReturnValueInt(info, imp->longMethodOptionalLongArg(optionalLongArg));
5492 static void longMethodOptionalLongArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5494 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5495 TestObjectPythonV8Internal::longMethodOptionalLongArgMethod(info);
5496 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5499 static void voidMethodLongArgOptionalLongArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5501 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodLongArgOptionalLongArg", "TestObjectPython", info.Holder(), info.GetIsolate());
5502 if (UNLIKELY(info.Length() < 1)) {
5503 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, info.Length()));
5504 exceptionState.throwIfNeeded();
5507 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
5508 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), exceptionState);
5509 if (UNLIKELY(info.Length() <= 1)) {
5510 imp->voidMethodLongArgOptionalLongArg(longArg);
5513 V8TRYCATCH_EXCEPTION_VOID(int, optionalLongArg, toInt32(info[1], exceptionState), exceptionState);
5514 imp->voidMethodLongArgOptionalLongArg(longArg, optionalLongArg);
5517 static void voidMethodLongArgOptionalLongArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5519 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5520 TestObjectPythonV8Internal::voidMethodLongArgOptionalLongArgMethod(info);
5521 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5524 static void voidMethodLongArgOptionalLongArgOptionalLongArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5526 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodLongArgOptionalLongArgOptionalLongArg", "TestObjectPython", info.Holder(), info.GetIsolate());
5527 if (UNLIKELY(info.Length() < 1)) {
5528 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, info.Length()));
5529 exceptionState.throwIfNeeded();
5532 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
5533 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), exceptionState);
5534 if (UNLIKELY(info.Length() <= 1)) {
5535 imp->voidMethodLongArgOptionalLongArgOptionalLongArg(longArg);
5538 V8TRYCATCH_EXCEPTION_VOID(int, optionalLongArg1, toInt32(info[1], exceptionState), exceptionState);
5539 if (UNLIKELY(info.Length() <= 2)) {
5540 imp->voidMethodLongArgOptionalLongArgOptionalLongArg(longArg, optionalLongArg1);
5543 V8TRYCATCH_EXCEPTION_VOID(int, optionalLongArg2, toInt32(info[2], exceptionState), exceptionState);
5544 imp->voidMethodLongArgOptionalLongArgOptionalLongArg(longArg, optionalLongArg1, optionalLongArg2);
5547 static void voidMethodLongArgOptionalLongArgOptionalLongArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5549 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5550 TestObjectPythonV8Internal::voidMethodLongArgOptionalLongArgOptionalLongArgMethod(info);
5551 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5554 static void voidMethodLongArgOptionalTestInterfaceEmptyArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5556 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodLongArgOptionalTestInterfaceEmptyArg", "TestObjectPython", info.Holder(), info.GetIsolate());
5557 if (UNLIKELY(info.Length() < 1)) {
5558 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, info.Length()));
5559 exceptionState.throwIfNeeded();
5562 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
5563 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), exceptionState);
5564 if (UNLIKELY(info.Length() <= 1)) {
5565 imp->voidMethodLongArgOptionalTestInterfaceEmptyArg(longArg);
5568 V8TRYCATCH_VOID(TestInterfaceEmpty*, optionalTestInterfaceEmpty, V8TestInterfaceEmpty::hasInstance(info[1], info.GetIsolate()) ? V8TestInterfaceEmpty::toNative(v8::Handle<v8::Object>::Cast(info[1])) : 0);
5569 imp->voidMethodLongArgOptionalTestInterfaceEmptyArg(longArg, optionalTestInterfaceEmpty);
5572 static void voidMethodLongArgOptionalTestInterfaceEmptyArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5574 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5575 TestObjectPythonV8Internal::voidMethodLongArgOptionalTestInterfaceEmptyArgMethod(info);
5576 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5579 static void voidMethodTestInterfaceEmptyArgOptionalLongArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5581 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodTestInterfaceEmptyArgOptionalLongArg", "TestObjectPython", info.Holder(), info.GetIsolate());
5582 if (UNLIKELY(info.Length() < 1)) {
5583 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, info.Length()));
5584 exceptionState.throwIfNeeded();
5587 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
5588 V8TRYCATCH_VOID(TestInterfaceEmpty*, optionalTestInterfaceEmpty, V8TestInterfaceEmpty::hasInstance(info[0], info.GetIsolate()) ? V8TestInterfaceEmpty::toNative(v8::Handle<v8::Object>::Cast(info[0])) : 0);
5589 if (UNLIKELY(info.Length() <= 1)) {
5590 imp->voidMethodTestInterfaceEmptyArgOptionalLongArg(optionalTestInterfaceEmpty);
5593 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[1], exceptionState), exceptionState);
5594 imp->voidMethodTestInterfaceEmptyArgOptionalLongArg(optionalTestInterfaceEmpty, longArg);
5597 static void voidMethodTestInterfaceEmptyArgOptionalLongArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5599 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5600 TestObjectPythonV8Internal::voidMethodTestInterfaceEmptyArgOptionalLongArgMethod(info);
5601 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5604 static void voidMethodOptionalDictionaryArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5606 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
5607 V8TRYCATCH_VOID(Dictionary, optionalDictionaryArg, Dictionary(info[0], info.GetIsolate()));
5608 if (!optionalDictionaryArg.isUndefinedOrNull() && !optionalDictionaryArg.isObject()) {
5609 throwTypeError(ExceptionMessages::failedToExecute("voidMethodOptionalDictionaryArg", "TestObjectPython", "parameter 1 ('optionalDictionaryArg') is not an object."), info.GetIsolate());
5612 imp->voidMethodOptionalDictionaryArg(optionalDictionaryArg);
5615 static void voidMethodOptionalDictionaryArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5617 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5618 TestObjectPythonV8Internal::voidMethodOptionalDictionaryArgMethod(info);
5619 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5622 static void voidMethodVariadicStringArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5624 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
5625 V8TRYCATCH_VOID(Vector<String>, variadicStringArgs, toNativeArguments<String>(info, 0));
5626 imp->voidMethodVariadicStringArg(variadicStringArgs);
5629 static void voidMethodVariadicStringArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5631 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5632 TestObjectPythonV8Internal::voidMethodVariadicStringArgMethod(info);
5633 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5636 static void voidMethodStringArgVariadicStringArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5638 if (UNLIKELY(info.Length() < 1)) {
5639 throwTypeError(ExceptionMessages::failedToExecute("voidMethodStringArgVariadicStringArg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
5642 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
5643 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, stringArg, info[0]);
5644 V8TRYCATCH_VOID(Vector<String>, variadicStringArgs, toNativeArguments<String>(info, 1));
5645 imp->voidMethodStringArgVariadicStringArg(stringArg, variadicStringArgs);
5648 static void voidMethodStringArgVariadicStringArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5650 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5651 TestObjectPythonV8Internal::voidMethodStringArgVariadicStringArgMethod(info);
5652 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5655 static void voidMethodVariadicTestInterfaceEmptyArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5657 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
5658 Vector<RefPtr<TestInterfaceEmpty> > variadicTestInterfaceEmptyArgs;
5659 for (int i = 0; i < info.Length(); ++i) {
5660 if (!V8TestInterfaceEmpty::hasInstance(info[i], info.GetIsolate())) {
5661 throwTypeError(ExceptionMessages::failedToExecute("voidMethodVariadicTestInterfaceEmptyArg", "TestObjectPython", "parameter 1 is not of type 'TestInterfaceEmpty'."), info.GetIsolate());
5664 variadicTestInterfaceEmptyArgs.append(V8TestInterfaceEmpty::toNative(v8::Handle<v8::Object>::Cast(info[i])));
5666 imp->voidMethodVariadicTestInterfaceEmptyArg(variadicTestInterfaceEmptyArgs);
5669 static void voidMethodVariadicTestInterfaceEmptyArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5671 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5672 TestObjectPythonV8Internal::voidMethodVariadicTestInterfaceEmptyArgMethod(info);
5673 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5676 static void voidMethodTestInterfaceEmptyArgVariadicTestInterfaceEmptyArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5678 if (UNLIKELY(info.Length() < 1)) {
5679 throwTypeError(ExceptionMessages::failedToExecute("voidMethodTestInterfaceEmptyArgVariadicTestInterfaceEmptyArg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
5682 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
5683 V8TRYCATCH_VOID(TestInterfaceEmpty*, testInterfaceEmptyArg, V8TestInterfaceEmpty::hasInstance(info[0], info.GetIsolate()) ? V8TestInterfaceEmpty::toNative(v8::Handle<v8::Object>::Cast(info[0])) : 0);
5684 Vector<RefPtr<TestInterfaceEmpty> > variadicTestInterfaceEmptyArgs;
5685 for (int i = 1; i < info.Length(); ++i) {
5686 if (!V8TestInterfaceEmpty::hasInstance(info[i], info.GetIsolate())) {
5687 throwTypeError(ExceptionMessages::failedToExecute("voidMethodTestInterfaceEmptyArgVariadicTestInterfaceEmptyArg", "TestObjectPython", "parameter 2 is not of type 'TestInterfaceEmpty'."), info.GetIsolate());
5690 variadicTestInterfaceEmptyArgs.append(V8TestInterfaceEmpty::toNative(v8::Handle<v8::Object>::Cast(info[i])));
5692 imp->voidMethodTestInterfaceEmptyArgVariadicTestInterfaceEmptyArg(testInterfaceEmptyArg, variadicTestInterfaceEmptyArgs);
5695 static void voidMethodTestInterfaceEmptyArgVariadicTestInterfaceEmptyArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5697 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5698 TestObjectPythonV8Internal::voidMethodTestInterfaceEmptyArgVariadicTestInterfaceEmptyArgMethod(info);
5699 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5702 static void overloadedMethodA1Method(const v8::FunctionCallbackInfo<v8::Value>& info)
5704 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedMethodA", "TestObjectPython", info.Holder(), info.GetIsolate());
5705 if (UNLIKELY(info.Length() < 1)) {
5706 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, info.Length()));
5707 exceptionState.throwIfNeeded();
5710 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
5711 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), exceptionState);
5712 imp->overloadedMethodA(longArg);
5715 static void overloadedMethodA2Method(const v8::FunctionCallbackInfo<v8::Value>& info)
5717 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedMethodA", "TestObjectPython", info.Holder(), info.GetIsolate());
5718 if (UNLIKELY(info.Length() < 2)) {
5719 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(2, info.Length()));
5720 exceptionState.throwIfNeeded();
5723 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
5724 V8TRYCATCH_EXCEPTION_VOID(int, longArg1, toInt32(info[0], exceptionState), exceptionState);
5725 V8TRYCATCH_EXCEPTION_VOID(int, longArg2, toInt32(info[1], exceptionState), exceptionState);
5726 imp->overloadedMethodA(longArg1, longArg2);
5729 static void overloadedMethodAMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5731 if (((info.Length() == 1))) {
5732 overloadedMethodA1Method(info);
5735 if (((info.Length() == 2))) {
5736 overloadedMethodA2Method(info);
5739 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedMethodA", "TestObjectPython", info.Holder(), info.GetIsolate());
5740 if (UNLIKELY(info.Length() < 1)) {
5741 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, info.Length()));
5742 exceptionState.throwIfNeeded();
5745 exceptionState.throwTypeError("No function was found that matched the signature provided.");
5746 exceptionState.throwIfNeeded();
5749 static void overloadedMethodAMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5751 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5752 TestObjectPythonV8Internal::overloadedMethodAMethod(info);
5753 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5756 static void overloadedMethodB1Method(const v8::FunctionCallbackInfo<v8::Value>& info)
5758 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedMethodB", "TestObjectPython", info.Holder(), info.GetIsolate());
5759 if (UNLIKELY(info.Length() < 1)) {
5760 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, info.Length()));
5761 exceptionState.throwIfNeeded();
5764 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
5765 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), exceptionState);
5766 imp->overloadedMethodB(longArg);
5769 static void overloadedMethodB2Method(const v8::FunctionCallbackInfo<v8::Value>& info)
5771 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedMethodB", "TestObjectPython", info.Holder(), info.GetIsolate());
5772 if (UNLIKELY(info.Length() < 1)) {
5773 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, info.Length()));
5774 exceptionState.throwIfNeeded();
5777 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
5778 V8TRYCATCH_EXCEPTION_VOID(int, longArg1, toInt32(info[0], exceptionState), exceptionState);
5779 if (UNLIKELY(info.Length() <= 1)) {
5780 imp->overloadedMethodB(longArg1);
5783 V8TRYCATCH_EXCEPTION_VOID(int, longArg2, toInt32(info[1], exceptionState), exceptionState);
5784 imp->overloadedMethodB(longArg1, longArg2);
5787 static void overloadedMethodBMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5789 if (((info.Length() == 1))) {
5790 overloadedMethodB1Method(info);
5793 if (((info.Length() == 1)) || ((info.Length() == 2))) {
5794 overloadedMethodB2Method(info);
5797 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedMethodB", "TestObjectPython", info.Holder(), info.GetIsolate());
5798 if (UNLIKELY(info.Length() < 1)) {
5799 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, info.Length()));
5800 exceptionState.throwIfNeeded();
5803 exceptionState.throwTypeError("No function was found that matched the signature provided.");
5804 exceptionState.throwIfNeeded();
5807 static void overloadedMethodBMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5809 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5810 TestObjectPythonV8Internal::overloadedMethodBMethod(info);
5811 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5814 static void overloadedMethodC1Method(const v8::FunctionCallbackInfo<v8::Value>& info)
5816 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedMethodC", "TestObjectPython", info.Holder(), info.GetIsolate());
5817 if (UNLIKELY(info.Length() < 1)) {
5818 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, info.Length()));
5819 exceptionState.throwIfNeeded();
5822 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
5823 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), exceptionState);
5824 imp->overloadedMethodC(longArg);
5827 static void overloadedMethodC2Method(const v8::FunctionCallbackInfo<v8::Value>& info)
5829 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedMethodC", "TestObjectPython", info.Holder(), info.GetIsolate());
5830 if (UNLIKELY(info.Length() < 1)) {
5831 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, info.Length()));
5832 exceptionState.throwIfNeeded();
5835 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
5836 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), exceptionState);
5837 V8TRYCATCH_VOID(Vector<int>, longArgs, toNativeArguments<int>(info, 1));
5838 imp->overloadedMethodC(longArg, longArgs);
5841 static void overloadedMethodCMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5843 if (((info.Length() == 1))) {
5844 overloadedMethodC1Method(info);
5848 overloadedMethodC2Method(info);
5851 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedMethodC", "TestObjectPython", info.Holder(), info.GetIsolate());
5852 if (UNLIKELY(info.Length() < 1)) {
5853 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, info.Length()));
5854 exceptionState.throwIfNeeded();
5857 exceptionState.throwTypeError("No function was found that matched the signature provided.");
5858 exceptionState.throwIfNeeded();
5861 static void overloadedMethodCMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5863 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5864 TestObjectPythonV8Internal::overloadedMethodCMethod(info);
5865 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5868 static void overloadedMethodD1Method(const v8::FunctionCallbackInfo<v8::Value>& info)
5870 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedMethodD", "TestObjectPython", info.Holder(), info.GetIsolate());
5871 if (UNLIKELY(info.Length() < 1)) {
5872 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, info.Length()));
5873 exceptionState.throwIfNeeded();
5876 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
5877 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), exceptionState);
5878 imp->overloadedMethodD(longArg);
5881 static void overloadedMethodD2Method(const v8::FunctionCallbackInfo<v8::Value>& info)
5883 if (UNLIKELY(info.Length() < 1)) {
5884 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethodD", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
5887 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
5888 V8TRYCATCH_VOID(TestInterfaceEmpty*, testInterfaceEmptyArg, V8TestInterfaceEmpty::hasInstance(info[0], info.GetIsolate()) ? V8TestInterfaceEmpty::toNative(v8::Handle<v8::Object>::Cast(info[0])) : 0);
5889 imp->overloadedMethodD(testInterfaceEmptyArg);
5892 static void overloadedMethodDMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5894 if (((info.Length() == 1))) {
5895 overloadedMethodD1Method(info);
5898 if (((info.Length() == 1) && (V8TestInterfaceEmpty::hasInstance(info[0], info.GetIsolate())))) {
5899 overloadedMethodD2Method(info);
5902 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedMethodD", "TestObjectPython", info.Holder(), info.GetIsolate());
5903 if (UNLIKELY(info.Length() < 1)) {
5904 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, info.Length()));
5905 exceptionState.throwIfNeeded();
5908 exceptionState.throwTypeError("No function was found that matched the signature provided.");
5909 exceptionState.throwIfNeeded();
5912 static void overloadedMethodDMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5914 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5915 TestObjectPythonV8Internal::overloadedMethodDMethod(info);
5916 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5919 static void overloadedMethodE1Method(const v8::FunctionCallbackInfo<v8::Value>& info)
5921 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedMethodE", "TestObjectPython", info.Holder(), info.GetIsolate());
5922 if (UNLIKELY(info.Length() < 1)) {
5923 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, info.Length()));
5924 exceptionState.throwIfNeeded();
5927 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
5928 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), exceptionState);
5929 imp->overloadedMethodE(longArg);
5932 static void overloadedMethodE2Method(const v8::FunctionCallbackInfo<v8::Value>& info)
5934 if (UNLIKELY(info.Length() < 1)) {
5935 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethodE", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
5938 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
5939 V8TRYCATCH_VOID(Vector<int>, longArrayArg, toNativeArray<int>(info[0], 1, info.GetIsolate()));
5940 imp->overloadedMethodE(longArrayArg);
5943 static void overloadedMethodEMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5945 if (((info.Length() == 1))) {
5946 overloadedMethodE1Method(info);
5949 if (((info.Length() == 1) && (info[0]->IsArray()))) {
5950 overloadedMethodE2Method(info);
5953 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedMethodE", "TestObjectPython", info.Holder(), info.GetIsolate());
5954 if (UNLIKELY(info.Length() < 1)) {
5955 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, info.Length()));
5956 exceptionState.throwIfNeeded();
5959 exceptionState.throwTypeError("No function was found that matched the signature provided.");
5960 exceptionState.throwIfNeeded();
5963 static void overloadedMethodEMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5965 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5966 TestObjectPythonV8Internal::overloadedMethodEMethod(info);
5967 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5970 static void overloadedMethodF1Method(const v8::FunctionCallbackInfo<v8::Value>& info)
5972 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedMethodF", "TestObjectPython", info.Holder(), info.GetIsolate());
5973 if (UNLIKELY(info.Length() < 1)) {
5974 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, info.Length()));
5975 exceptionState.throwIfNeeded();
5978 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
5979 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), exceptionState);
5980 imp->overloadedMethodF(longArg);
5983 static void overloadedMethodF2Method(const v8::FunctionCallbackInfo<v8::Value>& info)
5985 if (UNLIKELY(info.Length() < 1)) {
5986 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethodF", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
5989 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
5990 V8TRYCATCH_VOID(TestInterfaceEmpty*, testInterfaceEmptyNullableArg, V8TestInterfaceEmpty::hasInstance(info[0], info.GetIsolate()) ? V8TestInterfaceEmpty::toNative(v8::Handle<v8::Object>::Cast(info[0])) : 0);
5991 imp->overloadedMethodF(testInterfaceEmptyNullableArg);
5994 static void overloadedMethodFMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5996 if (((info.Length() == 1))) {
5997 overloadedMethodF1Method(info);
6000 if (((info.Length() == 1) && (info[0]->IsNull() || V8TestInterfaceEmpty::hasInstance(info[0], info.GetIsolate())))) {
6001 overloadedMethodF2Method(info);
6004 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedMethodF", "TestObjectPython", info.Holder(), info.GetIsolate());
6005 if (UNLIKELY(info.Length() < 1)) {
6006 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, info.Length()));
6007 exceptionState.throwIfNeeded();
6010 exceptionState.throwTypeError("No function was found that matched the signature provided.");
6011 exceptionState.throwIfNeeded();
6014 static void overloadedMethodFMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6016 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6017 TestObjectPythonV8Internal::overloadedMethodFMethod(info);
6018 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6021 static void overloadedMethodG1Method(const v8::FunctionCallbackInfo<v8::Value>& info)
6023 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
6024 imp->overloadedMethodG();
6027 static void overloadedMethodG2Method(const v8::FunctionCallbackInfo<v8::Value>& info)
6029 if (UNLIKELY(info.Length() < 1)) {
6030 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethodG", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
6033 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
6034 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strictTypeCheckingStringArg, info[0]);
6035 imp->overloadedMethodG(strictTypeCheckingStringArg);
6038 static void overloadedMethodGMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6040 if (((info.Length() == 0))) {
6041 overloadedMethodG1Method(info);
6044 if (((info.Length() == 1) && (isUndefinedOrNull(info[0]) || info[0]->IsString() || info[0]->IsObject()))) {
6045 overloadedMethodG2Method(info);
6048 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethodG", "TestObjectPython", "No function was found that matched the signature provided."), info.GetIsolate());
6051 static void overloadedMethodGMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6053 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6054 TestObjectPythonV8Internal::overloadedMethodGMethod(info);
6055 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6058 static void overloadedMethodH1Method(const v8::FunctionCallbackInfo<v8::Value>& info)
6060 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
6061 imp->overloadedMethodH();
6064 static void overloadedMethodH2Method(const v8::FunctionCallbackInfo<v8::Value>& info)
6066 if (UNLIKELY(info.Length() < 1)) {
6067 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethodH", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
6070 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
6071 if (info.Length() <= 0 || !info[0]->IsFunction()) {
6072 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethodH", "TestObjectPython", "The callback provided as parameter 1 is not a function."), info.GetIsolate());
6075 OwnPtr<TestCallbackInterface> testCallbackInterfaceArg = V8TestCallbackInterface::create(v8::Handle<v8::Function>::Cast(info[0]), currentExecutionContext(info.GetIsolate()));
6076 imp->overloadedMethodH(testCallbackInterfaceArg.release());
6079 static void overloadedMethodHMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6081 if (((info.Length() == 0))) {
6082 overloadedMethodH1Method(info);
6085 if (((info.Length() == 1) && (info[0]->IsNull() || info[0]->IsFunction()))) {
6086 overloadedMethodH2Method(info);
6089 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethodH", "TestObjectPython", "No function was found that matched the signature provided."), info.GetIsolate());
6092 static void overloadedMethodHMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6094 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6095 TestObjectPythonV8Internal::overloadedMethodHMethod(info);
6096 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6099 static void overloadedPerWorldBindingsMethod1Method(const v8::FunctionCallbackInfo<v8::Value>& info)
6101 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
6102 imp->overloadedPerWorldBindingsMethod();
6105 static void overloadedPerWorldBindingsMethod1MethodForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info)
6107 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
6108 imp->overloadedPerWorldBindingsMethod();
6111 static void overloadedPerWorldBindingsMethod2Method(const v8::FunctionCallbackInfo<v8::Value>& info)
6113 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedPerWorldBindingsMethod", "TestObjectPython", info.Holder(), info.GetIsolate());
6114 if (UNLIKELY(info.Length() < 1)) {
6115 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, info.Length()));
6116 exceptionState.throwIfNeeded();
6119 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
6120 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), exceptionState);
6121 imp->overloadedPerWorldBindingsMethod(longArg);
6124 static void overloadedPerWorldBindingsMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6126 if (((info.Length() == 0))) {
6127 overloadedPerWorldBindingsMethod1Method(info);
6130 if (((info.Length() == 1))) {
6131 overloadedPerWorldBindingsMethod2Method(info);
6134 throwTypeError(ExceptionMessages::failedToExecute("overloadedPerWorldBindingsMethod", "TestObjectPython", "No function was found that matched the signature provided."), info.GetIsolate());
6137 static void overloadedPerWorldBindingsMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6139 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6140 TestObjectPythonV8Internal::overloadedPerWorldBindingsMethodMethod(info);
6141 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6144 static void overloadedPerWorldBindingsMethod2MethodForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info)
6146 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedPerWorldBindingsMethod", "TestObjectPython", info.Holder(), info.GetIsolate());
6147 if (UNLIKELY(info.Length() < 1)) {
6148 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, info.Length()));
6149 exceptionState.throwIfNeeded();
6152 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
6153 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), exceptionState);
6154 imp->overloadedPerWorldBindingsMethod(longArg);
6157 static void overloadedPerWorldBindingsMethodMethodForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info)
6159 if (((info.Length() == 0))) {
6160 overloadedPerWorldBindingsMethod1MethodForMainWorld(info);
6163 if (((info.Length() == 1))) {
6164 overloadedPerWorldBindingsMethod2MethodForMainWorld(info);
6167 throwTypeError(ExceptionMessages::failedToExecute("overloadedPerWorldBindingsMethod", "TestObjectPython", "No function was found that matched the signature provided."), info.GetIsolate());
6170 static void overloadedPerWorldBindingsMethodMethodCallbackForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info)
6172 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6173 TestObjectPythonV8Internal::overloadedPerWorldBindingsMethodMethodForMainWorld(info);
6174 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6177 static void overloadedStaticMethod1Method(const v8::FunctionCallbackInfo<v8::Value>& info)
6179 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedStaticMethod", "TestObjectPython", info.Holder(), info.GetIsolate());
6180 if (UNLIKELY(info.Length() < 1)) {
6181 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, info.Length()));
6182 exceptionState.throwIfNeeded();
6185 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), exceptionState);
6186 TestObjectPython::overloadedStaticMethod(longArg);
6189 static void overloadedStaticMethod2Method(const v8::FunctionCallbackInfo<v8::Value>& info)
6191 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedStaticMethod", "TestObjectPython", info.Holder(), info.GetIsolate());
6192 if (UNLIKELY(info.Length() < 2)) {
6193 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(2, info.Length()));
6194 exceptionState.throwIfNeeded();
6197 V8TRYCATCH_EXCEPTION_VOID(int, longArg1, toInt32(info[0], exceptionState), exceptionState);
6198 V8TRYCATCH_EXCEPTION_VOID(int, longArg2, toInt32(info[1], exceptionState), exceptionState);
6199 TestObjectPython::overloadedStaticMethod(longArg1, longArg2);
6202 static void overloadedStaticMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6204 if (((info.Length() == 1))) {
6205 overloadedStaticMethod1Method(info);
6208 if (((info.Length() == 2))) {
6209 overloadedStaticMethod2Method(info);
6212 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedStaticMethod", "TestObjectPython", info.Holder(), info.GetIsolate());
6213 if (UNLIKELY(info.Length() < 1)) {
6214 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, info.Length()));
6215 exceptionState.throwIfNeeded();
6218 exceptionState.throwTypeError("No function was found that matched the signature provided.");
6219 exceptionState.throwIfNeeded();
6222 static void overloadedStaticMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6224 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6225 TestObjectPythonV8Internal::overloadedStaticMethodMethod(info);
6226 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6229 static void addEventListenerMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6231 ExceptionState exceptionState(ExceptionState::ExecutionContext, "addEventListener", "TestObjectPython", info.Holder(), info.GetIsolate());
6232 EventTarget* impl = V8TestObjectPython::toNative(info.Holder());
6233 if (DOMWindow* window = impl->toDOMWindow()) {
6234 if (!BindingSecurity::shouldAllowAccessToFrame(info.GetIsolate(), window->frame(), exceptionState)) {
6235 exceptionState.throwIfNeeded();
6238 if (!window->document())
6241 RefPtr<EventListener> listener = V8EventListenerList::getEventListener(info[1], false, ListenerFindOrCreate);
6243 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithNullCheck>, eventName, info[0]);
6244 impl->addEventListener(eventName, listener, info[2]->BooleanValue());
6245 if (!impl->toNode())
6246 addHiddenValueToArray(info.Holder(), info[1], V8TestObjectPython::eventListenerCacheIndex, info.GetIsolate());
6250 static void addEventListenerMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6252 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6253 TestObjectPythonV8Internal::addEventListenerMethod(info);
6254 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6257 static void removeEventListenerMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6259 ExceptionState exceptionState(ExceptionState::ExecutionContext, "removeEventListener", "TestObjectPython", info.Holder(), info.GetIsolate());
6260 EventTarget* impl = V8TestObjectPython::toNative(info.Holder());
6261 if (DOMWindow* window = impl->toDOMWindow()) {
6262 if (!BindingSecurity::shouldAllowAccessToFrame(info.GetIsolate(), window->frame(), exceptionState)) {
6263 exceptionState.throwIfNeeded();
6266 if (!window->document())
6269 RefPtr<EventListener> listener = V8EventListenerList::getEventListener(info[1], false, ListenerFindOnly);
6271 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithNullCheck>, eventName, info[0]);
6272 impl->removeEventListener(eventName, listener.get(), info[2]->BooleanValue());
6273 if (!impl->toNode())
6274 removeHiddenValueFromArray(info.Holder(), info[1], V8TestObjectPython::eventListenerCacheIndex, info.GetIsolate());
6278 static void removeEventListenerMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6280 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6281 TestObjectPythonV8Internal::removeEventListenerMethod(info);
6282 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6285 static void dispatchEventMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6287 ExceptionState exceptionState(ExceptionState::ExecutionContext, "dispatchEvent", "TestObjectPython", info.Holder(), info.GetIsolate());
6288 EventTarget* impl = V8TestObjectPython::toNative(info.Holder());
6289 if (DOMWindow* window = impl->toDOMWindow()) {
6290 if (!BindingSecurity::shouldAllowAccessToFrame(info.GetIsolate(), window->frame(), exceptionState)) {
6291 exceptionState.throwIfNeeded();
6294 if (!window->document())
6297 if (UNLIKELY(info.Length() < 1)) {
6298 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, info.Length()));
6299 exceptionState.throwIfNeeded();
6302 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
6303 V8TRYCATCH_VOID(Event*, event, V8Event::hasInstance(info[0], info.GetIsolate()) ? V8Event::toNative(v8::Handle<v8::Object>::Cast(info[0])) : 0);
6304 bool result = imp->dispatchEvent(event, exceptionState);
6305 if (exceptionState.throwIfNeeded())
6307 v8SetReturnValueBool(info, result);
6310 static void dispatchEventMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6312 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6313 TestObjectPythonV8Internal::dispatchEventMethod(info);
6314 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6317 static void voidMethodClampUnsignedShortArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6319 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodClampUnsignedShortArg", "TestObjectPython", info.Holder(), info.GetIsolate());
6320 if (UNLIKELY(info.Length() < 1)) {
6321 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, info.Length()));
6322 exceptionState.throwIfNeeded();
6325 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
6326 unsigned clampUnsignedShortArg = 0;
6327 V8TRYCATCH_VOID(double, clampUnsignedShortArgNativeValue, info[0]->NumberValue());
6328 if (!std::isnan(clampUnsignedShortArgNativeValue))
6329 clampUnsignedShortArg = clampTo<unsigned short>(clampUnsignedShortArgNativeValue);
6330 imp->voidMethodClampUnsignedShortArg(clampUnsignedShortArg);
6333 static void voidMethodClampUnsignedShortArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6335 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6336 TestObjectPythonV8Internal::voidMethodClampUnsignedShortArgMethod(info);
6337 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6340 static void voidMethodClampUnsignedLongArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6342 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodClampUnsignedLongArg", "TestObjectPython", info.Holder(), info.GetIsolate());
6343 if (UNLIKELY(info.Length() < 1)) {
6344 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, info.Length()));
6345 exceptionState.throwIfNeeded();
6348 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
6349 unsigned clampUnsignedLongArg = 0;
6350 V8TRYCATCH_VOID(double, clampUnsignedLongArgNativeValue, info[0]->NumberValue());
6351 if (!std::isnan(clampUnsignedLongArgNativeValue))
6352 clampUnsignedLongArg = clampTo<unsigned long>(clampUnsignedLongArgNativeValue);
6353 imp->voidMethodClampUnsignedLongArg(clampUnsignedLongArg);
6356 static void voidMethodClampUnsignedLongArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6358 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6359 TestObjectPythonV8Internal::voidMethodClampUnsignedLongArgMethod(info);
6360 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6363 static void voidMethodDefaultUndefinedTestInterfaceEmptyArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6365 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
6366 V8TRYCATCH_VOID(TestInterfaceEmpty*, defaultUndefinedTestInterfaceEmptyArg, V8TestInterfaceEmpty::hasInstance(info[0], info.GetIsolate()) ? V8TestInterfaceEmpty::toNative(v8::Handle<v8::Object>::Cast(info[0])) : 0);
6367 imp->voidMethodDefaultUndefinedTestInterfaceEmptyArg(defaultUndefinedTestInterfaceEmptyArg);
6370 static void voidMethodDefaultUndefinedTestInterfaceEmptyArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6372 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6373 TestObjectPythonV8Internal::voidMethodDefaultUndefinedTestInterfaceEmptyArgMethod(info);
6374 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6377 static void voidMethodDefaultUndefinedLongArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6379 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodDefaultUndefinedLongArg", "TestObjectPython", info.Holder(), info.GetIsolate());
6380 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
6381 V8TRYCATCH_EXCEPTION_VOID(int, defaultUndefinedLongArg, toInt32(info[0], exceptionState), exceptionState);
6382 imp->voidMethodDefaultUndefinedLongArg(defaultUndefinedLongArg);
6385 static void voidMethodDefaultUndefinedLongArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6387 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6388 TestObjectPythonV8Internal::voidMethodDefaultUndefinedLongArgMethod(info);
6389 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6392 static void voidMethodDefaultUndefinedStringArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6394 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
6395 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, defaultUndefinedStringArg, info[0]);
6396 imp->voidMethodDefaultUndefinedStringArg(defaultUndefinedStringArg);
6399 static void voidMethodDefaultUndefinedStringArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6401 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6402 TestObjectPythonV8Internal::voidMethodDefaultUndefinedStringArgMethod(info);
6403 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6406 static void voidMethodDefaultNullStringStringArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6408 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
6409 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, defaultNullStringStringArg, argumentOrNull(info, 0));
6410 imp->voidMethodDefaultNullStringStringArg(defaultNullStringStringArg);
6413 static void voidMethodDefaultNullStringStringArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6415 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6416 TestObjectPythonV8Internal::voidMethodDefaultNullStringStringArgMethod(info);
6417 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6420 static void voidMethodEnforceRangeLongArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6422 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodEnforceRangeLongArg", "TestObjectPython", info.Holder(), info.GetIsolate());
6423 if (UNLIKELY(info.Length() < 1)) {
6424 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, info.Length()));
6425 exceptionState.throwIfNeeded();
6428 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
6429 V8TRYCATCH_EXCEPTION_VOID(int, enforceRangeLongArg, toInt32(info[0], EnforceRange, exceptionState), exceptionState);
6430 imp->voidMethodEnforceRangeLongArg(enforceRangeLongArg);
6433 static void voidMethodEnforceRangeLongArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6435 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6436 TestObjectPythonV8Internal::voidMethodEnforceRangeLongArgMethod(info);
6437 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6440 static void voidMethodTreatNullAsNullStringStringArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6442 if (UNLIKELY(info.Length() < 1)) {
6443 throwTypeError(ExceptionMessages::failedToExecute("voidMethodTreatNullAsNullStringStringArg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
6446 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
6447 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithNullCheck>, treatNullAsNullStringStringArg, info[0]);
6448 imp->voidMethodTreatNullAsNullStringStringArg(treatNullAsNullStringStringArg);
6451 static void voidMethodTreatNullAsNullStringStringArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6453 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6454 TestObjectPythonV8Internal::voidMethodTreatNullAsNullStringStringArgMethod(info);
6455 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6458 static void voidMethodTreatNullAsNullStringTreatUndefinedAsNullStringStringArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6460 if (UNLIKELY(info.Length() < 1)) {
6461 throwTypeError(ExceptionMessages::failedToExecute("voidMethodTreatNullAsNullStringTreatUndefinedAsNullStringStringArg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
6464 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
6465 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithUndefinedOrNullCheck>, treatNullAsNullStringStringArg, info[0]);
6466 imp->voidMethodTreatNullAsNullStringTreatUndefinedAsNullStringStringArg(treatNullAsNullStringStringArg);
6469 static void voidMethodTreatNullAsNullStringTreatUndefinedAsNullStringStringArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6471 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6472 TestObjectPythonV8Internal::voidMethodTreatNullAsNullStringTreatUndefinedAsNullStringStringArgMethod(info);
6473 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6476 static void activityLoggingAccessForAllWorldsMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6478 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
6479 imp->activityLoggingAccessForAllWorldsMethod();
6482 static void activityLoggingAccessForAllWorldsMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6484 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6485 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->GetCurrentContext());
6486 if (contextData && contextData->activityLogger()) {
6487 Vector<v8::Handle<v8::Value> > loggerArgs = toNativeArguments<v8::Handle<v8::Value> >(info, 0);
6488 contextData->activityLogger()->log("TestObjectPython.activityLoggingAccessForAllWorldsMethod", info.Length(), loggerArgs.data(), "Method");
6490 TestObjectPythonV8Internal::activityLoggingAccessForAllWorldsMethodMethod(info);
6491 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6494 static void callWithScriptStateVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6496 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
6497 ScriptState* currentState = ScriptState::current();
6500 ScriptState& state = *currentState;
6501 imp->callWithScriptStateVoidMethod(&state);
6502 if (state.hadException()) {
6503 v8::Local<v8::Value> exception = state.exception();
6504 state.clearException();
6505 throwError(exception, info.GetIsolate());
6510 static void callWithScriptStateVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6512 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6513 TestObjectPythonV8Internal::callWithScriptStateVoidMethodMethod(info);
6514 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6517 static void callWithScriptStateLongMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6519 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
6520 ScriptState* currentState = ScriptState::current();
6523 ScriptState& state = *currentState;
6524 int result = imp->callWithScriptStateLongMethod(&state);
6525 if (state.hadException()) {
6526 v8::Local<v8::Value> exception = state.exception();
6527 state.clearException();
6528 throwError(exception, info.GetIsolate());
6531 v8SetReturnValueInt(info, result);
6534 static void callWithScriptStateLongMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6536 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6537 TestObjectPythonV8Internal::callWithScriptStateLongMethodMethod(info);
6538 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6541 static void callWithExecutionContextVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6543 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
6544 ExecutionContext* scriptContext = currentExecutionContext(info.GetIsolate());
6545 imp->callWithExecutionContextVoidMethod(scriptContext);
6548 static void callWithExecutionContextVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6550 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6551 TestObjectPythonV8Internal::callWithExecutionContextVoidMethodMethod(info);
6552 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6555 static void callWithScriptStateExecutionContextVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6557 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
6558 ScriptState* currentState = ScriptState::current();
6561 ScriptState& state = *currentState;
6562 ExecutionContext* scriptContext = currentExecutionContext(info.GetIsolate());
6563 imp->callWithScriptStateExecutionContextVoidMethod(&state, scriptContext);
6564 if (state.hadException()) {
6565 v8::Local<v8::Value> exception = state.exception();
6566 state.clearException();
6567 throwError(exception, info.GetIsolate());
6572 static void callWithScriptStateExecutionContextVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6574 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6575 TestObjectPythonV8Internal::callWithScriptStateExecutionContextVoidMethodMethod(info);
6576 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6579 static void callWithScriptStateScriptArgumentsVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6581 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
6582 ScriptState* currentState = ScriptState::current();
6585 ScriptState& state = *currentState;
6586 RefPtr<ScriptArguments> scriptArguments(createScriptArguments(info, 0));
6587 imp->callWithScriptStateScriptArgumentsVoidMethod(&state, scriptArguments.release());
6588 if (state.hadException()) {
6589 v8::Local<v8::Value> exception = state.exception();
6590 state.clearException();
6591 throwError(exception, info.GetIsolate());
6596 static void callWithScriptStateScriptArgumentsVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6598 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6599 TestObjectPythonV8Internal::callWithScriptStateScriptArgumentsVoidMethodMethod(info);
6600 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6603 static void callWithScriptStateScriptArgumentsVoidMethodOptionalBooleanArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6605 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
6606 if (UNLIKELY(info.Length() <= 0)) {
6607 ScriptState* currentState = ScriptState::current();
6610 ScriptState& state = *currentState;
6611 RefPtr<ScriptArguments> scriptArguments(createScriptArguments(info, 1));
6612 imp->callWithScriptStateScriptArgumentsVoidMethodOptionalBooleanArg(&state, scriptArguments.release());
6613 if (state.hadException()) {
6614 v8::Local<v8::Value> exception = state.exception();
6615 state.clearException();
6616 throwError(exception, info.GetIsolate());
6621 V8TRYCATCH_VOID(bool, optionalBooleanArg, info[0]->BooleanValue());
6622 ScriptState* currentState = ScriptState::current();
6625 ScriptState& state = *currentState;
6626 RefPtr<ScriptArguments> scriptArguments(createScriptArguments(info, 1));
6627 imp->callWithScriptStateScriptArgumentsVoidMethodOptionalBooleanArg(&state, scriptArguments.release(), optionalBooleanArg);
6628 if (state.hadException()) {
6629 v8::Local<v8::Value> exception = state.exception();
6630 state.clearException();
6631 throwError(exception, info.GetIsolate());
6636 static void callWithScriptStateScriptArgumentsVoidMethodOptionalBooleanArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6638 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6639 TestObjectPythonV8Internal::callWithScriptStateScriptArgumentsVoidMethodOptionalBooleanArgMethod(info);
6640 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6643 static void callWithActiveWindowMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6645 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
6646 imp->callWithActiveWindow(activeDOMWindow(info.GetIsolate()));
6649 static void callWithActiveWindowMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6651 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6652 TestObjectPythonV8Internal::callWithActiveWindowMethod(info);
6653 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6656 static void callWithActiveWindowScriptWindowMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6658 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
6659 imp->callWithActiveWindowScriptWindow(activeDOMWindow(info.GetIsolate()), firstDOMWindow(info.GetIsolate()));
6662 static void callWithActiveWindowScriptWindowMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6664 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6665 TestObjectPythonV8Internal::callWithActiveWindowScriptWindowMethod(info);
6666 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6669 static void checkSecurityForNodeVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6671 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
6672 if (!BindingSecurity::shouldAllowAccessToNode(info.GetIsolate(), imp->checkSecurityForNodeVoidMethod(exceptionState), exceptionState)) {
6673 v8SetReturnValueNull(info);
6674 exceptionState.throwIfNeeded();
6677 imp->checkSecurityForNodeVoidMethod();
6680 static void checkSecurityForNodeVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6682 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6683 TestObjectPythonV8Internal::checkSecurityForNodeVoidMethodMethod(info);
6684 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6687 #if ENABLE(CONDITION)
6688 static void conditionalConditionVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6690 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
6691 imp->conditionalConditionVoidMethod();
6693 #endif // ENABLE(CONDITION)
6695 #if ENABLE(CONDITION)
6696 static void conditionalConditionVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6698 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6699 TestObjectPythonV8Internal::conditionalConditionVoidMethodMethod(info);
6700 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6702 #endif // ENABLE(CONDITION)
6704 #if ENABLE(CONDITION_1) && ENABLE(CONDITION_2)
6705 static void conditionalCondition1AndCondition2VoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6707 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
6708 imp->conditionalCondition1AndCondition2VoidMethod();
6710 #endif // ENABLE(CONDITION_1) && ENABLE(CONDITION_2)
6712 #if ENABLE(CONDITION_1) && ENABLE(CONDITION_2)
6713 static void conditionalCondition1AndCondition2VoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6715 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6716 TestObjectPythonV8Internal::conditionalCondition1AndCondition2VoidMethodMethod(info);
6717 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6719 #endif // ENABLE(CONDITION_1) && ENABLE(CONDITION_2)
6721 #if ENABLE(CONDITION)
6722 static void conditionalConditionStaticVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6724 TestObjectPython::conditionalConditionStaticVoidMethod();
6726 #endif // ENABLE(CONDITION)
6728 #if ENABLE(CONDITION)
6729 static void conditionalConditionStaticVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6731 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6732 TestObjectPythonV8Internal::conditionalConditionStaticVoidMethodMethod(info);
6733 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6735 #endif // ENABLE(CONDITION)
6737 static void customVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6739 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6740 V8TestObjectPython::customVoidMethodMethodCustom(info);
6741 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6744 #if ENABLE(CONDITION)
6745 static void conditionalConditionCustomVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6747 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6748 V8TestObjectPython::conditionalConditionCustomVoidMethodMethodCustom(info);
6749 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6751 #endif // ENABLE(CONDITION)
6753 static void customElementCallbacksVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6755 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
6756 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
6757 imp->customElementCallbacksVoidMethod();
6760 static void customElementCallbacksVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6762 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6763 TestObjectPythonV8Internal::customElementCallbacksVoidMethodMethod(info);
6764 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6767 static void deprecatedVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6769 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
6770 imp->deprecatedVoidMethod();
6773 static void deprecatedVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6775 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6776 UseCounter::countDeprecation(activeExecutionContext(info.GetIsolate()), UseCounter::voidMethod);
6777 TestObjectPythonV8Internal::deprecatedVoidMethodMethod(info);
6778 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6781 static void doNotCheckSignatureVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6783 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
6784 imp->doNotCheckSignatureVoidMethod();
6787 static void doNotCheckSignatureVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6789 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6790 TestObjectPythonV8Internal::doNotCheckSignatureVoidMethodMethod(info);
6791 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6794 static void implementedAsVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6796 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
6797 imp->implementedAsMethodName();
6800 static void implementedAsVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6802 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6803 TestObjectPythonV8Internal::implementedAsVoidMethodMethod(info);
6804 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6807 static void measureAsVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6809 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
6810 imp->measureAsVoidMethod();
6813 static void measureAsVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6815 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6816 UseCounter::count(activeExecutionContext(info.GetIsolate()), UseCounter::TestFeature);
6817 TestObjectPythonV8Internal::measureAsVoidMethodMethod(info);
6818 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6821 static void notEnumerableVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6823 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
6824 imp->notEnumerableVoidMethod();
6827 static void notEnumerableVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6829 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6830 TestObjectPythonV8Internal::notEnumerableVoidMethodMethod(info);
6831 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6834 static void perContextEnabledVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6836 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
6837 imp->perContextEnabledVoidMethod();
6840 static void perContextEnabledVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6842 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6843 TestObjectPythonV8Internal::perContextEnabledVoidMethodMethod(info);
6844 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6847 static void perWorldBindingsVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6849 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
6850 imp->perWorldBindingsVoidMethod();
6853 static void perWorldBindingsVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6855 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6856 TestObjectPythonV8Internal::perWorldBindingsVoidMethodMethod(info);
6857 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6860 static void perWorldBindingsVoidMethodMethodForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info)
6862 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
6863 imp->perWorldBindingsVoidMethod();
6866 static void perWorldBindingsVoidMethodMethodCallbackForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info)
6868 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6869 TestObjectPythonV8Internal::perWorldBindingsVoidMethodMethodForMainWorld(info);
6870 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6873 static void perWorldBindingsVoidMethodTestInterfaceEmptyArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6875 if (UNLIKELY(info.Length() < 1)) {
6876 throwTypeError(ExceptionMessages::failedToExecute("perWorldBindingsVoidMethodTestInterfaceEmptyArg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
6879 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
6880 V8TRYCATCH_VOID(TestInterfaceEmpty*, testInterfaceEmptyArg, V8TestInterfaceEmpty::hasInstance(info[0], info.GetIsolate()) ? V8TestInterfaceEmpty::toNative(v8::Handle<v8::Object>::Cast(info[0])) : 0);
6881 imp->perWorldBindingsVoidMethodTestInterfaceEmptyArg(testInterfaceEmptyArg);
6884 static void perWorldBindingsVoidMethodTestInterfaceEmptyArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6886 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6887 TestObjectPythonV8Internal::perWorldBindingsVoidMethodTestInterfaceEmptyArgMethod(info);
6888 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6891 static void perWorldBindingsVoidMethodTestInterfaceEmptyArgMethodForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info)
6893 if (UNLIKELY(info.Length() < 1)) {
6894 throwTypeError(ExceptionMessages::failedToExecute("perWorldBindingsVoidMethodTestInterfaceEmptyArg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
6897 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
6898 V8TRYCATCH_VOID(TestInterfaceEmpty*, testInterfaceEmptyArg, V8TestInterfaceEmpty::hasInstance(info[0], info.GetIsolate()) ? V8TestInterfaceEmpty::toNative(v8::Handle<v8::Object>::Cast(info[0])) : 0);
6899 imp->perWorldBindingsVoidMethodTestInterfaceEmptyArg(testInterfaceEmptyArg);
6902 static void perWorldBindingsVoidMethodTestInterfaceEmptyArgMethodCallbackForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info)
6904 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6905 TestObjectPythonV8Internal::perWorldBindingsVoidMethodTestInterfaceEmptyArgMethodForMainWorld(info);
6906 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6909 static void activityLoggingForAllWorldsPerWorldBindingsVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6911 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
6912 imp->activityLoggingForAllWorldsPerWorldBindingsVoidMethod();
6915 static void activityLoggingForAllWorldsPerWorldBindingsVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6917 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6918 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->GetCurrentContext());
6919 if (contextData && contextData->activityLogger()) {
6920 Vector<v8::Handle<v8::Value> > loggerArgs = toNativeArguments<v8::Handle<v8::Value> >(info, 0);
6921 contextData->activityLogger()->log("TestObjectPython.activityLoggingForAllWorldsPerWorldBindingsVoidMethod", info.Length(), loggerArgs.data(), "Method");
6923 TestObjectPythonV8Internal::activityLoggingForAllWorldsPerWorldBindingsVoidMethodMethod(info);
6924 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6927 static void activityLoggingForAllWorldsPerWorldBindingsVoidMethodMethodForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info)
6929 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
6930 imp->activityLoggingForAllWorldsPerWorldBindingsVoidMethod();
6933 static void activityLoggingForAllWorldsPerWorldBindingsVoidMethodMethodCallbackForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info)
6935 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6936 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->GetCurrentContext());
6937 if (contextData && contextData->activityLogger()) {
6938 Vector<v8::Handle<v8::Value> > loggerArgs = toNativeArguments<v8::Handle<v8::Value> >(info, 0);
6939 contextData->activityLogger()->log("TestObjectPython.activityLoggingForAllWorldsPerWorldBindingsVoidMethod", info.Length(), loggerArgs.data(), "Method");
6941 TestObjectPythonV8Internal::activityLoggingForAllWorldsPerWorldBindingsVoidMethodMethodForMainWorld(info);
6942 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6945 static void activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6947 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
6948 imp->activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethod();
6951 static void activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6953 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6954 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->GetCurrentContext());
6955 if (contextData && contextData->activityLogger()) {
6956 Vector<v8::Handle<v8::Value> > loggerArgs = toNativeArguments<v8::Handle<v8::Value> >(info, 0);
6957 contextData->activityLogger()->log("TestObjectPython.activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethod", info.Length(), loggerArgs.data(), "Method");
6959 TestObjectPythonV8Internal::activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethodMethod(info);
6960 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6963 static void activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethodMethodForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info)
6965 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
6966 imp->activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethod();
6969 static void activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethodMethodCallbackForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info)
6971 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6972 TestObjectPythonV8Internal::activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethodMethodForMainWorld(info);
6973 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6976 static void raisesExceptionVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6978 ExceptionState exceptionState(ExceptionState::ExecutionContext, "raisesExceptionVoidMethod", "TestObjectPython", info.Holder(), info.GetIsolate());
6979 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
6980 imp->raisesExceptionVoidMethod(exceptionState);
6981 if (exceptionState.throwIfNeeded())
6985 static void raisesExceptionVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6987 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6988 TestObjectPythonV8Internal::raisesExceptionVoidMethodMethod(info);
6989 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6992 static void raisesExceptionStringMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6994 ExceptionState exceptionState(ExceptionState::ExecutionContext, "raisesExceptionStringMethod", "TestObjectPython", info.Holder(), info.GetIsolate());
6995 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
6996 String result = imp->raisesExceptionStringMethod(exceptionState);
6997 if (exceptionState.throwIfNeeded())
6999 v8SetReturnValueString(info, result, info.GetIsolate());
7002 static void raisesExceptionStringMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
7004 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7005 TestObjectPythonV8Internal::raisesExceptionStringMethodMethod(info);
7006 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7009 static void raisesExceptionVoidMethodOptionalLongArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
7011 ExceptionState exceptionState(ExceptionState::ExecutionContext, "raisesExceptionVoidMethodOptionalLongArg", "TestObjectPython", info.Holder(), info.GetIsolate());
7012 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
7013 if (UNLIKELY(info.Length() <= 0)) {
7014 imp->raisesExceptionVoidMethodOptionalLongArg(exceptionState);
7015 if (exceptionState.throwIfNeeded())
7019 V8TRYCATCH_EXCEPTION_VOID(int, optionalLongArg, toInt32(info[0], exceptionState), exceptionState);
7020 imp->raisesExceptionVoidMethodOptionalLongArg(optionalLongArg, exceptionState);
7021 if (exceptionState.throwIfNeeded())
7025 static void raisesExceptionVoidMethodOptionalLongArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
7027 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7028 TestObjectPythonV8Internal::raisesExceptionVoidMethodOptionalLongArgMethod(info);
7029 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7032 static void raisesExceptionVoidMethodTestCallbackInterfaceArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
7034 ExceptionState exceptionState(ExceptionState::ExecutionContext, "raisesExceptionVoidMethodTestCallbackInterfaceArg", "TestObjectPython", info.Holder(), info.GetIsolate());
7035 if (UNLIKELY(info.Length() < 1)) {
7036 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, info.Length()));
7037 exceptionState.throwIfNeeded();
7040 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
7041 if (info.Length() <= 0 || !info[0]->IsFunction()) {
7042 exceptionState.throwTypeError("The callback provided as parameter 1 is not a function.");
7043 exceptionState.throwIfNeeded();
7046 OwnPtr<TestCallbackInterface> testCallbackInterfaceArg = V8TestCallbackInterface::create(v8::Handle<v8::Function>::Cast(info[0]), currentExecutionContext(info.GetIsolate()));
7047 imp->raisesExceptionVoidMethodTestCallbackInterfaceArg(testCallbackInterfaceArg.release(), exceptionState);
7048 if (exceptionState.throwIfNeeded())
7052 static void raisesExceptionVoidMethodTestCallbackInterfaceArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
7054 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7055 TestObjectPythonV8Internal::raisesExceptionVoidMethodTestCallbackInterfaceArgMethod(info);
7056 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7059 static void raisesExceptionVoidMethodOptionalTestCallbackInterfaceArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
7061 ExceptionState exceptionState(ExceptionState::ExecutionContext, "raisesExceptionVoidMethodOptionalTestCallbackInterfaceArg", "TestObjectPython", info.Holder(), info.GetIsolate());
7062 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
7063 OwnPtr<TestCallbackInterface> optionalTestCallbackInterfaceArg;
7064 if (info.Length() > 0 && !isUndefinedOrNull(info[0])) {
7065 if (!info[0]->IsFunction()) {
7066 exceptionState.throwTypeError("The callback provided as parameter 1 is not a function.");
7067 exceptionState.throwIfNeeded();
7070 optionalTestCallbackInterfaceArg = V8TestCallbackInterface::create(v8::Handle<v8::Function>::Cast(info[0]), currentExecutionContext(info.GetIsolate()));
7072 imp->raisesExceptionVoidMethodOptionalTestCallbackInterfaceArg(optionalTestCallbackInterfaceArg.release(), exceptionState);
7073 if (exceptionState.throwIfNeeded())
7077 static void raisesExceptionVoidMethodOptionalTestCallbackInterfaceArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
7079 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7080 TestObjectPythonV8Internal::raisesExceptionVoidMethodOptionalTestCallbackInterfaceArgMethod(info);
7081 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7084 static void raisesExceptionTestInterfaceEmptyVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
7086 ExceptionState exceptionState(ExceptionState::ExecutionContext, "raisesExceptionTestInterfaceEmptyVoidMethod", "TestObjectPython", info.Holder(), info.GetIsolate());
7087 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
7088 RefPtr<TestInterfaceEmpty> result = imp->raisesExceptionTestInterfaceEmptyVoidMethod(exceptionState);
7089 if (exceptionState.throwIfNeeded())
7091 v8SetReturnValue(info, result.release());
7094 static void raisesExceptionTestInterfaceEmptyVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
7096 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7097 TestObjectPythonV8Internal::raisesExceptionTestInterfaceEmptyVoidMethodMethod(info);
7098 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7101 static void readOnlyVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
7103 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
7104 imp->readOnlyVoidMethod();
7107 static void readOnlyVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
7109 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7110 TestObjectPythonV8Internal::readOnlyVoidMethodMethod(info);
7111 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7114 static void notEnumerableReadOnlyVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
7116 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
7117 imp->notEnumerableReadOnlyVoidMethod();
7120 static void notEnumerableReadOnlyVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
7122 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7123 TestObjectPythonV8Internal::notEnumerableReadOnlyVoidMethodMethod(info);
7124 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7127 static void runtimeEnabledVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
7129 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
7130 imp->runtimeEnabledVoidMethod();
7133 static void runtimeEnabledVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
7135 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7136 TestObjectPythonV8Internal::runtimeEnabledVoidMethodMethod(info);
7137 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7140 static void perWorldBindingsRuntimeEnabledVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
7142 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
7143 imp->perWorldBindingsRuntimeEnabledVoidMethod();
7146 static void perWorldBindingsRuntimeEnabledVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
7148 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7149 TestObjectPythonV8Internal::perWorldBindingsRuntimeEnabledVoidMethodMethod(info);
7150 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7153 static void perWorldBindingsRuntimeEnabledVoidMethodMethodForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info)
7155 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
7156 imp->perWorldBindingsRuntimeEnabledVoidMethod();
7159 static void perWorldBindingsRuntimeEnabledVoidMethodMethodCallbackForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info)
7161 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7162 TestObjectPythonV8Internal::perWorldBindingsRuntimeEnabledVoidMethodMethodForMainWorld(info);
7163 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7166 static void strictTypeCheckingVoidMethodTestInterfaceEmptyArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
7168 if (UNLIKELY(info.Length() < 1)) {
7169 throwTypeError(ExceptionMessages::failedToExecute("strictTypeCheckingVoidMethodTestInterfaceEmptyArg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
7172 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
7173 if (info.Length() > 0 && !V8TestInterfaceEmpty::hasInstance(info[0], info.GetIsolate())) {
7174 throwTypeError(ExceptionMessages::failedToExecute("strictTypeCheckingVoidMethodTestInterfaceEmptyArg", "TestObjectPython", "parameter 1 is not of type 'TestInterfaceEmpty'."), info.GetIsolate());
7177 V8TRYCATCH_VOID(TestInterfaceEmpty*, testInterfaceEmptyArg, V8TestInterfaceEmpty::hasInstance(info[0], info.GetIsolate()) ? V8TestInterfaceEmpty::toNative(v8::Handle<v8::Object>::Cast(info[0])) : 0);
7178 imp->strictTypeCheckingVoidMethodTestInterfaceEmptyArg(testInterfaceEmptyArg);
7181 static void strictTypeCheckingVoidMethodTestInterfaceEmptyArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
7183 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7184 TestObjectPythonV8Internal::strictTypeCheckingVoidMethodTestInterfaceEmptyArgMethod(info);
7185 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7188 static void strictTypeCheckingVoidMethodNullableTestInterfaceEmptyArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
7190 if (UNLIKELY(info.Length() < 1)) {
7191 throwTypeError(ExceptionMessages::failedToExecute("strictTypeCheckingVoidMethodNullableTestInterfaceEmptyArg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
7194 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
7195 if (info.Length() > 0 && !isUndefinedOrNull(info[0]) && !V8TestInterfaceEmpty::hasInstance(info[0], info.GetIsolate())) {
7196 throwTypeError(ExceptionMessages::failedToExecute("strictTypeCheckingVoidMethodNullableTestInterfaceEmptyArg", "TestObjectPython", "parameter 1 is not of type 'TestInterfaceEmpty'."), info.GetIsolate());
7199 V8TRYCATCH_VOID(TestInterfaceEmpty*, testInterfaceEmptyArg, V8TestInterfaceEmpty::hasInstance(info[0], info.GetIsolate()) ? V8TestInterfaceEmpty::toNative(v8::Handle<v8::Object>::Cast(info[0])) : 0);
7200 imp->strictTypeCheckingVoidMethodNullableTestInterfaceEmptyArg(testInterfaceEmptyArg);
7203 static void strictTypeCheckingVoidMethodNullableTestInterfaceEmptyArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
7205 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7206 TestObjectPythonV8Internal::strictTypeCheckingVoidMethodNullableTestInterfaceEmptyArgMethod(info);
7207 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7210 static void treatReturnedNullStringAsNullStringMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
7212 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
7213 v8SetReturnValueStringOrNull(info, imp->treatReturnedNullStringAsNullStringMethod(), info.GetIsolate());
7216 static void treatReturnedNullStringAsNullStringMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
7218 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7219 TestObjectPythonV8Internal::treatReturnedNullStringAsNullStringMethodMethod(info);
7220 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7223 static void treatReturnedNullStringAsUndefinedStringMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
7225 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
7226 v8SetReturnValueStringOrUndefined(info, imp->treatReturnedNullStringAsUndefinedStringMethod(), info.GetIsolate());
7229 static void treatReturnedNullStringAsUndefinedStringMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
7231 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7232 TestObjectPythonV8Internal::treatReturnedNullStringAsUndefinedStringMethodMethod(info);
7233 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7236 static void unforgeableVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
7238 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
7239 imp->unforgeableVoidMethod();
7242 static void unforgeableVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
7244 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7245 TestObjectPythonV8Internal::unforgeableVoidMethodMethod(info);
7246 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7249 } // namespace TestObjectPythonV8Internal
7251 static const V8DOMConfiguration::AttributeConfiguration V8TestObjectPythonAttributes[] = {
7252 {"readonlyStringAttribute", TestObjectPythonV8Internal::readonlyStringAttributeAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7253 {"readonlyTestInterfaceEmptyAttribute", TestObjectPythonV8Internal::readonlyTestInterfaceEmptyAttributeAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7254 {"readonlyLongAttribute", TestObjectPythonV8Internal::readonlyLongAttributeAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7255 {"dateAttribute", TestObjectPythonV8Internal::dateAttributeAttributeGetterCallback, TestObjectPythonV8Internal::dateAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7256 {"stringAttribute", TestObjectPythonV8Internal::stringAttributeAttributeGetterCallback, TestObjectPythonV8Internal::stringAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7257 {"readonlyDOMTimeStampAttribute", TestObjectPythonV8Internal::readonlyDOMTimeStampAttributeAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7258 {"booleanAttribute", TestObjectPythonV8Internal::booleanAttributeAttributeGetterCallback, TestObjectPythonV8Internal::booleanAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7259 {"byteAttribute", TestObjectPythonV8Internal::byteAttributeAttributeGetterCallback, TestObjectPythonV8Internal::byteAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7260 {"doubleAttribute", TestObjectPythonV8Internal::doubleAttributeAttributeGetterCallback, TestObjectPythonV8Internal::doubleAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7261 {"floatAttribute", TestObjectPythonV8Internal::floatAttributeAttributeGetterCallback, TestObjectPythonV8Internal::floatAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7262 {"longAttribute", TestObjectPythonV8Internal::longAttributeAttributeGetterCallback, TestObjectPythonV8Internal::longAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7263 {"longLongAttribute", TestObjectPythonV8Internal::longLongAttributeAttributeGetterCallback, TestObjectPythonV8Internal::longLongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7264 {"octetAttribute", TestObjectPythonV8Internal::octetAttributeAttributeGetterCallback, TestObjectPythonV8Internal::octetAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7265 {"shortAttribute", TestObjectPythonV8Internal::shortAttributeAttributeGetterCallback, TestObjectPythonV8Internal::shortAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7266 {"unsignedLongAttribute", TestObjectPythonV8Internal::unsignedLongAttributeAttributeGetterCallback, TestObjectPythonV8Internal::unsignedLongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7267 {"unsignedLongLongAttribute", TestObjectPythonV8Internal::unsignedLongLongAttributeAttributeGetterCallback, TestObjectPythonV8Internal::unsignedLongLongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7268 {"unsignedShortAttribute", TestObjectPythonV8Internal::unsignedShortAttributeAttributeGetterCallback, TestObjectPythonV8Internal::unsignedShortAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7269 {"testInterfaceEmptyAttribute", TestObjectPythonV8Internal::testInterfaceEmptyAttributeAttributeGetterCallback, TestObjectPythonV8Internal::testInterfaceEmptyAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7270 {"testObjectPythonAttribute", TestObjectPythonV8Internal::testObjectPythonAttributeAttributeGetterCallback, TestObjectPythonV8Internal::testObjectPythonAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7271 {"voidCallbackFunctionAttribute", TestObjectPythonV8Internal::voidCallbackFunctionAttributeAttributeGetterCallback, TestObjectPythonV8Internal::voidCallbackFunctionAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7272 {"anyCallbackFunctionOptionalAnyArgAttribute", TestObjectPythonV8Internal::anyCallbackFunctionOptionalAnyArgAttributeAttributeGetterCallback, TestObjectPythonV8Internal::anyCallbackFunctionOptionalAnyArgAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7273 {"cssAttribute", TestObjectPythonV8Internal::cssAttributeAttributeGetterCallback, TestObjectPythonV8Internal::cssAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7274 {"imeAttribute", TestObjectPythonV8Internal::imeAttributeAttributeGetterCallback, TestObjectPythonV8Internal::imeAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7275 {"svgAttribute", TestObjectPythonV8Internal::svgAttributeAttributeGetterCallback, TestObjectPythonV8Internal::svgAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7276 {"xmlAttribute", TestObjectPythonV8Internal::xmlAttributeAttributeGetterCallback, TestObjectPythonV8Internal::xmlAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7277 {"nodeFilterAttribute", TestObjectPythonV8Internal::nodeFilterAttributeAttributeGetterCallback, TestObjectPythonV8Internal::nodeFilterAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7278 {"serializedScriptValueAttribute", TestObjectPythonV8Internal::serializedScriptValueAttributeAttributeGetterCallback, TestObjectPythonV8Internal::serializedScriptValueAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7279 {"anyAttribute", TestObjectPythonV8Internal::anyAttributeAttributeGetterCallback, TestObjectPythonV8Internal::anyAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7280 {"promiseAttribute", TestObjectPythonV8Internal::promiseAttributeAttributeGetterCallback, TestObjectPythonV8Internal::promiseAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7281 {"windowAttribute", TestObjectPythonV8Internal::windowAttributeAttributeGetterCallback, TestObjectPythonV8Internal::windowAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7282 {"documentAttribute", TestObjectPythonV8Internal::documentAttributeAttributeGetterCallback, TestObjectPythonV8Internal::documentAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7283 {"documentFragmentAttribute", TestObjectPythonV8Internal::documentFragmentAttributeAttributeGetterCallback, TestObjectPythonV8Internal::documentFragmentAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7284 {"documentTypeAttribute", TestObjectPythonV8Internal::documentTypeAttributeAttributeGetterCallback, TestObjectPythonV8Internal::documentTypeAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7285 {"elementAttribute", TestObjectPythonV8Internal::elementAttributeAttributeGetterCallback, TestObjectPythonV8Internal::elementAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7286 {"nodeAttribute", TestObjectPythonV8Internal::nodeAttributeAttributeGetterCallback, TestObjectPythonV8Internal::nodeAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7287 {"shadowRootAttribute", TestObjectPythonV8Internal::shadowRootAttributeAttributeGetterCallback, TestObjectPythonV8Internal::shadowRootAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7288 {"arrayBufferAttribute", TestObjectPythonV8Internal::arrayBufferAttributeAttributeGetterCallback, TestObjectPythonV8Internal::arrayBufferAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7289 {"float32ArrayAttribute", TestObjectPythonV8Internal::float32ArrayAttributeAttributeGetterCallback, TestObjectPythonV8Internal::float32ArrayAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7290 {"uint8ArrayAttribute", TestObjectPythonV8Internal::uint8ArrayAttributeAttributeGetterCallback, TestObjectPythonV8Internal::uint8ArrayAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7291 {"self", TestObjectPythonV8Internal::selfAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7292 {"readonlyEventTargetAttribute", TestObjectPythonV8Internal::readonlyEventTargetAttributeAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7293 {"readonlyWindowAttribute", TestObjectPythonV8Internal::readonlyWindowAttributeAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7294 {"htmlCollectionAttribute", TestObjectPythonV8Internal::htmlCollectionAttributeAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7295 {"htmlElementAttribute", TestObjectPythonV8Internal::htmlElementAttributeAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7296 {"stringArrayAttribute", TestObjectPythonV8Internal::stringArrayAttributeAttributeGetterCallback, TestObjectPythonV8Internal::stringArrayAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7297 {"testInterfaceEmptyArrayAttribute", TestObjectPythonV8Internal::testInterfaceEmptyArrayAttributeAttributeGetterCallback, TestObjectPythonV8Internal::testInterfaceEmptyArrayAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7298 {"floatArrayAttribute", TestObjectPythonV8Internal::floatArrayAttributeAttributeGetterCallback, TestObjectPythonV8Internal::floatArrayAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7299 {"nullableStringAttribute", TestObjectPythonV8Internal::nullableStringAttributeAttributeGetterCallback, TestObjectPythonV8Internal::nullableStringAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7300 {"nullableLongAttribute", TestObjectPythonV8Internal::nullableLongAttributeAttributeGetterCallback, TestObjectPythonV8Internal::nullableLongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7301 {"nullableTestInterfaceAttribute", TestObjectPythonV8Internal::nullableTestInterfaceAttributeAttributeGetterCallback, TestObjectPythonV8Internal::nullableTestInterfaceAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7302 {"testEnumAttribute", TestObjectPythonV8Internal::testEnumAttributeAttributeGetterCallback, TestObjectPythonV8Internal::testEnumAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7303 {"testObjectAConstructorAttribute", TestObjectPythonV8Internal::TestObjectPythonConstructorGetter, TestObjectPythonV8Internal::TestObjectPythonReplaceableAttributeSetterCallback, 0, 0, const_cast<WrapperTypeInfo*>(&V8TestObjectA::wrapperTypeInfo), static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::DontEnum), 0 /* on instance */},
7304 {"eventHandlerAttribute", TestObjectPythonV8Internal::eventHandlerAttributeAttributeGetterCallback, TestObjectPythonV8Internal::eventHandlerAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7305 {"activityLoggingAccessForAllWorldsLongAttribute", TestObjectPythonV8Internal::activityLoggingAccessForAllWorldsLongAttributeAttributeGetterCallback, TestObjectPythonV8Internal::activityLoggingAccessForAllWorldsLongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7306 {"activityLoggingGetterForAllWorldsLongAttribute", TestObjectPythonV8Internal::activityLoggingGetterForAllWorldsLongAttributeAttributeGetterCallback, TestObjectPythonV8Internal::activityLoggingGetterForAllWorldsLongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7307 {"activityLoggingSetterForAllWorldsLongAttribute", TestObjectPythonV8Internal::activityLoggingSetterForAllWorldsLongAttributeAttributeGetterCallback, TestObjectPythonV8Internal::activityLoggingSetterForAllWorldsLongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7308 {"cachedAttributeAnyAttribute", TestObjectPythonV8Internal::cachedAttributeAnyAttributeAttributeGetterCallback, TestObjectPythonV8Internal::cachedAttributeAnyAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7309 {"callWithExecutionContextAnyAttribute", TestObjectPythonV8Internal::callWithExecutionContextAnyAttributeAttributeGetterCallback, TestObjectPythonV8Internal::callWithExecutionContextAnyAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7310 {"checkSecurityForNodeReadonlyDocumentAttribute", TestObjectPythonV8Internal::checkSecurityForNodeReadonlyDocumentAttributeAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7311 #if ENABLE(CONDITION)
7312 {"conditionalLongAttribute", TestObjectPythonV8Internal::conditionalLongAttributeAttributeGetterCallback, TestObjectPythonV8Internal::conditionalLongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7313 #endif // ENABLE(CONDITION)
7314 #if ENABLE(CONDITION_1) && ENABLE(CONDITION_2)
7315 {"conditionalAndLongAttribute", TestObjectPythonV8Internal::conditionalAndLongAttributeAttributeGetterCallback, TestObjectPythonV8Internal::conditionalAndLongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7316 #endif // ENABLE(CONDITION_1) && ENABLE(CONDITION_2)
7317 #if ENABLE(CONDITION_1) || ENABLE(CONDITION_2)
7318 {"conditionalOrLongAttribute", TestObjectPythonV8Internal::conditionalOrLongAttributeAttributeGetterCallback, TestObjectPythonV8Internal::conditionalOrLongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7319 #endif // ENABLE(CONDITION_1) || ENABLE(CONDITION_2)
7320 {"customObjectAttribute", TestObjectPythonV8Internal::customObjectAttributeAttributeGetterCallback, TestObjectPythonV8Internal::customObjectAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7321 {"customGetterLongAttribute", TestObjectPythonV8Internal::customGetterLongAttributeAttributeGetterCallback, TestObjectPythonV8Internal::customGetterLongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7322 {"customGetterReadonlyObjectAttribute", TestObjectPythonV8Internal::customGetterReadonlyObjectAttributeAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7323 {"customSetterLongAttribute", TestObjectPythonV8Internal::customSetterLongAttributeAttributeGetterCallback, TestObjectPythonV8Internal::customSetterLongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7324 #if ENABLE(CONDITION)
7325 {"customLongAttribute", TestObjectPythonV8Internal::customLongAttributeAttributeGetterCallback, TestObjectPythonV8Internal::customLongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7326 #endif // ENABLE(CONDITION)
7327 {"customElementsCallbacksReadonlyLongAttribute", TestObjectPythonV8Internal::customElementsCallbacksReadonlyLongAttributeAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7328 {"deprecatedLongAttribute", TestObjectPythonV8Internal::deprecatedLongAttributeAttributeGetterCallback, TestObjectPythonV8Internal::deprecatedLongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7329 {"enforceRangeLongAttribute", TestObjectPythonV8Internal::enforceRangeLongAttributeAttributeGetterCallback, TestObjectPythonV8Internal::enforceRangeLongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7330 {"implementedAsLongAttribute", TestObjectPythonV8Internal::implementedAsLongAttributeAttributeGetterCallback, TestObjectPythonV8Internal::implementedAsLongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7331 {"customImplementedAsLongAttribute", TestObjectPythonV8Internal::customImplementedAsLongAttributeAttributeGetterCallback, TestObjectPythonV8Internal::customImplementedAsLongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7332 {"customGetterImplementedAsLongAttribute", TestObjectPythonV8Internal::customGetterImplementedAsLongAttributeAttributeGetterCallback, TestObjectPythonV8Internal::customGetterImplementedAsLongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7333 {"customSetterImplementedAsLongAttribute", TestObjectPythonV8Internal::customSetterImplementedAsLongAttributeAttributeGetterCallback, TestObjectPythonV8Internal::customSetterImplementedAsLongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7334 {"measureAsLongAttribute", TestObjectPythonV8Internal::measureAsLongAttributeAttributeGetterCallback, TestObjectPythonV8Internal::measureAsLongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7335 {"notEnumerableLongAttribute", TestObjectPythonV8Internal::notEnumerableLongAttributeAttributeGetterCallback, TestObjectPythonV8Internal::notEnumerableLongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::DontEnum), 0 /* on instance */},
7336 {"perWorldBindingsLongAttribute", TestObjectPythonV8Internal::perWorldBindingsLongAttributeAttributeGetterCallback, TestObjectPythonV8Internal::perWorldBindingsLongAttributeAttributeSetterCallback, TestObjectPythonV8Internal::perWorldBindingsLongAttributeAttributeGetterCallbackForMainWorld, TestObjectPythonV8Internal::perWorldBindingsLongAttributeAttributeSetterCallbackForMainWorld, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7337 {"perWorldBindingsReadonlyLongAttribute", TestObjectPythonV8Internal::perWorldBindingsReadonlyLongAttributeAttributeGetterCallback, 0, TestObjectPythonV8Internal::perWorldBindingsReadonlyLongAttributeAttributeGetterCallbackForMainWorld, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7338 {"perWorldBindingsReadonlyTestInterfaceEmptyAttribute", TestObjectPythonV8Internal::perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetterCallback, 0, TestObjectPythonV8Internal::perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetterCallbackForMainWorld, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7339 {"activityLoggingAccessPerWorldBindingsLongAttribute", TestObjectPythonV8Internal::activityLoggingAccessPerWorldBindingsLongAttributeAttributeGetterCallback, TestObjectPythonV8Internal::activityLoggingAccessPerWorldBindingsLongAttributeAttributeSetterCallback, TestObjectPythonV8Internal::activityLoggingAccessPerWorldBindingsLongAttributeAttributeGetterCallbackForMainWorld, TestObjectPythonV8Internal::activityLoggingAccessPerWorldBindingsLongAttributeAttributeSetterCallbackForMainWorld, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7340 {"activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttribute", TestObjectPythonV8Internal::activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeAttributeGetterCallback, TestObjectPythonV8Internal::activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeAttributeSetterCallback, TestObjectPythonV8Internal::activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeAttributeGetterCallbackForMainWorld, TestObjectPythonV8Internal::activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeAttributeSetterCallbackForMainWorld, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7341 {"activityLoggingGetterPerWorldBindingsLongAttribute", TestObjectPythonV8Internal::activityLoggingGetterPerWorldBindingsLongAttributeAttributeGetterCallback, TestObjectPythonV8Internal::activityLoggingGetterPerWorldBindingsLongAttributeAttributeSetterCallback, TestObjectPythonV8Internal::activityLoggingGetterPerWorldBindingsLongAttributeAttributeGetterCallbackForMainWorld, TestObjectPythonV8Internal::activityLoggingGetterPerWorldBindingsLongAttributeAttributeSetterCallbackForMainWorld, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7342 {"activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttribute", TestObjectPythonV8Internal::activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeAttributeGetterCallback, TestObjectPythonV8Internal::activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeAttributeSetterCallback, TestObjectPythonV8Internal::activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeAttributeGetterCallbackForMainWorld, TestObjectPythonV8Internal::activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeAttributeSetterCallbackForMainWorld, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7343 {"location", TestObjectPythonV8Internal::locationAttributeGetterCallback, TestObjectPythonV8Internal::locationAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7344 {"locationWithException", TestObjectPythonV8Internal::locationWithExceptionAttributeGetterCallback, TestObjectPythonV8Internal::locationWithExceptionAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7345 {"locationWithCallWith", TestObjectPythonV8Internal::locationWithCallWithAttributeGetterCallback, TestObjectPythonV8Internal::locationWithCallWithAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7346 {"locationWithPerWorldBindings", TestObjectPythonV8Internal::locationWithPerWorldBindingsAttributeGetterCallback, TestObjectPythonV8Internal::locationWithPerWorldBindingsAttributeSetterCallback, TestObjectPythonV8Internal::locationWithPerWorldBindingsAttributeGetterCallbackForMainWorld, TestObjectPythonV8Internal::locationWithPerWorldBindingsAttributeSetterCallbackForMainWorld, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7347 {"raisesExceptionLongAttribute", TestObjectPythonV8Internal::raisesExceptionLongAttributeAttributeGetterCallback, TestObjectPythonV8Internal::raisesExceptionLongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7348 {"raisesExceptionGetterLongAttribute", TestObjectPythonV8Internal::raisesExceptionGetterLongAttributeAttributeGetterCallback, TestObjectPythonV8Internal::raisesExceptionGetterLongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7349 {"setterRaisesExceptionLongAttribute", TestObjectPythonV8Internal::setterRaisesExceptionLongAttributeAttributeGetterCallback, TestObjectPythonV8Internal::setterRaisesExceptionLongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7350 {"raisesExceptionTestInterfaceEmptyAttribute", TestObjectPythonV8Internal::raisesExceptionTestInterfaceEmptyAttributeAttributeGetterCallback, TestObjectPythonV8Internal::raisesExceptionTestInterfaceEmptyAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7351 {"cachedAttributeRaisesExceptionGetterAnyAttribute", TestObjectPythonV8Internal::cachedAttributeRaisesExceptionGetterAnyAttributeAttributeGetterCallback, TestObjectPythonV8Internal::cachedAttributeRaisesExceptionGetterAnyAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7352 {"reflectTestInterfaceAttribute", TestObjectPythonV8Internal::reflectTestInterfaceAttributeAttributeGetterCallback, TestObjectPythonV8Internal::reflectTestInterfaceAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7353 {"reflectReflectedNameAttributeTestAttribute", TestObjectPythonV8Internal::reflectReflectedNameAttributeTestAttributeAttributeGetterCallback, TestObjectPythonV8Internal::reflectReflectedNameAttributeTestAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7354 {"reflectBooleanAttribute", TestObjectPythonV8Internal::reflectBooleanAttributeAttributeGetterCallback, TestObjectPythonV8Internal::reflectBooleanAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7355 {"reflectLongAttribute", TestObjectPythonV8Internal::reflectLongAttributeAttributeGetterCallback, TestObjectPythonV8Internal::reflectLongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7356 {"reflectUnsignedShortAttribute", TestObjectPythonV8Internal::reflectUnsignedShortAttributeAttributeGetterCallback, TestObjectPythonV8Internal::reflectUnsignedShortAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7357 {"reflectUnsignedLongAttribute", TestObjectPythonV8Internal::reflectUnsignedLongAttributeAttributeGetterCallback, TestObjectPythonV8Internal::reflectUnsignedLongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7358 {"id", TestObjectPythonV8Internal::idAttributeGetterCallback, TestObjectPythonV8Internal::idAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7359 {"name", TestObjectPythonV8Internal::nameAttributeGetterCallback, TestObjectPythonV8Internal::nameAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7360 {"class", TestObjectPythonV8Internal::classAttributeGetterCallback, TestObjectPythonV8Internal::classAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7361 {"reflectedId", TestObjectPythonV8Internal::reflectedIdAttributeGetterCallback, TestObjectPythonV8Internal::reflectedIdAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7362 {"reflectedName", TestObjectPythonV8Internal::reflectedNameAttributeGetterCallback, TestObjectPythonV8Internal::reflectedNameAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7363 {"reflectedClass", TestObjectPythonV8Internal::reflectedClassAttributeGetterCallback, TestObjectPythonV8Internal::reflectedClassAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7364 {"limitedToOnlyOneAttribute", TestObjectPythonV8Internal::limitedToOnlyOneAttributeAttributeGetterCallback, TestObjectPythonV8Internal::limitedToOnlyOneAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7365 {"limitedToOnlyAttribute", TestObjectPythonV8Internal::limitedToOnlyAttributeAttributeGetterCallback, TestObjectPythonV8Internal::limitedToOnlyAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7366 {"limitedToOnlyOtherAttribute", TestObjectPythonV8Internal::limitedToOnlyOtherAttributeAttributeGetterCallback, TestObjectPythonV8Internal::limitedToOnlyOtherAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7367 {"limitedWithMissingDefaultAttribute", TestObjectPythonV8Internal::limitedWithMissingDefaultAttributeAttributeGetterCallback, TestObjectPythonV8Internal::limitedWithMissingDefaultAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7368 {"limitedWithInvalidMissingDefaultAttribute", TestObjectPythonV8Internal::limitedWithInvalidMissingDefaultAttributeAttributeGetterCallback, TestObjectPythonV8Internal::limitedWithInvalidMissingDefaultAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7369 {"corsSettingAttribute", TestObjectPythonV8Internal::corsSettingAttributeAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7370 {"limitedWithEmptyMissingInvalidAttribute", TestObjectPythonV8Internal::limitedWithEmptyMissingInvalidAttributeAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7371 {"replaceableReadonlyLongAttribute", TestObjectPythonV8Internal::replaceableReadonlyLongAttributeAttributeGetterCallback, TestObjectPythonV8Internal::TestObjectPythonReplaceableAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7372 {"locationReplaceable", TestObjectPythonV8Internal::locationReplaceableAttributeGetterCallback, TestObjectPythonV8Internal::locationReplaceableAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7373 {"setterCallWithActiveWindowAndFirstWindowStringAttribute", TestObjectPythonV8Internal::setterCallWithActiveWindowAndFirstWindowStringAttributeAttributeGetterCallback, TestObjectPythonV8Internal::setterCallWithActiveWindowAndFirstWindowStringAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7374 {"setterCallWithExecutionContextStringAttribute", TestObjectPythonV8Internal::setterCallWithExecutionContextStringAttributeAttributeGetterCallback, TestObjectPythonV8Internal::setterCallWithExecutionContextStringAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7375 {"strictTypeCheckingFloatAttribute", TestObjectPythonV8Internal::strictTypeCheckingFloatAttributeAttributeGetterCallback, TestObjectPythonV8Internal::strictTypeCheckingFloatAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7376 {"strictTypeCheckingTestInterfaceAttribute", TestObjectPythonV8Internal::strictTypeCheckingTestInterfaceAttributeAttributeGetterCallback, TestObjectPythonV8Internal::strictTypeCheckingTestInterfaceAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7377 {"treatNullAsNullStringStringAttribute", TestObjectPythonV8Internal::treatNullAsNullStringStringAttributeAttributeGetterCallback, TestObjectPythonV8Internal::treatNullAsNullStringStringAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7378 {"treatReturnedNullStringAsNullStringAttribute", TestObjectPythonV8Internal::treatReturnedNullStringAsNullStringAttributeAttributeGetterCallback, TestObjectPythonV8Internal::treatReturnedNullStringAsNullStringAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7379 {"treatReturnedNullStringAsUndefinedStringAttribute", TestObjectPythonV8Internal::treatReturnedNullStringAsUndefinedStringAttributeAttributeGetterCallback, TestObjectPythonV8Internal::treatReturnedNullStringAsUndefinedStringAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7380 {"urlStringAttribute", TestObjectPythonV8Internal::urlStringAttributeAttributeGetterCallback, TestObjectPythonV8Internal::urlStringAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7381 {"urlStringAttribute", TestObjectPythonV8Internal::urlStringAttributeAttributeGetterCallback, TestObjectPythonV8Internal::urlStringAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7382 {"unforgeableLongAttribute", TestObjectPythonV8Internal::unforgeableLongAttributeAttributeGetterCallback, TestObjectPythonV8Internal::unforgeableLongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::PROHIBITS_OVERWRITING), static_cast<v8::PropertyAttribute>(v8::DontDelete), 0 /* on instance */},
7383 {"anotherStringAttribute", TestObjectPythonV8Internal::anotherStringAttributeAttributeGetterCallback, TestObjectPythonV8Internal::anotherStringAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7384 {"testInterfacePythonAttribute", TestObjectPythonV8Internal::testInterfacePythonAttributeAttributeGetterCallback, TestObjectPythonV8Internal::testInterfacePythonAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7385 {"testInterfaceWillBeGarbageCollectedAttribute", TestObjectPythonV8Internal::testInterfaceWillBeGarbageCollectedAttributeAttributeGetterCallback, TestObjectPythonV8Internal::testInterfaceWillBeGarbageCollectedAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7388 static const V8DOMConfiguration::AccessorConfiguration V8TestObjectPythonAccessors[] = {
7389 {"exposeJSAccessorsLongAttribute", TestObjectPythonV8Internal::exposeJSAccessorsLongAttributeAttributeGetterCallback, TestObjectPythonV8Internal::exposeJSAccessorsLongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None)},
7392 static const V8DOMConfiguration::MethodConfiguration V8TestObjectPythonMethods[] = {
7393 {"voidMethod", TestObjectPythonV8Internal::voidMethodMethodCallback, 0, 0},
7394 {"dateMethod", TestObjectPythonV8Internal::dateMethodMethodCallback, 0, 0},
7395 {"stringMethod", TestObjectPythonV8Internal::stringMethodMethodCallback, 0, 0},
7396 {"readonlyDOMTimeStampMethod", TestObjectPythonV8Internal::readonlyDOMTimeStampMethodMethodCallback, 0, 0},
7397 {"booleanMethod", TestObjectPythonV8Internal::booleanMethodMethodCallback, 0, 0},
7398 {"byteMethod", TestObjectPythonV8Internal::byteMethodMethodCallback, 0, 0},
7399 {"doubleMethod", TestObjectPythonV8Internal::doubleMethodMethodCallback, 0, 0},
7400 {"floatMethod", TestObjectPythonV8Internal::floatMethodMethodCallback, 0, 0},
7401 {"longMethod", TestObjectPythonV8Internal::longMethodMethodCallback, 0, 0},
7402 {"longLongMethod", TestObjectPythonV8Internal::longLongMethodMethodCallback, 0, 0},
7403 {"octetMethod", TestObjectPythonV8Internal::octetMethodMethodCallback, 0, 0},
7404 {"shortMethod", TestObjectPythonV8Internal::shortMethodMethodCallback, 0, 0},
7405 {"unsignedLongMethod", TestObjectPythonV8Internal::unsignedLongMethodMethodCallback, 0, 0},
7406 {"unsignedLongLongMethod", TestObjectPythonV8Internal::unsignedLongLongMethodMethodCallback, 0, 0},
7407 {"unsignedShortMethod", TestObjectPythonV8Internal::unsignedShortMethodMethodCallback, 0, 0},
7408 {"voidMethodDateArg", TestObjectPythonV8Internal::voidMethodDateArgMethodCallback, 0, 1},
7409 {"voidMethodStringArg", TestObjectPythonV8Internal::voidMethodStringArgMethodCallback, 0, 1},
7410 {"voidMethodBooleanArg", TestObjectPythonV8Internal::voidMethodBooleanArgMethodCallback, 0, 1},
7411 {"voidMethodByteArg", TestObjectPythonV8Internal::voidMethodByteArgMethodCallback, 0, 1},
7412 {"voidMethodDoubleArg", TestObjectPythonV8Internal::voidMethodDoubleArgMethodCallback, 0, 1},
7413 {"voidMethodFloatArg", TestObjectPythonV8Internal::voidMethodFloatArgMethodCallback, 0, 1},
7414 {"voidMethodLongArg", TestObjectPythonV8Internal::voidMethodLongArgMethodCallback, 0, 1},
7415 {"voidMethodLongLongArg", TestObjectPythonV8Internal::voidMethodLongLongArgMethodCallback, 0, 1},
7416 {"voidMethodOctetArg", TestObjectPythonV8Internal::voidMethodOctetArgMethodCallback, 0, 1},
7417 {"voidMethodShortArg", TestObjectPythonV8Internal::voidMethodShortArgMethodCallback, 0, 1},
7418 {"voidMethodUnsignedLongArg", TestObjectPythonV8Internal::voidMethodUnsignedLongArgMethodCallback, 0, 1},
7419 {"voidMethodUnsignedLongLongArg", TestObjectPythonV8Internal::voidMethodUnsignedLongLongArgMethodCallback, 0, 1},
7420 {"voidMethodUnsignedShortArg", TestObjectPythonV8Internal::voidMethodUnsignedShortArgMethodCallback, 0, 1},
7421 {"testInterfaceEmptyMethod", TestObjectPythonV8Internal::testInterfaceEmptyMethodMethodCallback, 0, 0},
7422 {"voidMethodTestInterfaceEmptyArg", TestObjectPythonV8Internal::voidMethodTestInterfaceEmptyArgMethodCallback, 0, 1},
7423 {"voidMethodLongArgTestInterfaceEmptyArg", TestObjectPythonV8Internal::voidMethodLongArgTestInterfaceEmptyArgMethodCallback, 0, 2},
7424 {"voidCallbackFunctionMethod", TestObjectPythonV8Internal::voidCallbackFunctionMethodMethodCallback, 0, 0},
7425 {"anyCallbackFunctionOptionalAnyArgMethod", TestObjectPythonV8Internal::anyCallbackFunctionOptionalAnyArgMethodMethodCallback, 0, 0},
7426 {"voidMethodVoidCallbackFunctionArg", TestObjectPythonV8Internal::voidMethodVoidCallbackFunctionArgMethodCallback, 0, 1},
7427 {"voidMethodAnyCallbackFunctionOptionalAnyArg", TestObjectPythonV8Internal::voidMethodAnyCallbackFunctionOptionalAnyArgMethodCallback, 0, 1},
7428 {"compareHowMethod", TestObjectPythonV8Internal::compareHowMethodMethodCallback, 0, 0},
7429 {"anyMethod", TestObjectPythonV8Internal::anyMethodMethodCallback, 0, 0},
7430 {"voidMethodCompareHowArg", TestObjectPythonV8Internal::voidMethodCompareHowArgMethodCallback, 0, 1},
7431 {"voidMethodEventTargetArg", TestObjectPythonV8Internal::voidMethodEventTargetArgMethodCallback, 0, 1},
7432 {"voidMethodMediaQueryListListenerArg", TestObjectPythonV8Internal::voidMethodMediaQueryListListenerArgMethodCallback, 0, 1},
7433 {"voidMethodAnyArg", TestObjectPythonV8Internal::voidMethodAnyArgMethodCallback, 0, 1},
7434 {"voidMethodAttrArg", TestObjectPythonV8Internal::voidMethodAttrArgMethodCallback, 0, 1},
7435 {"voidMethodDocumentArg", TestObjectPythonV8Internal::voidMethodDocumentArgMethodCallback, 0, 1},
7436 {"voidMethodDocumentTypeArg", TestObjectPythonV8Internal::voidMethodDocumentTypeArgMethodCallback, 0, 1},
7437 {"voidMethodElementArg", TestObjectPythonV8Internal::voidMethodElementArgMethodCallback, 0, 1},
7438 {"voidMethodNodeArg", TestObjectPythonV8Internal::voidMethodNodeArgMethodCallback, 0, 1},
7439 {"arrayBufferMethod", TestObjectPythonV8Internal::arrayBufferMethodMethodCallback, 0, 0},
7440 {"arrayBufferViewMethod", TestObjectPythonV8Internal::arrayBufferViewMethodMethodCallback, 0, 0},
7441 {"float32ArrayMethod", TestObjectPythonV8Internal::float32ArrayMethodMethodCallback, 0, 0},
7442 {"int32ArrayMethod", TestObjectPythonV8Internal::int32ArrayMethodMethodCallback, 0, 0},
7443 {"uint8ArrayMethod", TestObjectPythonV8Internal::uint8ArrayMethodMethodCallback, 0, 0},
7444 {"voidMethodArrayBufferArg", TestObjectPythonV8Internal::voidMethodArrayBufferArgMethodCallback, 0, 1},
7445 {"voidMethodArrayBufferViewArg", TestObjectPythonV8Internal::voidMethodArrayBufferViewArgMethodCallback, 0, 1},
7446 {"voidMethodFloat32ArrayArg", TestObjectPythonV8Internal::voidMethodFloat32ArrayArgMethodCallback, 0, 1},
7447 {"voidMethodInt32ArrayArg", TestObjectPythonV8Internal::voidMethodInt32ArrayArgMethodCallback, 0, 1},
7448 {"voidMethodUint8ArrayArg", TestObjectPythonV8Internal::voidMethodUint8ArrayArgMethodCallback, 0, 1},
7449 {"longArrayMethod", TestObjectPythonV8Internal::longArrayMethodMethodCallback, 0, 0},
7450 {"stringArrayMethod", TestObjectPythonV8Internal::stringArrayMethodMethodCallback, 0, 0},
7451 {"testInterfaceEmptyArrayMethod", TestObjectPythonV8Internal::testInterfaceEmptyArrayMethodMethodCallback, 0, 0},
7452 {"voidMethodArrayLongArg", TestObjectPythonV8Internal::voidMethodArrayLongArgMethodCallback, 0, 1},
7453 {"voidMethodArrayStringArg", TestObjectPythonV8Internal::voidMethodArrayStringArgMethodCallback, 0, 1},
7454 {"voidMethodArrayTestInterfaceEmptyArg", TestObjectPythonV8Internal::voidMethodArrayTestInterfaceEmptyArgMethodCallback, 0, 1},
7455 {"sequenceLongMethod", TestObjectPythonV8Internal::sequenceLongMethodMethodCallback, 0, 0},
7456 {"sequenceStringMethod", TestObjectPythonV8Internal::sequenceStringMethodMethodCallback, 0, 0},
7457 {"sequenceTestInterfaceEmptyMethod", TestObjectPythonV8Internal::sequenceTestInterfaceEmptyMethodMethodCallback, 0, 0},
7458 {"voidMethodSequenceLongArg", TestObjectPythonV8Internal::voidMethodSequenceLongArgMethodCallback, 0, 1},
7459 {"voidMethodSequenceStringArg", TestObjectPythonV8Internal::voidMethodSequenceStringArgMethodCallback, 0, 1},
7460 {"voidMethodSequenceTestInterfaceEmptyArg", TestObjectPythonV8Internal::voidMethodSequenceTestInterfaceEmptyArgMethodCallback, 0, 1},
7461 {"voidMethodNullableStringArg", TestObjectPythonV8Internal::voidMethodNullableStringArgMethodCallback, 0, 1},
7462 {"voidMethodTestCallbackInterfaceArg", TestObjectPythonV8Internal::voidMethodTestCallbackInterfaceArgMethodCallback, 0, 1},
7463 {"voidMethodOptionalTestCallbackInterfaceArg", TestObjectPythonV8Internal::voidMethodOptionalTestCallbackInterfaceArgMethodCallback, 0, 0},
7464 {"voidMethodNullableTestCallbackInterfaceArg", TestObjectPythonV8Internal::voidMethodNullableTestCallbackInterfaceArgMethodCallback, 0, 1},
7465 {"testEnumMethod", TestObjectPythonV8Internal::testEnumMethodMethodCallback, 0, 0},
7466 {"voidMethodTestEnumArg", TestObjectPythonV8Internal::voidMethodTestEnumArgMethodCallback, 0, 1},
7467 {"dictionaryMethod", TestObjectPythonV8Internal::dictionaryMethodMethodCallback, 0, 0},
7468 {"nodeFilterMethod", TestObjectPythonV8Internal::nodeFilterMethodMethodCallback, 0, 0},
7469 {"promiseMethod", TestObjectPythonV8Internal::promiseMethodMethodCallback, 0, 0},
7470 {"serializedScriptValueMethod", TestObjectPythonV8Internal::serializedScriptValueMethodMethodCallback, 0, 0},
7471 {"xPathNSResolverMethod", TestObjectPythonV8Internal::xPathNSResolverMethodMethodCallback, 0, 0},
7472 {"voidMethodDictionaryArg", TestObjectPythonV8Internal::voidMethodDictionaryArgMethodCallback, 0, 1},
7473 {"voidMethodNodeFilterArg", TestObjectPythonV8Internal::voidMethodNodeFilterArgMethodCallback, 0, 1},
7474 {"voidMethodPromiseArg", TestObjectPythonV8Internal::voidMethodPromiseArgMethodCallback, 0, 1},
7475 {"voidMethodSerializedScriptValueArg", TestObjectPythonV8Internal::voidMethodSerializedScriptValueArgMethodCallback, 0, 1},
7476 {"voidMethodXPathNSResolverArg", TestObjectPythonV8Internal::voidMethodXPathNSResolverArgMethodCallback, 0, 1},
7477 {"voidMethodSequenceDictionaryArg", TestObjectPythonV8Internal::voidMethodSequenceDictionaryArgMethodCallback, 0, 1},
7478 {"voidMethodStringArgLongArg", TestObjectPythonV8Internal::voidMethodStringArgLongArgMethodCallback, 0, 2},
7479 {"voidMethodOptionalStringArg", TestObjectPythonV8Internal::voidMethodOptionalStringArgMethodCallback, 0, 0},
7480 {"voidMethodOptionalTestInterfaceEmptyArg", TestObjectPythonV8Internal::voidMethodOptionalTestInterfaceEmptyArgMethodCallback, 0, 0},
7481 {"voidMethodOptionalLongArg", TestObjectPythonV8Internal::voidMethodOptionalLongArgMethodCallback, 0, 0},
7482 {"stringMethodOptionalLongArg", TestObjectPythonV8Internal::stringMethodOptionalLongArgMethodCallback, 0, 0},
7483 {"testInterfaceEmptyMethodOptionalLongArg", TestObjectPythonV8Internal::testInterfaceEmptyMethodOptionalLongArgMethodCallback, 0, 0},
7484 {"longMethodOptionalLongArg", TestObjectPythonV8Internal::longMethodOptionalLongArgMethodCallback, 0, 0},
7485 {"voidMethodLongArgOptionalLongArg", TestObjectPythonV8Internal::voidMethodLongArgOptionalLongArgMethodCallback, 0, 1},
7486 {"voidMethodLongArgOptionalLongArgOptionalLongArg", TestObjectPythonV8Internal::voidMethodLongArgOptionalLongArgOptionalLongArgMethodCallback, 0, 1},
7487 {"voidMethodLongArgOptionalTestInterfaceEmptyArg", TestObjectPythonV8Internal::voidMethodLongArgOptionalTestInterfaceEmptyArgMethodCallback, 0, 1},
7488 {"voidMethodTestInterfaceEmptyArgOptionalLongArg", TestObjectPythonV8Internal::voidMethodTestInterfaceEmptyArgOptionalLongArgMethodCallback, 0, 1},
7489 {"voidMethodOptionalDictionaryArg", TestObjectPythonV8Internal::voidMethodOptionalDictionaryArgMethodCallback, 0, 0},
7490 {"voidMethodVariadicStringArg", TestObjectPythonV8Internal::voidMethodVariadicStringArgMethodCallback, 0, 1},
7491 {"voidMethodStringArgVariadicStringArg", TestObjectPythonV8Internal::voidMethodStringArgVariadicStringArgMethodCallback, 0, 2},
7492 {"voidMethodVariadicTestInterfaceEmptyArg", TestObjectPythonV8Internal::voidMethodVariadicTestInterfaceEmptyArgMethodCallback, 0, 1},
7493 {"voidMethodTestInterfaceEmptyArgVariadicTestInterfaceEmptyArg", TestObjectPythonV8Internal::voidMethodTestInterfaceEmptyArgVariadicTestInterfaceEmptyArgMethodCallback, 0, 2},
7494 {"overloadedMethodA", TestObjectPythonV8Internal::overloadedMethodAMethodCallback, 0, 1},
7495 {"overloadedMethodB", TestObjectPythonV8Internal::overloadedMethodBMethodCallback, 0, 1},
7496 {"overloadedMethodC", TestObjectPythonV8Internal::overloadedMethodCMethodCallback, 0, 1},
7497 {"overloadedMethodD", TestObjectPythonV8Internal::overloadedMethodDMethodCallback, 0, 1},
7498 {"overloadedMethodE", TestObjectPythonV8Internal::overloadedMethodEMethodCallback, 0, 1},
7499 {"overloadedMethodF", TestObjectPythonV8Internal::overloadedMethodFMethodCallback, 0, 1},
7500 {"overloadedMethodG", TestObjectPythonV8Internal::overloadedMethodGMethodCallback, 0, 0},
7501 {"overloadedMethodH", TestObjectPythonV8Internal::overloadedMethodHMethodCallback, 0, 0},
7502 {"overloadedPerWorldBindingsMethod", TestObjectPythonV8Internal::overloadedPerWorldBindingsMethodMethodCallback, TestObjectPythonV8Internal::overloadedPerWorldBindingsMethodMethodCallbackForMainWorld, 0},
7503 {"addEventListener", TestObjectPythonV8Internal::addEventListenerMethodCallback, 0, 2},
7504 {"removeEventListener", TestObjectPythonV8Internal::removeEventListenerMethodCallback, 0, 2},
7505 {"dispatchEvent", TestObjectPythonV8Internal::dispatchEventMethodCallback, 0, 1},
7506 {"voidMethodClampUnsignedShortArg", TestObjectPythonV8Internal::voidMethodClampUnsignedShortArgMethodCallback, 0, 1},
7507 {"voidMethodClampUnsignedLongArg", TestObjectPythonV8Internal::voidMethodClampUnsignedLongArgMethodCallback, 0, 1},
7508 {"voidMethodDefaultUndefinedTestInterfaceEmptyArg", TestObjectPythonV8Internal::voidMethodDefaultUndefinedTestInterfaceEmptyArgMethodCallback, 0, 0},
7509 {"voidMethodDefaultUndefinedLongArg", TestObjectPythonV8Internal::voidMethodDefaultUndefinedLongArgMethodCallback, 0, 0},
7510 {"voidMethodDefaultUndefinedStringArg", TestObjectPythonV8Internal::voidMethodDefaultUndefinedStringArgMethodCallback, 0, 0},
7511 {"voidMethodDefaultNullStringStringArg", TestObjectPythonV8Internal::voidMethodDefaultNullStringStringArgMethodCallback, 0, 0},
7512 {"voidMethodEnforceRangeLongArg", TestObjectPythonV8Internal::voidMethodEnforceRangeLongArgMethodCallback, 0, 1},
7513 {"voidMethodTreatNullAsNullStringStringArg", TestObjectPythonV8Internal::voidMethodTreatNullAsNullStringStringArgMethodCallback, 0, 1},
7514 {"voidMethodTreatNullAsNullStringTreatUndefinedAsNullStringStringArg", TestObjectPythonV8Internal::voidMethodTreatNullAsNullStringTreatUndefinedAsNullStringStringArgMethodCallback, 0, 1},
7515 {"activityLoggingAccessForAllWorldsMethod", TestObjectPythonV8Internal::activityLoggingAccessForAllWorldsMethodMethodCallback, 0, 0},
7516 {"callWithScriptStateVoidMethod", TestObjectPythonV8Internal::callWithScriptStateVoidMethodMethodCallback, 0, 0},
7517 {"callWithScriptStateLongMethod", TestObjectPythonV8Internal::callWithScriptStateLongMethodMethodCallback, 0, 0},
7518 {"callWithExecutionContextVoidMethod", TestObjectPythonV8Internal::callWithExecutionContextVoidMethodMethodCallback, 0, 0},
7519 {"callWithScriptStateExecutionContextVoidMethod", TestObjectPythonV8Internal::callWithScriptStateExecutionContextVoidMethodMethodCallback, 0, 0},
7520 {"callWithScriptStateScriptArgumentsVoidMethod", TestObjectPythonV8Internal::callWithScriptStateScriptArgumentsVoidMethodMethodCallback, 0, 0},
7521 {"callWithScriptStateScriptArgumentsVoidMethodOptionalBooleanArg", TestObjectPythonV8Internal::callWithScriptStateScriptArgumentsVoidMethodOptionalBooleanArgMethodCallback, 0, 0},
7522 {"callWithActiveWindow", TestObjectPythonV8Internal::callWithActiveWindowMethodCallback, 0, 0},
7523 {"callWithActiveWindowScriptWindow", TestObjectPythonV8Internal::callWithActiveWindowScriptWindowMethodCallback, 0, 0},
7524 {"checkSecurityForNodeVoidMethod", TestObjectPythonV8Internal::checkSecurityForNodeVoidMethodMethodCallback, 0, 0},
7525 #if ENABLE(CONDITION)
7526 {"conditionalConditionVoidMethod", TestObjectPythonV8Internal::conditionalConditionVoidMethodMethodCallback, 0, 0},
7527 #endif // ENABLE(CONDITION)
7528 #if ENABLE(CONDITION_1) && ENABLE(CONDITION_2)
7529 {"conditionalCondition1AndCondition2VoidMethod", TestObjectPythonV8Internal::conditionalCondition1AndCondition2VoidMethodMethodCallback, 0, 0},
7530 #endif // ENABLE(CONDITION_1) && ENABLE(CONDITION_2)
7531 {"customVoidMethod", TestObjectPythonV8Internal::customVoidMethodMethodCallback, 0, 0},
7532 #if ENABLE(CONDITION)
7533 {"conditionalConditionCustomVoidMethod", TestObjectPythonV8Internal::conditionalConditionCustomVoidMethodMethodCallback, 0, 0},
7534 #endif // ENABLE(CONDITION)
7535 {"customElementCallbacksVoidMethod", TestObjectPythonV8Internal::customElementCallbacksVoidMethodMethodCallback, 0, 0},
7536 {"deprecatedVoidMethod", TestObjectPythonV8Internal::deprecatedVoidMethodMethodCallback, 0, 0},
7537 {"implementedAsVoidMethod", TestObjectPythonV8Internal::implementedAsVoidMethodMethodCallback, 0, 0},
7538 {"measureAsVoidMethod", TestObjectPythonV8Internal::measureAsVoidMethodMethodCallback, 0, 0},
7539 {"perWorldBindingsVoidMethod", TestObjectPythonV8Internal::perWorldBindingsVoidMethodMethodCallback, TestObjectPythonV8Internal::perWorldBindingsVoidMethodMethodCallbackForMainWorld, 0},
7540 {"perWorldBindingsVoidMethodTestInterfaceEmptyArg", TestObjectPythonV8Internal::perWorldBindingsVoidMethodTestInterfaceEmptyArgMethodCallback, TestObjectPythonV8Internal::perWorldBindingsVoidMethodTestInterfaceEmptyArgMethodCallbackForMainWorld, 1},
7541 {"activityLoggingForAllWorldsPerWorldBindingsVoidMethod", TestObjectPythonV8Internal::activityLoggingForAllWorldsPerWorldBindingsVoidMethodMethodCallback, TestObjectPythonV8Internal::activityLoggingForAllWorldsPerWorldBindingsVoidMethodMethodCallbackForMainWorld, 0},
7542 {"activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethod", TestObjectPythonV8Internal::activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethodMethodCallback, TestObjectPythonV8Internal::activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethodMethodCallbackForMainWorld, 0},
7543 {"raisesExceptionVoidMethod", TestObjectPythonV8Internal::raisesExceptionVoidMethodMethodCallback, 0, 0},
7544 {"raisesExceptionStringMethod", TestObjectPythonV8Internal::raisesExceptionStringMethodMethodCallback, 0, 0},
7545 {"raisesExceptionVoidMethodOptionalLongArg", TestObjectPythonV8Internal::raisesExceptionVoidMethodOptionalLongArgMethodCallback, 0, 0},
7546 {"raisesExceptionVoidMethodTestCallbackInterfaceArg", TestObjectPythonV8Internal::raisesExceptionVoidMethodTestCallbackInterfaceArgMethodCallback, 0, 1},
7547 {"raisesExceptionVoidMethodOptionalTestCallbackInterfaceArg", TestObjectPythonV8Internal::raisesExceptionVoidMethodOptionalTestCallbackInterfaceArgMethodCallback, 0, 0},
7548 {"raisesExceptionTestInterfaceEmptyVoidMethod", TestObjectPythonV8Internal::raisesExceptionTestInterfaceEmptyVoidMethodMethodCallback, 0, 0},
7549 {"strictTypeCheckingVoidMethodTestInterfaceEmptyArg", TestObjectPythonV8Internal::strictTypeCheckingVoidMethodTestInterfaceEmptyArgMethodCallback, 0, 1},
7550 {"strictTypeCheckingVoidMethodNullableTestInterfaceEmptyArg", TestObjectPythonV8Internal::strictTypeCheckingVoidMethodNullableTestInterfaceEmptyArgMethodCallback, 0, 1},
7551 {"treatReturnedNullStringAsNullStringMethod", TestObjectPythonV8Internal::treatReturnedNullStringAsNullStringMethodMethodCallback, 0, 0},
7552 {"treatReturnedNullStringAsUndefinedStringMethod", TestObjectPythonV8Internal::treatReturnedNullStringAsUndefinedStringMethodMethodCallback, 0, 0},
7555 static void configureV8TestObjectPythonTemplate(v8::Handle<v8::FunctionTemplate> functionTemplate, v8::Isolate* isolate, WrapperWorldType currentWorldType)
7557 functionTemplate->ReadOnlyPrototype();
7559 v8::Local<v8::Signature> defaultSignature;
7560 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(functionTemplate, "TestObjectPython", v8::Local<v8::FunctionTemplate>(), V8TestObjectPython::internalFieldCount,
7561 V8TestObjectPythonAttributes, WTF_ARRAY_LENGTH(V8TestObjectPythonAttributes),
7562 V8TestObjectPythonAccessors, WTF_ARRAY_LENGTH(V8TestObjectPythonAccessors),
7563 V8TestObjectPythonMethods, WTF_ARRAY_LENGTH(V8TestObjectPythonMethods),
7564 isolate, currentWorldType);
7565 v8::Local<v8::ObjectTemplate> ALLOW_UNUSED instanceTemplate = functionTemplate->InstanceTemplate();
7566 v8::Local<v8::ObjectTemplate> ALLOW_UNUSED prototypeTemplate = functionTemplate->PrototypeTemplate();
7567 if (RuntimeEnabledFeatures::featureNameEnabled()) {
7568 static const V8DOMConfiguration::AttributeConfiguration attributeConfiguration =\
7569 {"runtimeEnabledLongAttribute", TestObjectPythonV8Internal::runtimeEnabledLongAttributeAttributeGetterCallback, TestObjectPythonV8Internal::runtimeEnabledLongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */};
7570 V8DOMConfiguration::installAttribute(instanceTemplate, prototypeTemplate, attributeConfiguration, isolate, currentWorldType);
7572 #if ENABLE(CONDITION)
7573 if (RuntimeEnabledFeatures::featureNameEnabled()) {
7574 static const V8DOMConfiguration::AttributeConfiguration attributeConfiguration =\
7575 {"conditionalRuntimeEnabledLongAttribute", TestObjectPythonV8Internal::conditionalRuntimeEnabledLongAttributeAttributeGetterCallback, TestObjectPythonV8Internal::conditionalRuntimeEnabledLongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */};
7576 V8DOMConfiguration::installAttribute(instanceTemplate, prototypeTemplate, attributeConfiguration, isolate, currentWorldType);
7578 #endif // ENABLE(CONDITION)
7579 static const V8DOMConfiguration::ConstantConfiguration V8TestObjectPythonConstants[] = {
7580 {"CONST_VALUE_0", 0},
7581 {"CONST_VALUE_1", 1},
7582 {"CONST_VALUE_2", 2},
7583 {"CONST_VALUE_4", 4},
7584 {"CONST_VALUE_8", 8},
7585 {"CONST_VALUE_9", -1},
7586 {"CONST_VALUE_10", "my constant string"},
7587 {"CONST_VALUE_11", 0xffffffff},
7588 {"CONST_VALUE_12", 0x01},
7589 {"CONST_VALUE_13", 0X20},
7590 {"CONST_VALUE_14", 0x1abc},
7591 {"CONST_VALUE_15", 010},
7592 {"CONST_VALUE_16", -010},
7593 {"CONST_VALUE_16", -0x1A},
7594 {"CONST_VALUE_17", -0X1a},
7595 {"DEPRECATED_CONSTANT", 1},
7596 {"CONST_JAVASCRIPT", 1},
7598 V8DOMConfiguration::installConstants(functionTemplate, prototypeTemplate, V8TestObjectPythonConstants, WTF_ARRAY_LENGTH(V8TestObjectPythonConstants), isolate);
7599 if (RuntimeEnabledFeatures::featureNameEnabled()) {
7600 static const V8DOMConfiguration::ConstantConfiguration constantConfiguration = {"FEATURE_ENABLED_CONST", static_cast<signed int>(1)};
7601 V8DOMConfiguration::installConstants(functionTemplate, prototypeTemplate, &constantConfiguration, 1, isolate);
7603 COMPILE_ASSERT(0 == TestObjectPython::CONST_VALUE_0, TheValueOfTestObjectPython_CONST_VALUE_0DoesntMatchWithImplementation);
7604 COMPILE_ASSERT(1 == TestObjectPython::CONST_VALUE_1, TheValueOfTestObjectPython_CONST_VALUE_1DoesntMatchWithImplementation);
7605 COMPILE_ASSERT(2 == TestObjectPython::CONST_VALUE_2, TheValueOfTestObjectPython_CONST_VALUE_2DoesntMatchWithImplementation);
7606 COMPILE_ASSERT(4 == TestObjectPython::CONST_VALUE_4, TheValueOfTestObjectPython_CONST_VALUE_4DoesntMatchWithImplementation);
7607 COMPILE_ASSERT(8 == TestObjectPython::CONST_VALUE_8, TheValueOfTestObjectPython_CONST_VALUE_8DoesntMatchWithImplementation);
7608 COMPILE_ASSERT(-1 == TestObjectPython::CONST_VALUE_9, TheValueOfTestObjectPython_CONST_VALUE_9DoesntMatchWithImplementation);
7609 COMPILE_ASSERT("my constant string" == TestObjectPython::CONST_VALUE_10, TheValueOfTestObjectPython_CONST_VALUE_10DoesntMatchWithImplementation);
7610 COMPILE_ASSERT(0xffffffff == TestObjectPython::CONST_VALUE_11, TheValueOfTestObjectPython_CONST_VALUE_11DoesntMatchWithImplementation);
7611 COMPILE_ASSERT(0x01 == TestObjectPython::CONST_VALUE_12, TheValueOfTestObjectPython_CONST_VALUE_12DoesntMatchWithImplementation);
7612 COMPILE_ASSERT(0X20 == TestObjectPython::CONST_VALUE_13, TheValueOfTestObjectPython_CONST_VALUE_13DoesntMatchWithImplementation);
7613 COMPILE_ASSERT(0x1abc == TestObjectPython::CONST_VALUE_14, TheValueOfTestObjectPython_CONST_VALUE_14DoesntMatchWithImplementation);
7614 COMPILE_ASSERT(010 == TestObjectPython::CONST_VALUE_15, TheValueOfTestObjectPython_CONST_VALUE_15DoesntMatchWithImplementation);
7615 COMPILE_ASSERT(-010 == TestObjectPython::CONST_VALUE_16, TheValueOfTestObjectPython_CONST_VALUE_16DoesntMatchWithImplementation);
7616 COMPILE_ASSERT(-0x1A == TestObjectPython::CONST_VALUE_16, TheValueOfTestObjectPython_CONST_VALUE_16DoesntMatchWithImplementation);
7617 COMPILE_ASSERT(-0X1a == TestObjectPython::CONST_VALUE_17, TheValueOfTestObjectPython_CONST_VALUE_17DoesntMatchWithImplementation);
7618 COMPILE_ASSERT(1 == TestObjectPython::DEPRECATED_CONSTANT, TheValueOfTestObjectPython_DEPRECATED_CONSTANTDoesntMatchWithImplementation);
7619 COMPILE_ASSERT(1 == TestObjectPython::FEATURE_ENABLED_CONST, TheValueOfTestObjectPython_FEATURE_ENABLED_CONSTDoesntMatchWithImplementation);
7620 COMPILE_ASSERT(1 == TestObjectPython::CONST_IMPL, TheValueOfTestObjectPython_CONST_IMPLDoesntMatchWithImplementation);
7621 functionTemplate->Set(v8AtomicString(isolate, "staticVoidMethod"), v8::FunctionTemplate::New(isolate, TestObjectPythonV8Internal::staticVoidMethodMethodCallback, v8Undefined(), v8::Local<v8::Signature>(), 0));
7622 functionTemplate->Set(v8AtomicString(isolate, "overloadedStaticMethod"), v8::FunctionTemplate::New(isolate, TestObjectPythonV8Internal::overloadedStaticMethodMethodCallback, v8Undefined(), v8::Local<v8::Signature>(), 1));
7623 #if ENABLE(CONDITION)
7624 functionTemplate->Set(v8AtomicString(isolate, "conditionalConditionStaticVoidMethod"), v8::FunctionTemplate::New(isolate, TestObjectPythonV8Internal::conditionalConditionStaticVoidMethodMethodCallback, v8Undefined(), v8::Local<v8::Signature>(), 0));
7625 #endif // ENABLE(CONDITION)
7626 prototypeTemplate->Set(v8AtomicString(isolate, "doNotCheckSignatureVoidMethod"), v8::FunctionTemplate::New(isolate, TestObjectPythonV8Internal::doNotCheckSignatureVoidMethodMethodCallback, v8Undefined(), v8::Local<v8::Signature>(), 0));
7627 prototypeTemplate->Set(v8AtomicString(isolate, "notEnumerableVoidMethod"), v8::FunctionTemplate::New(isolate, TestObjectPythonV8Internal::notEnumerableVoidMethodMethodCallback, v8Undefined(), defaultSignature, 0), static_cast<v8::PropertyAttribute>(v8::DontDelete | v8::DontEnum));
7628 prototypeTemplate->Set(v8AtomicString(isolate, "readOnlyVoidMethod"), v8::FunctionTemplate::New(isolate, TestObjectPythonV8Internal::readOnlyVoidMethodMethodCallback, v8Undefined(), defaultSignature, 0), static_cast<v8::PropertyAttribute>(v8::DontDelete | v8::ReadOnly));
7629 prototypeTemplate->Set(v8AtomicString(isolate, "notEnumerableReadOnlyVoidMethod"), v8::FunctionTemplate::New(isolate, TestObjectPythonV8Internal::notEnumerableReadOnlyVoidMethodMethodCallback, v8Undefined(), defaultSignature, 0), static_cast<v8::PropertyAttribute>(v8::DontDelete | v8::DontEnum | v8::ReadOnly));
7630 if (RuntimeEnabledFeatures::featureNameEnabled())
7631 prototypeTemplate->Set(v8AtomicString(isolate, "runtimeEnabledVoidMethod"), v8::FunctionTemplate::New(isolate, TestObjectPythonV8Internal::runtimeEnabledVoidMethodMethodCallback, v8Undefined(), defaultSignature, 0));
7632 if (currentWorldType == MainWorld) {
7633 if (RuntimeEnabledFeatures::featureNameEnabled())
7634 prototypeTemplate->Set(v8AtomicString(isolate, "perWorldBindingsRuntimeEnabledVoidMethod"), v8::FunctionTemplate::New(isolate, TestObjectPythonV8Internal::perWorldBindingsRuntimeEnabledVoidMethodMethodCallbackForMainWorld, v8Undefined(), defaultSignature, 0));
7636 if (RuntimeEnabledFeatures::featureNameEnabled())
7637 prototypeTemplate->Set(v8AtomicString(isolate, "perWorldBindingsRuntimeEnabledVoidMethod"), v8::FunctionTemplate::New(isolate, TestObjectPythonV8Internal::perWorldBindingsRuntimeEnabledVoidMethodMethodCallback, v8Undefined(), defaultSignature, 0));
7639 instanceTemplate->Set(v8AtomicString(isolate, "unforgeableVoidMethod"), v8::FunctionTemplate::New(isolate, TestObjectPythonV8Internal::unforgeableVoidMethodMethodCallback, v8Undefined(), defaultSignature, 0));
7640 functionTemplate->SetNativeDataProperty(v8AtomicString(isolate, "staticStringAttribute"), TestObjectPythonV8Internal::staticStringAttributeAttributeGetterCallback, TestObjectPythonV8Internal::staticStringAttributeAttributeSetterCallback, v8::External::New(isolate, 0), static_cast<v8::PropertyAttribute>(v8::None), v8::Handle<v8::AccessorSignature>(), static_cast<v8::AccessControl>(v8::DEFAULT));
7641 functionTemplate->SetNativeDataProperty(v8AtomicString(isolate, "staticLongAttribute"), TestObjectPythonV8Internal::staticLongAttributeAttributeGetterCallback, TestObjectPythonV8Internal::staticLongAttributeAttributeSetterCallback, v8::External::New(isolate, 0), static_cast<v8::PropertyAttribute>(v8::None), v8::Handle<v8::AccessorSignature>(), static_cast<v8::AccessControl>(v8::DEFAULT));
7643 // Custom toString template
7644 functionTemplate->Set(v8AtomicString(isolate, "toString"), V8PerIsolateData::current()->toStringTemplate());
7647 v8::Handle<v8::FunctionTemplate> V8TestObjectPython::domTemplate(v8::Isolate* isolate, WrapperWorldType currentWorldType)
7649 V8PerIsolateData* data = V8PerIsolateData::from(isolate);
7650 V8PerIsolateData::TemplateMap::iterator result = data->templateMap(currentWorldType).find(&wrapperTypeInfo);
7651 if (result != data->templateMap(currentWorldType).end())
7652 return result->value.newLocal(isolate);
7654 TRACE_EVENT_SCOPED_SAMPLING_STATE("Blink", "BuildDOMTemplate");
7655 v8::EscapableHandleScope handleScope(isolate);
7656 v8::Local<v8::FunctionTemplate> templ = v8::FunctionTemplate::New(isolate, V8ObjectConstructor::isValidConstructorMode);
7657 configureV8TestObjectPythonTemplate(templ, isolate, currentWorldType);
7658 data->templateMap(currentWorldType).add(&wrapperTypeInfo, UnsafePersistent<v8::FunctionTemplate>(isolate, templ));
7659 return handleScope.Escape(templ);
7662 bool V8TestObjectPython::hasInstance(v8::Handle<v8::Value> jsValue, v8::Isolate* isolate)
7664 return V8PerIsolateData::from(isolate)->hasInstanceInMainWorld(&wrapperTypeInfo, jsValue)
7665 || V8PerIsolateData::from(isolate)->hasInstanceInNonMainWorld(&wrapperTypeInfo, jsValue);
7668 void V8TestObjectPython::installPerContextEnabledProperties(v8::Handle<v8::Object> instanceTemplate, TestObjectPython* impl, v8::Isolate* isolate)
7670 v8::Local<v8::Object> prototypeTemplate = v8::Local<v8::Object>::Cast(instanceTemplate->GetPrototype());
7671 if (ContextFeatures::featureNameEnabled(impl->document())) {
7672 static const V8DOMConfiguration::AttributeConfiguration attributeConfiguration =\
7673 {"perContextEnabledLongAttribute", TestObjectPythonV8Internal::perContextEnabledLongAttributeAttributeGetterCallback, TestObjectPythonV8Internal::perContextEnabledLongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */};
7674 V8DOMConfiguration::installAttribute(instanceTemplate, prototypeTemplate, attributeConfiguration, isolate);
7676 if (ContextFeatures::featureNameEnabled(impl->document())) {
7677 static const V8DOMConfiguration::AttributeConfiguration attributeConfiguration =\
7678 {"perContextEnabledRuntimeEnabledLongAttribute", TestObjectPythonV8Internal::perContextEnabledRuntimeEnabledLongAttributeAttributeGetterCallback, TestObjectPythonV8Internal::perContextEnabledRuntimeEnabledLongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */};
7679 V8DOMConfiguration::installAttribute(instanceTemplate, prototypeTemplate, attributeConfiguration, isolate);
7683 void V8TestObjectPython::installPerContextEnabledMethods(v8::Handle<v8::Object> prototypeTemplate, v8::Isolate* isolate)
7685 v8::Local<v8::Signature> defaultSignature = v8::Signature::New(isolate, domTemplate(isolate, worldType(isolate)));
7687 ExecutionContext* context = toExecutionContext(prototypeTemplate->CreationContext());
7688 if (context && context->isDocument() && ContextFeatures::featureNameEnabled(toDocument(context)))
7689 prototypeTemplate->Set(v8AtomicString(isolate, "perContextEnabledVoidMethod"), v8::FunctionTemplate::New(isolate, TestObjectPythonV8Internal::perContextEnabledVoidMethodMethodCallback, v8Undefined(), defaultSignature, 0)->GetFunction());
7692 v8::Handle<v8::Object> V8TestObjectPython::createWrapper(PassRefPtr<TestObjectPython> impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
7695 ASSERT(!DOMDataStore::containsWrapper<V8TestObjectPython>(impl.get(), isolate));
7696 if (ScriptWrappable::wrapperCanBeStoredInObject(impl.get())) {
7697 const WrapperTypeInfo* actualInfo = ScriptWrappable::getTypeInfoFromObject(impl.get());
7698 // Might be a XXXConstructor::wrapperTypeInfo instead of an XXX::wrapperTypeInfo. These will both have
7699 // the same object de-ref functions, though, so use that as the basis of the check.
7700 RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(actualInfo->derefObjectFunction == wrapperTypeInfo.derefObjectFunction);
7703 v8::Handle<v8::Object> wrapper = V8DOMWrapper::createWrapper(creationContext, &wrapperTypeInfo, toInternalPointer(impl.get()), isolate);
7704 if (UNLIKELY(wrapper.IsEmpty()))
7707 installPerContextEnabledProperties(wrapper, impl.get(), isolate);
7708 V8DOMWrapper::associateObjectWithWrapper<V8TestObjectPython>(impl, &wrapperTypeInfo, wrapper, isolate, WrapperConfiguration::Independent);
7712 void V8TestObjectPython::derefObject(void* object)
7714 fromInternalPointer(object)->deref();
7718 v8::Handle<v8::Value> toV8NoInline(TestObjectPython* impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
7720 return toV8(impl, creationContext, isolate);
7723 } // namespace WebCore