Upstream version 5.34.104.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / Source / bindings / tests / results / V8TestObjectPython.cpp
1 /*
2  * Copyright (C) 2013 Google Inc. All rights reserved.
3  *
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions are
6  * met:
7  *
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
13  * distribution.
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.
17  *
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.
29  */
30
31 // This file has been auto-generated by code_generator_v8.pm. DO NOT MODIFY!
32
33 #include "config.h"
34 #include "V8TestObjectPython.h"
35
36 #include "HTMLNames.h"
37 #include "RuntimeEnabledFeatures.h"
38 #include "V8Attr.h"
39 #include "V8Document.h"
40 #include "V8DocumentFragment.h"
41 #include "V8DocumentType.h"
42 #include "V8Element.h"
43 #include "V8Event.h"
44 #include "V8EventTarget.h"
45 #include "V8HTMLCollection.h"
46 #include "V8HTMLElement.h"
47 #include "V8Node.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"
57 #include "V8Window.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"
87
88 namespace WebCore {
89
90 static void initializeScriptWrappableForInterface(TestObjectPython* object)
91 {
92     if (ScriptWrappable::wrapperCanBeStoredInObject(object))
93         ScriptWrappable::setTypeInfoInObject(object, &V8TestObjectPython::wrapperTypeInfo);
94     else
95         ASSERT_NOT_REACHED();
96 }
97
98 } // namespace WebCore
99
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)
105 {
106     WebCore::initializeScriptWrappableForInterface(object);
107 }
108
109 namespace WebCore {
110 const WrapperTypeInfo V8TestObjectPython::wrapperTypeInfo = { gin::kEmbedderBlink, V8TestObjectPython::domTemplate, V8TestObjectPython::derefObject, 0, 0, 0, V8TestObjectPython::installPerContextEnabledMethods, 0, WrapperTypeObjectPrototype, false };
111
112 namespace TestObjectPythonV8Internal {
113
114 template <typename T> void V8_USE(T) { }
115
116 static void readonlyStringAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
117 {
118     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
119     v8SetReturnValueString(info, imp->readonlyStringAttribute(), info.GetIsolate());
120 }
121
122 static void readonlyStringAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
123 {
124     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
125     TestObjectPythonV8Internal::readonlyStringAttributeAttributeGetter(info);
126     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
127 }
128
129 static void readonlyTestInterfaceEmptyAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
130 {
131     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
132     RefPtr<TestInterfaceEmpty> result = imp->readonlyTestInterfaceEmptyAttribute();
133     if (result && DOMDataStore::setReturnValueFromWrapper<V8TestInterfaceEmpty>(info.GetReturnValue(), result.get()))
134         return;
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);
139     }
140 }
141
142 static void readonlyTestInterfaceEmptyAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
143 {
144     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
145     TestObjectPythonV8Internal::readonlyTestInterfaceEmptyAttributeAttributeGetter(info);
146     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
147 }
148
149 static void readonlyLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
150 {
151     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
152     v8SetReturnValueInt(info, imp->readonlyLongAttribute());
153 }
154
155 static void readonlyLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
156 {
157     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
158     TestObjectPythonV8Internal::readonlyLongAttributeAttributeGetter(info);
159     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
160 }
161
162 static void dateAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
163 {
164     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
165     v8SetReturnValue(info, v8DateOrNull(imp->dateAttribute(), info.GetIsolate()));
166 }
167
168 static void dateAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
169 {
170     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
171     TestObjectPythonV8Internal::dateAttributeAttributeGetter(info);
172     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
173 }
174
175 static void dateAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
176 {
177     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
178     V8TRYCATCH_VOID(double, cppValue, toCoreDate(jsValue));
179     imp->setDateAttribute(cppValue);
180 }
181
182 static void dateAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
183 {
184     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
185     TestObjectPythonV8Internal::dateAttributeAttributeSetter(jsValue, info);
186     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
187 }
188
189 static void stringAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
190 {
191     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
192     v8SetReturnValueString(info, imp->stringAttribute(), info.GetIsolate());
193 }
194
195 static void stringAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
196 {
197     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
198     TestObjectPythonV8Internal::stringAttributeAttributeGetter(info);
199     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
200 }
201
202 static void stringAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
203 {
204     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
205     V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue);
206     imp->setStringAttribute(cppValue);
207 }
208
209 static void stringAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
210 {
211     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
212     TestObjectPythonV8Internal::stringAttributeAttributeSetter(jsValue, info);
213     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
214 }
215
216 static void readonlyDOMTimeStampAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
217 {
218     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
219     v8SetReturnValue(info, static_cast<double>(imp->readonlyDOMTimeStampAttribute()));
220 }
221
222 static void readonlyDOMTimeStampAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
223 {
224     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
225     TestObjectPythonV8Internal::readonlyDOMTimeStampAttributeAttributeGetter(info);
226     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
227 }
228
229 static void booleanAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
230 {
231     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
232     v8SetReturnValueBool(info, imp->booleanAttribute());
233 }
234
235 static void booleanAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
236 {
237     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
238     TestObjectPythonV8Internal::booleanAttributeAttributeGetter(info);
239     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
240 }
241
242 static void booleanAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
243 {
244     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
245     V8TRYCATCH_VOID(bool, cppValue, jsValue->BooleanValue());
246     imp->setBooleanAttribute(cppValue);
247 }
248
249 static void booleanAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
250 {
251     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
252     TestObjectPythonV8Internal::booleanAttributeAttributeSetter(jsValue, info);
253     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
254 }
255
256 static void byteAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
257 {
258     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
259     v8SetReturnValueInt(info, imp->byteAttribute());
260 }
261
262 static void byteAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
263 {
264     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
265     TestObjectPythonV8Internal::byteAttributeAttributeGetter(info);
266     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
267 }
268
269 static void byteAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
270 {
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);
275 }
276
277 static void byteAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
278 {
279     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
280     TestObjectPythonV8Internal::byteAttributeAttributeSetter(jsValue, info);
281     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
282 }
283
284 static void doubleAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
285 {
286     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
287     v8SetReturnValue(info, imp->doubleAttribute());
288 }
289
290 static void doubleAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
291 {
292     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
293     TestObjectPythonV8Internal::doubleAttributeAttributeGetter(info);
294     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
295 }
296
297 static void doubleAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
298 {
299     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
300     V8TRYCATCH_VOID(double, cppValue, static_cast<double>(jsValue->NumberValue()));
301     imp->setDoubleAttribute(cppValue);
302 }
303
304 static void doubleAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
305 {
306     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
307     TestObjectPythonV8Internal::doubleAttributeAttributeSetter(jsValue, info);
308     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
309 }
310
311 static void floatAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
312 {
313     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
314     v8SetReturnValue(info, imp->floatAttribute());
315 }
316
317 static void floatAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
318 {
319     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
320     TestObjectPythonV8Internal::floatAttributeAttributeGetter(info);
321     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
322 }
323
324 static void floatAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
325 {
326     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
327     V8TRYCATCH_VOID(float, cppValue, static_cast<float>(jsValue->NumberValue()));
328     imp->setFloatAttribute(cppValue);
329 }
330
331 static void floatAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
332 {
333     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
334     TestObjectPythonV8Internal::floatAttributeAttributeSetter(jsValue, info);
335     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
336 }
337
338 static void longAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
339 {
340     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
341     v8SetReturnValueInt(info, imp->longAttribute());
342 }
343
344 static void longAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
345 {
346     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
347     TestObjectPythonV8Internal::longAttributeAttributeGetter(info);
348     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
349 }
350
351 static void longAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
352 {
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);
357 }
358
359 static void longAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
360 {
361     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
362     TestObjectPythonV8Internal::longAttributeAttributeSetter(jsValue, info);
363     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
364 }
365
366 static void longLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
367 {
368     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
369     v8SetReturnValue(info, static_cast<double>(imp->longLongAttribute()));
370 }
371
372 static void longLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
373 {
374     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
375     TestObjectPythonV8Internal::longLongAttributeAttributeGetter(info);
376     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
377 }
378
379 static void longLongAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
380 {
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);
385 }
386
387 static void longLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
388 {
389     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
390     TestObjectPythonV8Internal::longLongAttributeAttributeSetter(jsValue, info);
391     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
392 }
393
394 static void octetAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
395 {
396     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
397     v8SetReturnValueUnsigned(info, imp->octetAttribute());
398 }
399
400 static void octetAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
401 {
402     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
403     TestObjectPythonV8Internal::octetAttributeAttributeGetter(info);
404     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
405 }
406
407 static void octetAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
408 {
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);
413 }
414
415 static void octetAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
416 {
417     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
418     TestObjectPythonV8Internal::octetAttributeAttributeSetter(jsValue, info);
419     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
420 }
421
422 static void shortAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
423 {
424     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
425     v8SetReturnValueInt(info, imp->shortAttribute());
426 }
427
428 static void shortAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
429 {
430     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
431     TestObjectPythonV8Internal::shortAttributeAttributeGetter(info);
432     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
433 }
434
435 static void shortAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
436 {
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);
441 }
442
443 static void shortAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
444 {
445     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
446     TestObjectPythonV8Internal::shortAttributeAttributeSetter(jsValue, info);
447     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
448 }
449
450 static void unsignedLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
451 {
452     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
453     v8SetReturnValueUnsigned(info, imp->unsignedLongAttribute());
454 }
455
456 static void unsignedLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
457 {
458     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
459     TestObjectPythonV8Internal::unsignedLongAttributeAttributeGetter(info);
460     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
461 }
462
463 static void unsignedLongAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
464 {
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);
469 }
470
471 static void unsignedLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
472 {
473     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
474     TestObjectPythonV8Internal::unsignedLongAttributeAttributeSetter(jsValue, info);
475     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
476 }
477
478 static void unsignedLongLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
479 {
480     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
481     v8SetReturnValue(info, static_cast<double>(imp->unsignedLongLongAttribute()));
482 }
483
484 static void unsignedLongLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
485 {
486     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
487     TestObjectPythonV8Internal::unsignedLongLongAttributeAttributeGetter(info);
488     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
489 }
490
491 static void unsignedLongLongAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
492 {
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);
497 }
498
499 static void unsignedLongLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
500 {
501     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
502     TestObjectPythonV8Internal::unsignedLongLongAttributeAttributeSetter(jsValue, info);
503     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
504 }
505
506 static void unsignedShortAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
507 {
508     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
509     v8SetReturnValueUnsigned(info, imp->unsignedShortAttribute());
510 }
511
512 static void unsignedShortAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
513 {
514     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
515     TestObjectPythonV8Internal::unsignedShortAttributeAttributeGetter(info);
516     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
517 }
518
519 static void unsignedShortAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
520 {
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);
525 }
526
527 static void unsignedShortAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
528 {
529     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
530     TestObjectPythonV8Internal::unsignedShortAttributeAttributeSetter(jsValue, info);
531     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
532 }
533
534 static void testInterfaceEmptyAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
535 {
536     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
537     v8SetReturnValueFast(info, imp->testInterfaceEmptyAttribute(), imp);
538 }
539
540 static void testInterfaceEmptyAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
541 {
542     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
543     TestObjectPythonV8Internal::testInterfaceEmptyAttributeAttributeGetter(info);
544     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
545 }
546
547 static void testInterfaceEmptyAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
548 {
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));
552 }
553
554 static void testInterfaceEmptyAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
555 {
556     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
557     TestObjectPythonV8Internal::testInterfaceEmptyAttributeAttributeSetter(jsValue, info);
558     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
559 }
560
561 static void testObjectPythonAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
562 {
563     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
564     v8SetReturnValueFast(info, imp->testObjectPythonAttribute(), imp);
565 }
566
567 static void testObjectPythonAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
568 {
569     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
570     TestObjectPythonV8Internal::testObjectPythonAttributeAttributeGetter(info);
571     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
572 }
573
574 static void testObjectPythonAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
575 {
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));
579 }
580
581 static void testObjectPythonAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
582 {
583     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
584     TestObjectPythonV8Internal::testObjectPythonAttributeAttributeSetter(jsValue, info);
585     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
586 }
587
588 static void voidCallbackFunctionAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
589 {
590     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
591     v8SetReturnValue(info, imp->voidCallbackFunctionAttribute().v8Value());
592 }
593
594 static void voidCallbackFunctionAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
595 {
596     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
597     TestObjectPythonV8Internal::voidCallbackFunctionAttributeAttributeGetter(info);
598     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
599 }
600
601 static void voidCallbackFunctionAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
602 {
603     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
604     V8TRYCATCH_VOID(ScriptValue, cppValue, ScriptValue(jsValue, info.GetIsolate()));
605     imp->setVoidCallbackFunctionAttribute(cppValue);
606 }
607
608 static void voidCallbackFunctionAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
609 {
610     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
611     TestObjectPythonV8Internal::voidCallbackFunctionAttributeAttributeSetter(jsValue, info);
612     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
613 }
614
615 static void anyCallbackFunctionOptionalAnyArgAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
616 {
617     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
618     v8SetReturnValue(info, imp->anyCallbackFunctionOptionalAnyArgAttribute().v8Value());
619 }
620
621 static void anyCallbackFunctionOptionalAnyArgAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
622 {
623     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
624     TestObjectPythonV8Internal::anyCallbackFunctionOptionalAnyArgAttributeAttributeGetter(info);
625     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
626 }
627
628 static void anyCallbackFunctionOptionalAnyArgAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
629 {
630     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
631     V8TRYCATCH_VOID(ScriptValue, cppValue, ScriptValue(jsValue, info.GetIsolate()));
632     imp->setAnyCallbackFunctionOptionalAnyArgAttribute(cppValue);
633 }
634
635 static void anyCallbackFunctionOptionalAnyArgAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
636 {
637     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
638     TestObjectPythonV8Internal::anyCallbackFunctionOptionalAnyArgAttributeAttributeSetter(jsValue, info);
639     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
640 }
641
642 static void cssAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
643 {
644     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
645     v8SetReturnValueInt(info, imp->cssAttribute());
646 }
647
648 static void cssAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
649 {
650     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
651     TestObjectPythonV8Internal::cssAttributeAttributeGetter(info);
652     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
653 }
654
655 static void cssAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
656 {
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);
661 }
662
663 static void cssAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
664 {
665     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
666     TestObjectPythonV8Internal::cssAttributeAttributeSetter(jsValue, info);
667     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
668 }
669
670 static void imeAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
671 {
672     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
673     v8SetReturnValueInt(info, imp->imeAttribute());
674 }
675
676 static void imeAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
677 {
678     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
679     TestObjectPythonV8Internal::imeAttributeAttributeGetter(info);
680     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
681 }
682
683 static void imeAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
684 {
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);
689 }
690
691 static void imeAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
692 {
693     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
694     TestObjectPythonV8Internal::imeAttributeAttributeSetter(jsValue, info);
695     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
696 }
697
698 static void svgAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
699 {
700     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
701     v8SetReturnValueInt(info, imp->svgAttribute());
702 }
703
704 static void svgAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
705 {
706     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
707     TestObjectPythonV8Internal::svgAttributeAttributeGetter(info);
708     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
709 }
710
711 static void svgAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
712 {
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);
717 }
718
719 static void svgAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
720 {
721     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
722     TestObjectPythonV8Internal::svgAttributeAttributeSetter(jsValue, info);
723     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
724 }
725
726 static void xmlAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
727 {
728     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
729     v8SetReturnValueInt(info, imp->xmlAttribute());
730 }
731
732 static void xmlAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
733 {
734     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
735     TestObjectPythonV8Internal::xmlAttributeAttributeGetter(info);
736     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
737 }
738
739 static void xmlAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
740 {
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);
745 }
746
747 static void xmlAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
748 {
749     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
750     TestObjectPythonV8Internal::xmlAttributeAttributeSetter(jsValue, info);
751     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
752 }
753
754 static void nodeFilterAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
755 {
756     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
757     v8SetReturnValueFast(info, imp->nodeFilterAttribute(), imp);
758 }
759
760 static void nodeFilterAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
761 {
762     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
763     TestObjectPythonV8Internal::nodeFilterAttributeAttributeGetter(info);
764     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
765 }
766
767 static void nodeFilterAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
768 {
769     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
770     V8TRYCATCH_VOID(RefPtr<NodeFilter>, cppValue, toNodeFilter(jsValue, info.GetIsolate()));
771     imp->setNodeFilterAttribute(WTF::getPtr(cppValue));
772 }
773
774 static void nodeFilterAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
775 {
776     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
777     TestObjectPythonV8Internal::nodeFilterAttributeAttributeSetter(jsValue, info);
778     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
779 }
780
781 static void serializedScriptValueAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
782 {
783     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
784     v8SetReturnValue(info, imp->serializedScriptValueAttribute() ? imp->serializedScriptValueAttribute()->deserialize() : v8::Handle<v8::Value>(v8::Null(info.GetIsolate())));
785 }
786
787 static void serializedScriptValueAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
788 {
789     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
790     TestObjectPythonV8Internal::serializedScriptValueAttributeAttributeGetter(info);
791     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
792 }
793
794 static void serializedScriptValueAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
795 {
796     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
797     V8TRYCATCH_VOID(RefPtr<SerializedScriptValue>, cppValue, SerializedScriptValue::create(jsValue, info.GetIsolate()));
798     imp->setSerializedScriptValueAttribute(WTF::getPtr(cppValue));
799 }
800
801 static void serializedScriptValueAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
802 {
803     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
804     TestObjectPythonV8Internal::serializedScriptValueAttributeAttributeSetter(jsValue, info);
805     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
806 }
807
808 static void anyAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
809 {
810     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
811     v8SetReturnValue(info, imp->anyAttribute().v8Value());
812 }
813
814 static void anyAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
815 {
816     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
817     TestObjectPythonV8Internal::anyAttributeAttributeGetter(info);
818     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
819 }
820
821 static void anyAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
822 {
823     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
824     V8TRYCATCH_VOID(ScriptValue, cppValue, ScriptValue(jsValue, info.GetIsolate()));
825     imp->setAnyAttribute(cppValue);
826 }
827
828 static void anyAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
829 {
830     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
831     TestObjectPythonV8Internal::anyAttributeAttributeSetter(jsValue, info);
832     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
833 }
834
835 static void promiseAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
836 {
837     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
838     v8SetReturnValue(info, imp->promiseAttribute().v8Value());
839 }
840
841 static void promiseAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
842 {
843     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
844     TestObjectPythonV8Internal::promiseAttributeAttributeGetter(info);
845     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
846 }
847
848 static void promiseAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
849 {
850     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
851     V8TRYCATCH_VOID(ScriptPromise, cppValue, ScriptPromise(jsValue, info.GetIsolate()));
852     imp->setPromiseAttribute(cppValue);
853 }
854
855 static void promiseAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
856 {
857     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
858     TestObjectPythonV8Internal::promiseAttributeAttributeSetter(jsValue, info);
859     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
860 }
861
862 static void windowAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
863 {
864     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
865     v8SetReturnValueFast(info, imp->windowAttribute(), imp);
866 }
867
868 static void windowAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
869 {
870     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
871     TestObjectPythonV8Internal::windowAttributeAttributeGetter(info);
872     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
873 }
874
875 static void windowAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
876 {
877     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
878     V8TRYCATCH_VOID(DOMWindow*, cppValue, toDOMWindow(jsValue, info.GetIsolate()));
879     imp->setWindowAttribute(WTF::getPtr(cppValue));
880 }
881
882 static void windowAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
883 {
884     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
885     TestObjectPythonV8Internal::windowAttributeAttributeSetter(jsValue, info);
886     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
887 }
888
889 static void documentAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
890 {
891     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
892     v8SetReturnValueFast(info, imp->documentAttribute(), imp);
893 }
894
895 static void documentAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
896 {
897     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
898     TestObjectPythonV8Internal::documentAttributeAttributeGetter(info);
899     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
900 }
901
902 static void documentAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
903 {
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));
907 }
908
909 static void documentAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
910 {
911     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
912     TestObjectPythonV8Internal::documentAttributeAttributeSetter(jsValue, info);
913     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
914 }
915
916 static void documentFragmentAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
917 {
918     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
919     v8SetReturnValueFast(info, imp->documentFragmentAttribute(), imp);
920 }
921
922 static void documentFragmentAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
923 {
924     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
925     TestObjectPythonV8Internal::documentFragmentAttributeAttributeGetter(info);
926     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
927 }
928
929 static void documentFragmentAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
930 {
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));
934 }
935
936 static void documentFragmentAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
937 {
938     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
939     TestObjectPythonV8Internal::documentFragmentAttributeAttributeSetter(jsValue, info);
940     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
941 }
942
943 static void documentTypeAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
944 {
945     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
946     v8SetReturnValueFast(info, imp->documentTypeAttribute(), imp);
947 }
948
949 static void documentTypeAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
950 {
951     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
952     TestObjectPythonV8Internal::documentTypeAttributeAttributeGetter(info);
953     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
954 }
955
956 static void documentTypeAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
957 {
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));
961 }
962
963 static void documentTypeAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
964 {
965     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
966     TestObjectPythonV8Internal::documentTypeAttributeAttributeSetter(jsValue, info);
967     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
968 }
969
970 static void elementAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
971 {
972     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
973     v8SetReturnValueFast(info, imp->elementAttribute(), imp);
974 }
975
976 static void elementAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
977 {
978     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
979     TestObjectPythonV8Internal::elementAttributeAttributeGetter(info);
980     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
981 }
982
983 static void elementAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
984 {
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));
988 }
989
990 static void elementAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
991 {
992     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
993     TestObjectPythonV8Internal::elementAttributeAttributeSetter(jsValue, info);
994     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
995 }
996
997 static void nodeAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
998 {
999     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
1000     v8SetReturnValueFast(info, imp->nodeAttribute(), imp);
1001 }
1002
1003 static void nodeAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1004 {
1005     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1006     TestObjectPythonV8Internal::nodeAttributeAttributeGetter(info);
1007     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1008 }
1009
1010 static void nodeAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1011 {
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));
1015 }
1016
1017 static void nodeAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1018 {
1019     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1020     TestObjectPythonV8Internal::nodeAttributeAttributeSetter(jsValue, info);
1021     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1022 }
1023
1024 static void shadowRootAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
1025 {
1026     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
1027     v8SetReturnValueFast(info, imp->shadowRootAttribute(), imp);
1028 }
1029
1030 static void shadowRootAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1031 {
1032     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1033     TestObjectPythonV8Internal::shadowRootAttributeAttributeGetter(info);
1034     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1035 }
1036
1037 static void shadowRootAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1038 {
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));
1042 }
1043
1044 static void shadowRootAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1045 {
1046     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1047     TestObjectPythonV8Internal::shadowRootAttributeAttributeSetter(jsValue, info);
1048     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1049 }
1050
1051 static void arrayBufferAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
1052 {
1053     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
1054     v8SetReturnValueFast(info, imp->arrayBufferAttribute(), imp);
1055 }
1056
1057 static void arrayBufferAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1058 {
1059     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1060     TestObjectPythonV8Internal::arrayBufferAttributeAttributeGetter(info);
1061     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1062 }
1063
1064 static void arrayBufferAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1065 {
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));
1069 }
1070
1071 static void arrayBufferAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1072 {
1073     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1074     TestObjectPythonV8Internal::arrayBufferAttributeAttributeSetter(jsValue, info);
1075     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1076 }
1077
1078 static void float32ArrayAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
1079 {
1080     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
1081     v8SetReturnValueFast(info, imp->float32ArrayAttribute(), imp);
1082 }
1083
1084 static void float32ArrayAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1085 {
1086     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1087     TestObjectPythonV8Internal::float32ArrayAttributeAttributeGetter(info);
1088     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1089 }
1090
1091 static void float32ArrayAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1092 {
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));
1096 }
1097
1098 static void float32ArrayAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1099 {
1100     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1101     TestObjectPythonV8Internal::float32ArrayAttributeAttributeSetter(jsValue, info);
1102     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1103 }
1104
1105 static void uint8ArrayAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
1106 {
1107     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
1108     v8SetReturnValueFast(info, imp->uint8ArrayAttribute(), imp);
1109 }
1110
1111 static void uint8ArrayAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1112 {
1113     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1114     TestObjectPythonV8Internal::uint8ArrayAttributeAttributeGetter(info);
1115     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1116 }
1117
1118 static void uint8ArrayAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1119 {
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));
1123 }
1124
1125 static void uint8ArrayAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1126 {
1127     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1128     TestObjectPythonV8Internal::uint8ArrayAttributeAttributeSetter(jsValue, info);
1129     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1130 }
1131
1132 static void selfAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
1133 {
1134     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
1135     v8SetReturnValueFast(info, imp->self(), imp);
1136 }
1137
1138 static void selfAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1139 {
1140     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1141     TestObjectPythonV8Internal::selfAttributeGetter(info);
1142     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1143 }
1144
1145 static void readonlyEventTargetAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
1146 {
1147     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
1148     v8SetReturnValueFast(info, imp->readonlyEventTargetAttribute(), imp);
1149 }
1150
1151 static void readonlyEventTargetAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1152 {
1153     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1154     TestObjectPythonV8Internal::readonlyEventTargetAttributeAttributeGetter(info);
1155     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1156 }
1157
1158 static void readonlyWindowAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
1159 {
1160     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
1161     v8SetReturnValueFast(info, imp->readonlyWindowAttribute(), imp);
1162 }
1163
1164 static void readonlyWindowAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1165 {
1166     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1167     TestObjectPythonV8Internal::readonlyWindowAttributeAttributeGetter(info);
1168     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1169 }
1170
1171 static void htmlCollectionAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
1172 {
1173     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
1174     v8SetReturnValueFast(info, imp->htmlCollectionAttribute(), imp);
1175 }
1176
1177 static void htmlCollectionAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1178 {
1179     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1180     TestObjectPythonV8Internal::htmlCollectionAttributeAttributeGetter(info);
1181     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1182 }
1183
1184 static void htmlElementAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
1185 {
1186     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
1187     v8SetReturnValueFast(info, imp->htmlElementAttribute(), imp);
1188 }
1189
1190 static void htmlElementAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1191 {
1192     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1193     TestObjectPythonV8Internal::htmlElementAttributeAttributeGetter(info);
1194     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1195 }
1196
1197 static void stringArrayAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
1198 {
1199     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
1200     v8SetReturnValue(info, v8Array(imp->stringArrayAttribute(), info.GetIsolate()));
1201 }
1202
1203 static void stringArrayAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1204 {
1205     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1206     TestObjectPythonV8Internal::stringArrayAttributeAttributeGetter(info);
1207     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1208 }
1209
1210 static void stringArrayAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1211 {
1212     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
1213     V8TRYCATCH_VOID(Vector<String>, cppValue, toNativeArray<String>(jsValue, 0, info.GetIsolate()));
1214     imp->setStringArrayAttribute(cppValue);
1215 }
1216
1217 static void stringArrayAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1218 {
1219     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1220     TestObjectPythonV8Internal::stringArrayAttributeAttributeSetter(jsValue, info);
1221     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1222 }
1223
1224 static void testInterfaceEmptyArrayAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
1225 {
1226     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
1227     v8SetReturnValue(info, v8Array(imp->testInterfaceEmptyArrayAttribute(), info.GetIsolate()));
1228 }
1229
1230 static void testInterfaceEmptyArrayAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1231 {
1232     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1233     TestObjectPythonV8Internal::testInterfaceEmptyArrayAttributeAttributeGetter(info);
1234     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1235 }
1236
1237 static void testInterfaceEmptyArrayAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1238 {
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);
1242 }
1243
1244 static void testInterfaceEmptyArrayAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1245 {
1246     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1247     TestObjectPythonV8Internal::testInterfaceEmptyArrayAttributeAttributeSetter(jsValue, info);
1248     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1249 }
1250
1251 static void floatArrayAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
1252 {
1253     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
1254     v8SetReturnValue(info, v8Array(imp->floatArrayAttribute(), info.GetIsolate()));
1255 }
1256
1257 static void floatArrayAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1258 {
1259     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1260     TestObjectPythonV8Internal::floatArrayAttributeAttributeGetter(info);
1261     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1262 }
1263
1264 static void floatArrayAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1265 {
1266     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
1267     V8TRYCATCH_VOID(Vector<float>, cppValue, toNativeArray<float>(jsValue, 0, info.GetIsolate()));
1268     imp->setFloatArrayAttribute(cppValue);
1269 }
1270
1271 static void floatArrayAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1272 {
1273     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1274     TestObjectPythonV8Internal::floatArrayAttributeAttributeSetter(jsValue, info);
1275     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1276 }
1277
1278 static void nullableStringAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
1279 {
1280     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
1281     bool isNull = false;
1282     String jsValue = imp->nullableStringAttribute(isNull);
1283     if (isNull) {
1284         v8SetReturnValueNull(info);
1285         return;
1286     }
1287     v8SetReturnValueString(info, jsValue, info.GetIsolate());
1288 }
1289
1290 static void nullableStringAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1291 {
1292     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1293     TestObjectPythonV8Internal::nullableStringAttributeAttributeGetter(info);
1294     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1295 }
1296
1297 static void nullableStringAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1298 {
1299     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
1300     V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue);
1301     imp->setNullableStringAttribute(cppValue);
1302 }
1303
1304 static void nullableStringAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1305 {
1306     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1307     TestObjectPythonV8Internal::nullableStringAttributeAttributeSetter(jsValue, info);
1308     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1309 }
1310
1311 static void nullableLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
1312 {
1313     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
1314     bool isNull = false;
1315     int jsValue = imp->nullableLongAttribute(isNull);
1316     if (isNull) {
1317         v8SetReturnValueNull(info);
1318         return;
1319     }
1320     v8SetReturnValueInt(info, jsValue);
1321 }
1322
1323 static void nullableLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1324 {
1325     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1326     TestObjectPythonV8Internal::nullableLongAttributeAttributeGetter(info);
1327     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1328 }
1329
1330 static void nullableLongAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1331 {
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);
1336 }
1337
1338 static void nullableLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1339 {
1340     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1341     TestObjectPythonV8Internal::nullableLongAttributeAttributeSetter(jsValue, info);
1342     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1343 }
1344
1345 static void nullableTestInterfaceAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
1346 {
1347     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
1348     bool isNull = false;
1349     RefPtr<TestInterface> jsValue = imp->nullableTestInterfaceAttribute(isNull);
1350     if (isNull) {
1351         v8SetReturnValueNull(info);
1352         return;
1353     }
1354     v8SetReturnValueFast(info, jsValue.release(), imp);
1355 }
1356
1357 static void nullableTestInterfaceAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1358 {
1359     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1360     TestObjectPythonV8Internal::nullableTestInterfaceAttributeAttributeGetter(info);
1361     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1362 }
1363
1364 static void nullableTestInterfaceAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1365 {
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));
1369 }
1370
1371 static void nullableTestInterfaceAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1372 {
1373     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1374     TestObjectPythonV8Internal::nullableTestInterfaceAttributeAttributeSetter(jsValue, info);
1375     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1376 }
1377
1378 static void testEnumAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
1379 {
1380     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
1381     v8SetReturnValueString(info, imp->testEnumAttribute(), info.GetIsolate());
1382 }
1383
1384 static void testEnumAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1385 {
1386     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1387     TestObjectPythonV8Internal::testEnumAttributeAttributeGetter(info);
1388     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1389 }
1390
1391 static void testEnumAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1392 {
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"))
1397         return;
1398     imp->setTestEnumAttribute(cppValue);
1399 }
1400
1401 static void testEnumAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1402 {
1403     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1404     TestObjectPythonV8Internal::testEnumAttributeAttributeSetter(jsValue, info);
1405     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1406 }
1407
1408 static void staticStringAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
1409 {
1410     v8SetReturnValueString(info, TestObjectPython::staticStringAttribute(), info.GetIsolate());
1411 }
1412
1413 static void staticStringAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1414 {
1415     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1416     TestObjectPythonV8Internal::staticStringAttributeAttributeGetter(info);
1417     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1418 }
1419
1420 static void staticStringAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1421 {
1422     V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue);
1423     TestObjectPython::setStaticStringAttribute(cppValue);
1424 }
1425
1426 static void staticStringAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1427 {
1428     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1429     TestObjectPythonV8Internal::staticStringAttributeAttributeSetter(jsValue, info);
1430     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1431 }
1432
1433 static void staticLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
1434 {
1435     v8SetReturnValueInt(info, TestObjectPython::staticLongAttribute());
1436 }
1437
1438 static void staticLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1439 {
1440     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1441     TestObjectPythonV8Internal::staticLongAttributeAttributeGetter(info);
1442     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1443 }
1444
1445 static void staticLongAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1446 {
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);
1450 }
1451
1452 static void staticLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1453 {
1454     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1455     TestObjectPythonV8Internal::staticLongAttributeAttributeSetter(jsValue, info);
1456     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1457 }
1458
1459 static void eventHandlerAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
1460 {
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())));
1464 }
1465
1466 static void eventHandlerAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1467 {
1468     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1469     TestObjectPythonV8Internal::eventHandlerAttributeAttributeGetter(info);
1470     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1471 }
1472
1473 static void eventHandlerAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1474 {
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));
1478 }
1479
1480 static void eventHandlerAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1481 {
1482     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1483     TestObjectPythonV8Internal::eventHandlerAttributeAttributeSetter(jsValue, info);
1484     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1485 }
1486
1487 static void activityLoggingAccessForAllWorldsLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
1488 {
1489     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
1490     v8SetReturnValueInt(info, imp->activityLoggingAccessForAllWorldsLongAttribute());
1491 }
1492
1493 static void activityLoggingAccessForAllWorldsLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1494 {
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");
1501 }
1502
1503 static void activityLoggingAccessForAllWorldsLongAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1504 {
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);
1509 }
1510
1511 static void activityLoggingAccessForAllWorldsLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1512 {
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");
1518     }
1519     TestObjectPythonV8Internal::activityLoggingAccessForAllWorldsLongAttributeAttributeSetter(jsValue, info);
1520     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1521 }
1522
1523 static void activityLoggingGetterForAllWorldsLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
1524 {
1525     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
1526     v8SetReturnValueInt(info, imp->activityLoggingGetterForAllWorldsLongAttribute());
1527 }
1528
1529 static void activityLoggingGetterForAllWorldsLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1530 {
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");
1537 }
1538
1539 static void activityLoggingGetterForAllWorldsLongAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1540 {
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);
1545 }
1546
1547 static void activityLoggingGetterForAllWorldsLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1548 {
1549     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1550     TestObjectPythonV8Internal::activityLoggingGetterForAllWorldsLongAttributeAttributeSetter(jsValue, info);
1551     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1552 }
1553
1554 static void activityLoggingSetterForAllWorldsLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
1555 {
1556     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
1557     v8SetReturnValueInt(info, imp->activityLoggingSetterForAllWorldsLongAttribute());
1558 }
1559
1560 static void activityLoggingSetterForAllWorldsLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1561 {
1562     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1563     TestObjectPythonV8Internal::activityLoggingSetterForAllWorldsLongAttributeAttributeGetter(info);
1564     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1565 }
1566
1567 static void activityLoggingSetterForAllWorldsLongAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1568 {
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);
1573 }
1574
1575 static void activityLoggingSetterForAllWorldsLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1576 {
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");
1582     }
1583     TestObjectPythonV8Internal::activityLoggingSetterForAllWorldsLongAttributeAttributeSetter(jsValue, info);
1584     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1585 }
1586
1587 static void cachedAttributeAnyAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
1588 {
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);
1595             return;
1596         }
1597     }
1598     ScriptValue jsValue = imp->cachedAttributeAnyAttribute();
1599     setHiddenValue(info.GetIsolate(), info.Holder(), propertyName, jsValue.v8Value());
1600     v8SetReturnValue(info, jsValue.v8Value());
1601 }
1602
1603 static void cachedAttributeAnyAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1604 {
1605     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1606     TestObjectPythonV8Internal::cachedAttributeAnyAttributeAttributeGetter(info);
1607     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1608 }
1609
1610 static void cachedAttributeAnyAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1611 {
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.
1616 }
1617
1618 static void cachedAttributeAnyAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1619 {
1620     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1621     TestObjectPythonV8Internal::cachedAttributeAnyAttributeAttributeSetter(jsValue, info);
1622     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1623 }
1624
1625 static void callWithExecutionContextAnyAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
1626 {
1627     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
1628     ExecutionContext* scriptContext = currentExecutionContext(info.GetIsolate());
1629     v8SetReturnValue(info, imp->callWithExecutionContextAnyAttribute(scriptContext).v8Value());
1630 }
1631
1632 static void callWithExecutionContextAnyAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1633 {
1634     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1635     TestObjectPythonV8Internal::callWithExecutionContextAnyAttributeAttributeGetter(info);
1636     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1637 }
1638
1639 static void callWithExecutionContextAnyAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1640 {
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);
1645 }
1646
1647 static void callWithExecutionContextAnyAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1648 {
1649     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1650     TestObjectPythonV8Internal::callWithExecutionContextAnyAttributeAttributeSetter(jsValue, info);
1651     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1652 }
1653
1654 static void checkSecurityForNodeReadonlyDocumentAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
1655 {
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();
1661         return;
1662     }
1663     v8SetReturnValueFast(info, imp->checkSecurityForNodeReadonlyDocumentAttribute(), imp);
1664 }
1665
1666 static void checkSecurityForNodeReadonlyDocumentAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1667 {
1668     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1669     TestObjectPythonV8Internal::checkSecurityForNodeReadonlyDocumentAttributeAttributeGetter(info);
1670     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1671 }
1672
1673 #if ENABLE(CONDITION)
1674 static void conditionalLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
1675 {
1676     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
1677     v8SetReturnValueInt(info, imp->conditionalLongAttribute());
1678 }
1679 #endif // ENABLE(CONDITION)
1680
1681 #if ENABLE(CONDITION)
1682 static void conditionalLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1683 {
1684     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1685     TestObjectPythonV8Internal::conditionalLongAttributeAttributeGetter(info);
1686     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1687 }
1688 #endif // ENABLE(CONDITION)
1689
1690 #if ENABLE(CONDITION)
1691 static void conditionalLongAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1692 {
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);
1697 }
1698 #endif // ENABLE(CONDITION)
1699
1700 #if ENABLE(CONDITION)
1701 static void conditionalLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1702 {
1703     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1704     TestObjectPythonV8Internal::conditionalLongAttributeAttributeSetter(jsValue, info);
1705     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1706 }
1707 #endif // ENABLE(CONDITION)
1708
1709 #if ENABLE(CONDITION_1) && ENABLE(CONDITION_2)
1710 static void conditionalAndLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
1711 {
1712     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
1713     v8SetReturnValueInt(info, imp->conditionalAndLongAttribute());
1714 }
1715 #endif // ENABLE(CONDITION_1) && ENABLE(CONDITION_2)
1716
1717 #if ENABLE(CONDITION_1) && ENABLE(CONDITION_2)
1718 static void conditionalAndLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1719 {
1720     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1721     TestObjectPythonV8Internal::conditionalAndLongAttributeAttributeGetter(info);
1722     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1723 }
1724 #endif // ENABLE(CONDITION_1) && ENABLE(CONDITION_2)
1725
1726 #if ENABLE(CONDITION_1) && ENABLE(CONDITION_2)
1727 static void conditionalAndLongAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1728 {
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);
1733 }
1734 #endif // ENABLE(CONDITION_1) && ENABLE(CONDITION_2)
1735
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)
1738 {
1739     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1740     TestObjectPythonV8Internal::conditionalAndLongAttributeAttributeSetter(jsValue, info);
1741     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1742 }
1743 #endif // ENABLE(CONDITION_1) && ENABLE(CONDITION_2)
1744
1745 #if ENABLE(CONDITION_1) || ENABLE(CONDITION_2)
1746 static void conditionalOrLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
1747 {
1748     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
1749     v8SetReturnValueInt(info, imp->conditionalOrLongAttribute());
1750 }
1751 #endif // ENABLE(CONDITION_1) || ENABLE(CONDITION_2)
1752
1753 #if ENABLE(CONDITION_1) || ENABLE(CONDITION_2)
1754 static void conditionalOrLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1755 {
1756     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1757     TestObjectPythonV8Internal::conditionalOrLongAttributeAttributeGetter(info);
1758     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1759 }
1760 #endif // ENABLE(CONDITION_1) || ENABLE(CONDITION_2)
1761
1762 #if ENABLE(CONDITION_1) || ENABLE(CONDITION_2)
1763 static void conditionalOrLongAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1764 {
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);
1769 }
1770 #endif // ENABLE(CONDITION_1) || ENABLE(CONDITION_2)
1771
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)
1774 {
1775     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1776     TestObjectPythonV8Internal::conditionalOrLongAttributeAttributeSetter(jsValue, info);
1777     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1778 }
1779 #endif // ENABLE(CONDITION_1) || ENABLE(CONDITION_2)
1780
1781 static void customObjectAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1782 {
1783     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1784     V8TestObjectPython::customObjectAttributeAttributeGetterCustom(info);
1785     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1786 }
1787
1788 static void customObjectAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1789 {
1790     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1791     V8TestObjectPython::customObjectAttributeAttributeSetterCustom(jsValue, info);
1792     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1793 }
1794
1795 static void customGetterLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1796 {
1797     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1798     V8TestObjectPython::customGetterLongAttributeAttributeGetterCustom(info);
1799     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1800 }
1801
1802 static void customGetterLongAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1803 {
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);
1808 }
1809
1810 static void customGetterLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1811 {
1812     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1813     TestObjectPythonV8Internal::customGetterLongAttributeAttributeSetter(jsValue, info);
1814     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1815 }
1816
1817 static void customGetterReadonlyObjectAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1818 {
1819     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1820     V8TestObjectPython::customGetterReadonlyObjectAttributeAttributeGetterCustom(info);
1821     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1822 }
1823
1824 static void customSetterLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
1825 {
1826     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
1827     v8SetReturnValueInt(info, imp->customSetterLongAttribute());
1828 }
1829
1830 static void customSetterLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1831 {
1832     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1833     TestObjectPythonV8Internal::customSetterLongAttributeAttributeGetter(info);
1834     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1835 }
1836
1837 static void customSetterLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1838 {
1839     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1840     V8TestObjectPython::customSetterLongAttributeAttributeSetterCustom(jsValue, info);
1841     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1842 }
1843
1844 #if ENABLE(CONDITION)
1845 static void customLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1846 {
1847     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1848     V8TestObjectPython::customLongAttributeAttributeGetterCustom(info);
1849     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1850 }
1851 #endif // ENABLE(CONDITION)
1852
1853 #if ENABLE(CONDITION)
1854 static void customLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1855 {
1856     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1857     V8TestObjectPython::customLongAttributeAttributeSetterCustom(jsValue, info);
1858     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1859 }
1860 #endif // ENABLE(CONDITION)
1861
1862 static void customElementsCallbacksReadonlyLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
1863 {
1864     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
1865     v8SetReturnValueInt(info, imp->customElementsCallbacksReadonlyLongAttribute());
1866 }
1867
1868 static void customElementsCallbacksReadonlyLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1869 {
1870     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1871     TestObjectPythonV8Internal::customElementsCallbacksReadonlyLongAttributeAttributeGetter(info);
1872     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1873 }
1874
1875 static void deprecatedLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
1876 {
1877     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
1878     v8SetReturnValueInt(info, imp->deprecatedLongAttribute());
1879 }
1880
1881 static void deprecatedLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1882 {
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");
1887 }
1888
1889 static void deprecatedLongAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1890 {
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);
1895 }
1896
1897 static void deprecatedLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1898 {
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");
1903 }
1904
1905 static void enforceRangeLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
1906 {
1907     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
1908     v8SetReturnValueInt(info, imp->enforceRangeLongAttribute());
1909 }
1910
1911 static void enforceRangeLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1912 {
1913     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1914     TestObjectPythonV8Internal::enforceRangeLongAttributeAttributeGetter(info);
1915     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1916 }
1917
1918 static void enforceRangeLongAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1919 {
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);
1924 }
1925
1926 static void enforceRangeLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1927 {
1928     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1929     TestObjectPythonV8Internal::enforceRangeLongAttributeAttributeSetter(jsValue, info);
1930     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1931 }
1932
1933 static void exposeJSAccessorsLongAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
1934 {
1935     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
1936     v8SetReturnValueInt(info, imp->exposeJSAccessorsLongAttribute());
1937 }
1938
1939 static void exposeJSAccessorsLongAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
1940 {
1941     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1942     TestObjectPythonV8Internal::exposeJSAccessorsLongAttributeAttributeGetter(info);
1943     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1944 }
1945
1946 static void exposeJSAccessorsLongAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::FunctionCallbackInfo<v8::Value>& info)
1947 {
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);
1952 }
1953
1954 static void exposeJSAccessorsLongAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
1955 {
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");
1960 }
1961
1962 static void implementedAsLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
1963 {
1964     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
1965     v8SetReturnValueInt(info, imp->implementedAsName());
1966 }
1967
1968 static void implementedAsLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1969 {
1970     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1971     TestObjectPythonV8Internal::implementedAsLongAttributeAttributeGetter(info);
1972     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1973 }
1974
1975 static void implementedAsLongAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1976 {
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);
1981 }
1982
1983 static void implementedAsLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1984 {
1985     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1986     TestObjectPythonV8Internal::implementedAsLongAttributeAttributeSetter(jsValue, info);
1987     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1988 }
1989
1990 static void customImplementedAsLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1991 {
1992     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1993     V8TestObjectPython::customImplementedAsLongAttributeAttributeGetterCustom(info);
1994     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1995 }
1996
1997 static void customImplementedAsLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1998 {
1999     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2000     V8TestObjectPython::customImplementedAsLongAttributeAttributeSetterCustom(jsValue, info);
2001     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2002 }
2003
2004 static void customGetterImplementedAsLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2005 {
2006     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2007     V8TestObjectPython::customGetterImplementedAsLongAttributeAttributeGetterCustom(info);
2008     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2009 }
2010
2011 static void customGetterImplementedAsLongAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2012 {
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);
2017 }
2018
2019 static void customGetterImplementedAsLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2020 {
2021     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2022     TestObjectPythonV8Internal::customGetterImplementedAsLongAttributeAttributeSetter(jsValue, info);
2023     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2024 }
2025
2026 static void customSetterImplementedAsLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
2027 {
2028     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
2029     v8SetReturnValueInt(info, imp->implementedAsNameWithCustomGetter());
2030 }
2031
2032 static void customSetterImplementedAsLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2033 {
2034     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2035     TestObjectPythonV8Internal::customSetterImplementedAsLongAttributeAttributeGetter(info);
2036     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2037 }
2038
2039 static void customSetterImplementedAsLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2040 {
2041     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2042     V8TestObjectPython::customSetterImplementedAsLongAttributeAttributeSetterCustom(jsValue, info);
2043     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2044 }
2045
2046 static void measureAsLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
2047 {
2048     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
2049     v8SetReturnValueInt(info, imp->measureAsLongAttribute());
2050 }
2051
2052 static void measureAsLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2053 {
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");
2058 }
2059
2060 static void measureAsLongAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2061 {
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);
2066 }
2067
2068 static void measureAsLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2069 {
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");
2074 }
2075
2076 static void notEnumerableLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
2077 {
2078     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
2079     v8SetReturnValueInt(info, imp->notEnumerableLongAttribute());
2080 }
2081
2082 static void notEnumerableLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2083 {
2084     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2085     TestObjectPythonV8Internal::notEnumerableLongAttributeAttributeGetter(info);
2086     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2087 }
2088
2089 static void notEnumerableLongAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2090 {
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);
2095 }
2096
2097 static void notEnumerableLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2098 {
2099     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2100     TestObjectPythonV8Internal::notEnumerableLongAttributeAttributeSetter(jsValue, info);
2101     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2102 }
2103
2104 static void perContextEnabledLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
2105 {
2106     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
2107     v8SetReturnValueInt(info, imp->perContextEnabledLongAttribute());
2108 }
2109
2110 static void perContextEnabledLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2111 {
2112     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2113     TestObjectPythonV8Internal::perContextEnabledLongAttributeAttributeGetter(info);
2114     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2115 }
2116
2117 static void perContextEnabledLongAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2118 {
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);
2123 }
2124
2125 static void perContextEnabledLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2126 {
2127     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2128     TestObjectPythonV8Internal::perContextEnabledLongAttributeAttributeSetter(jsValue, info);
2129     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2130 }
2131
2132 static void perWorldBindingsLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
2133 {
2134     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
2135     v8SetReturnValueInt(info, imp->perWorldBindingsLongAttribute());
2136 }
2137
2138 static void perWorldBindingsLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2139 {
2140     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2141     TestObjectPythonV8Internal::perWorldBindingsLongAttributeAttributeGetter(info);
2142     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2143 }
2144
2145 static void perWorldBindingsLongAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2146 {
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);
2151 }
2152
2153 static void perWorldBindingsLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2154 {
2155     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2156     TestObjectPythonV8Internal::perWorldBindingsLongAttributeAttributeSetter(jsValue, info);
2157     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2158 }
2159
2160 static void perWorldBindingsLongAttributeAttributeGetterForMainWorld(const v8::PropertyCallbackInfo<v8::Value>& info)
2161 {
2162     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
2163     v8SetReturnValueInt(info, imp->perWorldBindingsLongAttribute());
2164 }
2165
2166 static void perWorldBindingsLongAttributeAttributeGetterCallbackForMainWorld(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2167 {
2168     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2169     TestObjectPythonV8Internal::perWorldBindingsLongAttributeAttributeGetterForMainWorld(info);
2170     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2171 }
2172
2173 static void perWorldBindingsLongAttributeAttributeSetterForMainWorld(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2174 {
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);
2179 }
2180
2181 static void perWorldBindingsLongAttributeAttributeSetterCallbackForMainWorld(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2182 {
2183     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2184     TestObjectPythonV8Internal::perWorldBindingsLongAttributeAttributeSetterForMainWorld(jsValue, info);
2185     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2186 }
2187
2188 static void perWorldBindingsReadonlyLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
2189 {
2190     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
2191     v8SetReturnValueInt(info, imp->perWorldBindingsReadonlyLongAttribute());
2192 }
2193
2194 static void perWorldBindingsReadonlyLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2195 {
2196     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2197     TestObjectPythonV8Internal::perWorldBindingsReadonlyLongAttributeAttributeGetter(info);
2198     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2199 }
2200
2201 static void perWorldBindingsReadonlyLongAttributeAttributeGetterForMainWorld(const v8::PropertyCallbackInfo<v8::Value>& info)
2202 {
2203     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
2204     v8SetReturnValueInt(info, imp->perWorldBindingsReadonlyLongAttribute());
2205 }
2206
2207 static void perWorldBindingsReadonlyLongAttributeAttributeGetterCallbackForMainWorld(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2208 {
2209     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2210     TestObjectPythonV8Internal::perWorldBindingsReadonlyLongAttributeAttributeGetterForMainWorld(info);
2211     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2212 }
2213
2214 static void perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
2215 {
2216     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
2217     RefPtr<TestInterfaceEmpty> result = imp->perWorldBindingsReadonlyTestInterfaceEmptyAttribute();
2218     if (result && DOMDataStore::setReturnValueFromWrapper<V8TestInterfaceEmpty>(info.GetReturnValue(), result.get()))
2219         return;
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);
2224     }
2225 }
2226
2227 static void perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2228 {
2229     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2230     TestObjectPythonV8Internal::perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetter(info);
2231     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2232 }
2233
2234 static void perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetterForMainWorld(const v8::PropertyCallbackInfo<v8::Value>& info)
2235 {
2236     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
2237     RefPtr<TestInterfaceEmpty> result = imp->perWorldBindingsReadonlyTestInterfaceEmptyAttribute();
2238     if (result && DOMDataStore::setReturnValueFromWrapperForMainWorld<V8TestInterfaceEmpty>(info.GetReturnValue(), result.get()))
2239         return;
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);
2244     }
2245 }
2246
2247 static void perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetterCallbackForMainWorld(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2248 {
2249     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2250     TestObjectPythonV8Internal::perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetterForMainWorld(info);
2251     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2252 }
2253
2254 static void activityLoggingAccessPerWorldBindingsLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
2255 {
2256     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
2257     v8SetReturnValueInt(info, imp->activityLoggingAccessPerWorldBindingsLongAttribute());
2258 }
2259
2260 static void activityLoggingAccessPerWorldBindingsLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2261 {
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");
2268 }
2269
2270 static void activityLoggingAccessPerWorldBindingsLongAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2271 {
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);
2276 }
2277
2278 static void activityLoggingAccessPerWorldBindingsLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2279 {
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");
2285     }
2286     TestObjectPythonV8Internal::activityLoggingAccessPerWorldBindingsLongAttributeAttributeSetter(jsValue, info);
2287     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2288 }
2289
2290 static void activityLoggingAccessPerWorldBindingsLongAttributeAttributeGetterForMainWorld(const v8::PropertyCallbackInfo<v8::Value>& info)
2291 {
2292     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
2293     v8SetReturnValueInt(info, imp->activityLoggingAccessPerWorldBindingsLongAttribute());
2294 }
2295
2296 static void activityLoggingAccessPerWorldBindingsLongAttributeAttributeGetterCallbackForMainWorld(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2297 {
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");
2304 }
2305
2306 static void activityLoggingAccessPerWorldBindingsLongAttributeAttributeSetterForMainWorld(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2307 {
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);
2312 }
2313
2314 static void activityLoggingAccessPerWorldBindingsLongAttributeAttributeSetterCallbackForMainWorld(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2315 {
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");
2321     }
2322     TestObjectPythonV8Internal::activityLoggingAccessPerWorldBindingsLongAttributeAttributeSetterForMainWorld(jsValue, info);
2323     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2324 }
2325
2326 static void activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
2327 {
2328     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
2329     v8SetReturnValueInt(info, imp->activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttribute());
2330 }
2331
2332 static void activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2333 {
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");
2340 }
2341
2342 static void activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2343 {
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);
2348 }
2349
2350 static void activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2351 {
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");
2357     }
2358     TestObjectPythonV8Internal::activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeAttributeSetter(jsValue, info);
2359     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2360 }
2361
2362 static void activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeAttributeGetterForMainWorld(const v8::PropertyCallbackInfo<v8::Value>& info)
2363 {
2364     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
2365     v8SetReturnValueInt(info, imp->activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttribute());
2366 }
2367
2368 static void activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeAttributeGetterCallbackForMainWorld(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2369 {
2370     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2371     TestObjectPythonV8Internal::activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeAttributeGetterForMainWorld(info);
2372     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2373 }
2374
2375 static void activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeAttributeSetterForMainWorld(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2376 {
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);
2381 }
2382
2383 static void activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeAttributeSetterCallbackForMainWorld(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2384 {
2385     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2386     TestObjectPythonV8Internal::activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeAttributeSetterForMainWorld(jsValue, info);
2387     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2388 }
2389
2390 static void activityLoggingGetterPerWorldBindingsLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
2391 {
2392     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
2393     v8SetReturnValueInt(info, imp->activityLoggingGetterPerWorldBindingsLongAttribute());
2394 }
2395
2396 static void activityLoggingGetterPerWorldBindingsLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2397 {
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");
2404 }
2405
2406 static void activityLoggingGetterPerWorldBindingsLongAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2407 {
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);
2412 }
2413
2414 static void activityLoggingGetterPerWorldBindingsLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2415 {
2416     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2417     TestObjectPythonV8Internal::activityLoggingGetterPerWorldBindingsLongAttributeAttributeSetter(jsValue, info);
2418     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2419 }
2420
2421 static void activityLoggingGetterPerWorldBindingsLongAttributeAttributeGetterForMainWorld(const v8::PropertyCallbackInfo<v8::Value>& info)
2422 {
2423     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
2424     v8SetReturnValueInt(info, imp->activityLoggingGetterPerWorldBindingsLongAttribute());
2425 }
2426
2427 static void activityLoggingGetterPerWorldBindingsLongAttributeAttributeGetterCallbackForMainWorld(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2428 {
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");
2435 }
2436
2437 static void activityLoggingGetterPerWorldBindingsLongAttributeAttributeSetterForMainWorld(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2438 {
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);
2443 }
2444
2445 static void activityLoggingGetterPerWorldBindingsLongAttributeAttributeSetterCallbackForMainWorld(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2446 {
2447     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2448     TestObjectPythonV8Internal::activityLoggingGetterPerWorldBindingsLongAttributeAttributeSetterForMainWorld(jsValue, info);
2449     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2450 }
2451
2452 static void activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
2453 {
2454     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
2455     v8SetReturnValueInt(info, imp->activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttribute());
2456 }
2457
2458 static void activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2459 {
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");
2466 }
2467
2468 static void activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2469 {
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);
2474 }
2475
2476 static void activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2477 {
2478     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2479     TestObjectPythonV8Internal::activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeAttributeSetter(jsValue, info);
2480     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2481 }
2482
2483 static void activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeAttributeGetterForMainWorld(const v8::PropertyCallbackInfo<v8::Value>& info)
2484 {
2485     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
2486     v8SetReturnValueInt(info, imp->activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttribute());
2487 }
2488
2489 static void activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeAttributeGetterCallbackForMainWorld(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2490 {
2491     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2492     TestObjectPythonV8Internal::activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeAttributeGetterForMainWorld(info);
2493     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2494 }
2495
2496 static void activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeAttributeSetterForMainWorld(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2497 {
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);
2502 }
2503
2504 static void activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeAttributeSetterCallbackForMainWorld(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2505 {
2506     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2507     TestObjectPythonV8Internal::activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeAttributeSetterForMainWorld(jsValue, info);
2508     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2509 }
2510
2511 static void locationAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
2512 {
2513     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
2514     v8SetReturnValueFast(info, imp->location(), imp);
2515 }
2516
2517 static void locationAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2518 {
2519     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2520     TestObjectPythonV8Internal::locationAttributeGetter(info);
2521     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2522 }
2523
2524 static void locationAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2525 {
2526     TestObjectPython* proxyImp = V8TestObjectPython::toNative(info.Holder());
2527     TestNode* imp = proxyImp->location();
2528     if (!imp)
2529         return;
2530     V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue);
2531     imp->setHref(cppValue);
2532 }
2533
2534 static void locationAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2535 {
2536     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2537     TestObjectPythonV8Internal::locationAttributeSetter(jsValue, info);
2538     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2539 }
2540
2541 static void locationWithExceptionAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
2542 {
2543     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
2544     v8SetReturnValueFast(info, imp->locationWithException(), imp);
2545 }
2546
2547 static void locationWithExceptionAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2548 {
2549     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2550     TestObjectPythonV8Internal::locationWithExceptionAttributeGetter(info);
2551     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2552 }
2553
2554 static void locationWithExceptionAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2555 {
2556     TestObjectPython* proxyImp = V8TestObjectPython::toNative(info.Holder());
2557     TestNode* imp = proxyImp->locationWithException();
2558     if (!imp)
2559         return;
2560     V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue);
2561     imp->setHrefThrows(cppValue);
2562 }
2563
2564 static void locationWithExceptionAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2565 {
2566     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2567     TestObjectPythonV8Internal::locationWithExceptionAttributeSetter(jsValue, info);
2568     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2569 }
2570
2571 static void locationWithCallWithAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
2572 {
2573     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
2574     v8SetReturnValueFast(info, imp->locationWithCallWith(), imp);
2575 }
2576
2577 static void locationWithCallWithAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2578 {
2579     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2580     TestObjectPythonV8Internal::locationWithCallWithAttributeGetter(info);
2581     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2582 }
2583
2584 static void locationWithCallWithAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2585 {
2586     TestObjectPython* proxyImp = V8TestObjectPython::toNative(info.Holder());
2587     TestNode* imp = proxyImp->locationWithCallWith();
2588     if (!imp)
2589         return;
2590     V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue);
2591     imp->setHrefCallWith(activeDOMWindow(info.GetIsolate()), firstDOMWindow(info.GetIsolate()), cppValue);
2592 }
2593
2594 static void locationWithCallWithAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2595 {
2596     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2597     TestObjectPythonV8Internal::locationWithCallWithAttributeSetter(jsValue, info);
2598     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2599 }
2600
2601 static void locationWithPerWorldBindingsAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
2602 {
2603     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
2604     v8SetReturnValueFast(info, imp->locationWithPerWorldBindings(), imp);
2605 }
2606
2607 static void locationWithPerWorldBindingsAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2608 {
2609     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2610     TestObjectPythonV8Internal::locationWithPerWorldBindingsAttributeGetter(info);
2611     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2612 }
2613
2614 static void locationWithPerWorldBindingsAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2615 {
2616     TestObjectPython* proxyImp = V8TestObjectPython::toNative(info.Holder());
2617     TestNode* imp = proxyImp->locationWithPerWorldBindings();
2618     if (!imp)
2619         return;
2620     V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue);
2621     imp->setHref(cppValue);
2622 }
2623
2624 static void locationWithPerWorldBindingsAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2625 {
2626     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2627     TestObjectPythonV8Internal::locationWithPerWorldBindingsAttributeSetter(jsValue, info);
2628     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2629 }
2630
2631 static void locationWithPerWorldBindingsAttributeGetterForMainWorld(const v8::PropertyCallbackInfo<v8::Value>& info)
2632 {
2633     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
2634     v8SetReturnValueForMainWorld(info, imp->locationWithPerWorldBindings());
2635 }
2636
2637 static void locationWithPerWorldBindingsAttributeGetterCallbackForMainWorld(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2638 {
2639     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2640     TestObjectPythonV8Internal::locationWithPerWorldBindingsAttributeGetterForMainWorld(info);
2641     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2642 }
2643
2644 static void locationWithPerWorldBindingsAttributeSetterForMainWorld(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2645 {
2646     TestObjectPython* proxyImp = V8TestObjectPython::toNative(info.Holder());
2647     TestNode* imp = proxyImp->locationWithPerWorldBindings();
2648     if (!imp)
2649         return;
2650     V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue);
2651     imp->setHref(cppValue);
2652 }
2653
2654 static void locationWithPerWorldBindingsAttributeSetterCallbackForMainWorld(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2655 {
2656     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2657     TestObjectPythonV8Internal::locationWithPerWorldBindingsAttributeSetterForMainWorld(jsValue, info);
2658     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2659 }
2660
2661 static void raisesExceptionLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
2662 {
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()))
2667         return;
2668     v8SetReturnValueInt(info, jsValue);
2669 }
2670
2671 static void raisesExceptionLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2672 {
2673     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2674     TestObjectPythonV8Internal::raisesExceptionLongAttributeAttributeGetter(info);
2675     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2676 }
2677
2678 static void raisesExceptionLongAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2679 {
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();
2685 }
2686
2687 static void raisesExceptionLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2688 {
2689     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2690     TestObjectPythonV8Internal::raisesExceptionLongAttributeAttributeSetter(jsValue, info);
2691     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2692 }
2693
2694 static void raisesExceptionGetterLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
2695 {
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()))
2700         return;
2701     v8SetReturnValueInt(info, jsValue);
2702 }
2703
2704 static void raisesExceptionGetterLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2705 {
2706     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2707     TestObjectPythonV8Internal::raisesExceptionGetterLongAttributeAttributeGetter(info);
2708     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2709 }
2710
2711 static void raisesExceptionGetterLongAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2712 {
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);
2717 }
2718
2719 static void raisesExceptionGetterLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2720 {
2721     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2722     TestObjectPythonV8Internal::raisesExceptionGetterLongAttributeAttributeSetter(jsValue, info);
2723     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2724 }
2725
2726 static void setterRaisesExceptionLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
2727 {
2728     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
2729     v8SetReturnValueInt(info, imp->setterRaisesExceptionLongAttribute());
2730 }
2731
2732 static void setterRaisesExceptionLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2733 {
2734     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2735     TestObjectPythonV8Internal::setterRaisesExceptionLongAttributeAttributeGetter(info);
2736     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2737 }
2738
2739 static void setterRaisesExceptionLongAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2740 {
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();
2746 }
2747
2748 static void setterRaisesExceptionLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2749 {
2750     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2751     TestObjectPythonV8Internal::setterRaisesExceptionLongAttributeAttributeSetter(jsValue, info);
2752     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2753 }
2754
2755 static void raisesExceptionTestInterfaceEmptyAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
2756 {
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()))
2761         return;
2762     v8SetReturnValueFast(info, jsValue.release(), imp);
2763 }
2764
2765 static void raisesExceptionTestInterfaceEmptyAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2766 {
2767     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2768     TestObjectPythonV8Internal::raisesExceptionTestInterfaceEmptyAttributeAttributeGetter(info);
2769     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2770 }
2771
2772 static void raisesExceptionTestInterfaceEmptyAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2773 {
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();
2779 }
2780
2781 static void raisesExceptionTestInterfaceEmptyAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2782 {
2783     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2784     TestObjectPythonV8Internal::raisesExceptionTestInterfaceEmptyAttributeAttributeSetter(jsValue, info);
2785     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2786 }
2787
2788 static void cachedAttributeRaisesExceptionGetterAnyAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
2789 {
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);
2796             return;
2797         }
2798     }
2799     ExceptionState exceptionState(ExceptionState::GetterContext, "cachedAttributeRaisesExceptionGetterAnyAttribute", "TestObjectPython", info.Holder(), info.GetIsolate());
2800     ScriptValue jsValue = imp->cachedAttributeRaisesExceptionGetterAnyAttribute(exceptionState);
2801     if (UNLIKELY(exceptionState.throwIfNeeded()))
2802         return;
2803     setHiddenValue(info.GetIsolate(), info.Holder(), propertyName, jsValue.v8Value());
2804     v8SetReturnValue(info, jsValue.v8Value());
2805 }
2806
2807 static void cachedAttributeRaisesExceptionGetterAnyAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2808 {
2809     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2810     TestObjectPythonV8Internal::cachedAttributeRaisesExceptionGetterAnyAttributeAttributeGetter(info);
2811     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2812 }
2813
2814 static void cachedAttributeRaisesExceptionGetterAnyAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2815 {
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.
2822 }
2823
2824 static void cachedAttributeRaisesExceptionGetterAnyAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2825 {
2826     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2827     TestObjectPythonV8Internal::cachedAttributeRaisesExceptionGetterAnyAttributeAttributeSetter(jsValue, info);
2828     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2829 }
2830
2831 static void reflectTestInterfaceAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
2832 {
2833     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
2834     v8SetReturnValueFast(info, imp->fastGetAttribute(HTMLNames::reflecttestinterfaceattributeAttr), imp);
2835 }
2836
2837 static void reflectTestInterfaceAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2838 {
2839     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2840     TestObjectPythonV8Internal::reflectTestInterfaceAttributeAttributeGetter(info);
2841     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2842 }
2843
2844 static void reflectTestInterfaceAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2845 {
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));
2850 }
2851
2852 static void reflectTestInterfaceAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2853 {
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");
2858 }
2859
2860 static void reflectReflectedNameAttributeTestAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
2861 {
2862     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
2863     v8SetReturnValueFast(info, imp->fastGetAttribute(HTMLNames::reflectedNameAttributeAttr), imp);
2864 }
2865
2866 static void reflectReflectedNameAttributeTestAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2867 {
2868     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2869     TestObjectPythonV8Internal::reflectReflectedNameAttributeTestAttributeAttributeGetter(info);
2870     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2871 }
2872
2873 static void reflectReflectedNameAttributeTestAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2874 {
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));
2879 }
2880
2881 static void reflectReflectedNameAttributeTestAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2882 {
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");
2887 }
2888
2889 static void reflectBooleanAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
2890 {
2891     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
2892     v8SetReturnValueBool(info, imp->fastHasAttribute(HTMLNames::reflectbooleanattributeAttr));
2893 }
2894
2895 static void reflectBooleanAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2896 {
2897     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2898     TestObjectPythonV8Internal::reflectBooleanAttributeAttributeGetter(info);
2899     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2900 }
2901
2902 static void reflectBooleanAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2903 {
2904     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
2905     V8TRYCATCH_VOID(bool, cppValue, jsValue->BooleanValue());
2906     CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
2907     imp->setBooleanAttribute(HTMLNames::reflectbooleanattributeAttr, cppValue);
2908 }
2909
2910 static void reflectBooleanAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2911 {
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");
2916 }
2917
2918 static void reflectLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
2919 {
2920     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
2921     v8SetReturnValueInt(info, imp->getIntegralAttribute(HTMLNames::reflectlongattributeAttr));
2922 }
2923
2924 static void reflectLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2925 {
2926     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2927     TestObjectPythonV8Internal::reflectLongAttributeAttributeGetter(info);
2928     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2929 }
2930
2931 static void reflectLongAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2932 {
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);
2938 }
2939
2940 static void reflectLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2941 {
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");
2946 }
2947
2948 static void reflectUnsignedShortAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
2949 {
2950     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
2951     v8SetReturnValueUnsigned(info, std::max(0, imp->fastGetAttribute(HTMLNames::reflectunsignedshortattributeAttr)));
2952 }
2953
2954 static void reflectUnsignedShortAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2955 {
2956     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2957     TestObjectPythonV8Internal::reflectUnsignedShortAttributeAttributeGetter(info);
2958     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2959 }
2960
2961 static void reflectUnsignedShortAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2962 {
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);
2968 }
2969
2970 static void reflectUnsignedShortAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2971 {
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");
2976 }
2977
2978 static void reflectUnsignedLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
2979 {
2980     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
2981     v8SetReturnValueUnsigned(info, std::max(0, imp->getIntegralAttribute(HTMLNames::reflectunsignedlongattributeAttr)));
2982 }
2983
2984 static void reflectUnsignedLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2985 {
2986     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2987     TestObjectPythonV8Internal::reflectUnsignedLongAttributeAttributeGetter(info);
2988     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2989 }
2990
2991 static void reflectUnsignedLongAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
2992 {
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);
2998 }
2999
3000 static void reflectUnsignedLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
3001 {
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");
3006 }
3007
3008 static void idAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
3009 {
3010     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
3011     v8SetReturnValueString(info, imp->getIdAttribute(), info.GetIsolate());
3012 }
3013
3014 static void idAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3015 {
3016     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3017     TestObjectPythonV8Internal::idAttributeGetter(info);
3018     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3019 }
3020
3021 static void idAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
3022 {
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);
3027 }
3028
3029 static void idAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
3030 {
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");
3035 }
3036
3037 static void nameAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
3038 {
3039     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
3040     v8SetReturnValueString(info, imp->getNameAttribute(), info.GetIsolate());
3041 }
3042
3043 static void nameAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3044 {
3045     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3046     TestObjectPythonV8Internal::nameAttributeGetter(info);
3047     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3048 }
3049
3050 static void nameAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
3051 {
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);
3056 }
3057
3058 static void nameAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
3059 {
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");
3064 }
3065
3066 static void classAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
3067 {
3068     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
3069     v8SetReturnValueString(info, imp->getClassAttribute(), info.GetIsolate());
3070 }
3071
3072 static void classAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3073 {
3074     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3075     TestObjectPythonV8Internal::classAttributeGetter(info);
3076     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3077 }
3078
3079 static void classAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
3080 {
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);
3085 }
3086
3087 static void classAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
3088 {
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");
3093 }
3094
3095 static void reflectedIdAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
3096 {
3097     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
3098     v8SetReturnValueString(info, imp->getIdAttribute(), info.GetIsolate());
3099 }
3100
3101 static void reflectedIdAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3102 {
3103     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3104     TestObjectPythonV8Internal::reflectedIdAttributeGetter(info);
3105     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3106 }
3107
3108 static void reflectedIdAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
3109 {
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);
3114 }
3115
3116 static void reflectedIdAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
3117 {
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");
3122 }
3123
3124 static void reflectedNameAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
3125 {
3126     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
3127     v8SetReturnValueString(info, imp->getNameAttribute(), info.GetIsolate());
3128 }
3129
3130 static void reflectedNameAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3131 {
3132     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3133     TestObjectPythonV8Internal::reflectedNameAttributeGetter(info);
3134     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3135 }
3136
3137 static void reflectedNameAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
3138 {
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);
3143 }
3144
3145 static void reflectedNameAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
3146 {
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");
3151 }
3152
3153 static void reflectedClassAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
3154 {
3155     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
3156     v8SetReturnValueString(info, imp->getClassAttribute(), info.GetIsolate());
3157 }
3158
3159 static void reflectedClassAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3160 {
3161     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3162     TestObjectPythonV8Internal::reflectedClassAttributeGetter(info);
3163     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3164 }
3165
3166 static void reflectedClassAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
3167 {
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);
3172 }
3173
3174 static void reflectedClassAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
3175 {
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");
3180 }
3181
3182 static void limitedToOnlyOneAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
3183 {
3184     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
3185     String resultValue = imp->fastGetAttribute(HTMLNames::limitedtoonlyoneattributeAttr);
3186     if (resultValue.isEmpty()) {
3187         ;
3188     } else if (equalIgnoringCase(resultValue, "unique")) {
3189         resultValue = "unique";
3190     } else {
3191         resultValue = "";
3192     }
3193     v8SetReturnValueString(info, resultValue, info.GetIsolate());
3194 }
3195
3196 static void limitedToOnlyOneAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3197 {
3198     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3199     TestObjectPythonV8Internal::limitedToOnlyOneAttributeAttributeGetter(info);
3200     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3201 }
3202
3203 static void limitedToOnlyOneAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
3204 {
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);
3209 }
3210
3211 static void limitedToOnlyOneAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
3212 {
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");
3217 }
3218
3219 static void limitedToOnlyAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
3220 {
3221     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
3222     String resultValue = imp->fastGetAttribute(HTMLNames::limitedtoonlyattributeAttr);
3223     if (resultValue.isEmpty()) {
3224         ;
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";
3231     } else {
3232         resultValue = "";
3233     }
3234     v8SetReturnValueString(info, resultValue, info.GetIsolate());
3235 }
3236
3237 static void limitedToOnlyAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3238 {
3239     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3240     TestObjectPythonV8Internal::limitedToOnlyAttributeAttributeGetter(info);
3241     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3242 }
3243
3244 static void limitedToOnlyAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
3245 {
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);
3250 }
3251
3252 static void limitedToOnlyAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
3253 {
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");
3258 }
3259
3260 static void limitedToOnlyOtherAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
3261 {
3262     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
3263     String resultValue = imp->fastGetAttribute(HTMLNames::OtherAttr);
3264     if (resultValue.isEmpty()) {
3265         ;
3266     } else if (equalIgnoringCase(resultValue, "Value1")) {
3267         resultValue = "Value1";
3268     } else if (equalIgnoringCase(resultValue, "Value2")) {
3269         resultValue = "Value2";
3270     } else {
3271         resultValue = "";
3272     }
3273     v8SetReturnValueString(info, resultValue, info.GetIsolate());
3274 }
3275
3276 static void limitedToOnlyOtherAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3277 {
3278     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3279     TestObjectPythonV8Internal::limitedToOnlyOtherAttributeAttributeGetter(info);
3280     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3281 }
3282
3283 static void limitedToOnlyOtherAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
3284 {
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);
3289 }
3290
3291 static void limitedToOnlyOtherAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
3292 {
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");
3297 }
3298
3299 static void limitedWithMissingDefaultAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
3300 {
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";
3309     } else {
3310         resultValue = "";
3311     }
3312     v8SetReturnValueString(info, resultValue, info.GetIsolate());
3313 }
3314
3315 static void limitedWithMissingDefaultAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3316 {
3317     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3318     TestObjectPythonV8Internal::limitedWithMissingDefaultAttributeAttributeGetter(info);
3319     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3320 }
3321
3322 static void limitedWithMissingDefaultAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
3323 {
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);
3328 }
3329
3330 static void limitedWithMissingDefaultAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
3331 {
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");
3336 }
3337
3338 static void limitedWithInvalidMissingDefaultAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
3339 {
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";
3350     } else {
3351         resultValue = "ltr";
3352     }
3353     v8SetReturnValueString(info, resultValue, info.GetIsolate());
3354 }
3355
3356 static void limitedWithInvalidMissingDefaultAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3357 {
3358     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3359     TestObjectPythonV8Internal::limitedWithInvalidMissingDefaultAttributeAttributeGetter(info);
3360     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3361 }
3362
3363 static void limitedWithInvalidMissingDefaultAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
3364 {
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);
3369 }
3370
3371 static void limitedWithInvalidMissingDefaultAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
3372 {
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");
3377 }
3378
3379 static void corsSettingAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
3380 {
3381     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
3382     String resultValue = imp->fastGetAttribute(HTMLNames::corssettingattributeAttr);
3383     if (resultValue.isNull()) {
3384         ;
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";
3391     } else {
3392         resultValue = "anonymous";
3393     }
3394     v8SetReturnValueString(info, resultValue, info.GetIsolate());
3395 }
3396
3397 static void corsSettingAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3398 {
3399     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3400     TestObjectPythonV8Internal::corsSettingAttributeAttributeGetter(info);
3401     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3402 }
3403
3404 static void limitedWithEmptyMissingInvalidAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
3405 {
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";
3420     } else {
3421         resultValue = "invalid";
3422     }
3423     v8SetReturnValueString(info, resultValue, info.GetIsolate());
3424 }
3425
3426 static void limitedWithEmptyMissingInvalidAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3427 {
3428     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3429     TestObjectPythonV8Internal::limitedWithEmptyMissingInvalidAttributeAttributeGetter(info);
3430     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3431 }
3432
3433 static void replaceableReadonlyLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
3434 {
3435     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
3436     v8SetReturnValueInt(info, imp->replaceableReadonlyLongAttribute());
3437 }
3438
3439 static void replaceableReadonlyLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3440 {
3441     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3442     TestObjectPythonV8Internal::replaceableReadonlyLongAttributeAttributeGetter(info);
3443     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3444 }
3445
3446 static void locationReplaceableAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
3447 {
3448     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
3449     v8SetReturnValueFast(info, imp->locationReplaceable(), imp);
3450 }
3451
3452 static void locationReplaceableAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3453 {
3454     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3455     TestObjectPythonV8Internal::locationReplaceableAttributeGetter(info);
3456     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3457 }
3458
3459 static void locationReplaceableAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
3460 {
3461     TestObjectPython* proxyImp = V8TestObjectPython::toNative(info.Holder());
3462     TestNode* imp = proxyImp->locationReplaceable();
3463     if (!imp)
3464         return;
3465     V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue);
3466     imp->setHref(cppValue);
3467 }
3468
3469 static void locationReplaceableAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
3470 {
3471     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
3472     TestObjectPythonV8Internal::locationReplaceableAttributeSetter(jsValue, info);
3473     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3474 }
3475
3476 static void runtimeEnabledLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
3477 {
3478     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
3479     v8SetReturnValueInt(info, imp->runtimeEnabledLongAttribute());
3480 }
3481
3482 static void runtimeEnabledLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3483 {
3484     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3485     TestObjectPythonV8Internal::runtimeEnabledLongAttributeAttributeGetter(info);
3486     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3487 }
3488
3489 static void runtimeEnabledLongAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
3490 {
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);
3495 }
3496
3497 static void runtimeEnabledLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
3498 {
3499     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
3500     TestObjectPythonV8Internal::runtimeEnabledLongAttributeAttributeSetter(jsValue, info);
3501     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3502 }
3503
3504 static void perContextEnabledRuntimeEnabledLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
3505 {
3506     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
3507     v8SetReturnValueInt(info, imp->perContextEnabledRuntimeEnabledLongAttribute());
3508 }
3509
3510 static void perContextEnabledRuntimeEnabledLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3511 {
3512     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3513     TestObjectPythonV8Internal::perContextEnabledRuntimeEnabledLongAttributeAttributeGetter(info);
3514     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3515 }
3516
3517 static void perContextEnabledRuntimeEnabledLongAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
3518 {
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);
3523 }
3524
3525 static void perContextEnabledRuntimeEnabledLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
3526 {
3527     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
3528     TestObjectPythonV8Internal::perContextEnabledRuntimeEnabledLongAttributeAttributeSetter(jsValue, info);
3529     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3530 }
3531
3532 #if ENABLE(CONDITION)
3533 static void conditionalRuntimeEnabledLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
3534 {
3535     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
3536     v8SetReturnValueInt(info, imp->conditionalRuntimeEnabledLongAttribute());
3537 }
3538 #endif // ENABLE(CONDITION)
3539
3540 #if ENABLE(CONDITION)
3541 static void conditionalRuntimeEnabledLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3542 {
3543     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3544     TestObjectPythonV8Internal::conditionalRuntimeEnabledLongAttributeAttributeGetter(info);
3545     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3546 }
3547 #endif // ENABLE(CONDITION)
3548
3549 #if ENABLE(CONDITION)
3550 static void conditionalRuntimeEnabledLongAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
3551 {
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);
3556 }
3557 #endif // ENABLE(CONDITION)
3558
3559 #if ENABLE(CONDITION)
3560 static void conditionalRuntimeEnabledLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
3561 {
3562     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
3563     TestObjectPythonV8Internal::conditionalRuntimeEnabledLongAttributeAttributeSetter(jsValue, info);
3564     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3565 }
3566 #endif // ENABLE(CONDITION)
3567
3568 static void setterCallWithActiveWindowAndFirstWindowStringAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
3569 {
3570     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
3571     v8SetReturnValueString(info, imp->setterCallWithActiveWindowAndFirstWindowStringAttribute(), info.GetIsolate());
3572 }
3573
3574 static void setterCallWithActiveWindowAndFirstWindowStringAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3575 {
3576     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3577     TestObjectPythonV8Internal::setterCallWithActiveWindowAndFirstWindowStringAttributeAttributeGetter(info);
3578     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3579 }
3580
3581 static void setterCallWithActiveWindowAndFirstWindowStringAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
3582 {
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);
3586 }
3587
3588 static void setterCallWithActiveWindowAndFirstWindowStringAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
3589 {
3590     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
3591     TestObjectPythonV8Internal::setterCallWithActiveWindowAndFirstWindowStringAttributeAttributeSetter(jsValue, info);
3592     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3593 }
3594
3595 static void setterCallWithExecutionContextStringAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
3596 {
3597     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
3598     v8SetReturnValueString(info, imp->setterCallWithExecutionContextStringAttribute(), info.GetIsolate());
3599 }
3600
3601 static void setterCallWithExecutionContextStringAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3602 {
3603     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3604     TestObjectPythonV8Internal::setterCallWithExecutionContextStringAttributeAttributeGetter(info);
3605     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3606 }
3607
3608 static void setterCallWithExecutionContextStringAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
3609 {
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);
3614 }
3615
3616 static void setterCallWithExecutionContextStringAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
3617 {
3618     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
3619     TestObjectPythonV8Internal::setterCallWithExecutionContextStringAttributeAttributeSetter(jsValue, info);
3620     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3621 }
3622
3623 static void strictTypeCheckingFloatAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
3624 {
3625     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
3626     v8SetReturnValue(info, imp->strictTypeCheckingFloatAttribute());
3627 }
3628
3629 static void strictTypeCheckingFloatAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3630 {
3631     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3632     TestObjectPythonV8Internal::strictTypeCheckingFloatAttributeAttributeGetter(info);
3633     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3634 }
3635
3636 static void strictTypeCheckingFloatAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
3637 {
3638     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
3639     V8TRYCATCH_VOID(float, cppValue, static_cast<float>(jsValue->NumberValue()));
3640     imp->setStrictTypeCheckingFloatAttribute(cppValue);
3641 }
3642
3643 static void strictTypeCheckingFloatAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
3644 {
3645     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
3646     TestObjectPythonV8Internal::strictTypeCheckingFloatAttributeAttributeSetter(jsValue, info);
3647     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3648 }
3649
3650 static void strictTypeCheckingTestInterfaceAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
3651 {
3652     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
3653     v8SetReturnValueFast(info, imp->strictTypeCheckingTestInterfaceAttribute(), imp);
3654 }
3655
3656 static void strictTypeCheckingTestInterfaceAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3657 {
3658     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3659     TestObjectPythonV8Internal::strictTypeCheckingTestInterfaceAttributeAttributeGetter(info);
3660     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3661 }
3662
3663 static void strictTypeCheckingTestInterfaceAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
3664 {
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();
3669         return;
3670     }
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));
3674 }
3675
3676 static void strictTypeCheckingTestInterfaceAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
3677 {
3678     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
3679     TestObjectPythonV8Internal::strictTypeCheckingTestInterfaceAttributeAttributeSetter(jsValue, info);
3680     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3681 }
3682
3683 static void treatNullAsNullStringStringAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
3684 {
3685     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
3686     v8SetReturnValueString(info, imp->treatNullAsNullStringStringAttribute(), info.GetIsolate());
3687 }
3688
3689 static void treatNullAsNullStringStringAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3690 {
3691     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3692     TestObjectPythonV8Internal::treatNullAsNullStringStringAttributeAttributeGetter(info);
3693     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3694 }
3695
3696 static void treatNullAsNullStringStringAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
3697 {
3698     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
3699     V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithNullCheck>, cppValue, jsValue);
3700     imp->setTreatNullAsNullStringStringAttribute(cppValue);
3701 }
3702
3703 static void treatNullAsNullStringStringAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
3704 {
3705     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
3706     TestObjectPythonV8Internal::treatNullAsNullStringStringAttributeAttributeSetter(jsValue, info);
3707     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3708 }
3709
3710 static void treatReturnedNullStringAsNullStringAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
3711 {
3712     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
3713     v8SetReturnValueStringOrNull(info, imp->treatReturnedNullStringAsNullStringAttribute(), info.GetIsolate());
3714 }
3715
3716 static void treatReturnedNullStringAsNullStringAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3717 {
3718     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3719     TestObjectPythonV8Internal::treatReturnedNullStringAsNullStringAttributeAttributeGetter(info);
3720     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3721 }
3722
3723 static void treatReturnedNullStringAsNullStringAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
3724 {
3725     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
3726     V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue);
3727     imp->setTreatReturnedNullStringAsNullStringAttribute(cppValue);
3728 }
3729
3730 static void treatReturnedNullStringAsNullStringAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
3731 {
3732     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
3733     TestObjectPythonV8Internal::treatReturnedNullStringAsNullStringAttributeAttributeSetter(jsValue, info);
3734     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3735 }
3736
3737 static void treatReturnedNullStringAsUndefinedStringAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
3738 {
3739     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
3740     v8SetReturnValueStringOrUndefined(info, imp->treatReturnedNullStringAsUndefinedStringAttribute(), info.GetIsolate());
3741 }
3742
3743 static void treatReturnedNullStringAsUndefinedStringAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3744 {
3745     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3746     TestObjectPythonV8Internal::treatReturnedNullStringAsUndefinedStringAttributeAttributeGetter(info);
3747     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3748 }
3749
3750 static void treatReturnedNullStringAsUndefinedStringAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
3751 {
3752     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
3753     V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue);
3754     imp->setTreatReturnedNullStringAsUndefinedStringAttribute(cppValue);
3755 }
3756
3757 static void treatReturnedNullStringAsUndefinedStringAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
3758 {
3759     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
3760     TestObjectPythonV8Internal::treatReturnedNullStringAsUndefinedStringAttributeAttributeSetter(jsValue, info);
3761     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3762 }
3763
3764 static void urlStringAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
3765 {
3766     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
3767     v8SetReturnValueString(info, imp->getURLAttribute(HTMLNames::urlstringattributeAttr), info.GetIsolate());
3768 }
3769
3770 static void urlStringAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3771 {
3772     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3773     TestObjectPythonV8Internal::urlStringAttributeAttributeGetter(info);
3774     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3775 }
3776
3777 static void urlStringAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
3778 {
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);
3783 }
3784
3785 static void urlStringAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
3786 {
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");
3791 }
3792
3793 static void urlStringAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
3794 {
3795     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
3796     v8SetReturnValueString(info, imp->getURLAttribute(HTMLNames::ReflectUrlAttributeAttr), info.GetIsolate());
3797 }
3798
3799 static void urlStringAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3800 {
3801     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3802     TestObjectPythonV8Internal::urlStringAttributeAttributeGetter(info);
3803     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3804 }
3805
3806 static void urlStringAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
3807 {
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);
3812 }
3813
3814 static void urlStringAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
3815 {
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");
3820 }
3821
3822 static void unforgeableLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
3823 {
3824     v8::Handle<v8::Object> holder = info.This()->FindInstanceInPrototypeChain(V8TestObjectPython::domTemplate(info.GetIsolate(), worldType(info.GetIsolate())));
3825     if (holder.IsEmpty())
3826         return;
3827     TestObjectPython* imp = V8TestObjectPython::toNative(holder);
3828     v8SetReturnValueInt(info, imp->unforgeableLongAttribute());
3829 }
3830
3831 static void unforgeableLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3832 {
3833     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3834     TestObjectPythonV8Internal::unforgeableLongAttributeAttributeGetter(info);
3835     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3836 }
3837
3838 static void unforgeableLongAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
3839 {
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);
3844 }
3845
3846 static void unforgeableLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
3847 {
3848     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
3849     TestObjectPythonV8Internal::unforgeableLongAttributeAttributeSetter(jsValue, info);
3850     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3851 }
3852
3853 static void anotherStringAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
3854 {
3855     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
3856     v8SetReturnValueString(info, imp->fastGetAttribute(HTMLNames::ReflectUrlAttributeAsAStringAttr), info.GetIsolate());
3857 }
3858
3859 static void anotherStringAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3860 {
3861     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3862     TestObjectPythonV8Internal::anotherStringAttributeAttributeGetter(info);
3863     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3864 }
3865
3866 static void anotherStringAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
3867 {
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);
3872 }
3873
3874 static void anotherStringAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
3875 {
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");
3880 }
3881
3882 static void testInterfacePythonAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
3883 {
3884     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
3885     v8SetReturnValueFast(info, imp->testInterfacePythonAttribute(), imp);
3886 }
3887
3888 static void testInterfacePythonAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3889 {
3890     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3891     TestObjectPythonV8Internal::testInterfacePythonAttributeAttributeGetter(info);
3892     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3893 }
3894
3895 static void testInterfacePythonAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
3896 {
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));
3900 }
3901
3902 static void testInterfacePythonAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
3903 {
3904     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
3905     TestObjectPythonV8Internal::testInterfacePythonAttributeAttributeSetter(jsValue, info);
3906     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3907 }
3908
3909 static void testInterfaceWillBeGarbageCollectedAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
3910 {
3911     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
3912     bool isNull = false;
3913     RefPtrWillBeRawPtr<TestInterfaceWillBeGarbageCollected> jsValue = imp->testInterfaceWillBeGarbageCollectedAttribute(isNull);
3914     if (isNull) {
3915         v8SetReturnValueNull(info);
3916         return;
3917     }
3918     v8SetReturnValueFast(info, jsValue.release(), imp);
3919 }
3920
3921 static void testInterfaceWillBeGarbageCollectedAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3922 {
3923     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3924     TestObjectPythonV8Internal::testInterfaceWillBeGarbageCollectedAttributeAttributeGetter(info);
3925     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3926 }
3927
3928 static void testInterfaceWillBeGarbageCollectedAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
3929 {
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));
3933 }
3934
3935 static void testInterfaceWillBeGarbageCollectedAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
3936 {
3937     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
3938     TestObjectPythonV8Internal::testInterfaceWillBeGarbageCollectedAttributeAttributeSetter(jsValue, info);
3939     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3940 }
3941
3942 static void TestObjectPythonConstructorGetter(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3943 {
3944     v8::Handle<v8::Value> data = info.Data();
3945     ASSERT(data->IsExternal());
3946     V8PerContextData* perContextData = V8PerContextData::from(info.Holder()->CreationContext());
3947     if (!perContextData)
3948         return;
3949     v8SetReturnValue(info, perContextData->constructorForType(WrapperTypeInfo::unwrap(data)));
3950 }
3951
3952 static void TestObjectPythonReplaceableAttributeSetter(v8::Local<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
3953 {
3954     info.This()->ForceSet(name, jsValue);
3955 }
3956
3957 static void TestObjectPythonReplaceableAttributeSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
3958 {
3959     TestObjectPythonV8Internal::TestObjectPythonReplaceableAttributeSetter(name, jsValue, info);
3960 }
3961
3962 static void voidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
3963 {
3964     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
3965     imp->voidMethod();
3966 }
3967
3968 static void voidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
3969 {
3970     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3971     TestObjectPythonV8Internal::voidMethodMethod(info);
3972     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3973 }
3974
3975 static void staticVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
3976 {
3977     TestObjectPython::staticVoidMethod();
3978 }
3979
3980 static void staticVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
3981 {
3982     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3983     TestObjectPythonV8Internal::staticVoidMethodMethod(info);
3984     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3985 }
3986
3987 static void dateMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
3988 {
3989     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
3990     v8SetReturnValue(info, v8DateOrNull(imp->dateMethod(), info.GetIsolate()));
3991 }
3992
3993 static void dateMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
3994 {
3995     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
3996     TestObjectPythonV8Internal::dateMethodMethod(info);
3997     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3998 }
3999
4000 static void stringMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4001 {
4002     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
4003     v8SetReturnValueString(info, imp->stringMethod(), info.GetIsolate());
4004 }
4005
4006 static void stringMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4007 {
4008     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4009     TestObjectPythonV8Internal::stringMethodMethod(info);
4010     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4011 }
4012
4013 static void readonlyDOMTimeStampMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4014 {
4015     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
4016     v8SetReturnValue(info, static_cast<double>(imp->readonlyDOMTimeStampMethod()));
4017 }
4018
4019 static void readonlyDOMTimeStampMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4020 {
4021     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4022     TestObjectPythonV8Internal::readonlyDOMTimeStampMethodMethod(info);
4023     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4024 }
4025
4026 static void booleanMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4027 {
4028     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
4029     v8SetReturnValueBool(info, imp->booleanMethod());
4030 }
4031
4032 static void booleanMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4033 {
4034     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4035     TestObjectPythonV8Internal::booleanMethodMethod(info);
4036     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4037 }
4038
4039 static void byteMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4040 {
4041     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
4042     v8SetReturnValueInt(info, imp->byteMethod());
4043 }
4044
4045 static void byteMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4046 {
4047     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4048     TestObjectPythonV8Internal::byteMethodMethod(info);
4049     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4050 }
4051
4052 static void doubleMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4053 {
4054     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
4055     v8SetReturnValue(info, imp->doubleMethod());
4056 }
4057
4058 static void doubleMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4059 {
4060     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4061     TestObjectPythonV8Internal::doubleMethodMethod(info);
4062     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4063 }
4064
4065 static void floatMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4066 {
4067     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
4068     v8SetReturnValue(info, imp->floatMethod());
4069 }
4070
4071 static void floatMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4072 {
4073     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4074     TestObjectPythonV8Internal::floatMethodMethod(info);
4075     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4076 }
4077
4078 static void longMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4079 {
4080     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
4081     v8SetReturnValueInt(info, imp->longMethod());
4082 }
4083
4084 static void longMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4085 {
4086     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4087     TestObjectPythonV8Internal::longMethodMethod(info);
4088     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4089 }
4090
4091 static void longLongMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4092 {
4093     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
4094     v8SetReturnValue(info, static_cast<double>(imp->longLongMethod()));
4095 }
4096
4097 static void longLongMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4098 {
4099     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4100     TestObjectPythonV8Internal::longLongMethodMethod(info);
4101     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4102 }
4103
4104 static void octetMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4105 {
4106     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
4107     v8SetReturnValueUnsigned(info, imp->octetMethod());
4108 }
4109
4110 static void octetMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4111 {
4112     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4113     TestObjectPythonV8Internal::octetMethodMethod(info);
4114     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4115 }
4116
4117 static void shortMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4118 {
4119     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
4120     v8SetReturnValueInt(info, imp->shortMethod());
4121 }
4122
4123 static void shortMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4124 {
4125     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4126     TestObjectPythonV8Internal::shortMethodMethod(info);
4127     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4128 }
4129
4130 static void unsignedLongMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4131 {
4132     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
4133     v8SetReturnValueUnsigned(info, imp->unsignedLongMethod());
4134 }
4135
4136 static void unsignedLongMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4137 {
4138     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4139     TestObjectPythonV8Internal::unsignedLongMethodMethod(info);
4140     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4141 }
4142
4143 static void unsignedLongLongMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4144 {
4145     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
4146     v8SetReturnValue(info, static_cast<double>(imp->unsignedLongLongMethod()));
4147 }
4148
4149 static void unsignedLongLongMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4150 {
4151     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4152     TestObjectPythonV8Internal::unsignedLongLongMethodMethod(info);
4153     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4154 }
4155
4156 static void unsignedShortMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4157 {
4158     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
4159     v8SetReturnValueUnsigned(info, imp->unsignedShortMethod());
4160 }
4161
4162 static void unsignedShortMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4163 {
4164     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4165     TestObjectPythonV8Internal::unsignedShortMethodMethod(info);
4166     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4167 }
4168
4169 static void voidMethodDateArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4170 {
4171     if (UNLIKELY(info.Length() < 1)) {
4172         throwTypeError(ExceptionMessages::failedToExecute("voidMethodDateArg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
4173         return;
4174     }
4175     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
4176     V8TRYCATCH_VOID(double, dateArg, toCoreDate(info[0]));
4177     imp->voidMethodDateArg(dateArg);
4178 }
4179
4180 static void voidMethodDateArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4181 {
4182     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4183     TestObjectPythonV8Internal::voidMethodDateArgMethod(info);
4184     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4185 }
4186
4187 static void voidMethodStringArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4188 {
4189     if (UNLIKELY(info.Length() < 1)) {
4190         throwTypeError(ExceptionMessages::failedToExecute("voidMethodStringArg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
4191         return;
4192     }
4193     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
4194     V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, stringArg, info[0]);
4195     imp->voidMethodStringArg(stringArg);
4196 }
4197
4198 static void voidMethodStringArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4199 {
4200     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4201     TestObjectPythonV8Internal::voidMethodStringArgMethod(info);
4202     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4203 }
4204
4205 static void voidMethodBooleanArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4206 {
4207     if (UNLIKELY(info.Length() < 1)) {
4208         throwTypeError(ExceptionMessages::failedToExecute("voidMethodBooleanArg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
4209         return;
4210     }
4211     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
4212     V8TRYCATCH_VOID(bool, booleanArg, info[0]->BooleanValue());
4213     imp->voidMethodBooleanArg(booleanArg);
4214 }
4215
4216 static void voidMethodBooleanArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4217 {
4218     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4219     TestObjectPythonV8Internal::voidMethodBooleanArgMethod(info);
4220     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4221 }
4222
4223 static void voidMethodByteArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4224 {
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();
4229         return;
4230     }
4231     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
4232     V8TRYCATCH_EXCEPTION_VOID(int, byteArg, toInt8(info[0], exceptionState), exceptionState);
4233     imp->voidMethodByteArg(byteArg);
4234 }
4235
4236 static void voidMethodByteArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4237 {
4238     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4239     TestObjectPythonV8Internal::voidMethodByteArgMethod(info);
4240     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4241 }
4242
4243 static void voidMethodDoubleArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4244 {
4245     if (UNLIKELY(info.Length() < 1)) {
4246         throwTypeError(ExceptionMessages::failedToExecute("voidMethodDoubleArg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
4247         return;
4248     }
4249     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
4250     V8TRYCATCH_VOID(double, doubleArg, static_cast<double>(info[0]->NumberValue()));
4251     imp->voidMethodDoubleArg(doubleArg);
4252 }
4253
4254 static void voidMethodDoubleArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4255 {
4256     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4257     TestObjectPythonV8Internal::voidMethodDoubleArgMethod(info);
4258     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4259 }
4260
4261 static void voidMethodFloatArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4262 {
4263     if (UNLIKELY(info.Length() < 1)) {
4264         throwTypeError(ExceptionMessages::failedToExecute("voidMethodFloatArg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
4265         return;
4266     }
4267     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
4268     V8TRYCATCH_VOID(float, floatArg, static_cast<float>(info[0]->NumberValue()));
4269     imp->voidMethodFloatArg(floatArg);
4270 }
4271
4272 static void voidMethodFloatArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4273 {
4274     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4275     TestObjectPythonV8Internal::voidMethodFloatArgMethod(info);
4276     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4277 }
4278
4279 static void voidMethodLongArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4280 {
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();
4285         return;
4286     }
4287     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
4288     V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), exceptionState);
4289     imp->voidMethodLongArg(longArg);
4290 }
4291
4292 static void voidMethodLongArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4293 {
4294     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4295     TestObjectPythonV8Internal::voidMethodLongArgMethod(info);
4296     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4297 }
4298
4299 static void voidMethodLongLongArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4300 {
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();
4305         return;
4306     }
4307     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
4308     V8TRYCATCH_EXCEPTION_VOID(long long, longLongArg, toInt64(info[0], exceptionState), exceptionState);
4309     imp->voidMethodLongLongArg(longLongArg);
4310 }
4311
4312 static void voidMethodLongLongArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4313 {
4314     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4315     TestObjectPythonV8Internal::voidMethodLongLongArgMethod(info);
4316     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4317 }
4318
4319 static void voidMethodOctetArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4320 {
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();
4325         return;
4326     }
4327     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
4328     V8TRYCATCH_EXCEPTION_VOID(unsigned, octetArg, toUInt8(info[0], exceptionState), exceptionState);
4329     imp->voidMethodOctetArg(octetArg);
4330 }
4331
4332 static void voidMethodOctetArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4333 {
4334     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4335     TestObjectPythonV8Internal::voidMethodOctetArgMethod(info);
4336     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4337 }
4338
4339 static void voidMethodShortArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4340 {
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();
4345         return;
4346     }
4347     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
4348     V8TRYCATCH_EXCEPTION_VOID(int, shortArg, toInt16(info[0], exceptionState), exceptionState);
4349     imp->voidMethodShortArg(shortArg);
4350 }
4351
4352 static void voidMethodShortArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4353 {
4354     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4355     TestObjectPythonV8Internal::voidMethodShortArgMethod(info);
4356     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4357 }
4358
4359 static void voidMethodUnsignedLongArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4360 {
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();
4365         return;
4366     }
4367     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
4368     V8TRYCATCH_EXCEPTION_VOID(unsigned, unsignedLongArg, toUInt32(info[0], exceptionState), exceptionState);
4369     imp->voidMethodUnsignedLongArg(unsignedLongArg);
4370 }
4371
4372 static void voidMethodUnsignedLongArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4373 {
4374     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4375     TestObjectPythonV8Internal::voidMethodUnsignedLongArgMethod(info);
4376     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4377 }
4378
4379 static void voidMethodUnsignedLongLongArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4380 {
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();
4385         return;
4386     }
4387     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
4388     V8TRYCATCH_EXCEPTION_VOID(unsigned long long, unsignedLongLongArg, toUInt64(info[0], exceptionState), exceptionState);
4389     imp->voidMethodUnsignedLongLongArg(unsignedLongLongArg);
4390 }
4391
4392 static void voidMethodUnsignedLongLongArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4393 {
4394     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4395     TestObjectPythonV8Internal::voidMethodUnsignedLongLongArgMethod(info);
4396     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4397 }
4398
4399 static void voidMethodUnsignedShortArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4400 {
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();
4405         return;
4406     }
4407     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
4408     V8TRYCATCH_EXCEPTION_VOID(unsigned, unsignedShortArg, toUInt16(info[0], exceptionState), exceptionState);
4409     imp->voidMethodUnsignedShortArg(unsignedShortArg);
4410 }
4411
4412 static void voidMethodUnsignedShortArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4413 {
4414     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4415     TestObjectPythonV8Internal::voidMethodUnsignedShortArgMethod(info);
4416     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4417 }
4418
4419 static void testInterfaceEmptyMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4420 {
4421     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
4422     v8SetReturnValue(info, imp->testInterfaceEmptyMethod());
4423 }
4424
4425 static void testInterfaceEmptyMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4426 {
4427     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4428     TestObjectPythonV8Internal::testInterfaceEmptyMethodMethod(info);
4429     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4430 }
4431
4432 static void voidMethodTestInterfaceEmptyArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4433 {
4434     if (UNLIKELY(info.Length() < 1)) {
4435         throwTypeError(ExceptionMessages::failedToExecute("voidMethodTestInterfaceEmptyArg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
4436         return;
4437     }
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);
4441 }
4442
4443 static void voidMethodTestInterfaceEmptyArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4444 {
4445     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4446     TestObjectPythonV8Internal::voidMethodTestInterfaceEmptyArgMethod(info);
4447     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4448 }
4449
4450 static void voidMethodLongArgTestInterfaceEmptyArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4451 {
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();
4456         return;
4457     }
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);
4462 }
4463
4464 static void voidMethodLongArgTestInterfaceEmptyArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4465 {
4466     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4467     TestObjectPythonV8Internal::voidMethodLongArgTestInterfaceEmptyArgMethod(info);
4468     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4469 }
4470
4471 static void voidCallbackFunctionMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4472 {
4473     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
4474     v8SetReturnValue(info, imp->voidCallbackFunctionMethod().v8Value());
4475 }
4476
4477 static void voidCallbackFunctionMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4478 {
4479     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4480     TestObjectPythonV8Internal::voidCallbackFunctionMethodMethod(info);
4481     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4482 }
4483
4484 static void anyCallbackFunctionOptionalAnyArgMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4485 {
4486     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
4487     v8SetReturnValue(info, imp->anyCallbackFunctionOptionalAnyArgMethod().v8Value());
4488 }
4489
4490 static void anyCallbackFunctionOptionalAnyArgMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4491 {
4492     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4493     TestObjectPythonV8Internal::anyCallbackFunctionOptionalAnyArgMethodMethod(info);
4494     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4495 }
4496
4497 static void voidMethodVoidCallbackFunctionArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4498 {
4499     if (UNLIKELY(info.Length() < 1)) {
4500         throwTypeError(ExceptionMessages::failedToExecute("voidMethodVoidCallbackFunctionArg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
4501         return;
4502     }
4503     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
4504     V8TRYCATCH_VOID(ScriptValue, voidCallbackFunctionArg, ScriptValue(info[0], info.GetIsolate()));
4505     imp->voidMethodVoidCallbackFunctionArg(voidCallbackFunctionArg);
4506 }
4507
4508 static void voidMethodVoidCallbackFunctionArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4509 {
4510     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4511     TestObjectPythonV8Internal::voidMethodVoidCallbackFunctionArgMethod(info);
4512     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4513 }
4514
4515 static void voidMethodAnyCallbackFunctionOptionalAnyArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4516 {
4517     if (UNLIKELY(info.Length() < 1)) {
4518         throwTypeError(ExceptionMessages::failedToExecute("voidMethodAnyCallbackFunctionOptionalAnyArg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
4519         return;
4520     }
4521     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
4522     V8TRYCATCH_VOID(ScriptValue, anyCallbackFunctionOptionalAnyArgArg, ScriptValue(info[0], info.GetIsolate()));
4523     imp->voidMethodAnyCallbackFunctionOptionalAnyArg(anyCallbackFunctionOptionalAnyArgArg);
4524 }
4525
4526 static void voidMethodAnyCallbackFunctionOptionalAnyArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4527 {
4528     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4529     TestObjectPythonV8Internal::voidMethodAnyCallbackFunctionOptionalAnyArgMethod(info);
4530     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4531 }
4532
4533 static void compareHowMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4534 {
4535     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
4536     v8SetReturnValue(info, imp->compareHowMethod());
4537 }
4538
4539 static void compareHowMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4540 {
4541     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4542     TestObjectPythonV8Internal::compareHowMethodMethod(info);
4543     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4544 }
4545
4546 static void anyMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4547 {
4548     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
4549     v8SetReturnValue(info, imp->anyMethod().v8Value());
4550 }
4551
4552 static void anyMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4553 {
4554     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4555     TestObjectPythonV8Internal::anyMethodMethod(info);
4556     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4557 }
4558
4559 static void voidMethodCompareHowArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4560 {
4561     if (UNLIKELY(info.Length() < 1)) {
4562         throwTypeError(ExceptionMessages::failedToExecute("voidMethodCompareHowArg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
4563         return;
4564     }
4565     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
4566     V8TRYCATCH_VOID(Range::CompareHow, compareHowArg, static_cast<Range::CompareHow>(info[0]->Int32Value()));
4567     imp->voidMethodCompareHowArg(compareHowArg);
4568 }
4569
4570 static void voidMethodCompareHowArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4571 {
4572     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4573     TestObjectPythonV8Internal::voidMethodCompareHowArgMethod(info);
4574     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4575 }
4576
4577 static void voidMethodEventTargetArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4578 {
4579     if (UNLIKELY(info.Length() < 1)) {
4580         throwTypeError(ExceptionMessages::failedToExecute("voidMethodEventTargetArg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
4581         return;
4582     }
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);
4586 }
4587
4588 static void voidMethodEventTargetArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4589 {
4590     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4591     TestObjectPythonV8Internal::voidMethodEventTargetArgMethod(info);
4592     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4593 }
4594
4595 static void voidMethodMediaQueryListListenerArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4596 {
4597     if (UNLIKELY(info.Length() < 1)) {
4598         throwTypeError(ExceptionMessages::failedToExecute("voidMethodMediaQueryListListenerArg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
4599         return;
4600     }
4601     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
4602     V8TRYCATCH_VOID(RefPtr<MediaQueryListListener>, mediaQueryListListenerArg, MediaQueryListListener::create(ScriptValue(info[0], info.GetIsolate())));
4603     imp->voidMethodMediaQueryListListenerArg(mediaQueryListListenerArg);
4604 }
4605
4606 static void voidMethodMediaQueryListListenerArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4607 {
4608     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4609     TestObjectPythonV8Internal::voidMethodMediaQueryListListenerArgMethod(info);
4610     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4611 }
4612
4613 static void voidMethodAnyArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4614 {
4615     if (UNLIKELY(info.Length() < 1)) {
4616         throwTypeError(ExceptionMessages::failedToExecute("voidMethodAnyArg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
4617         return;
4618     }
4619     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
4620     V8TRYCATCH_VOID(ScriptValue, anyArg, ScriptValue(info[0], info.GetIsolate()));
4621     imp->voidMethodAnyArg(anyArg);
4622 }
4623
4624 static void voidMethodAnyArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4625 {
4626     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4627     TestObjectPythonV8Internal::voidMethodAnyArgMethod(info);
4628     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4629 }
4630
4631 static void voidMethodAttrArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4632 {
4633     if (UNLIKELY(info.Length() < 1)) {
4634         throwTypeError(ExceptionMessages::failedToExecute("voidMethodAttrArg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
4635         return;
4636     }
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);
4640 }
4641
4642 static void voidMethodAttrArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4643 {
4644     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4645     TestObjectPythonV8Internal::voidMethodAttrArgMethod(info);
4646     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4647 }
4648
4649 static void voidMethodDocumentArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4650 {
4651     if (UNLIKELY(info.Length() < 1)) {
4652         throwTypeError(ExceptionMessages::failedToExecute("voidMethodDocumentArg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
4653         return;
4654     }
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);
4658 }
4659
4660 static void voidMethodDocumentArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4661 {
4662     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4663     TestObjectPythonV8Internal::voidMethodDocumentArgMethod(info);
4664     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4665 }
4666
4667 static void voidMethodDocumentTypeArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4668 {
4669     if (UNLIKELY(info.Length() < 1)) {
4670         throwTypeError(ExceptionMessages::failedToExecute("voidMethodDocumentTypeArg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
4671         return;
4672     }
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);
4676 }
4677
4678 static void voidMethodDocumentTypeArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4679 {
4680     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4681     TestObjectPythonV8Internal::voidMethodDocumentTypeArgMethod(info);
4682     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4683 }
4684
4685 static void voidMethodElementArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4686 {
4687     if (UNLIKELY(info.Length() < 1)) {
4688         throwTypeError(ExceptionMessages::failedToExecute("voidMethodElementArg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
4689         return;
4690     }
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);
4694 }
4695
4696 static void voidMethodElementArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4697 {
4698     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4699     TestObjectPythonV8Internal::voidMethodElementArgMethod(info);
4700     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4701 }
4702
4703 static void voidMethodNodeArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4704 {
4705     if (UNLIKELY(info.Length() < 1)) {
4706         throwTypeError(ExceptionMessages::failedToExecute("voidMethodNodeArg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
4707         return;
4708     }
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);
4712 }
4713
4714 static void voidMethodNodeArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4715 {
4716     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4717     TestObjectPythonV8Internal::voidMethodNodeArgMethod(info);
4718     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4719 }
4720
4721 static void arrayBufferMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4722 {
4723     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
4724     v8SetReturnValue(info, imp->arrayBufferMethod());
4725 }
4726
4727 static void arrayBufferMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4728 {
4729     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4730     TestObjectPythonV8Internal::arrayBufferMethodMethod(info);
4731     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4732 }
4733
4734 static void arrayBufferViewMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4735 {
4736     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
4737     v8SetReturnValue(info, imp->arrayBufferViewMethod());
4738 }
4739
4740 static void arrayBufferViewMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4741 {
4742     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4743     TestObjectPythonV8Internal::arrayBufferViewMethodMethod(info);
4744     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4745 }
4746
4747 static void float32ArrayMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4748 {
4749     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
4750     v8SetReturnValue(info, imp->float32ArrayMethod());
4751 }
4752
4753 static void float32ArrayMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4754 {
4755     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4756     TestObjectPythonV8Internal::float32ArrayMethodMethod(info);
4757     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4758 }
4759
4760 static void int32ArrayMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4761 {
4762     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
4763     v8SetReturnValue(info, imp->int32ArrayMethod());
4764 }
4765
4766 static void int32ArrayMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4767 {
4768     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4769     TestObjectPythonV8Internal::int32ArrayMethodMethod(info);
4770     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4771 }
4772
4773 static void uint8ArrayMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4774 {
4775     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
4776     v8SetReturnValue(info, imp->uint8ArrayMethod());
4777 }
4778
4779 static void uint8ArrayMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4780 {
4781     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4782     TestObjectPythonV8Internal::uint8ArrayMethodMethod(info);
4783     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4784 }
4785
4786 static void voidMethodArrayBufferArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4787 {
4788     if (UNLIKELY(info.Length() < 1)) {
4789         throwTypeError(ExceptionMessages::failedToExecute("voidMethodArrayBufferArg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
4790         return;
4791     }
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);
4795 }
4796
4797 static void voidMethodArrayBufferArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4798 {
4799     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4800     TestObjectPythonV8Internal::voidMethodArrayBufferArgMethod(info);
4801     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4802 }
4803
4804 static void voidMethodArrayBufferViewArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4805 {
4806     if (UNLIKELY(info.Length() < 1)) {
4807         throwTypeError(ExceptionMessages::failedToExecute("voidMethodArrayBufferViewArg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
4808         return;
4809     }
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);
4813 }
4814
4815 static void voidMethodArrayBufferViewArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4816 {
4817     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4818     TestObjectPythonV8Internal::voidMethodArrayBufferViewArgMethod(info);
4819     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4820 }
4821
4822 static void voidMethodFloat32ArrayArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4823 {
4824     if (UNLIKELY(info.Length() < 1)) {
4825         throwTypeError(ExceptionMessages::failedToExecute("voidMethodFloat32ArrayArg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
4826         return;
4827     }
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);
4831 }
4832
4833 static void voidMethodFloat32ArrayArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4834 {
4835     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4836     TestObjectPythonV8Internal::voidMethodFloat32ArrayArgMethod(info);
4837     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4838 }
4839
4840 static void voidMethodInt32ArrayArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4841 {
4842     if (UNLIKELY(info.Length() < 1)) {
4843         throwTypeError(ExceptionMessages::failedToExecute("voidMethodInt32ArrayArg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
4844         return;
4845     }
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);
4849 }
4850
4851 static void voidMethodInt32ArrayArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4852 {
4853     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4854     TestObjectPythonV8Internal::voidMethodInt32ArrayArgMethod(info);
4855     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4856 }
4857
4858 static void voidMethodUint8ArrayArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4859 {
4860     if (UNLIKELY(info.Length() < 1)) {
4861         throwTypeError(ExceptionMessages::failedToExecute("voidMethodUint8ArrayArg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
4862         return;
4863     }
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);
4867 }
4868
4869 static void voidMethodUint8ArrayArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4870 {
4871     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4872     TestObjectPythonV8Internal::voidMethodUint8ArrayArgMethod(info);
4873     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4874 }
4875
4876 static void longArrayMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4877 {
4878     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
4879     v8SetReturnValue(info, v8Array(imp->longArrayMethod(), info.GetIsolate()));
4880 }
4881
4882 static void longArrayMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4883 {
4884     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4885     TestObjectPythonV8Internal::longArrayMethodMethod(info);
4886     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4887 }
4888
4889 static void stringArrayMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4890 {
4891     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
4892     v8SetReturnValue(info, v8Array(imp->stringArrayMethod(), info.GetIsolate()));
4893 }
4894
4895 static void stringArrayMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4896 {
4897     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4898     TestObjectPythonV8Internal::stringArrayMethodMethod(info);
4899     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4900 }
4901
4902 static void testInterfaceEmptyArrayMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4903 {
4904     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
4905     v8SetReturnValue(info, v8Array(imp->testInterfaceEmptyArrayMethod(), info.GetIsolate()));
4906 }
4907
4908 static void testInterfaceEmptyArrayMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4909 {
4910     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4911     TestObjectPythonV8Internal::testInterfaceEmptyArrayMethodMethod(info);
4912     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4913 }
4914
4915 static void voidMethodArrayLongArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4916 {
4917     if (UNLIKELY(info.Length() < 1)) {
4918         throwTypeError(ExceptionMessages::failedToExecute("voidMethodArrayLongArg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
4919         return;
4920     }
4921     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
4922     V8TRYCATCH_VOID(Vector<int>, arrayLongArg, toNativeArray<int>(info[0], 1, info.GetIsolate()));
4923     imp->voidMethodArrayLongArg(arrayLongArg);
4924 }
4925
4926 static void voidMethodArrayLongArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4927 {
4928     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4929     TestObjectPythonV8Internal::voidMethodArrayLongArgMethod(info);
4930     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4931 }
4932
4933 static void voidMethodArrayStringArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4934 {
4935     if (UNLIKELY(info.Length() < 1)) {
4936         throwTypeError(ExceptionMessages::failedToExecute("voidMethodArrayStringArg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
4937         return;
4938     }
4939     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
4940     V8TRYCATCH_VOID(Vector<String>, arrayStringArg, toNativeArray<String>(info[0], 1, info.GetIsolate()));
4941     imp->voidMethodArrayStringArg(arrayStringArg);
4942 }
4943
4944 static void voidMethodArrayStringArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4945 {
4946     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4947     TestObjectPythonV8Internal::voidMethodArrayStringArgMethod(info);
4948     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4949 }
4950
4951 static void voidMethodArrayTestInterfaceEmptyArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4952 {
4953     if (UNLIKELY(info.Length() < 1)) {
4954         throwTypeError(ExceptionMessages::failedToExecute("voidMethodArrayTestInterfaceEmptyArg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
4955         return;
4956     }
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);
4960 }
4961
4962 static void voidMethodArrayTestInterfaceEmptyArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4963 {
4964     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4965     TestObjectPythonV8Internal::voidMethodArrayTestInterfaceEmptyArgMethod(info);
4966     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4967 }
4968
4969 static void sequenceLongMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4970 {
4971     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
4972     v8SetReturnValue(info, v8Array(imp->sequenceLongMethod(), info.GetIsolate()));
4973 }
4974
4975 static void sequenceLongMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4976 {
4977     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4978     TestObjectPythonV8Internal::sequenceLongMethodMethod(info);
4979     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4980 }
4981
4982 static void sequenceStringMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4983 {
4984     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
4985     v8SetReturnValue(info, v8Array(imp->sequenceStringMethod(), info.GetIsolate()));
4986 }
4987
4988 static void sequenceStringMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4989 {
4990     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4991     TestObjectPythonV8Internal::sequenceStringMethodMethod(info);
4992     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4993 }
4994
4995 static void sequenceTestInterfaceEmptyMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4996 {
4997     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
4998     v8SetReturnValue(info, v8Array(imp->sequenceTestInterfaceEmptyMethod(), info.GetIsolate()));
4999 }
5000
5001 static void sequenceTestInterfaceEmptyMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5002 {
5003     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5004     TestObjectPythonV8Internal::sequenceTestInterfaceEmptyMethodMethod(info);
5005     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5006 }
5007
5008 static void voidMethodSequenceLongArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5009 {
5010     if (UNLIKELY(info.Length() < 1)) {
5011         throwTypeError(ExceptionMessages::failedToExecute("voidMethodSequenceLongArg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
5012         return;
5013     }
5014     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
5015     V8TRYCATCH_VOID(Vector<int>, sequenceLongArg, toNativeArray<int>(info[0], 1, info.GetIsolate()));
5016     imp->voidMethodSequenceLongArg(sequenceLongArg);
5017 }
5018
5019 static void voidMethodSequenceLongArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5020 {
5021     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5022     TestObjectPythonV8Internal::voidMethodSequenceLongArgMethod(info);
5023     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5024 }
5025
5026 static void voidMethodSequenceStringArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5027 {
5028     if (UNLIKELY(info.Length() < 1)) {
5029         throwTypeError(ExceptionMessages::failedToExecute("voidMethodSequenceStringArg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
5030         return;
5031     }
5032     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
5033     V8TRYCATCH_VOID(Vector<String>, sequenceStringArg, toNativeArray<String>(info[0], 1, info.GetIsolate()));
5034     imp->voidMethodSequenceStringArg(sequenceStringArg);
5035 }
5036
5037 static void voidMethodSequenceStringArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5038 {
5039     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5040     TestObjectPythonV8Internal::voidMethodSequenceStringArgMethod(info);
5041     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5042 }
5043
5044 static void voidMethodSequenceTestInterfaceEmptyArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5045 {
5046     if (UNLIKELY(info.Length() < 1)) {
5047         throwTypeError(ExceptionMessages::failedToExecute("voidMethodSequenceTestInterfaceEmptyArg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
5048         return;
5049     }
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);
5053 }
5054
5055 static void voidMethodSequenceTestInterfaceEmptyArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5056 {
5057     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5058     TestObjectPythonV8Internal::voidMethodSequenceTestInterfaceEmptyArgMethod(info);
5059     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5060 }
5061
5062 static void voidMethodNullableStringArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5063 {
5064     if (UNLIKELY(info.Length() < 1)) {
5065         throwTypeError(ExceptionMessages::failedToExecute("voidMethodNullableStringArg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
5066         return;
5067     }
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);
5071 }
5072
5073 static void voidMethodNullableStringArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5074 {
5075     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5076     TestObjectPythonV8Internal::voidMethodNullableStringArgMethod(info);
5077     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5078 }
5079
5080 static void voidMethodTestCallbackInterfaceArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5081 {
5082     if (UNLIKELY(info.Length() < 1)) {
5083         throwTypeError(ExceptionMessages::failedToExecute("voidMethodTestCallbackInterfaceArg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
5084         return;
5085     }
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());
5089         return;
5090     }
5091     OwnPtr<TestCallbackInterface> testCallbackInterfaceArg = V8TestCallbackInterface::create(v8::Handle<v8::Function>::Cast(info[0]), currentExecutionContext(info.GetIsolate()));
5092     imp->voidMethodTestCallbackInterfaceArg(testCallbackInterfaceArg.release());
5093 }
5094
5095 static void voidMethodTestCallbackInterfaceArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5096 {
5097     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5098     TestObjectPythonV8Internal::voidMethodTestCallbackInterfaceArgMethod(info);
5099     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5100 }
5101
5102 static void voidMethodOptionalTestCallbackInterfaceArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5103 {
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());
5109             return;
5110         }
5111         optionalTestCallbackInterfaceArg = V8TestCallbackInterface::create(v8::Handle<v8::Function>::Cast(info[0]), currentExecutionContext(info.GetIsolate()));
5112     }
5113     imp->voidMethodOptionalTestCallbackInterfaceArg(optionalTestCallbackInterfaceArg.release());
5114 }
5115
5116 static void voidMethodOptionalTestCallbackInterfaceArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5117 {
5118     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5119     TestObjectPythonV8Internal::voidMethodOptionalTestCallbackInterfaceArgMethod(info);
5120     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5121 }
5122
5123 static void voidMethodNullableTestCallbackInterfaceArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5124 {
5125     if (UNLIKELY(info.Length() < 1)) {
5126         throwTypeError(ExceptionMessages::failedToExecute("voidMethodNullableTestCallbackInterfaceArg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
5127         return;
5128     }
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());
5132         return;
5133     }
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());
5136 }
5137
5138 static void voidMethodNullableTestCallbackInterfaceArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5139 {
5140     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5141     TestObjectPythonV8Internal::voidMethodNullableTestCallbackInterfaceArgMethod(info);
5142     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5143 }
5144
5145 static void testEnumMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5146 {
5147     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
5148     v8SetReturnValueString(info, imp->testEnumMethod(), info.GetIsolate());
5149 }
5150
5151 static void testEnumMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5152 {
5153     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5154     TestObjectPythonV8Internal::testEnumMethodMethod(info);
5155     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5156 }
5157
5158 static void voidMethodTestEnumArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5159 {
5160     if (UNLIKELY(info.Length() < 1)) {
5161         throwTypeError(ExceptionMessages::failedToExecute("voidMethodTestEnumArg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
5162         return;
5163     }
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());
5169         return;
5170     }
5171     imp->voidMethodTestEnumArg(testEnumTypeArg);
5172 }
5173
5174 static void voidMethodTestEnumArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5175 {
5176     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5177     TestObjectPythonV8Internal::voidMethodTestEnumArgMethod(info);
5178     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5179 }
5180
5181 static void dictionaryMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5182 {
5183     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
5184     v8SetReturnValue(info, imp->dictionaryMethod());
5185 }
5186
5187 static void dictionaryMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5188 {
5189     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5190     TestObjectPythonV8Internal::dictionaryMethodMethod(info);
5191     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5192 }
5193
5194 static void nodeFilterMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5195 {
5196     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
5197     v8SetReturnValue(info, imp->nodeFilterMethod());
5198 }
5199
5200 static void nodeFilterMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5201 {
5202     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5203     TestObjectPythonV8Internal::nodeFilterMethodMethod(info);
5204     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5205 }
5206
5207 static void promiseMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5208 {
5209     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
5210     v8SetReturnValue(info, imp->promiseMethod().v8Value());
5211 }
5212
5213 static void promiseMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5214 {
5215     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5216     TestObjectPythonV8Internal::promiseMethodMethod(info);
5217     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5218 }
5219
5220 static void serializedScriptValueMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5221 {
5222     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
5223     v8SetReturnValue(info, imp->serializedScriptValueMethod() ? imp->serializedScriptValueMethod()->deserialize() : v8::Handle<v8::Value>(v8::Null(info.GetIsolate())));
5224 }
5225
5226 static void serializedScriptValueMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5227 {
5228     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5229     TestObjectPythonV8Internal::serializedScriptValueMethodMethod(info);
5230     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5231 }
5232
5233 static void xPathNSResolverMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5234 {
5235     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
5236     v8SetReturnValue(info, imp->xPathNSResolverMethod());
5237 }
5238
5239 static void xPathNSResolverMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5240 {
5241     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5242     TestObjectPythonV8Internal::xPathNSResolverMethodMethod(info);
5243     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5244 }
5245
5246 static void voidMethodDictionaryArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5247 {
5248     if (UNLIKELY(info.Length() < 1)) {
5249         throwTypeError(ExceptionMessages::failedToExecute("voidMethodDictionaryArg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
5250         return;
5251     }
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());
5256         return;
5257     }
5258     imp->voidMethodDictionaryArg(dictionaryArg);
5259 }
5260
5261 static void voidMethodDictionaryArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5262 {
5263     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5264     TestObjectPythonV8Internal::voidMethodDictionaryArgMethod(info);
5265     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5266 }
5267
5268 static void voidMethodNodeFilterArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5269 {
5270     if (UNLIKELY(info.Length() < 1)) {
5271         throwTypeError(ExceptionMessages::failedToExecute("voidMethodNodeFilterArg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
5272         return;
5273     }
5274     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
5275     V8TRYCATCH_VOID(RefPtr<NodeFilter>, nodeFilterArg, toNodeFilter(info[0], info.GetIsolate()));
5276     imp->voidMethodNodeFilterArg(nodeFilterArg.release());
5277 }
5278
5279 static void voidMethodNodeFilterArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5280 {
5281     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5282     TestObjectPythonV8Internal::voidMethodNodeFilterArgMethod(info);
5283     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5284 }
5285
5286 static void voidMethodPromiseArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5287 {
5288     if (UNLIKELY(info.Length() < 1)) {
5289         throwTypeError(ExceptionMessages::failedToExecute("voidMethodPromiseArg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
5290         return;
5291     }
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());
5296         return;
5297     }
5298     imp->voidMethodPromiseArg(promiseArg);
5299 }
5300
5301 static void voidMethodPromiseArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5302 {
5303     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5304     TestObjectPythonV8Internal::voidMethodPromiseArgMethod(info);
5305     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5306 }
5307
5308 static void voidMethodSerializedScriptValueArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5309 {
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();
5314         return;
5315     }
5316     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
5317     RefPtr<SerializedScriptValue> serializedScriptValueArg = SerializedScriptValue::create(info[0], 0, 0, exceptionState, info.GetIsolate());
5318     if (exceptionState.throwIfNeeded())
5319         return;
5320     imp->voidMethodSerializedScriptValueArg(serializedScriptValueArg);
5321 }
5322
5323 static void voidMethodSerializedScriptValueArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5324 {
5325     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5326     TestObjectPythonV8Internal::voidMethodSerializedScriptValueArgMethod(info);
5327     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5328 }
5329
5330 static void voidMethodXPathNSResolverArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5331 {
5332     if (UNLIKELY(info.Length() < 1)) {
5333         throwTypeError(ExceptionMessages::failedToExecute("voidMethodXPathNSResolverArg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
5334         return;
5335     }
5336     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
5337     V8TRYCATCH_VOID(RefPtr<XPathNSResolver>, xPathNSResolverArg, toXPathNSResolver(info[0], info.GetIsolate()));
5338     imp->voidMethodXPathNSResolverArg(xPathNSResolverArg.release());
5339 }
5340
5341 static void voidMethodXPathNSResolverArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5342 {
5343     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5344     TestObjectPythonV8Internal::voidMethodXPathNSResolverArgMethod(info);
5345     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5346 }
5347
5348 static void voidMethodSequenceDictionaryArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5349 {
5350     if (UNLIKELY(info.Length() < 1)) {
5351         throwTypeError(ExceptionMessages::failedToExecute("voidMethodSequenceDictionaryArg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
5352         return;
5353     }
5354     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
5355     V8TRYCATCH_VOID(Vector<Dictionary>, sequenceDictionaryArg, toNativeArray<Dictionary>(info[0], 1, info.GetIsolate()));
5356     imp->voidMethodSequenceDictionaryArg(sequenceDictionaryArg);
5357 }
5358
5359 static void voidMethodSequenceDictionaryArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5360 {
5361     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5362     TestObjectPythonV8Internal::voidMethodSequenceDictionaryArgMethod(info);
5363     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5364 }
5365
5366 static void voidMethodStringArgLongArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5367 {
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();
5372         return;
5373     }
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);
5378 }
5379
5380 static void voidMethodStringArgLongArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5381 {
5382     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5383     TestObjectPythonV8Internal::voidMethodStringArgLongArgMethod(info);
5384     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5385 }
5386
5387 static void voidMethodOptionalStringArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5388 {
5389     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
5390     if (UNLIKELY(info.Length() <= 0)) {
5391         imp->voidMethodOptionalStringArg();
5392         return;
5393     }
5394     V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, optionalStringArg, info[0]);
5395     imp->voidMethodOptionalStringArg(optionalStringArg);
5396 }
5397
5398 static void voidMethodOptionalStringArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5399 {
5400     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5401     TestObjectPythonV8Internal::voidMethodOptionalStringArgMethod(info);
5402     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5403 }
5404
5405 static void voidMethodOptionalTestInterfaceEmptyArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5406 {
5407     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
5408     if (UNLIKELY(info.Length() <= 0)) {
5409         imp->voidMethodOptionalTestInterfaceEmptyArg();
5410         return;
5411     }
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);
5414 }
5415
5416 static void voidMethodOptionalTestInterfaceEmptyArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5417 {
5418     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5419     TestObjectPythonV8Internal::voidMethodOptionalTestInterfaceEmptyArgMethod(info);
5420     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5421 }
5422
5423 static void voidMethodOptionalLongArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5424 {
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();
5429         return;
5430     }
5431     V8TRYCATCH_EXCEPTION_VOID(int, optionalLongArg, toInt32(info[0], exceptionState), exceptionState);
5432     imp->voidMethodOptionalLongArg(optionalLongArg);
5433 }
5434
5435 static void voidMethodOptionalLongArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5436 {
5437     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5438     TestObjectPythonV8Internal::voidMethodOptionalLongArgMethod(info);
5439     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5440 }
5441
5442 static void stringMethodOptionalLongArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5443 {
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());
5448         return;
5449     }
5450     V8TRYCATCH_EXCEPTION_VOID(int, optionalLongArg, toInt32(info[0], exceptionState), exceptionState);
5451     v8SetReturnValueString(info, imp->stringMethodOptionalLongArg(optionalLongArg), info.GetIsolate());
5452 }
5453
5454 static void stringMethodOptionalLongArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5455 {
5456     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5457     TestObjectPythonV8Internal::stringMethodOptionalLongArgMethod(info);
5458     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5459 }
5460
5461 static void testInterfaceEmptyMethodOptionalLongArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5462 {
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());
5467         return;
5468     }
5469     V8TRYCATCH_EXCEPTION_VOID(int, optionalLongArg, toInt32(info[0], exceptionState), exceptionState);
5470     v8SetReturnValue(info, imp->testInterfaceEmptyMethodOptionalLongArg(optionalLongArg));
5471 }
5472
5473 static void testInterfaceEmptyMethodOptionalLongArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5474 {
5475     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5476     TestObjectPythonV8Internal::testInterfaceEmptyMethodOptionalLongArgMethod(info);
5477     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5478 }
5479
5480 static void longMethodOptionalLongArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5481 {
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());
5486         return;
5487     }
5488     V8TRYCATCH_EXCEPTION_VOID(int, optionalLongArg, toInt32(info[0], exceptionState), exceptionState);
5489     v8SetReturnValueInt(info, imp->longMethodOptionalLongArg(optionalLongArg));
5490 }
5491
5492 static void longMethodOptionalLongArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5493 {
5494     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5495     TestObjectPythonV8Internal::longMethodOptionalLongArgMethod(info);
5496     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5497 }
5498
5499 static void voidMethodLongArgOptionalLongArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5500 {
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();
5505         return;
5506     }
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);
5511         return;
5512     }
5513     V8TRYCATCH_EXCEPTION_VOID(int, optionalLongArg, toInt32(info[1], exceptionState), exceptionState);
5514     imp->voidMethodLongArgOptionalLongArg(longArg, optionalLongArg);
5515 }
5516
5517 static void voidMethodLongArgOptionalLongArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5518 {
5519     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5520     TestObjectPythonV8Internal::voidMethodLongArgOptionalLongArgMethod(info);
5521     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5522 }
5523
5524 static void voidMethodLongArgOptionalLongArgOptionalLongArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5525 {
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();
5530         return;
5531     }
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);
5536         return;
5537     }
5538     V8TRYCATCH_EXCEPTION_VOID(int, optionalLongArg1, toInt32(info[1], exceptionState), exceptionState);
5539     if (UNLIKELY(info.Length() <= 2)) {
5540         imp->voidMethodLongArgOptionalLongArgOptionalLongArg(longArg, optionalLongArg1);
5541         return;
5542     }
5543     V8TRYCATCH_EXCEPTION_VOID(int, optionalLongArg2, toInt32(info[2], exceptionState), exceptionState);
5544     imp->voidMethodLongArgOptionalLongArgOptionalLongArg(longArg, optionalLongArg1, optionalLongArg2);
5545 }
5546
5547 static void voidMethodLongArgOptionalLongArgOptionalLongArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5548 {
5549     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5550     TestObjectPythonV8Internal::voidMethodLongArgOptionalLongArgOptionalLongArgMethod(info);
5551     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5552 }
5553
5554 static void voidMethodLongArgOptionalTestInterfaceEmptyArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5555 {
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();
5560         return;
5561     }
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);
5566         return;
5567     }
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);
5570 }
5571
5572 static void voidMethodLongArgOptionalTestInterfaceEmptyArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5573 {
5574     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5575     TestObjectPythonV8Internal::voidMethodLongArgOptionalTestInterfaceEmptyArgMethod(info);
5576     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5577 }
5578
5579 static void voidMethodTestInterfaceEmptyArgOptionalLongArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5580 {
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();
5585         return;
5586     }
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);
5591         return;
5592     }
5593     V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[1], exceptionState), exceptionState);
5594     imp->voidMethodTestInterfaceEmptyArgOptionalLongArg(optionalTestInterfaceEmpty, longArg);
5595 }
5596
5597 static void voidMethodTestInterfaceEmptyArgOptionalLongArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5598 {
5599     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5600     TestObjectPythonV8Internal::voidMethodTestInterfaceEmptyArgOptionalLongArgMethod(info);
5601     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5602 }
5603
5604 static void voidMethodOptionalDictionaryArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5605 {
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());
5610         return;
5611     }
5612     imp->voidMethodOptionalDictionaryArg(optionalDictionaryArg);
5613 }
5614
5615 static void voidMethodOptionalDictionaryArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5616 {
5617     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5618     TestObjectPythonV8Internal::voidMethodOptionalDictionaryArgMethod(info);
5619     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5620 }
5621
5622 static void voidMethodVariadicStringArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5623 {
5624     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
5625     V8TRYCATCH_VOID(Vector<String>, variadicStringArgs, toNativeArguments<String>(info, 0));
5626     imp->voidMethodVariadicStringArg(variadicStringArgs);
5627 }
5628
5629 static void voidMethodVariadicStringArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5630 {
5631     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5632     TestObjectPythonV8Internal::voidMethodVariadicStringArgMethod(info);
5633     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5634 }
5635
5636 static void voidMethodStringArgVariadicStringArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5637 {
5638     if (UNLIKELY(info.Length() < 1)) {
5639         throwTypeError(ExceptionMessages::failedToExecute("voidMethodStringArgVariadicStringArg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
5640         return;
5641     }
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);
5646 }
5647
5648 static void voidMethodStringArgVariadicStringArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5649 {
5650     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5651     TestObjectPythonV8Internal::voidMethodStringArgVariadicStringArgMethod(info);
5652     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5653 }
5654
5655 static void voidMethodVariadicTestInterfaceEmptyArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5656 {
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());
5662             return;
5663         }
5664         variadicTestInterfaceEmptyArgs.append(V8TestInterfaceEmpty::toNative(v8::Handle<v8::Object>::Cast(info[i])));
5665     }
5666     imp->voidMethodVariadicTestInterfaceEmptyArg(variadicTestInterfaceEmptyArgs);
5667 }
5668
5669 static void voidMethodVariadicTestInterfaceEmptyArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5670 {
5671     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5672     TestObjectPythonV8Internal::voidMethodVariadicTestInterfaceEmptyArgMethod(info);
5673     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5674 }
5675
5676 static void voidMethodTestInterfaceEmptyArgVariadicTestInterfaceEmptyArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5677 {
5678     if (UNLIKELY(info.Length() < 1)) {
5679         throwTypeError(ExceptionMessages::failedToExecute("voidMethodTestInterfaceEmptyArgVariadicTestInterfaceEmptyArg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
5680         return;
5681     }
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());
5688             return;
5689         }
5690         variadicTestInterfaceEmptyArgs.append(V8TestInterfaceEmpty::toNative(v8::Handle<v8::Object>::Cast(info[i])));
5691     }
5692     imp->voidMethodTestInterfaceEmptyArgVariadicTestInterfaceEmptyArg(testInterfaceEmptyArg, variadicTestInterfaceEmptyArgs);
5693 }
5694
5695 static void voidMethodTestInterfaceEmptyArgVariadicTestInterfaceEmptyArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5696 {
5697     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5698     TestObjectPythonV8Internal::voidMethodTestInterfaceEmptyArgVariadicTestInterfaceEmptyArgMethod(info);
5699     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5700 }
5701
5702 static void overloadedMethodA1Method(const v8::FunctionCallbackInfo<v8::Value>& info)
5703 {
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();
5708         return;
5709     }
5710     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
5711     V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), exceptionState);
5712     imp->overloadedMethodA(longArg);
5713 }
5714
5715 static void overloadedMethodA2Method(const v8::FunctionCallbackInfo<v8::Value>& info)
5716 {
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();
5721         return;
5722     }
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);
5727 }
5728
5729 static void overloadedMethodAMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5730 {
5731     if (((info.Length() == 1))) {
5732         overloadedMethodA1Method(info);
5733         return;
5734     }
5735     if (((info.Length() == 2))) {
5736         overloadedMethodA2Method(info);
5737         return;
5738     }
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();
5743         return;
5744     }
5745     exceptionState.throwTypeError("No function was found that matched the signature provided.");
5746     exceptionState.throwIfNeeded();
5747 }
5748
5749 static void overloadedMethodAMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5750 {
5751     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5752     TestObjectPythonV8Internal::overloadedMethodAMethod(info);
5753     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5754 }
5755
5756 static void overloadedMethodB1Method(const v8::FunctionCallbackInfo<v8::Value>& info)
5757 {
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();
5762         return;
5763     }
5764     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
5765     V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), exceptionState);
5766     imp->overloadedMethodB(longArg);
5767 }
5768
5769 static void overloadedMethodB2Method(const v8::FunctionCallbackInfo<v8::Value>& info)
5770 {
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();
5775         return;
5776     }
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);
5781         return;
5782     }
5783     V8TRYCATCH_EXCEPTION_VOID(int, longArg2, toInt32(info[1], exceptionState), exceptionState);
5784     imp->overloadedMethodB(longArg1, longArg2);
5785 }
5786
5787 static void overloadedMethodBMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5788 {
5789     if (((info.Length() == 1))) {
5790         overloadedMethodB1Method(info);
5791         return;
5792     }
5793     if (((info.Length() == 1)) || ((info.Length() == 2))) {
5794         overloadedMethodB2Method(info);
5795         return;
5796     }
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();
5801         return;
5802     }
5803     exceptionState.throwTypeError("No function was found that matched the signature provided.");
5804     exceptionState.throwIfNeeded();
5805 }
5806
5807 static void overloadedMethodBMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5808 {
5809     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5810     TestObjectPythonV8Internal::overloadedMethodBMethod(info);
5811     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5812 }
5813
5814 static void overloadedMethodC1Method(const v8::FunctionCallbackInfo<v8::Value>& info)
5815 {
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();
5820         return;
5821     }
5822     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
5823     V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), exceptionState);
5824     imp->overloadedMethodC(longArg);
5825 }
5826
5827 static void overloadedMethodC2Method(const v8::FunctionCallbackInfo<v8::Value>& info)
5828 {
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();
5833         return;
5834     }
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);
5839 }
5840
5841 static void overloadedMethodCMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5842 {
5843     if (((info.Length() == 1))) {
5844         overloadedMethodC1Method(info);
5845         return;
5846     }
5847     if () {
5848         overloadedMethodC2Method(info);
5849         return;
5850     }
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();
5855         return;
5856     }
5857     exceptionState.throwTypeError("No function was found that matched the signature provided.");
5858     exceptionState.throwIfNeeded();
5859 }
5860
5861 static void overloadedMethodCMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5862 {
5863     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5864     TestObjectPythonV8Internal::overloadedMethodCMethod(info);
5865     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5866 }
5867
5868 static void overloadedMethodD1Method(const v8::FunctionCallbackInfo<v8::Value>& info)
5869 {
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();
5874         return;
5875     }
5876     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
5877     V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), exceptionState);
5878     imp->overloadedMethodD(longArg);
5879 }
5880
5881 static void overloadedMethodD2Method(const v8::FunctionCallbackInfo<v8::Value>& info)
5882 {
5883     if (UNLIKELY(info.Length() < 1)) {
5884         throwTypeError(ExceptionMessages::failedToExecute("overloadedMethodD", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
5885         return;
5886     }
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);
5890 }
5891
5892 static void overloadedMethodDMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5893 {
5894     if (((info.Length() == 1))) {
5895         overloadedMethodD1Method(info);
5896         return;
5897     }
5898     if (((info.Length() == 1) && (V8TestInterfaceEmpty::hasInstance(info[0], info.GetIsolate())))) {
5899         overloadedMethodD2Method(info);
5900         return;
5901     }
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();
5906         return;
5907     }
5908     exceptionState.throwTypeError("No function was found that matched the signature provided.");
5909     exceptionState.throwIfNeeded();
5910 }
5911
5912 static void overloadedMethodDMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5913 {
5914     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5915     TestObjectPythonV8Internal::overloadedMethodDMethod(info);
5916     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5917 }
5918
5919 static void overloadedMethodE1Method(const v8::FunctionCallbackInfo<v8::Value>& info)
5920 {
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();
5925         return;
5926     }
5927     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
5928     V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), exceptionState);
5929     imp->overloadedMethodE(longArg);
5930 }
5931
5932 static void overloadedMethodE2Method(const v8::FunctionCallbackInfo<v8::Value>& info)
5933 {
5934     if (UNLIKELY(info.Length() < 1)) {
5935         throwTypeError(ExceptionMessages::failedToExecute("overloadedMethodE", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
5936         return;
5937     }
5938     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
5939     V8TRYCATCH_VOID(Vector<int>, longArrayArg, toNativeArray<int>(info[0], 1, info.GetIsolate()));
5940     imp->overloadedMethodE(longArrayArg);
5941 }
5942
5943 static void overloadedMethodEMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5944 {
5945     if (((info.Length() == 1))) {
5946         overloadedMethodE1Method(info);
5947         return;
5948     }
5949     if (((info.Length() == 1) && (info[0]->IsArray()))) {
5950         overloadedMethodE2Method(info);
5951         return;
5952     }
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();
5957         return;
5958     }
5959     exceptionState.throwTypeError("No function was found that matched the signature provided.");
5960     exceptionState.throwIfNeeded();
5961 }
5962
5963 static void overloadedMethodEMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5964 {
5965     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5966     TestObjectPythonV8Internal::overloadedMethodEMethod(info);
5967     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5968 }
5969
5970 static void overloadedMethodF1Method(const v8::FunctionCallbackInfo<v8::Value>& info)
5971 {
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();
5976         return;
5977     }
5978     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
5979     V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), exceptionState);
5980     imp->overloadedMethodF(longArg);
5981 }
5982
5983 static void overloadedMethodF2Method(const v8::FunctionCallbackInfo<v8::Value>& info)
5984 {
5985     if (UNLIKELY(info.Length() < 1)) {
5986         throwTypeError(ExceptionMessages::failedToExecute("overloadedMethodF", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
5987         return;
5988     }
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);
5992 }
5993
5994 static void overloadedMethodFMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5995 {
5996     if (((info.Length() == 1))) {
5997         overloadedMethodF1Method(info);
5998         return;
5999     }
6000     if (((info.Length() == 1) && (info[0]->IsNull() || V8TestInterfaceEmpty::hasInstance(info[0], info.GetIsolate())))) {
6001         overloadedMethodF2Method(info);
6002         return;
6003     }
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();
6008         return;
6009     }
6010     exceptionState.throwTypeError("No function was found that matched the signature provided.");
6011     exceptionState.throwIfNeeded();
6012 }
6013
6014 static void overloadedMethodFMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6015 {
6016     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6017     TestObjectPythonV8Internal::overloadedMethodFMethod(info);
6018     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6019 }
6020
6021 static void overloadedMethodG1Method(const v8::FunctionCallbackInfo<v8::Value>& info)
6022 {
6023     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
6024     imp->overloadedMethodG();
6025 }
6026
6027 static void overloadedMethodG2Method(const v8::FunctionCallbackInfo<v8::Value>& info)
6028 {
6029     if (UNLIKELY(info.Length() < 1)) {
6030         throwTypeError(ExceptionMessages::failedToExecute("overloadedMethodG", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
6031         return;
6032     }
6033     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
6034     V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strictTypeCheckingStringArg, info[0]);
6035     imp->overloadedMethodG(strictTypeCheckingStringArg);
6036 }
6037
6038 static void overloadedMethodGMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6039 {
6040     if (((info.Length() == 0))) {
6041         overloadedMethodG1Method(info);
6042         return;
6043     }
6044     if (((info.Length() == 1) && (isUndefinedOrNull(info[0]) || info[0]->IsString() || info[0]->IsObject()))) {
6045         overloadedMethodG2Method(info);
6046         return;
6047     }
6048     throwTypeError(ExceptionMessages::failedToExecute("overloadedMethodG", "TestObjectPython", "No function was found that matched the signature provided."), info.GetIsolate());
6049 }
6050
6051 static void overloadedMethodGMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6052 {
6053     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6054     TestObjectPythonV8Internal::overloadedMethodGMethod(info);
6055     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6056 }
6057
6058 static void overloadedMethodH1Method(const v8::FunctionCallbackInfo<v8::Value>& info)
6059 {
6060     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
6061     imp->overloadedMethodH();
6062 }
6063
6064 static void overloadedMethodH2Method(const v8::FunctionCallbackInfo<v8::Value>& info)
6065 {
6066     if (UNLIKELY(info.Length() < 1)) {
6067         throwTypeError(ExceptionMessages::failedToExecute("overloadedMethodH", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
6068         return;
6069     }
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());
6073         return;
6074     }
6075     OwnPtr<TestCallbackInterface> testCallbackInterfaceArg = V8TestCallbackInterface::create(v8::Handle<v8::Function>::Cast(info[0]), currentExecutionContext(info.GetIsolate()));
6076     imp->overloadedMethodH(testCallbackInterfaceArg.release());
6077 }
6078
6079 static void overloadedMethodHMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6080 {
6081     if (((info.Length() == 0))) {
6082         overloadedMethodH1Method(info);
6083         return;
6084     }
6085     if (((info.Length() == 1) && (info[0]->IsNull() || info[0]->IsFunction()))) {
6086         overloadedMethodH2Method(info);
6087         return;
6088     }
6089     throwTypeError(ExceptionMessages::failedToExecute("overloadedMethodH", "TestObjectPython", "No function was found that matched the signature provided."), info.GetIsolate());
6090 }
6091
6092 static void overloadedMethodHMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6093 {
6094     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6095     TestObjectPythonV8Internal::overloadedMethodHMethod(info);
6096     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6097 }
6098
6099 static void overloadedPerWorldBindingsMethod1Method(const v8::FunctionCallbackInfo<v8::Value>& info)
6100 {
6101     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
6102     imp->overloadedPerWorldBindingsMethod();
6103 }
6104
6105 static void overloadedPerWorldBindingsMethod1MethodForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info)
6106 {
6107     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
6108     imp->overloadedPerWorldBindingsMethod();
6109 }
6110
6111 static void overloadedPerWorldBindingsMethod2Method(const v8::FunctionCallbackInfo<v8::Value>& info)
6112 {
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();
6117         return;
6118     }
6119     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
6120     V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), exceptionState);
6121     imp->overloadedPerWorldBindingsMethod(longArg);
6122 }
6123
6124 static void overloadedPerWorldBindingsMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6125 {
6126     if (((info.Length() == 0))) {
6127         overloadedPerWorldBindingsMethod1Method(info);
6128         return;
6129     }
6130     if (((info.Length() == 1))) {
6131         overloadedPerWorldBindingsMethod2Method(info);
6132         return;
6133     }
6134     throwTypeError(ExceptionMessages::failedToExecute("overloadedPerWorldBindingsMethod", "TestObjectPython", "No function was found that matched the signature provided."), info.GetIsolate());
6135 }
6136
6137 static void overloadedPerWorldBindingsMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6138 {
6139     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6140     TestObjectPythonV8Internal::overloadedPerWorldBindingsMethodMethod(info);
6141     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6142 }
6143
6144 static void overloadedPerWorldBindingsMethod2MethodForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info)
6145 {
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();
6150         return;
6151     }
6152     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
6153     V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), exceptionState);
6154     imp->overloadedPerWorldBindingsMethod(longArg);
6155 }
6156
6157 static void overloadedPerWorldBindingsMethodMethodForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info)
6158 {
6159     if (((info.Length() == 0))) {
6160         overloadedPerWorldBindingsMethod1MethodForMainWorld(info);
6161         return;
6162     }
6163     if (((info.Length() == 1))) {
6164         overloadedPerWorldBindingsMethod2MethodForMainWorld(info);
6165         return;
6166     }
6167     throwTypeError(ExceptionMessages::failedToExecute("overloadedPerWorldBindingsMethod", "TestObjectPython", "No function was found that matched the signature provided."), info.GetIsolate());
6168 }
6169
6170 static void overloadedPerWorldBindingsMethodMethodCallbackForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info)
6171 {
6172     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6173     TestObjectPythonV8Internal::overloadedPerWorldBindingsMethodMethodForMainWorld(info);
6174     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6175 }
6176
6177 static void overloadedStaticMethod1Method(const v8::FunctionCallbackInfo<v8::Value>& info)
6178 {
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();
6183         return;
6184     }
6185     V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), exceptionState);
6186     TestObjectPython::overloadedStaticMethod(longArg);
6187 }
6188
6189 static void overloadedStaticMethod2Method(const v8::FunctionCallbackInfo<v8::Value>& info)
6190 {
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();
6195         return;
6196     }
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);
6200 }
6201
6202 static void overloadedStaticMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6203 {
6204     if (((info.Length() == 1))) {
6205         overloadedStaticMethod1Method(info);
6206         return;
6207     }
6208     if (((info.Length() == 2))) {
6209         overloadedStaticMethod2Method(info);
6210         return;
6211     }
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();
6216         return;
6217     }
6218     exceptionState.throwTypeError("No function was found that matched the signature provided.");
6219     exceptionState.throwIfNeeded();
6220 }
6221
6222 static void overloadedStaticMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6223 {
6224     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6225     TestObjectPythonV8Internal::overloadedStaticMethodMethod(info);
6226     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6227 }
6228
6229 static void addEventListenerMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6230 {
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();
6236             return;
6237         }
6238         if (!window->document())
6239             return;
6240     }
6241     RefPtr<EventListener> listener = V8EventListenerList::getEventListener(info[1], false, ListenerFindOrCreate);
6242     if (listener) {
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());
6247     }
6248 }
6249
6250 static void addEventListenerMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6251 {
6252     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6253     TestObjectPythonV8Internal::addEventListenerMethod(info);
6254     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6255 }
6256
6257 static void removeEventListenerMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6258 {
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();
6264             return;
6265         }
6266         if (!window->document())
6267             return;
6268     }
6269     RefPtr<EventListener> listener = V8EventListenerList::getEventListener(info[1], false, ListenerFindOnly);
6270     if (listener) {
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());
6275     }
6276 }
6277
6278 static void removeEventListenerMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6279 {
6280     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6281     TestObjectPythonV8Internal::removeEventListenerMethod(info);
6282     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6283 }
6284
6285 static void dispatchEventMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6286 {
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();
6292             return;
6293         }
6294         if (!window->document())
6295             return;
6296     }
6297     if (UNLIKELY(info.Length() < 1)) {
6298         exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, info.Length()));
6299         exceptionState.throwIfNeeded();
6300         return;
6301     }
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())
6306         return;
6307     v8SetReturnValueBool(info, result);
6308 }
6309
6310 static void dispatchEventMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6311 {
6312     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6313     TestObjectPythonV8Internal::dispatchEventMethod(info);
6314     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6315 }
6316
6317 static void voidMethodClampUnsignedShortArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6318 {
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();
6323         return;
6324     }
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);
6331 }
6332
6333 static void voidMethodClampUnsignedShortArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6334 {
6335     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6336     TestObjectPythonV8Internal::voidMethodClampUnsignedShortArgMethod(info);
6337     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6338 }
6339
6340 static void voidMethodClampUnsignedLongArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6341 {
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();
6346         return;
6347     }
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);
6354 }
6355
6356 static void voidMethodClampUnsignedLongArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6357 {
6358     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6359     TestObjectPythonV8Internal::voidMethodClampUnsignedLongArgMethod(info);
6360     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6361 }
6362
6363 static void voidMethodDefaultUndefinedTestInterfaceEmptyArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6364 {
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);
6368 }
6369
6370 static void voidMethodDefaultUndefinedTestInterfaceEmptyArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6371 {
6372     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6373     TestObjectPythonV8Internal::voidMethodDefaultUndefinedTestInterfaceEmptyArgMethod(info);
6374     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6375 }
6376
6377 static void voidMethodDefaultUndefinedLongArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6378 {
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);
6383 }
6384
6385 static void voidMethodDefaultUndefinedLongArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6386 {
6387     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6388     TestObjectPythonV8Internal::voidMethodDefaultUndefinedLongArgMethod(info);
6389     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6390 }
6391
6392 static void voidMethodDefaultUndefinedStringArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6393 {
6394     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
6395     V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, defaultUndefinedStringArg, info[0]);
6396     imp->voidMethodDefaultUndefinedStringArg(defaultUndefinedStringArg);
6397 }
6398
6399 static void voidMethodDefaultUndefinedStringArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6400 {
6401     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6402     TestObjectPythonV8Internal::voidMethodDefaultUndefinedStringArgMethod(info);
6403     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6404 }
6405
6406 static void voidMethodDefaultNullStringStringArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6407 {
6408     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
6409     V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, defaultNullStringStringArg, argumentOrNull(info, 0));
6410     imp->voidMethodDefaultNullStringStringArg(defaultNullStringStringArg);
6411 }
6412
6413 static void voidMethodDefaultNullStringStringArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6414 {
6415     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6416     TestObjectPythonV8Internal::voidMethodDefaultNullStringStringArgMethod(info);
6417     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6418 }
6419
6420 static void voidMethodEnforceRangeLongArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6421 {
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();
6426         return;
6427     }
6428     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
6429     V8TRYCATCH_EXCEPTION_VOID(int, enforceRangeLongArg, toInt32(info[0], EnforceRange, exceptionState), exceptionState);
6430     imp->voidMethodEnforceRangeLongArg(enforceRangeLongArg);
6431 }
6432
6433 static void voidMethodEnforceRangeLongArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6434 {
6435     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6436     TestObjectPythonV8Internal::voidMethodEnforceRangeLongArgMethod(info);
6437     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6438 }
6439
6440 static void voidMethodTreatNullAsNullStringStringArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6441 {
6442     if (UNLIKELY(info.Length() < 1)) {
6443         throwTypeError(ExceptionMessages::failedToExecute("voidMethodTreatNullAsNullStringStringArg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
6444         return;
6445     }
6446     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
6447     V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithNullCheck>, treatNullAsNullStringStringArg, info[0]);
6448     imp->voidMethodTreatNullAsNullStringStringArg(treatNullAsNullStringStringArg);
6449 }
6450
6451 static void voidMethodTreatNullAsNullStringStringArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6452 {
6453     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6454     TestObjectPythonV8Internal::voidMethodTreatNullAsNullStringStringArgMethod(info);
6455     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6456 }
6457
6458 static void voidMethodTreatNullAsNullStringTreatUndefinedAsNullStringStringArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6459 {
6460     if (UNLIKELY(info.Length() < 1)) {
6461         throwTypeError(ExceptionMessages::failedToExecute("voidMethodTreatNullAsNullStringTreatUndefinedAsNullStringStringArg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
6462         return;
6463     }
6464     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
6465     V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithUndefinedOrNullCheck>, treatNullAsNullStringStringArg, info[0]);
6466     imp->voidMethodTreatNullAsNullStringTreatUndefinedAsNullStringStringArg(treatNullAsNullStringStringArg);
6467 }
6468
6469 static void voidMethodTreatNullAsNullStringTreatUndefinedAsNullStringStringArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6470 {
6471     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6472     TestObjectPythonV8Internal::voidMethodTreatNullAsNullStringTreatUndefinedAsNullStringStringArgMethod(info);
6473     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6474 }
6475
6476 static void activityLoggingAccessForAllWorldsMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6477 {
6478     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
6479     imp->activityLoggingAccessForAllWorldsMethod();
6480 }
6481
6482 static void activityLoggingAccessForAllWorldsMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6483 {
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");
6489     }
6490     TestObjectPythonV8Internal::activityLoggingAccessForAllWorldsMethodMethod(info);
6491     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6492 }
6493
6494 static void callWithScriptStateVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6495 {
6496     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
6497     ScriptState* currentState = ScriptState::current();
6498     if (!currentState)
6499         return;
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());
6506         return;
6507     }
6508 }
6509
6510 static void callWithScriptStateVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6511 {
6512     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6513     TestObjectPythonV8Internal::callWithScriptStateVoidMethodMethod(info);
6514     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6515 }
6516
6517 static void callWithScriptStateLongMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6518 {
6519     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
6520     ScriptState* currentState = ScriptState::current();
6521     if (!currentState)
6522         return;
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());
6529         return;
6530     }
6531     v8SetReturnValueInt(info, result);
6532 }
6533
6534 static void callWithScriptStateLongMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6535 {
6536     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6537     TestObjectPythonV8Internal::callWithScriptStateLongMethodMethod(info);
6538     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6539 }
6540
6541 static void callWithExecutionContextVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6542 {
6543     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
6544     ExecutionContext* scriptContext = currentExecutionContext(info.GetIsolate());
6545     imp->callWithExecutionContextVoidMethod(scriptContext);
6546 }
6547
6548 static void callWithExecutionContextVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6549 {
6550     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6551     TestObjectPythonV8Internal::callWithExecutionContextVoidMethodMethod(info);
6552     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6553 }
6554
6555 static void callWithScriptStateExecutionContextVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6556 {
6557     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
6558     ScriptState* currentState = ScriptState::current();
6559     if (!currentState)
6560         return;
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());
6568         return;
6569     }
6570 }
6571
6572 static void callWithScriptStateExecutionContextVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6573 {
6574     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6575     TestObjectPythonV8Internal::callWithScriptStateExecutionContextVoidMethodMethod(info);
6576     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6577 }
6578
6579 static void callWithScriptStateScriptArgumentsVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6580 {
6581     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
6582     ScriptState* currentState = ScriptState::current();
6583     if (!currentState)
6584         return;
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());
6592         return;
6593     }
6594 }
6595
6596 static void callWithScriptStateScriptArgumentsVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6597 {
6598     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6599     TestObjectPythonV8Internal::callWithScriptStateScriptArgumentsVoidMethodMethod(info);
6600     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6601 }
6602
6603 static void callWithScriptStateScriptArgumentsVoidMethodOptionalBooleanArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6604 {
6605     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
6606     if (UNLIKELY(info.Length() <= 0)) {
6607         ScriptState* currentState = ScriptState::current();
6608         if (!currentState)
6609             return;
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());
6617             return;
6618         }
6619         return;
6620     }
6621     V8TRYCATCH_VOID(bool, optionalBooleanArg, info[0]->BooleanValue());
6622     ScriptState* currentState = ScriptState::current();
6623     if (!currentState)
6624         return;
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());
6632         return;
6633     }
6634 }
6635
6636 static void callWithScriptStateScriptArgumentsVoidMethodOptionalBooleanArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6637 {
6638     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6639     TestObjectPythonV8Internal::callWithScriptStateScriptArgumentsVoidMethodOptionalBooleanArgMethod(info);
6640     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6641 }
6642
6643 static void callWithActiveWindowMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6644 {
6645     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
6646     imp->callWithActiveWindow(activeDOMWindow(info.GetIsolate()));
6647 }
6648
6649 static void callWithActiveWindowMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6650 {
6651     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6652     TestObjectPythonV8Internal::callWithActiveWindowMethod(info);
6653     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6654 }
6655
6656 static void callWithActiveWindowScriptWindowMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6657 {
6658     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
6659     imp->callWithActiveWindowScriptWindow(activeDOMWindow(info.GetIsolate()), firstDOMWindow(info.GetIsolate()));
6660 }
6661
6662 static void callWithActiveWindowScriptWindowMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6663 {
6664     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6665     TestObjectPythonV8Internal::callWithActiveWindowScriptWindowMethod(info);
6666     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6667 }
6668
6669 static void checkSecurityForNodeVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6670 {
6671     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
6672     if (!BindingSecurity::shouldAllowAccessToNode(info.GetIsolate(), imp->checkSecurityForNodeVoidMethod(exceptionState), exceptionState)) {
6673         v8SetReturnValueNull(info);
6674         exceptionState.throwIfNeeded();
6675         return;
6676     }
6677     imp->checkSecurityForNodeVoidMethod();
6678 }
6679
6680 static void checkSecurityForNodeVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6681 {
6682     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6683     TestObjectPythonV8Internal::checkSecurityForNodeVoidMethodMethod(info);
6684     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6685 }
6686
6687 #if ENABLE(CONDITION)
6688 static void conditionalConditionVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6689 {
6690     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
6691     imp->conditionalConditionVoidMethod();
6692 }
6693 #endif // ENABLE(CONDITION)
6694
6695 #if ENABLE(CONDITION)
6696 static void conditionalConditionVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6697 {
6698     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6699     TestObjectPythonV8Internal::conditionalConditionVoidMethodMethod(info);
6700     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6701 }
6702 #endif // ENABLE(CONDITION)
6703
6704 #if ENABLE(CONDITION_1) && ENABLE(CONDITION_2)
6705 static void conditionalCondition1AndCondition2VoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6706 {
6707     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
6708     imp->conditionalCondition1AndCondition2VoidMethod();
6709 }
6710 #endif // ENABLE(CONDITION_1) && ENABLE(CONDITION_2)
6711
6712 #if ENABLE(CONDITION_1) && ENABLE(CONDITION_2)
6713 static void conditionalCondition1AndCondition2VoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6714 {
6715     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6716     TestObjectPythonV8Internal::conditionalCondition1AndCondition2VoidMethodMethod(info);
6717     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6718 }
6719 #endif // ENABLE(CONDITION_1) && ENABLE(CONDITION_2)
6720
6721 #if ENABLE(CONDITION)
6722 static void conditionalConditionStaticVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6723 {
6724     TestObjectPython::conditionalConditionStaticVoidMethod();
6725 }
6726 #endif // ENABLE(CONDITION)
6727
6728 #if ENABLE(CONDITION)
6729 static void conditionalConditionStaticVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6730 {
6731     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6732     TestObjectPythonV8Internal::conditionalConditionStaticVoidMethodMethod(info);
6733     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6734 }
6735 #endif // ENABLE(CONDITION)
6736
6737 static void customVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6738 {
6739     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6740     V8TestObjectPython::customVoidMethodMethodCustom(info);
6741     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6742 }
6743
6744 #if ENABLE(CONDITION)
6745 static void conditionalConditionCustomVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6746 {
6747     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6748     V8TestObjectPython::conditionalConditionCustomVoidMethodMethodCustom(info);
6749     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6750 }
6751 #endif // ENABLE(CONDITION)
6752
6753 static void customElementCallbacksVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6754 {
6755     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
6756     CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
6757     imp->customElementCallbacksVoidMethod();
6758 }
6759
6760 static void customElementCallbacksVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6761 {
6762     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6763     TestObjectPythonV8Internal::customElementCallbacksVoidMethodMethod(info);
6764     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6765 }
6766
6767 static void deprecatedVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6768 {
6769     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
6770     imp->deprecatedVoidMethod();
6771 }
6772
6773 static void deprecatedVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6774 {
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");
6779 }
6780
6781 static void doNotCheckSignatureVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6782 {
6783     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
6784     imp->doNotCheckSignatureVoidMethod();
6785 }
6786
6787 static void doNotCheckSignatureVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6788 {
6789     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6790     TestObjectPythonV8Internal::doNotCheckSignatureVoidMethodMethod(info);
6791     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6792 }
6793
6794 static void implementedAsVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6795 {
6796     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
6797     imp->implementedAsMethodName();
6798 }
6799
6800 static void implementedAsVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6801 {
6802     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6803     TestObjectPythonV8Internal::implementedAsVoidMethodMethod(info);
6804     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6805 }
6806
6807 static void measureAsVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6808 {
6809     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
6810     imp->measureAsVoidMethod();
6811 }
6812
6813 static void measureAsVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6814 {
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");
6819 }
6820
6821 static void notEnumerableVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6822 {
6823     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
6824     imp->notEnumerableVoidMethod();
6825 }
6826
6827 static void notEnumerableVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6828 {
6829     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6830     TestObjectPythonV8Internal::notEnumerableVoidMethodMethod(info);
6831     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6832 }
6833
6834 static void perContextEnabledVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6835 {
6836     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
6837     imp->perContextEnabledVoidMethod();
6838 }
6839
6840 static void perContextEnabledVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6841 {
6842     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6843     TestObjectPythonV8Internal::perContextEnabledVoidMethodMethod(info);
6844     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6845 }
6846
6847 static void perWorldBindingsVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6848 {
6849     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
6850     imp->perWorldBindingsVoidMethod();
6851 }
6852
6853 static void perWorldBindingsVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6854 {
6855     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6856     TestObjectPythonV8Internal::perWorldBindingsVoidMethodMethod(info);
6857     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6858 }
6859
6860 static void perWorldBindingsVoidMethodMethodForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info)
6861 {
6862     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
6863     imp->perWorldBindingsVoidMethod();
6864 }
6865
6866 static void perWorldBindingsVoidMethodMethodCallbackForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info)
6867 {
6868     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6869     TestObjectPythonV8Internal::perWorldBindingsVoidMethodMethodForMainWorld(info);
6870     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6871 }
6872
6873 static void perWorldBindingsVoidMethodTestInterfaceEmptyArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6874 {
6875     if (UNLIKELY(info.Length() < 1)) {
6876         throwTypeError(ExceptionMessages::failedToExecute("perWorldBindingsVoidMethodTestInterfaceEmptyArg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
6877         return;
6878     }
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);
6882 }
6883
6884 static void perWorldBindingsVoidMethodTestInterfaceEmptyArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6885 {
6886     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6887     TestObjectPythonV8Internal::perWorldBindingsVoidMethodTestInterfaceEmptyArgMethod(info);
6888     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6889 }
6890
6891 static void perWorldBindingsVoidMethodTestInterfaceEmptyArgMethodForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info)
6892 {
6893     if (UNLIKELY(info.Length() < 1)) {
6894         throwTypeError(ExceptionMessages::failedToExecute("perWorldBindingsVoidMethodTestInterfaceEmptyArg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
6895         return;
6896     }
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);
6900 }
6901
6902 static void perWorldBindingsVoidMethodTestInterfaceEmptyArgMethodCallbackForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info)
6903 {
6904     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6905     TestObjectPythonV8Internal::perWorldBindingsVoidMethodTestInterfaceEmptyArgMethodForMainWorld(info);
6906     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6907 }
6908
6909 static void activityLoggingForAllWorldsPerWorldBindingsVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6910 {
6911     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
6912     imp->activityLoggingForAllWorldsPerWorldBindingsVoidMethod();
6913 }
6914
6915 static void activityLoggingForAllWorldsPerWorldBindingsVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6916 {
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");
6922     }
6923     TestObjectPythonV8Internal::activityLoggingForAllWorldsPerWorldBindingsVoidMethodMethod(info);
6924     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6925 }
6926
6927 static void activityLoggingForAllWorldsPerWorldBindingsVoidMethodMethodForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info)
6928 {
6929     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
6930     imp->activityLoggingForAllWorldsPerWorldBindingsVoidMethod();
6931 }
6932
6933 static void activityLoggingForAllWorldsPerWorldBindingsVoidMethodMethodCallbackForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info)
6934 {
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");
6940     }
6941     TestObjectPythonV8Internal::activityLoggingForAllWorldsPerWorldBindingsVoidMethodMethodForMainWorld(info);
6942     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6943 }
6944
6945 static void activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6946 {
6947     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
6948     imp->activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethod();
6949 }
6950
6951 static void activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6952 {
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");
6958     }
6959     TestObjectPythonV8Internal::activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethodMethod(info);
6960     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6961 }
6962
6963 static void activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethodMethodForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info)
6964 {
6965     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
6966     imp->activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethod();
6967 }
6968
6969 static void activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethodMethodCallbackForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info)
6970 {
6971     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6972     TestObjectPythonV8Internal::activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethodMethodForMainWorld(info);
6973     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6974 }
6975
6976 static void raisesExceptionVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6977 {
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())
6982         return;
6983 }
6984
6985 static void raisesExceptionVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6986 {
6987     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6988     TestObjectPythonV8Internal::raisesExceptionVoidMethodMethod(info);
6989     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6990 }
6991
6992 static void raisesExceptionStringMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6993 {
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())
6998         return;
6999     v8SetReturnValueString(info, result, info.GetIsolate());
7000 }
7001
7002 static void raisesExceptionStringMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
7003 {
7004     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7005     TestObjectPythonV8Internal::raisesExceptionStringMethodMethod(info);
7006     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7007 }
7008
7009 static void raisesExceptionVoidMethodOptionalLongArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
7010 {
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())
7016             return;
7017         return;
7018     }
7019     V8TRYCATCH_EXCEPTION_VOID(int, optionalLongArg, toInt32(info[0], exceptionState), exceptionState);
7020     imp->raisesExceptionVoidMethodOptionalLongArg(optionalLongArg, exceptionState);
7021     if (exceptionState.throwIfNeeded())
7022         return;
7023 }
7024
7025 static void raisesExceptionVoidMethodOptionalLongArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
7026 {
7027     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7028     TestObjectPythonV8Internal::raisesExceptionVoidMethodOptionalLongArgMethod(info);
7029     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7030 }
7031
7032 static void raisesExceptionVoidMethodTestCallbackInterfaceArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
7033 {
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();
7038         return;
7039     }
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();
7044         return;
7045     }
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())
7049         return;
7050 }
7051
7052 static void raisesExceptionVoidMethodTestCallbackInterfaceArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
7053 {
7054     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7055     TestObjectPythonV8Internal::raisesExceptionVoidMethodTestCallbackInterfaceArgMethod(info);
7056     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7057 }
7058
7059 static void raisesExceptionVoidMethodOptionalTestCallbackInterfaceArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
7060 {
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();
7068             return;
7069         }
7070         optionalTestCallbackInterfaceArg = V8TestCallbackInterface::create(v8::Handle<v8::Function>::Cast(info[0]), currentExecutionContext(info.GetIsolate()));
7071     }
7072     imp->raisesExceptionVoidMethodOptionalTestCallbackInterfaceArg(optionalTestCallbackInterfaceArg.release(), exceptionState);
7073     if (exceptionState.throwIfNeeded())
7074         return;
7075 }
7076
7077 static void raisesExceptionVoidMethodOptionalTestCallbackInterfaceArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
7078 {
7079     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7080     TestObjectPythonV8Internal::raisesExceptionVoidMethodOptionalTestCallbackInterfaceArgMethod(info);
7081     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7082 }
7083
7084 static void raisesExceptionTestInterfaceEmptyVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
7085 {
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())
7090         return;
7091     v8SetReturnValue(info, result.release());
7092 }
7093
7094 static void raisesExceptionTestInterfaceEmptyVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
7095 {
7096     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7097     TestObjectPythonV8Internal::raisesExceptionTestInterfaceEmptyVoidMethodMethod(info);
7098     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7099 }
7100
7101 static void readOnlyVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
7102 {
7103     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
7104     imp->readOnlyVoidMethod();
7105 }
7106
7107 static void readOnlyVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
7108 {
7109     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7110     TestObjectPythonV8Internal::readOnlyVoidMethodMethod(info);
7111     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7112 }
7113
7114 static void notEnumerableReadOnlyVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
7115 {
7116     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
7117     imp->notEnumerableReadOnlyVoidMethod();
7118 }
7119
7120 static void notEnumerableReadOnlyVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
7121 {
7122     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7123     TestObjectPythonV8Internal::notEnumerableReadOnlyVoidMethodMethod(info);
7124     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7125 }
7126
7127 static void runtimeEnabledVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
7128 {
7129     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
7130     imp->runtimeEnabledVoidMethod();
7131 }
7132
7133 static void runtimeEnabledVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
7134 {
7135     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7136     TestObjectPythonV8Internal::runtimeEnabledVoidMethodMethod(info);
7137     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7138 }
7139
7140 static void perWorldBindingsRuntimeEnabledVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
7141 {
7142     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
7143     imp->perWorldBindingsRuntimeEnabledVoidMethod();
7144 }
7145
7146 static void perWorldBindingsRuntimeEnabledVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
7147 {
7148     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7149     TestObjectPythonV8Internal::perWorldBindingsRuntimeEnabledVoidMethodMethod(info);
7150     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7151 }
7152
7153 static void perWorldBindingsRuntimeEnabledVoidMethodMethodForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info)
7154 {
7155     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
7156     imp->perWorldBindingsRuntimeEnabledVoidMethod();
7157 }
7158
7159 static void perWorldBindingsRuntimeEnabledVoidMethodMethodCallbackForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info)
7160 {
7161     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7162     TestObjectPythonV8Internal::perWorldBindingsRuntimeEnabledVoidMethodMethodForMainWorld(info);
7163     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7164 }
7165
7166 static void strictTypeCheckingVoidMethodTestInterfaceEmptyArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
7167 {
7168     if (UNLIKELY(info.Length() < 1)) {
7169         throwTypeError(ExceptionMessages::failedToExecute("strictTypeCheckingVoidMethodTestInterfaceEmptyArg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
7170         return;
7171     }
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());
7175         return;
7176     }
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);
7179 }
7180
7181 static void strictTypeCheckingVoidMethodTestInterfaceEmptyArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
7182 {
7183     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7184     TestObjectPythonV8Internal::strictTypeCheckingVoidMethodTestInterfaceEmptyArgMethod(info);
7185     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7186 }
7187
7188 static void strictTypeCheckingVoidMethodNullableTestInterfaceEmptyArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
7189 {
7190     if (UNLIKELY(info.Length() < 1)) {
7191         throwTypeError(ExceptionMessages::failedToExecute("strictTypeCheckingVoidMethodNullableTestInterfaceEmptyArg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
7192         return;
7193     }
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());
7197         return;
7198     }
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);
7201 }
7202
7203 static void strictTypeCheckingVoidMethodNullableTestInterfaceEmptyArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
7204 {
7205     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7206     TestObjectPythonV8Internal::strictTypeCheckingVoidMethodNullableTestInterfaceEmptyArgMethod(info);
7207     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7208 }
7209
7210 static void treatReturnedNullStringAsNullStringMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
7211 {
7212     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
7213     v8SetReturnValueStringOrNull(info, imp->treatReturnedNullStringAsNullStringMethod(), info.GetIsolate());
7214 }
7215
7216 static void treatReturnedNullStringAsNullStringMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
7217 {
7218     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7219     TestObjectPythonV8Internal::treatReturnedNullStringAsNullStringMethodMethod(info);
7220     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7221 }
7222
7223 static void treatReturnedNullStringAsUndefinedStringMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
7224 {
7225     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
7226     v8SetReturnValueStringOrUndefined(info, imp->treatReturnedNullStringAsUndefinedStringMethod(), info.GetIsolate());
7227 }
7228
7229 static void treatReturnedNullStringAsUndefinedStringMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
7230 {
7231     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7232     TestObjectPythonV8Internal::treatReturnedNullStringAsUndefinedStringMethodMethod(info);
7233     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7234 }
7235
7236 static void unforgeableVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
7237 {
7238     TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
7239     imp->unforgeableVoidMethod();
7240 }
7241
7242 static void unforgeableVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
7243 {
7244     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7245     TestObjectPythonV8Internal::unforgeableVoidMethodMethod(info);
7246     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7247 }
7248
7249 } // namespace TestObjectPythonV8Internal
7250
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 */},
7386 };
7387
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)},
7390 };
7391
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},
7553 };
7554
7555 static void configureV8TestObjectPythonTemplate(v8::Handle<v8::FunctionTemplate> functionTemplate, v8::Isolate* isolate, WrapperWorldType currentWorldType)
7556 {
7557     functionTemplate->ReadOnlyPrototype();
7558
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);
7571     }
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);
7577     }
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},
7597     };
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);
7602     }
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));
7635     } else {
7636         if (RuntimeEnabledFeatures::featureNameEnabled())
7637             prototypeTemplate->Set(v8AtomicString(isolate, "perWorldBindingsRuntimeEnabledVoidMethod"), v8::FunctionTemplate::New(isolate, TestObjectPythonV8Internal::perWorldBindingsRuntimeEnabledVoidMethodMethodCallback, v8Undefined(), defaultSignature, 0));
7638     }
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));
7642
7643     // Custom toString template
7644     functionTemplate->Set(v8AtomicString(isolate, "toString"), V8PerIsolateData::current()->toStringTemplate());
7645 }
7646
7647 v8::Handle<v8::FunctionTemplate> V8TestObjectPython::domTemplate(v8::Isolate* isolate, WrapperWorldType currentWorldType)
7648 {
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);
7653
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);
7660 }
7661
7662 bool V8TestObjectPython::hasInstance(v8::Handle<v8::Value> jsValue, v8::Isolate* isolate)
7663 {
7664     return V8PerIsolateData::from(isolate)->hasInstanceInMainWorld(&wrapperTypeInfo, jsValue)
7665         || V8PerIsolateData::from(isolate)->hasInstanceInNonMainWorld(&wrapperTypeInfo, jsValue);
7666 }
7667
7668 void V8TestObjectPython::installPerContextEnabledProperties(v8::Handle<v8::Object> instanceTemplate, TestObjectPython* impl, v8::Isolate* isolate)
7669 {
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);
7675     }
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);
7680     }
7681 }
7682
7683 void V8TestObjectPython::installPerContextEnabledMethods(v8::Handle<v8::Object> prototypeTemplate, v8::Isolate* isolate)
7684 {
7685     v8::Local<v8::Signature> defaultSignature = v8::Signature::New(isolate, domTemplate(isolate, worldType(isolate)));
7686
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());
7690 }
7691
7692 v8::Handle<v8::Object> V8TestObjectPython::createWrapper(PassRefPtr<TestObjectPython> impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
7693 {
7694     ASSERT(impl);
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);
7701     }
7702
7703     v8::Handle<v8::Object> wrapper = V8DOMWrapper::createWrapper(creationContext, &wrapperTypeInfo, toInternalPointer(impl.get()), isolate);
7704     if (UNLIKELY(wrapper.IsEmpty()))
7705         return wrapper;
7706
7707     installPerContextEnabledProperties(wrapper, impl.get(), isolate);
7708     V8DOMWrapper::associateObjectWithWrapper<V8TestObjectPython>(impl, &wrapperTypeInfo, wrapper, isolate, WrapperConfiguration::Independent);
7709     return wrapper;
7710 }
7711
7712 void V8TestObjectPython::derefObject(void* object)
7713 {
7714     fromInternalPointer(object)->deref();
7715 }
7716
7717 template<>
7718 v8::Handle<v8::Value> toV8NoInline(TestObjectPython* impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
7719 {
7720     return toV8(impl, creationContext, isolate);
7721 }
7722
7723 } // namespace WebCore