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

Side by Side Diff: trunk/Source/bindings/tests/results/V8TestObjectPython.cpp

Issue 218813002: Revert 170357 "Revert of Make DOMWrapperWorld::current() return ..." (Closed) Base URL: svn://svn.chromium.org/blink/
Patch Set: Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 // This file has been auto-generated by code_generator_v8.py. DO NOT MODIFY!
6
7 #include "config.h"
8 #include "V8TestObjectPython.h"
9
10 #include "HTMLNames.h"
11 #include "RuntimeEnabledFeatures.h"
12 #include "V8Attr.h"
13 #include "V8Document.h"
14 #include "V8DocumentFragment.h"
15 #include "V8DocumentType.h"
16 #include "V8Element.h"
17 #include "V8EventTarget.h"
18 #include "V8HTMLCollection.h"
19 #include "V8HTMLElement.h"
20 #include "V8Node.h"
21 #include "V8NodeFilter.h"
22 #include "V8ShadowRoot.h"
23 #include "V8TestCallbackInterface.h"
24 #include "V8TestInterface.h"
25 #include "V8TestInterfaceEmpty.h"
26 #include "V8TestInterfacePython.h"
27 #include "V8TestInterfaceWillBeGarbageCollected.h"
28 #include "V8TestNode.h"
29 #include "V8TestObjectA.h"
30 #include "V8Window.h"
31 #include "V8XPathNSResolver.h"
32 #include "bindings/v8/BindingSecurity.h"
33 #include "bindings/v8/Dictionary.h"
34 #include "bindings/v8/ExceptionState.h"
35 #include "bindings/v8/ScriptCallStackFactory.h"
36 #include "bindings/v8/ScriptPromise.h"
37 #include "bindings/v8/ScriptState.h"
38 #include "bindings/v8/ScriptValue.h"
39 #include "bindings/v8/SerializedScriptValue.h"
40 #include "bindings/v8/V8AbstractEventListener.h"
41 #include "bindings/v8/V8DOMActivityLogger.h"
42 #include "bindings/v8/V8DOMConfiguration.h"
43 #include "bindings/v8/V8EventListenerList.h"
44 #include "bindings/v8/V8HiddenValue.h"
45 #include "bindings/v8/V8ObjectConstructor.h"
46 #include "bindings/v8/custom/V8ArrayBufferCustom.h"
47 #include "bindings/v8/custom/V8ArrayBufferViewCustom.h"
48 #include "bindings/v8/custom/V8Float32ArrayCustom.h"
49 #include "bindings/v8/custom/V8Int32ArrayCustom.h"
50 #include "bindings/v8/custom/V8Uint8ArrayCustom.h"
51 #include "core/css/MediaQueryListListener.h"
52 #include "core/dom/ContextFeatures.h"
53 #include "core/dom/Document.h"
54 #include "core/dom/custom/CustomElementCallbackDispatcher.h"
55 #include "core/frame/DOMWindow.h"
56 #include "core/frame/UseCounter.h"
57 #include "core/inspector/ScriptArguments.h"
58 #include "platform/TraceEvent.h"
59 #include "wtf/GetPtr.h"
60 #include "wtf/RefPtr.h"
61
62 namespace WebCore {
63
64 static void initializeScriptWrappableForInterface(TestObjectPython* object)
65 {
66 if (ScriptWrappable::wrapperCanBeStoredInObject(object))
67 ScriptWrappable::setTypeInfoInObject(object, &V8TestObjectPython::wrappe rTypeInfo);
68 else
69 ASSERT_NOT_REACHED();
70 }
71
72 } // namespace WebCore
73
74 void webCoreInitializeScriptWrappableForInterface(WebCore::TestObjectPython* obj ect)
75 {
76 WebCore::initializeScriptWrappableForInterface(object);
77 }
78
79 namespace WebCore {
80 const WrapperTypeInfo V8TestObjectPython::wrapperTypeInfo = { gin::kEmbedderBlin k, V8TestObjectPython::domTemplate, V8TestObjectPython::derefObject, 0, 0, 0, V8 TestObjectPython::installPerContextEnabledMethods, 0, WrapperTypeObjectPrototype , false };
81
82 namespace TestObjectPythonV8Internal {
83
84 template <typename T> void V8_USE(T) { }
85
86 static void readonlyStringAttributeAttributeGetter(const v8::PropertyCallbackInf o<v8::Value>& info)
87 {
88 v8::Handle<v8::Object> holder = info.Holder();
89 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
90 v8SetReturnValueString(info, impl->readonlyStringAttribute(), info.GetIsolat e());
91 }
92
93 static void readonlyStringAttributeAttributeGetterCallback(v8::Local<v8::String> , const v8::PropertyCallbackInfo<v8::Value>& info)
94 {
95 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
96 TestObjectPythonV8Internal::readonlyStringAttributeAttributeGetter(info);
97 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
98 }
99
100 static void readonlyTestInterfaceEmptyAttributeAttributeGetter(const v8::Propert yCallbackInfo<v8::Value>& info)
101 {
102 v8::Handle<v8::Object> holder = info.Holder();
103 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
104 RefPtr<TestInterfaceEmpty> result(impl->readonlyTestInterfaceEmptyAttribute( ));
105 if (result && DOMDataStore::setReturnValueFromWrapper<V8TestInterfaceEmpty>( info.GetReturnValue(), result.get()))
106 return;
107 v8::Handle<v8::Value> wrapper = toV8(result.get(), holder, info.GetIsolate() );
108 if (!wrapper.IsEmpty()) {
109 V8HiddenValue::setHiddenValue(info.GetIsolate(), holder, v8AtomicString( info.GetIsolate(), "readonlyTestInterfaceEmptyAttribute"), wrapper);
110 v8SetReturnValue(info, wrapper);
111 }
112 }
113
114 static void readonlyTestInterfaceEmptyAttributeAttributeGetterCallback(v8::Local <v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
115 {
116 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
117 TestObjectPythonV8Internal::readonlyTestInterfaceEmptyAttributeAttributeGett er(info);
118 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
119 }
120
121 static void readonlyLongAttributeAttributeGetter(const v8::PropertyCallbackInfo< v8::Value>& info)
122 {
123 v8::Handle<v8::Object> holder = info.Holder();
124 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
125 v8SetReturnValueInt(info, impl->readonlyLongAttribute());
126 }
127
128 static void readonlyLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
129 {
130 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
131 TestObjectPythonV8Internal::readonlyLongAttributeAttributeGetter(info);
132 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
133 }
134
135 static void dateAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Valu e>& info)
136 {
137 v8::Handle<v8::Object> holder = info.Holder();
138 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
139 v8SetReturnValue(info, v8DateOrNull(impl->dateAttribute(), info.GetIsolate() ));
140 }
141
142 static void dateAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8 ::PropertyCallbackInfo<v8::Value>& info)
143 {
144 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
145 TestObjectPythonV8Internal::dateAttributeAttributeGetter(info);
146 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
147 }
148
149 static void dateAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8: :PropertyCallbackInfo<void>& info)
150 {
151 v8::Handle<v8::Object> holder = info.Holder();
152 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
153 V8TRYCATCH_VOID(double, cppValue, toCoreDate(v8Value));
154 impl->setDateAttribute(cppValue);
155 }
156
157 static void dateAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Loca l<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
158 {
159 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
160 TestObjectPythonV8Internal::dateAttributeAttributeSetter(v8Value, info);
161 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
162 }
163
164 static void stringAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Va lue>& info)
165 {
166 v8::Handle<v8::Object> holder = info.Holder();
167 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
168 v8SetReturnValueString(info, impl->stringAttribute(), info.GetIsolate());
169 }
170
171 static void stringAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
172 {
173 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
174 TestObjectPythonV8Internal::stringAttributeAttributeGetter(info);
175 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
176 }
177
178 static void stringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v 8::PropertyCallbackInfo<void>& info)
179 {
180 v8::Handle<v8::Object> holder = info.Holder();
181 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
182 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, v8Value);
183 impl->setStringAttribute(cppValue);
184 }
185
186 static void stringAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Lo cal<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
187 {
188 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
189 TestObjectPythonV8Internal::stringAttributeAttributeSetter(v8Value, info);
190 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
191 }
192
193 static void readonlyDOMTimeStampAttributeAttributeGetter(const v8::PropertyCallb ackInfo<v8::Value>& info)
194 {
195 v8::Handle<v8::Object> holder = info.Holder();
196 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
197 v8SetReturnValue(info, static_cast<double>(impl->readonlyDOMTimeStampAttribu te()));
198 }
199
200 static void readonlyDOMTimeStampAttributeAttributeGetterCallback(v8::Local<v8::S tring>, const v8::PropertyCallbackInfo<v8::Value>& info)
201 {
202 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
203 TestObjectPythonV8Internal::readonlyDOMTimeStampAttributeAttributeGetter(inf o);
204 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
205 }
206
207 static void booleanAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::V alue>& info)
208 {
209 v8::Handle<v8::Object> holder = info.Holder();
210 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
211 v8SetReturnValueBool(info, impl->booleanAttribute());
212 }
213
214 static void booleanAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
215 {
216 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
217 TestObjectPythonV8Internal::booleanAttributeAttributeGetter(info);
218 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
219 }
220
221 static void booleanAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
222 {
223 v8::Handle<v8::Object> holder = info.Holder();
224 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
225 V8TRYCATCH_VOID(bool, cppValue, v8Value->BooleanValue());
226 impl->setBooleanAttribute(cppValue);
227 }
228
229 static void booleanAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::L ocal<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
230 {
231 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
232 TestObjectPythonV8Internal::booleanAttributeAttributeSetter(v8Value, info);
233 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
234 }
235
236 static void byteAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Valu e>& info)
237 {
238 v8::Handle<v8::Object> holder = info.Holder();
239 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
240 v8SetReturnValueInt(info, impl->byteAttribute());
241 }
242
243 static void byteAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8 ::PropertyCallbackInfo<v8::Value>& info)
244 {
245 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
246 TestObjectPythonV8Internal::byteAttributeAttributeGetter(info);
247 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
248 }
249
250 static void byteAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8: :PropertyCallbackInfo<void>& info)
251 {
252 v8::Handle<v8::Object> holder = info.Holder();
253 ExceptionState exceptionState(ExceptionState::SetterContext, "byteAttribute" , "TestObjectPython", holder, info.GetIsolate());
254 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
255 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt8(v8Value, exceptionState), ex ceptionState);
256 impl->setByteAttribute(cppValue);
257 }
258
259 static void byteAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Loca l<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
260 {
261 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
262 TestObjectPythonV8Internal::byteAttributeAttributeSetter(v8Value, info);
263 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
264 }
265
266 static void doubleAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Va lue>& info)
267 {
268 v8::Handle<v8::Object> holder = info.Holder();
269 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
270 v8SetReturnValue(info, impl->doubleAttribute());
271 }
272
273 static void doubleAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
274 {
275 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
276 TestObjectPythonV8Internal::doubleAttributeAttributeGetter(info);
277 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
278 }
279
280 static void doubleAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v 8::PropertyCallbackInfo<void>& info)
281 {
282 v8::Handle<v8::Object> holder = info.Holder();
283 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
284 V8TRYCATCH_VOID(double, cppValue, static_cast<double>(v8Value->NumberValue() ));
285 impl->setDoubleAttribute(cppValue);
286 }
287
288 static void doubleAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Lo cal<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
289 {
290 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
291 TestObjectPythonV8Internal::doubleAttributeAttributeSetter(v8Value, info);
292 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
293 }
294
295 static void floatAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Val ue>& info)
296 {
297 v8::Handle<v8::Object> holder = info.Holder();
298 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
299 v8SetReturnValue(info, impl->floatAttribute());
300 }
301
302 static void floatAttributeAttributeGetterCallback(v8::Local<v8::String>, const v 8::PropertyCallbackInfo<v8::Value>& info)
303 {
304 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
305 TestObjectPythonV8Internal::floatAttributeAttributeGetter(info);
306 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
307 }
308
309 static void floatAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8 ::PropertyCallbackInfo<void>& info)
310 {
311 v8::Handle<v8::Object> holder = info.Holder();
312 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
313 V8TRYCATCH_VOID(float, cppValue, static_cast<float>(v8Value->NumberValue())) ;
314 impl->setFloatAttribute(cppValue);
315 }
316
317 static void floatAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Loc al<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
318 {
319 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
320 TestObjectPythonV8Internal::floatAttributeAttributeSetter(v8Value, info);
321 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
322 }
323
324 static void longAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Valu e>& info)
325 {
326 v8::Handle<v8::Object> holder = info.Holder();
327 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
328 v8SetReturnValueInt(info, impl->longAttribute());
329 }
330
331 static void longAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8 ::PropertyCallbackInfo<v8::Value>& info)
332 {
333 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
334 TestObjectPythonV8Internal::longAttributeAttributeGetter(info);
335 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
336 }
337
338 static void longAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8: :PropertyCallbackInfo<void>& info)
339 {
340 v8::Handle<v8::Object> holder = info.Holder();
341 ExceptionState exceptionState(ExceptionState::SetterContext, "longAttribute" , "TestObjectPython", holder, info.GetIsolate());
342 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
343 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e xceptionState);
344 impl->setLongAttribute(cppValue);
345 }
346
347 static void longAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Loca l<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
348 {
349 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
350 TestObjectPythonV8Internal::longAttributeAttributeSetter(v8Value, info);
351 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
352 }
353
354 static void longLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8:: Value>& info)
355 {
356 v8::Handle<v8::Object> holder = info.Holder();
357 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
358 v8SetReturnValue(info, static_cast<double>(impl->longLongAttribute()));
359 }
360
361 static void longLongAttributeAttributeGetterCallback(v8::Local<v8::String>, cons t v8::PropertyCallbackInfo<v8::Value>& info)
362 {
363 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
364 TestObjectPythonV8Internal::longLongAttributeAttributeGetter(info);
365 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
366 }
367
368 static void longLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
369 {
370 v8::Handle<v8::Object> holder = info.Holder();
371 ExceptionState exceptionState(ExceptionState::SetterContext, "longLongAttrib ute", "TestObjectPython", holder, info.GetIsolate());
372 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
373 V8TRYCATCH_EXCEPTION_VOID(long long, cppValue, toInt64(v8Value, exceptionSta te), exceptionState);
374 impl->setLongLongAttribute(cppValue);
375 }
376
377 static void longLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8:: Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
378 {
379 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
380 TestObjectPythonV8Internal::longLongAttributeAttributeSetter(v8Value, info);
381 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
382 }
383
384 static void octetAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Val ue>& info)
385 {
386 v8::Handle<v8::Object> holder = info.Holder();
387 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
388 v8SetReturnValueUnsigned(info, impl->octetAttribute());
389 }
390
391 static void octetAttributeAttributeGetterCallback(v8::Local<v8::String>, const v 8::PropertyCallbackInfo<v8::Value>& info)
392 {
393 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
394 TestObjectPythonV8Internal::octetAttributeAttributeGetter(info);
395 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
396 }
397
398 static void octetAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8 ::PropertyCallbackInfo<void>& info)
399 {
400 v8::Handle<v8::Object> holder = info.Holder();
401 ExceptionState exceptionState(ExceptionState::SetterContext, "octetAttribute ", "TestObjectPython", holder, info.GetIsolate());
402 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
403 V8TRYCATCH_EXCEPTION_VOID(unsigned, cppValue, toUInt8(v8Value, exceptionStat e), exceptionState);
404 impl->setOctetAttribute(cppValue);
405 }
406
407 static void octetAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Loc al<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
408 {
409 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
410 TestObjectPythonV8Internal::octetAttributeAttributeSetter(v8Value, info);
411 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
412 }
413
414 static void shortAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Val ue>& info)
415 {
416 v8::Handle<v8::Object> holder = info.Holder();
417 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
418 v8SetReturnValueInt(info, impl->shortAttribute());
419 }
420
421 static void shortAttributeAttributeGetterCallback(v8::Local<v8::String>, const v 8::PropertyCallbackInfo<v8::Value>& info)
422 {
423 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
424 TestObjectPythonV8Internal::shortAttributeAttributeGetter(info);
425 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
426 }
427
428 static void shortAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8 ::PropertyCallbackInfo<void>& info)
429 {
430 v8::Handle<v8::Object> holder = info.Holder();
431 ExceptionState exceptionState(ExceptionState::SetterContext, "shortAttribute ", "TestObjectPython", holder, info.GetIsolate());
432 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
433 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt16(v8Value, exceptionState), e xceptionState);
434 impl->setShortAttribute(cppValue);
435 }
436
437 static void shortAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Loc al<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
438 {
439 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
440 TestObjectPythonV8Internal::shortAttributeAttributeSetter(v8Value, info);
441 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
442 }
443
444 static void unsignedLongAttributeAttributeGetter(const v8::PropertyCallbackInfo< v8::Value>& info)
445 {
446 v8::Handle<v8::Object> holder = info.Holder();
447 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
448 v8SetReturnValueUnsigned(info, impl->unsignedLongAttribute());
449 }
450
451 static void unsignedLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
452 {
453 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
454 TestObjectPythonV8Internal::unsignedLongAttributeAttributeGetter(info);
455 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
456 }
457
458 static void unsignedLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c onst v8::PropertyCallbackInfo<void>& info)
459 {
460 v8::Handle<v8::Object> holder = info.Holder();
461 ExceptionState exceptionState(ExceptionState::SetterContext, "unsignedLongAt tribute", "TestObjectPython", holder, info.GetIsolate());
462 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
463 V8TRYCATCH_EXCEPTION_VOID(unsigned, cppValue, toUInt32(v8Value, exceptionSta te), exceptionState);
464 impl->setUnsignedLongAttribute(cppValue);
465 }
466
467 static void unsignedLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
468 {
469 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
470 TestObjectPythonV8Internal::unsignedLongAttributeAttributeSetter(v8Value, in fo);
471 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
472 }
473
474 static void unsignedLongLongAttributeAttributeGetter(const v8::PropertyCallbackI nfo<v8::Value>& info)
475 {
476 v8::Handle<v8::Object> holder = info.Holder();
477 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
478 v8SetReturnValue(info, static_cast<double>(impl->unsignedLongLongAttribute() ));
479 }
480
481 static void unsignedLongLongAttributeAttributeGetterCallback(v8::Local<v8::Strin g>, const v8::PropertyCallbackInfo<v8::Value>& info)
482 {
483 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
484 TestObjectPythonV8Internal::unsignedLongLongAttributeAttributeGetter(info);
485 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
486 }
487
488 static void unsignedLongLongAttributeAttributeSetter(v8::Local<v8::Value> v8Valu e, const v8::PropertyCallbackInfo<void>& info)
489 {
490 v8::Handle<v8::Object> holder = info.Holder();
491 ExceptionState exceptionState(ExceptionState::SetterContext, "unsignedLongLo ngAttribute", "TestObjectPython", holder, info.GetIsolate());
492 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
493 V8TRYCATCH_EXCEPTION_VOID(unsigned long long, cppValue, toUInt64(v8Value, ex ceptionState), exceptionState);
494 impl->setUnsignedLongLongAttribute(cppValue);
495 }
496
497 static void unsignedLongLongAttributeAttributeSetterCallback(v8::Local<v8::Strin g>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
498 {
499 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
500 TestObjectPythonV8Internal::unsignedLongLongAttributeAttributeSetter(v8Value , info);
501 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
502 }
503
504 static void unsignedShortAttributeAttributeGetter(const v8::PropertyCallbackInfo <v8::Value>& info)
505 {
506 v8::Handle<v8::Object> holder = info.Holder();
507 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
508 v8SetReturnValueUnsigned(info, impl->unsignedShortAttribute());
509 }
510
511 static void unsignedShortAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
512 {
513 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
514 TestObjectPythonV8Internal::unsignedShortAttributeAttributeGetter(info);
515 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
516 }
517
518 static void unsignedShortAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
519 {
520 v8::Handle<v8::Object> holder = info.Holder();
521 ExceptionState exceptionState(ExceptionState::SetterContext, "unsignedShortA ttribute", "TestObjectPython", holder, info.GetIsolate());
522 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
523 V8TRYCATCH_EXCEPTION_VOID(unsigned, cppValue, toUInt16(v8Value, exceptionSta te), exceptionState);
524 impl->setUnsignedShortAttribute(cppValue);
525 }
526
527 static void unsignedShortAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
528 {
529 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
530 TestObjectPythonV8Internal::unsignedShortAttributeAttributeSetter(v8Value, i nfo);
531 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
532 }
533
534 static void testInterfaceEmptyAttributeAttributeGetter(const v8::PropertyCallbac kInfo<v8::Value>& info)
535 {
536 v8::Handle<v8::Object> holder = info.Holder();
537 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
538 v8SetReturnValueFast(info, WTF::getPtr(impl->testInterfaceEmptyAttribute()), impl);
539 }
540
541 static void testInterfaceEmptyAttributeAttributeGetterCallback(v8::Local<v8::Str ing>, const v8::PropertyCallbackInfo<v8::Value>& info)
542 {
543 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
544 TestObjectPythonV8Internal::testInterfaceEmptyAttributeAttributeGetter(info) ;
545 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
546 }
547
548 static void testInterfaceEmptyAttributeAttributeSetter(v8::Local<v8::Value> v8Va lue, const v8::PropertyCallbackInfo<void>& info)
549 {
550 v8::Handle<v8::Object> holder = info.Holder();
551 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
552 V8TRYCATCH_VOID(TestInterfaceEmpty*, cppValue, V8TestInterfaceEmpty::toNativ eWithTypeCheck(info.GetIsolate(), v8Value));
553 impl->setTestInterfaceEmptyAttribute(WTF::getPtr(cppValue));
554 }
555
556 static void testInterfaceEmptyAttributeAttributeSetterCallback(v8::Local<v8::Str ing>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
557 {
558 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
559 TestObjectPythonV8Internal::testInterfaceEmptyAttributeAttributeSetter(v8Val ue, info);
560 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
561 }
562
563 static void testObjectPythonAttributeAttributeGetter(const v8::PropertyCallbackI nfo<v8::Value>& info)
564 {
565 v8::Handle<v8::Object> holder = info.Holder();
566 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
567 v8SetReturnValueFast(info, WTF::getPtr(impl->testObjectPythonAttribute()), i mpl);
568 }
569
570 static void testObjectPythonAttributeAttributeGetterCallback(v8::Local<v8::Strin g>, const v8::PropertyCallbackInfo<v8::Value>& info)
571 {
572 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
573 TestObjectPythonV8Internal::testObjectPythonAttributeAttributeGetter(info);
574 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
575 }
576
577 static void testObjectPythonAttributeAttributeSetter(v8::Local<v8::Value> v8Valu e, const v8::PropertyCallbackInfo<void>& info)
578 {
579 v8::Handle<v8::Object> holder = info.Holder();
580 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
581 V8TRYCATCH_VOID(TestObjectPython*, cppValue, V8TestObjectPython::toNativeWit hTypeCheck(info.GetIsolate(), v8Value));
582 impl->setTestObjectPythonAttribute(WTF::getPtr(cppValue));
583 }
584
585 static void testObjectPythonAttributeAttributeSetterCallback(v8::Local<v8::Strin g>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
586 {
587 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
588 TestObjectPythonV8Internal::testObjectPythonAttributeAttributeSetter(v8Value , info);
589 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
590 }
591
592 static void voidCallbackFunctionAttributeAttributeGetter(const v8::PropertyCallb ackInfo<v8::Value>& info)
593 {
594 v8::Handle<v8::Object> holder = info.Holder();
595 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
596 v8SetReturnValue(info, impl->voidCallbackFunctionAttribute().v8Value());
597 }
598
599 static void voidCallbackFunctionAttributeAttributeGetterCallback(v8::Local<v8::S tring>, const v8::PropertyCallbackInfo<v8::Value>& info)
600 {
601 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
602 TestObjectPythonV8Internal::voidCallbackFunctionAttributeAttributeGetter(inf o);
603 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
604 }
605
606 static void voidCallbackFunctionAttributeAttributeSetter(v8::Local<v8::Value> v8 Value, const v8::PropertyCallbackInfo<void>& info)
607 {
608 v8::Handle<v8::Object> holder = info.Holder();
609 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
610 V8TRYCATCH_VOID(ScriptValue, cppValue, ScriptValue(v8Value, info.GetIsolate( )));
611 impl->setVoidCallbackFunctionAttribute(cppValue);
612 }
613
614 static void voidCallbackFunctionAttributeAttributeSetterCallback(v8::Local<v8::S tring>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info )
615 {
616 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
617 TestObjectPythonV8Internal::voidCallbackFunctionAttributeAttributeSetter(v8V alue, info);
618 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
619 }
620
621 static void anyCallbackFunctionOptionalAnyArgAttributeAttributeGetter(const v8:: PropertyCallbackInfo<v8::Value>& info)
622 {
623 v8::Handle<v8::Object> holder = info.Holder();
624 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
625 v8SetReturnValue(info, impl->anyCallbackFunctionOptionalAnyArgAttribute().v8 Value());
626 }
627
628 static void anyCallbackFunctionOptionalAnyArgAttributeAttributeGetterCallback(v8 ::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
629 {
630 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
631 TestObjectPythonV8Internal::anyCallbackFunctionOptionalAnyArgAttributeAttrib uteGetter(info);
632 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
633 }
634
635 static void anyCallbackFunctionOptionalAnyArgAttributeAttributeSetter(v8::Local< v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
636 {
637 v8::Handle<v8::Object> holder = info.Holder();
638 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
639 V8TRYCATCH_VOID(ScriptValue, cppValue, ScriptValue(v8Value, info.GetIsolate( )));
640 impl->setAnyCallbackFunctionOptionalAnyArgAttribute(cppValue);
641 }
642
643 static void anyCallbackFunctionOptionalAnyArgAttributeAttributeSetterCallback(v8 ::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInf o<void>& info)
644 {
645 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
646 TestObjectPythonV8Internal::anyCallbackFunctionOptionalAnyArgAttributeAttrib uteSetter(v8Value, info);
647 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
648 }
649
650 static void cssAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value >& info)
651 {
652 v8::Handle<v8::Object> holder = info.Holder();
653 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
654 v8SetReturnValueInt(info, impl->cssAttribute());
655 }
656
657 static void cssAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8: :PropertyCallbackInfo<v8::Value>& info)
658 {
659 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
660 TestObjectPythonV8Internal::cssAttributeAttributeGetter(info);
661 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
662 }
663
664 static void cssAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8:: PropertyCallbackInfo<void>& info)
665 {
666 v8::Handle<v8::Object> holder = info.Holder();
667 ExceptionState exceptionState(ExceptionState::SetterContext, "cssAttribute", "TestObjectPython", holder, info.GetIsolate());
668 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
669 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e xceptionState);
670 impl->setCSSAttribute(cppValue);
671 }
672
673 static void cssAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local <v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
674 {
675 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
676 TestObjectPythonV8Internal::cssAttributeAttributeSetter(v8Value, info);
677 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
678 }
679
680 static void imeAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value >& info)
681 {
682 v8::Handle<v8::Object> holder = info.Holder();
683 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
684 v8SetReturnValueInt(info, impl->imeAttribute());
685 }
686
687 static void imeAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8: :PropertyCallbackInfo<v8::Value>& info)
688 {
689 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
690 TestObjectPythonV8Internal::imeAttributeAttributeGetter(info);
691 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
692 }
693
694 static void imeAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8:: PropertyCallbackInfo<void>& info)
695 {
696 v8::Handle<v8::Object> holder = info.Holder();
697 ExceptionState exceptionState(ExceptionState::SetterContext, "imeAttribute", "TestObjectPython", holder, info.GetIsolate());
698 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
699 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e xceptionState);
700 impl->setIMEAttribute(cppValue);
701 }
702
703 static void imeAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local <v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
704 {
705 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
706 TestObjectPythonV8Internal::imeAttributeAttributeSetter(v8Value, info);
707 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
708 }
709
710 static void svgAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value >& info)
711 {
712 v8::Handle<v8::Object> holder = info.Holder();
713 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
714 v8SetReturnValueInt(info, impl->svgAttribute());
715 }
716
717 static void svgAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8: :PropertyCallbackInfo<v8::Value>& info)
718 {
719 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
720 TestObjectPythonV8Internal::svgAttributeAttributeGetter(info);
721 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
722 }
723
724 static void svgAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8:: PropertyCallbackInfo<void>& info)
725 {
726 v8::Handle<v8::Object> holder = info.Holder();
727 ExceptionState exceptionState(ExceptionState::SetterContext, "svgAttribute", "TestObjectPython", holder, info.GetIsolate());
728 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
729 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e xceptionState);
730 impl->setSVGAttribute(cppValue);
731 }
732
733 static void svgAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local <v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
734 {
735 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
736 TestObjectPythonV8Internal::svgAttributeAttributeSetter(v8Value, info);
737 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
738 }
739
740 static void xmlAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value >& info)
741 {
742 v8::Handle<v8::Object> holder = info.Holder();
743 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
744 v8SetReturnValueInt(info, impl->xmlAttribute());
745 }
746
747 static void xmlAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8: :PropertyCallbackInfo<v8::Value>& info)
748 {
749 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
750 TestObjectPythonV8Internal::xmlAttributeAttributeGetter(info);
751 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
752 }
753
754 static void xmlAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8:: PropertyCallbackInfo<void>& info)
755 {
756 v8::Handle<v8::Object> holder = info.Holder();
757 ExceptionState exceptionState(ExceptionState::SetterContext, "xmlAttribute", "TestObjectPython", holder, info.GetIsolate());
758 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
759 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e xceptionState);
760 impl->setXMLAttribute(cppValue);
761 }
762
763 static void xmlAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local <v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
764 {
765 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
766 TestObjectPythonV8Internal::xmlAttributeAttributeSetter(v8Value, info);
767 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
768 }
769
770 static void nodeFilterAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8 ::Value>& info)
771 {
772 v8::Handle<v8::Object> holder = info.Holder();
773 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
774 v8SetReturnValueFast(info, WTF::getPtr(impl->nodeFilterAttribute()), impl);
775 }
776
777 static void nodeFilterAttributeAttributeGetterCallback(v8::Local<v8::String>, co nst v8::PropertyCallbackInfo<v8::Value>& info)
778 {
779 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
780 TestObjectPythonV8Internal::nodeFilterAttributeAttributeGetter(info);
781 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
782 }
783
784 static void nodeFilterAttributeAttributeSetter(v8::Local<v8::Value> v8Value, con st v8::PropertyCallbackInfo<void>& info)
785 {
786 v8::Handle<v8::Object> holder = info.Holder();
787 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
788 V8TRYCATCH_VOID(RefPtr<NodeFilter>, cppValue, toNodeFilter(v8Value, info.Get Isolate()));
789 impl->setNodeFilterAttribute(WTF::getPtr(cppValue));
790 }
791
792 static void nodeFilterAttributeAttributeSetterCallback(v8::Local<v8::String>, v8 ::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
793 {
794 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
795 TestObjectPythonV8Internal::nodeFilterAttributeAttributeSetter(v8Value, info );
796 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
797 }
798
799 static void serializedScriptValueAttributeAttributeGetter(const v8::PropertyCall backInfo<v8::Value>& info)
800 {
801 v8::Handle<v8::Object> holder = info.Holder();
802 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
803 v8SetReturnValue(info, impl->serializedScriptValueAttribute() ? impl->serial izedScriptValueAttribute()->deserialize() : v8::Handle<v8::Value>(v8::Null(info. GetIsolate())));
804 }
805
806 static void serializedScriptValueAttributeAttributeGetterCallback(v8::Local<v8:: String>, const v8::PropertyCallbackInfo<v8::Value>& info)
807 {
808 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
809 TestObjectPythonV8Internal::serializedScriptValueAttributeAttributeGetter(in fo);
810 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
811 }
812
813 static void serializedScriptValueAttributeAttributeSetter(v8::Local<v8::Value> v 8Value, const v8::PropertyCallbackInfo<void>& info)
814 {
815 v8::Handle<v8::Object> holder = info.Holder();
816 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
817 V8TRYCATCH_VOID(RefPtr<SerializedScriptValue>, cppValue, SerializedScriptVal ue::create(v8Value, info.GetIsolate()));
818 impl->setSerializedScriptValueAttribute(WTF::getPtr(cppValue));
819 }
820
821 static void serializedScriptValueAttributeAttributeSetterCallback(v8::Local<v8:: String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& inf o)
822 {
823 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
824 TestObjectPythonV8Internal::serializedScriptValueAttributeAttributeSetter(v8 Value, info);
825 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
826 }
827
828 static void anyAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value >& info)
829 {
830 v8::Handle<v8::Object> holder = info.Holder();
831 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
832 v8SetReturnValue(info, impl->anyAttribute().v8Value());
833 }
834
835 static void anyAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8: :PropertyCallbackInfo<v8::Value>& info)
836 {
837 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
838 TestObjectPythonV8Internal::anyAttributeAttributeGetter(info);
839 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
840 }
841
842 static void anyAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8:: PropertyCallbackInfo<void>& info)
843 {
844 v8::Handle<v8::Object> holder = info.Holder();
845 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
846 V8TRYCATCH_VOID(ScriptValue, cppValue, ScriptValue(v8Value, info.GetIsolate( )));
847 impl->setAnyAttribute(cppValue);
848 }
849
850 static void anyAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local <v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
851 {
852 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
853 TestObjectPythonV8Internal::anyAttributeAttributeSetter(v8Value, info);
854 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
855 }
856
857 static void promiseAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::V alue>& info)
858 {
859 v8::Handle<v8::Object> holder = info.Holder();
860 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
861 v8SetReturnValue(info, impl->promiseAttribute().v8Value());
862 }
863
864 static void promiseAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
865 {
866 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
867 TestObjectPythonV8Internal::promiseAttributeAttributeGetter(info);
868 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
869 }
870
871 static void promiseAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
872 {
873 v8::Handle<v8::Object> holder = info.Holder();
874 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
875 V8TRYCATCH_VOID(ScriptPromise, cppValue, ScriptPromise(v8Value, info.GetIsol ate()));
876 impl->setPromiseAttribute(cppValue);
877 }
878
879 static void promiseAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::L ocal<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
880 {
881 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
882 TestObjectPythonV8Internal::promiseAttributeAttributeSetter(v8Value, info);
883 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
884 }
885
886 static void windowAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Va lue>& info)
887 {
888 v8::Handle<v8::Object> holder = info.Holder();
889 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
890 v8SetReturnValueFast(info, WTF::getPtr(impl->windowAttribute()), impl);
891 }
892
893 static void windowAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
894 {
895 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
896 TestObjectPythonV8Internal::windowAttributeAttributeGetter(info);
897 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
898 }
899
900 static void windowAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v 8::PropertyCallbackInfo<void>& info)
901 {
902 v8::Handle<v8::Object> holder = info.Holder();
903 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
904 V8TRYCATCH_VOID(DOMWindow*, cppValue, toDOMWindow(v8Value, info.GetIsolate() ));
905 impl->setWindowAttribute(WTF::getPtr(cppValue));
906 }
907
908 static void windowAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Lo cal<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
909 {
910 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
911 TestObjectPythonV8Internal::windowAttributeAttributeSetter(v8Value, info);
912 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
913 }
914
915 static void documentAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8:: Value>& info)
916 {
917 v8::Handle<v8::Object> holder = info.Holder();
918 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
919 v8SetReturnValueFast(info, WTF::getPtr(impl->documentAttribute()), impl);
920 }
921
922 static void documentAttributeAttributeGetterCallback(v8::Local<v8::String>, cons t v8::PropertyCallbackInfo<v8::Value>& info)
923 {
924 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
925 TestObjectPythonV8Internal::documentAttributeAttributeGetter(info);
926 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
927 }
928
929 static void documentAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
930 {
931 v8::Handle<v8::Object> holder = info.Holder();
932 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
933 V8TRYCATCH_VOID(Document*, cppValue, V8Document::toNativeWithTypeCheck(info. GetIsolate(), v8Value));
934 impl->setDocumentAttribute(WTF::getPtr(cppValue));
935 }
936
937 static void documentAttributeAttributeSetterCallback(v8::Local<v8::String>, v8:: Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
938 {
939 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
940 TestObjectPythonV8Internal::documentAttributeAttributeSetter(v8Value, info);
941 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
942 }
943
944 static void documentFragmentAttributeAttributeGetter(const v8::PropertyCallbackI nfo<v8::Value>& info)
945 {
946 v8::Handle<v8::Object> holder = info.Holder();
947 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
948 v8SetReturnValueFast(info, WTF::getPtr(impl->documentFragmentAttribute()), i mpl);
949 }
950
951 static void documentFragmentAttributeAttributeGetterCallback(v8::Local<v8::Strin g>, const v8::PropertyCallbackInfo<v8::Value>& info)
952 {
953 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
954 TestObjectPythonV8Internal::documentFragmentAttributeAttributeGetter(info);
955 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
956 }
957
958 static void documentFragmentAttributeAttributeSetter(v8::Local<v8::Value> v8Valu e, const v8::PropertyCallbackInfo<void>& info)
959 {
960 v8::Handle<v8::Object> holder = info.Holder();
961 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
962 V8TRYCATCH_VOID(DocumentFragment*, cppValue, V8DocumentFragment::toNativeWit hTypeCheck(info.GetIsolate(), v8Value));
963 impl->setDocumentFragmentAttribute(WTF::getPtr(cppValue));
964 }
965
966 static void documentFragmentAttributeAttributeSetterCallback(v8::Local<v8::Strin g>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
967 {
968 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
969 TestObjectPythonV8Internal::documentFragmentAttributeAttributeSetter(v8Value , info);
970 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
971 }
972
973 static void documentTypeAttributeAttributeGetter(const v8::PropertyCallbackInfo< v8::Value>& info)
974 {
975 v8::Handle<v8::Object> holder = info.Holder();
976 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
977 v8SetReturnValueFast(info, WTF::getPtr(impl->documentTypeAttribute()), impl) ;
978 }
979
980 static void documentTypeAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
981 {
982 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
983 TestObjectPythonV8Internal::documentTypeAttributeAttributeGetter(info);
984 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
985 }
986
987 static void documentTypeAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c onst v8::PropertyCallbackInfo<void>& info)
988 {
989 v8::Handle<v8::Object> holder = info.Holder();
990 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
991 V8TRYCATCH_VOID(DocumentType*, cppValue, V8DocumentType::toNativeWithTypeChe ck(info.GetIsolate(), v8Value));
992 impl->setDocumentTypeAttribute(WTF::getPtr(cppValue));
993 }
994
995 static void documentTypeAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
996 {
997 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
998 TestObjectPythonV8Internal::documentTypeAttributeAttributeSetter(v8Value, in fo);
999 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1000 }
1001
1002 static void elementAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::V alue>& info)
1003 {
1004 v8::Handle<v8::Object> holder = info.Holder();
1005 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
1006 v8SetReturnValueFast(info, WTF::getPtr(impl->elementAttribute()), impl);
1007 }
1008
1009 static void elementAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1010 {
1011 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1012 TestObjectPythonV8Internal::elementAttributeAttributeGetter(info);
1013 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1014 }
1015
1016 static void elementAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
1017 {
1018 v8::Handle<v8::Object> holder = info.Holder();
1019 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
1020 V8TRYCATCH_VOID(Element*, cppValue, V8Element::toNativeWithTypeCheck(info.Ge tIsolate(), v8Value));
1021 impl->setElementAttribute(WTF::getPtr(cppValue));
1022 }
1023
1024 static void elementAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::L ocal<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
1025 {
1026 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1027 TestObjectPythonV8Internal::elementAttributeAttributeSetter(v8Value, info);
1028 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1029 }
1030
1031 static void nodeAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Valu e>& info)
1032 {
1033 v8::Handle<v8::Object> holder = info.Holder();
1034 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
1035 v8SetReturnValueFast(info, WTF::getPtr(impl->nodeAttribute()), impl);
1036 }
1037
1038 static void nodeAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8 ::PropertyCallbackInfo<v8::Value>& info)
1039 {
1040 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1041 TestObjectPythonV8Internal::nodeAttributeAttributeGetter(info);
1042 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1043 }
1044
1045 static void nodeAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8: :PropertyCallbackInfo<void>& info)
1046 {
1047 v8::Handle<v8::Object> holder = info.Holder();
1048 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
1049 V8TRYCATCH_VOID(Node*, cppValue, V8Node::toNativeWithTypeCheck(info.GetIsola te(), v8Value));
1050 impl->setNodeAttribute(WTF::getPtr(cppValue));
1051 }
1052
1053 static void nodeAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Loca l<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
1054 {
1055 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1056 TestObjectPythonV8Internal::nodeAttributeAttributeSetter(v8Value, info);
1057 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1058 }
1059
1060 static void shadowRootAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8 ::Value>& info)
1061 {
1062 v8::Handle<v8::Object> holder = info.Holder();
1063 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
1064 v8SetReturnValueFast(info, WTF::getPtr(impl->shadowRootAttribute()), impl);
1065 }
1066
1067 static void shadowRootAttributeAttributeGetterCallback(v8::Local<v8::String>, co nst v8::PropertyCallbackInfo<v8::Value>& info)
1068 {
1069 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1070 TestObjectPythonV8Internal::shadowRootAttributeAttributeGetter(info);
1071 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1072 }
1073
1074 static void shadowRootAttributeAttributeSetter(v8::Local<v8::Value> v8Value, con st v8::PropertyCallbackInfo<void>& info)
1075 {
1076 v8::Handle<v8::Object> holder = info.Holder();
1077 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
1078 V8TRYCATCH_VOID(ShadowRoot*, cppValue, V8ShadowRoot::toNativeWithTypeCheck(i nfo.GetIsolate(), v8Value));
1079 impl->setShadowRootAttribute(WTF::getPtr(cppValue));
1080 }
1081
1082 static void shadowRootAttributeAttributeSetterCallback(v8::Local<v8::String>, v8 ::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
1083 {
1084 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1085 TestObjectPythonV8Internal::shadowRootAttributeAttributeSetter(v8Value, info );
1086 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1087 }
1088
1089 static void arrayBufferAttributeAttributeGetter(const v8::PropertyCallbackInfo<v 8::Value>& info)
1090 {
1091 v8::Handle<v8::Object> holder = info.Holder();
1092 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
1093 v8SetReturnValueFast(info, WTF::getPtr(impl->arrayBufferAttribute()), impl);
1094 }
1095
1096 static void arrayBufferAttributeAttributeGetterCallback(v8::Local<v8::String>, c onst v8::PropertyCallbackInfo<v8::Value>& info)
1097 {
1098 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1099 TestObjectPythonV8Internal::arrayBufferAttributeAttributeGetter(info);
1100 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1101 }
1102
1103 static void arrayBufferAttributeAttributeSetter(v8::Local<v8::Value> v8Value, co nst v8::PropertyCallbackInfo<void>& info)
1104 {
1105 v8::Handle<v8::Object> holder = info.Holder();
1106 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
1107 V8TRYCATCH_VOID(ArrayBuffer*, cppValue, v8Value->IsArrayBuffer() ? V8ArrayBu ffer::toNative(v8::Handle<v8::ArrayBuffer>::Cast(v8Value)) : 0);
1108 impl->setArrayBufferAttribute(WTF::getPtr(cppValue));
1109 }
1110
1111 static void arrayBufferAttributeAttributeSetterCallback(v8::Local<v8::String>, v 8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
1112 {
1113 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1114 TestObjectPythonV8Internal::arrayBufferAttributeAttributeSetter(v8Value, inf o);
1115 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1116 }
1117
1118 static void float32ArrayAttributeAttributeGetter(const v8::PropertyCallbackInfo< v8::Value>& info)
1119 {
1120 v8::Handle<v8::Object> holder = info.Holder();
1121 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
1122 v8SetReturnValueFast(info, WTF::getPtr(impl->float32ArrayAttribute()), impl) ;
1123 }
1124
1125 static void float32ArrayAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1126 {
1127 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1128 TestObjectPythonV8Internal::float32ArrayAttributeAttributeGetter(info);
1129 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1130 }
1131
1132 static void float32ArrayAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c onst v8::PropertyCallbackInfo<void>& info)
1133 {
1134 v8::Handle<v8::Object> holder = info.Holder();
1135 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
1136 V8TRYCATCH_VOID(Float32Array*, cppValue, v8Value->IsFloat32Array() ? V8Float 32Array::toNative(v8::Handle<v8::Float32Array>::Cast(v8Value)) : 0);
1137 impl->setFloat32ArrayAttribute(WTF::getPtr(cppValue));
1138 }
1139
1140 static void float32ArrayAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
1141 {
1142 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1143 TestObjectPythonV8Internal::float32ArrayAttributeAttributeSetter(v8Value, in fo);
1144 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1145 }
1146
1147 static void uint8ArrayAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8 ::Value>& info)
1148 {
1149 v8::Handle<v8::Object> holder = info.Holder();
1150 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
1151 v8SetReturnValueFast(info, WTF::getPtr(impl->uint8ArrayAttribute()), impl);
1152 }
1153
1154 static void uint8ArrayAttributeAttributeGetterCallback(v8::Local<v8::String>, co nst v8::PropertyCallbackInfo<v8::Value>& info)
1155 {
1156 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1157 TestObjectPythonV8Internal::uint8ArrayAttributeAttributeGetter(info);
1158 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1159 }
1160
1161 static void uint8ArrayAttributeAttributeSetter(v8::Local<v8::Value> v8Value, con st v8::PropertyCallbackInfo<void>& info)
1162 {
1163 v8::Handle<v8::Object> holder = info.Holder();
1164 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
1165 V8TRYCATCH_VOID(Uint8Array*, cppValue, v8Value->IsUint8Array() ? V8Uint8Arra y::toNative(v8::Handle<v8::Uint8Array>::Cast(v8Value)) : 0);
1166 impl->setUint8ArrayAttribute(WTF::getPtr(cppValue));
1167 }
1168
1169 static void uint8ArrayAttributeAttributeSetterCallback(v8::Local<v8::String>, v8 ::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
1170 {
1171 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1172 TestObjectPythonV8Internal::uint8ArrayAttributeAttributeSetter(v8Value, info );
1173 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1174 }
1175
1176 static void selfAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
1177 {
1178 v8::Handle<v8::Object> holder = info.Holder();
1179 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
1180 v8SetReturnValueFast(info, WTF::getPtr(impl->self()), impl);
1181 }
1182
1183 static void selfAttributeGetterCallback(v8::Local<v8::String>, const v8::Propert yCallbackInfo<v8::Value>& info)
1184 {
1185 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1186 TestObjectPythonV8Internal::selfAttributeGetter(info);
1187 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1188 }
1189
1190 static void readonlyEventTargetAttributeAttributeGetter(const v8::PropertyCallba ckInfo<v8::Value>& info)
1191 {
1192 v8::Handle<v8::Object> holder = info.Holder();
1193 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
1194 v8SetReturnValueFast(info, WTF::getPtr(impl->readonlyEventTargetAttribute()) , impl);
1195 }
1196
1197 static void readonlyEventTargetAttributeAttributeGetterCallback(v8::Local<v8::St ring>, const v8::PropertyCallbackInfo<v8::Value>& info)
1198 {
1199 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1200 TestObjectPythonV8Internal::readonlyEventTargetAttributeAttributeGetter(info );
1201 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1202 }
1203
1204 static void readonlyEventTargetOrNullAttributeAttributeGetter(const v8::Property CallbackInfo<v8::Value>& info)
1205 {
1206 v8::Handle<v8::Object> holder = info.Holder();
1207 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
1208 bool isNull = false;
1209 RefPtr<EventTarget> v8Value = impl->readonlyEventTargetOrNullAttribute(isNul l);
1210 if (isNull) {
1211 v8SetReturnValueNull(info);
1212 return;
1213 }
1214 v8SetReturnValueFast(info, WTF::getPtr(v8Value.release()), impl);
1215 }
1216
1217 static void readonlyEventTargetOrNullAttributeAttributeGetterCallback(v8::Local< v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1218 {
1219 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1220 TestObjectPythonV8Internal::readonlyEventTargetOrNullAttributeAttributeGette r(info);
1221 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1222 }
1223
1224 static void readonlyWindowAttributeAttributeGetter(const v8::PropertyCallbackInf o<v8::Value>& info)
1225 {
1226 v8::Handle<v8::Object> holder = info.Holder();
1227 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
1228 v8SetReturnValueFast(info, WTF::getPtr(impl->readonlyWindowAttribute()), imp l);
1229 }
1230
1231 static void readonlyWindowAttributeAttributeGetterCallback(v8::Local<v8::String> , const v8::PropertyCallbackInfo<v8::Value>& info)
1232 {
1233 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1234 TestObjectPythonV8Internal::readonlyWindowAttributeAttributeGetter(info);
1235 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1236 }
1237
1238 static void htmlCollectionAttributeAttributeGetter(const v8::PropertyCallbackInf o<v8::Value>& info)
1239 {
1240 v8::Handle<v8::Object> holder = info.Holder();
1241 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
1242 v8SetReturnValueFast(info, WTF::getPtr(impl->htmlCollectionAttribute()), imp l);
1243 }
1244
1245 static void htmlCollectionAttributeAttributeGetterCallback(v8::Local<v8::String> , const v8::PropertyCallbackInfo<v8::Value>& info)
1246 {
1247 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1248 TestObjectPythonV8Internal::htmlCollectionAttributeAttributeGetter(info);
1249 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1250 }
1251
1252 static void htmlElementAttributeAttributeGetter(const v8::PropertyCallbackInfo<v 8::Value>& info)
1253 {
1254 v8::Handle<v8::Object> holder = info.Holder();
1255 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
1256 v8SetReturnValueFast(info, WTF::getPtr(impl->htmlElementAttribute()), impl);
1257 }
1258
1259 static void htmlElementAttributeAttributeGetterCallback(v8::Local<v8::String>, c onst v8::PropertyCallbackInfo<v8::Value>& info)
1260 {
1261 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1262 TestObjectPythonV8Internal::htmlElementAttributeAttributeGetter(info);
1263 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1264 }
1265
1266 static void stringArrayAttributeAttributeGetter(const v8::PropertyCallbackInfo<v 8::Value>& info)
1267 {
1268 v8::Handle<v8::Object> holder = info.Holder();
1269 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
1270 v8SetReturnValue(info, v8Array(impl->stringArrayAttribute(), info.GetIsolate ()));
1271 }
1272
1273 static void stringArrayAttributeAttributeGetterCallback(v8::Local<v8::String>, c onst v8::PropertyCallbackInfo<v8::Value>& info)
1274 {
1275 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1276 TestObjectPythonV8Internal::stringArrayAttributeAttributeGetter(info);
1277 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1278 }
1279
1280 static void stringArrayAttributeAttributeSetter(v8::Local<v8::Value> v8Value, co nst v8::PropertyCallbackInfo<void>& info)
1281 {
1282 v8::Handle<v8::Object> holder = info.Holder();
1283 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
1284 V8TRYCATCH_VOID(Vector<String>, cppValue, toNativeArray<String>(v8Value, 0, info.GetIsolate()));
1285 impl->setStringArrayAttribute(cppValue);
1286 }
1287
1288 static void stringArrayAttributeAttributeSetterCallback(v8::Local<v8::String>, v 8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
1289 {
1290 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1291 TestObjectPythonV8Internal::stringArrayAttributeAttributeSetter(v8Value, inf o);
1292 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1293 }
1294
1295 static void testInterfaceEmptyArrayAttributeAttributeGetter(const v8::PropertyCa llbackInfo<v8::Value>& info)
1296 {
1297 v8::Handle<v8::Object> holder = info.Holder();
1298 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
1299 v8SetReturnValue(info, v8Array(impl->testInterfaceEmptyArrayAttribute(), inf o.GetIsolate()));
1300 }
1301
1302 static void testInterfaceEmptyArrayAttributeAttributeGetterCallback(v8::Local<v8 ::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1303 {
1304 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1305 TestObjectPythonV8Internal::testInterfaceEmptyArrayAttributeAttributeGetter( info);
1306 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1307 }
1308
1309 static void testInterfaceEmptyArrayAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
1310 {
1311 v8::Handle<v8::Object> holder = info.Holder();
1312 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
1313 V8TRYCATCH_VOID(Vector<RefPtr<TestInterfaceEmpty> >, cppValue, (toRefPtrNati veArray<TestInterfaceEmpty, V8TestInterfaceEmpty>(v8Value, 0, info.GetIsolate()) ));
1314 impl->setTestInterfaceEmptyArrayAttribute(cppValue);
1315 }
1316
1317 static void testInterfaceEmptyArrayAttributeAttributeSetterCallback(v8::Local<v8 ::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& i nfo)
1318 {
1319 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1320 TestObjectPythonV8Internal::testInterfaceEmptyArrayAttributeAttributeSetter( v8Value, info);
1321 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1322 }
1323
1324 static void floatArrayAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8 ::Value>& info)
1325 {
1326 v8::Handle<v8::Object> holder = info.Holder();
1327 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
1328 v8SetReturnValue(info, v8Array(impl->floatArrayAttribute(), info.GetIsolate( )));
1329 }
1330
1331 static void floatArrayAttributeAttributeGetterCallback(v8::Local<v8::String>, co nst v8::PropertyCallbackInfo<v8::Value>& info)
1332 {
1333 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1334 TestObjectPythonV8Internal::floatArrayAttributeAttributeGetter(info);
1335 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1336 }
1337
1338 static void floatArrayAttributeAttributeSetter(v8::Local<v8::Value> v8Value, con st v8::PropertyCallbackInfo<void>& info)
1339 {
1340 v8::Handle<v8::Object> holder = info.Holder();
1341 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
1342 V8TRYCATCH_VOID(Vector<float>, cppValue, toNativeArray<float>(v8Value, 0, in fo.GetIsolate()));
1343 impl->setFloatArrayAttribute(cppValue);
1344 }
1345
1346 static void floatArrayAttributeAttributeSetterCallback(v8::Local<v8::String>, v8 ::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
1347 {
1348 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1349 TestObjectPythonV8Internal::floatArrayAttributeAttributeSetter(v8Value, info );
1350 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1351 }
1352
1353 static void stringOrNullAttributeAttributeGetter(const v8::PropertyCallbackInfo< v8::Value>& info)
1354 {
1355 v8::Handle<v8::Object> holder = info.Holder();
1356 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
1357 bool isNull = false;
1358 String v8Value = impl->stringOrNullAttribute(isNull);
1359 if (isNull) {
1360 v8SetReturnValueNull(info);
1361 return;
1362 }
1363 v8SetReturnValueString(info, v8Value, info.GetIsolate());
1364 }
1365
1366 static void stringOrNullAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1367 {
1368 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1369 TestObjectPythonV8Internal::stringOrNullAttributeAttributeGetter(info);
1370 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1371 }
1372
1373 static void stringOrNullAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c onst v8::PropertyCallbackInfo<void>& info)
1374 {
1375 v8::Handle<v8::Object> holder = info.Holder();
1376 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
1377 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, v8Value);
1378 impl->setStringOrNullAttribute(cppValue);
1379 }
1380
1381 static void stringOrNullAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
1382 {
1383 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1384 TestObjectPythonV8Internal::stringOrNullAttributeAttributeSetter(v8Value, in fo);
1385 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1386 }
1387
1388 static void longOrNullAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8 ::Value>& info)
1389 {
1390 v8::Handle<v8::Object> holder = info.Holder();
1391 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
1392 bool isNull = false;
1393 int v8Value = impl->longOrNullAttribute(isNull);
1394 if (isNull) {
1395 v8SetReturnValueNull(info);
1396 return;
1397 }
1398 v8SetReturnValueInt(info, v8Value);
1399 }
1400
1401 static void longOrNullAttributeAttributeGetterCallback(v8::Local<v8::String>, co nst v8::PropertyCallbackInfo<v8::Value>& info)
1402 {
1403 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1404 TestObjectPythonV8Internal::longOrNullAttributeAttributeGetter(info);
1405 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1406 }
1407
1408 static void longOrNullAttributeAttributeSetter(v8::Local<v8::Value> v8Value, con st v8::PropertyCallbackInfo<void>& info)
1409 {
1410 v8::Handle<v8::Object> holder = info.Holder();
1411 ExceptionState exceptionState(ExceptionState::SetterContext, "longOrNullAttr ibute", "TestObjectPython", holder, info.GetIsolate());
1412 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
1413 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e xceptionState);
1414 impl->setLongOrNullAttribute(cppValue);
1415 }
1416
1417 static void longOrNullAttributeAttributeSetterCallback(v8::Local<v8::String>, v8 ::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
1418 {
1419 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1420 TestObjectPythonV8Internal::longOrNullAttributeAttributeSetter(v8Value, info );
1421 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1422 }
1423
1424 static void testInterfaceOrNullAttributeAttributeGetter(const v8::PropertyCallba ckInfo<v8::Value>& info)
1425 {
1426 v8::Handle<v8::Object> holder = info.Holder();
1427 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
1428 bool isNull = false;
1429 RefPtr<TestInterface> v8Value = impl->testInterfaceOrNullAttribute(isNull);
1430 if (isNull) {
1431 v8SetReturnValueNull(info);
1432 return;
1433 }
1434 v8SetReturnValueFast(info, WTF::getPtr(v8Value.release()), impl);
1435 }
1436
1437 static void testInterfaceOrNullAttributeAttributeGetterCallback(v8::Local<v8::St ring>, const v8::PropertyCallbackInfo<v8::Value>& info)
1438 {
1439 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1440 TestObjectPythonV8Internal::testInterfaceOrNullAttributeAttributeGetter(info );
1441 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1442 }
1443
1444 static void testInterfaceOrNullAttributeAttributeSetter(v8::Local<v8::Value> v8V alue, const v8::PropertyCallbackInfo<void>& info)
1445 {
1446 v8::Handle<v8::Object> holder = info.Holder();
1447 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
1448 V8TRYCATCH_VOID(TestInterface*, cppValue, V8TestInterface::toNativeWithTypeC heck(info.GetIsolate(), v8Value));
1449 impl->setTestInterfaceOrNullAttribute(WTF::getPtr(cppValue));
1450 }
1451
1452 static void testInterfaceOrNullAttributeAttributeSetterCallback(v8::Local<v8::St ring>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
1453 {
1454 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1455 TestObjectPythonV8Internal::testInterfaceOrNullAttributeAttributeSetter(v8Va lue, info);
1456 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1457 }
1458
1459 static void testEnumAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8:: Value>& info)
1460 {
1461 v8::Handle<v8::Object> holder = info.Holder();
1462 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
1463 v8SetReturnValueString(info, impl->testEnumAttribute(), info.GetIsolate());
1464 }
1465
1466 static void testEnumAttributeAttributeGetterCallback(v8::Local<v8::String>, cons t v8::PropertyCallbackInfo<v8::Value>& info)
1467 {
1468 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1469 TestObjectPythonV8Internal::testEnumAttributeAttributeGetter(info);
1470 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1471 }
1472
1473 static void testEnumAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
1474 {
1475 v8::Handle<v8::Object> holder = info.Holder();
1476 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
1477 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, v8Value);
1478 String string = cppValue;
1479 if (!(string == "" || string == "EnumValue1" || string == "EnumValue2" || st ring == "EnumValue3"))
1480 return;
1481 impl->setTestEnumAttribute(cppValue);
1482 }
1483
1484 static void testEnumAttributeAttributeSetterCallback(v8::Local<v8::String>, v8:: Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
1485 {
1486 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1487 TestObjectPythonV8Internal::testEnumAttributeAttributeSetter(v8Value, info);
1488 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1489 }
1490
1491 static void staticStringAttributeAttributeGetter(const v8::PropertyCallbackInfo< v8::Value>& info)
1492 {
1493 v8SetReturnValueString(info, TestObjectPython::staticStringAttribute(), info .GetIsolate());
1494 }
1495
1496 static void staticStringAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1497 {
1498 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1499 TestObjectPythonV8Internal::staticStringAttributeAttributeGetter(info);
1500 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1501 }
1502
1503 static void staticStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c onst v8::PropertyCallbackInfo<void>& info)
1504 {
1505 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, v8Value);
1506 TestObjectPython::setStaticStringAttribute(cppValue);
1507 }
1508
1509 static void staticStringAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
1510 {
1511 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1512 TestObjectPythonV8Internal::staticStringAttributeAttributeSetter(v8Value, in fo);
1513 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1514 }
1515
1516 static void staticLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8 ::Value>& info)
1517 {
1518 v8SetReturnValueInt(info, TestObjectPython::staticLongAttribute());
1519 }
1520
1521 static void staticLongAttributeAttributeGetterCallback(v8::Local<v8::String>, co nst v8::PropertyCallbackInfo<v8::Value>& info)
1522 {
1523 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1524 TestObjectPythonV8Internal::staticLongAttributeAttributeGetter(info);
1525 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1526 }
1527
1528 static void staticLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, con st v8::PropertyCallbackInfo<void>& info)
1529 {
1530 ExceptionState exceptionState(ExceptionState::SetterContext, "staticLongAttr ibute", "TestObjectPython", holder, info.GetIsolate());
1531 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e xceptionState);
1532 TestObjectPython::setStaticLongAttribute(cppValue);
1533 }
1534
1535 static void staticLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8 ::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
1536 {
1537 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1538 TestObjectPythonV8Internal::staticLongAttributeAttributeSetter(v8Value, info );
1539 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1540 }
1541
1542 static void eventHandlerAttributeAttributeGetter(const v8::PropertyCallbackInfo< v8::Value>& info)
1543 {
1544 v8::Handle<v8::Object> holder = info.Holder();
1545 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
1546 EventListener* v8Value = impl->eventHandlerAttribute();
1547 v8SetReturnValue(info, v8Value ? v8::Handle<v8::Value>(V8AbstractEventListen er::cast(v8Value)->getListenerObject(impl->executionContext())) : v8::Handle<v8: :Value>(v8::Null(info.GetIsolate())));
1548 }
1549
1550 static void eventHandlerAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1551 {
1552 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1553 TestObjectPythonV8Internal::eventHandlerAttributeAttributeGetter(info);
1554 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1555 }
1556
1557 static void eventHandlerAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c onst v8::PropertyCallbackInfo<void>& info)
1558 {
1559 v8::Handle<v8::Object> holder = info.Holder();
1560 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
1561 moveEventListenerToNewWrapper(holder, impl->eventHandlerAttribute(), v8Value , V8TestObjectPython::eventListenerCacheIndex, info.GetIsolate());
1562 impl->setEventHandlerAttribute(V8EventListenerList::getEventListener(v8Value , true, ListenerFindOrCreate));
1563 }
1564
1565 static void eventHandlerAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
1566 {
1567 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1568 TestObjectPythonV8Internal::eventHandlerAttributeAttributeSetter(v8Value, in fo);
1569 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1570 }
1571
1572 static void activityLoggingAccessForAllWorldsLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
1573 {
1574 v8::Handle<v8::Object> holder = info.Holder();
1575 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
1576 v8SetReturnValueInt(info, impl->activityLoggingAccessForAllWorldsLongAttribu te());
1577 }
1578
1579 static void activityLoggingAccessForAllWorldsLongAttributeAttributeGetterCallbac k(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1580 {
1581 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1582 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext());
1583 if (contextData && contextData->activityLogger())
1584 contextData->activityLogger()->log("TestObjectPython.activityLoggingAcce ssForAllWorldsLongAttribute", 0, 0, "Getter");
1585 TestObjectPythonV8Internal::activityLoggingAccessForAllWorldsLongAttributeAt tributeGetter(info);
1586 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1587 }
1588
1589 static void activityLoggingAccessForAllWorldsLongAttributeAttributeSetter(v8::Lo cal<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
1590 {
1591 v8::Handle<v8::Object> holder = info.Holder();
1592 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggin gAccessForAllWorldsLongAttribute", "TestObjectPython", holder, info.GetIsolate() );
1593 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
1594 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e xceptionState);
1595 impl->setActivityLoggingAccessForAllWorldsLongAttribute(cppValue);
1596 }
1597
1598 static void activityLoggingAccessForAllWorldsLongAttributeAttributeSetterCallbac k(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbac kInfo<void>& info)
1599 {
1600 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1601 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext());
1602 if (contextData && contextData->activityLogger()) {
1603 v8::Handle<v8::Value> loggerArg[] = { v8Value };
1604 contextData->activityLogger()->log("TestObjectPython.activityLoggingAcce ssForAllWorldsLongAttribute", 1, &loggerArg[0], "Setter");
1605 }
1606 TestObjectPythonV8Internal::activityLoggingAccessForAllWorldsLongAttributeAt tributeSetter(v8Value, info);
1607 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1608 }
1609
1610 static void activityLoggingGetterForAllWorldsLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
1611 {
1612 v8::Handle<v8::Object> holder = info.Holder();
1613 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
1614 v8SetReturnValueInt(info, impl->activityLoggingGetterForAllWorldsLongAttribu te());
1615 }
1616
1617 static void activityLoggingGetterForAllWorldsLongAttributeAttributeGetterCallbac k(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1618 {
1619 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1620 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext());
1621 if (contextData && contextData->activityLogger())
1622 contextData->activityLogger()->log("TestObjectPython.activityLoggingGett erForAllWorldsLongAttribute", 0, 0, "Getter");
1623 TestObjectPythonV8Internal::activityLoggingGetterForAllWorldsLongAttributeAt tributeGetter(info);
1624 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1625 }
1626
1627 static void activityLoggingGetterForAllWorldsLongAttributeAttributeSetter(v8::Lo cal<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
1628 {
1629 v8::Handle<v8::Object> holder = info.Holder();
1630 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggin gGetterForAllWorldsLongAttribute", "TestObjectPython", holder, info.GetIsolate() );
1631 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
1632 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e xceptionState);
1633 impl->setActivityLoggingGetterForAllWorldsLongAttribute(cppValue);
1634 }
1635
1636 static void activityLoggingGetterForAllWorldsLongAttributeAttributeSetterCallbac k(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbac kInfo<void>& info)
1637 {
1638 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1639 TestObjectPythonV8Internal::activityLoggingGetterForAllWorldsLongAttributeAt tributeSetter(v8Value, info);
1640 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1641 }
1642
1643 static void activityLoggingSetterForAllWorldsLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
1644 {
1645 v8::Handle<v8::Object> holder = info.Holder();
1646 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
1647 v8SetReturnValueInt(info, impl->activityLoggingSetterForAllWorldsLongAttribu te());
1648 }
1649
1650 static void activityLoggingSetterForAllWorldsLongAttributeAttributeGetterCallbac k(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1651 {
1652 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1653 TestObjectPythonV8Internal::activityLoggingSetterForAllWorldsLongAttributeAt tributeGetter(info);
1654 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1655 }
1656
1657 static void activityLoggingSetterForAllWorldsLongAttributeAttributeSetter(v8::Lo cal<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
1658 {
1659 v8::Handle<v8::Object> holder = info.Holder();
1660 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggin gSetterForAllWorldsLongAttribute", "TestObjectPython", holder, info.GetIsolate() );
1661 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
1662 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e xceptionState);
1663 impl->setActivityLoggingSetterForAllWorldsLongAttribute(cppValue);
1664 }
1665
1666 static void activityLoggingSetterForAllWorldsLongAttributeAttributeSetterCallbac k(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbac kInfo<void>& info)
1667 {
1668 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1669 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext());
1670 if (contextData && contextData->activityLogger()) {
1671 v8::Handle<v8::Value> loggerArg[] = { v8Value };
1672 contextData->activityLogger()->log("TestObjectPython.activityLoggingSett erForAllWorldsLongAttribute", 1, &loggerArg[0], "Setter");
1673 }
1674 TestObjectPythonV8Internal::activityLoggingSetterForAllWorldsLongAttributeAt tributeSetter(v8Value, info);
1675 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1676 }
1677
1678 static void cachedAttributeAnyAttributeAttributeGetter(const v8::PropertyCallbac kInfo<v8::Value>& info)
1679 {
1680 v8::Handle<v8::Object> holder = info.Holder();
1681 v8::Handle<v8::String> propertyName = v8AtomicString(info.GetIsolate(), "cac hedAttributeAnyAttribute");
1682 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
1683 if (!impl->isValueDirty()) {
1684 v8::Handle<v8::Value> v8Value = V8HiddenValue::getHiddenValue(info.GetIs olate(), holder, propertyName);
1685 if (!v8Value.IsEmpty()) {
1686 v8SetReturnValue(info, v8Value);
1687 return;
1688 }
1689 }
1690 ScriptValue v8Value = impl->cachedAttributeAnyAttribute();
1691 V8HiddenValue::setHiddenValue(info.GetIsolate(), holder, propertyName, v8Val ue.v8Value());
1692 v8SetReturnValue(info, v8Value.v8Value());
1693 }
1694
1695 static void cachedAttributeAnyAttributeAttributeGetterCallback(v8::Local<v8::Str ing>, const v8::PropertyCallbackInfo<v8::Value>& info)
1696 {
1697 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1698 TestObjectPythonV8Internal::cachedAttributeAnyAttributeAttributeGetter(info) ;
1699 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1700 }
1701
1702 static void cachedAttributeAnyAttributeAttributeSetter(v8::Local<v8::Value> v8Va lue, const v8::PropertyCallbackInfo<void>& info)
1703 {
1704 v8::Handle<v8::Object> holder = info.Holder();
1705 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
1706 V8TRYCATCH_VOID(ScriptValue, cppValue, ScriptValue(v8Value, info.GetIsolate( )));
1707 impl->setCachedAttributeAnyAttribute(cppValue);
1708 V8HiddenValue::deleteHiddenValue(info.GetIsolate(), holder, v8AtomicString(i nfo.GetIsolate(), "cachedAttributeAnyAttribute")); // Invalidate the cached valu e.
1709 }
1710
1711 static void cachedAttributeAnyAttributeAttributeSetterCallback(v8::Local<v8::Str ing>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
1712 {
1713 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1714 TestObjectPythonV8Internal::cachedAttributeAnyAttributeAttributeSetter(v8Val ue, info);
1715 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1716 }
1717
1718 static void callWithExecutionContextAnyAttributeAttributeGetter(const v8::Proper tyCallbackInfo<v8::Value>& info)
1719 {
1720 v8::Handle<v8::Object> holder = info.Holder();
1721 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
1722 ExecutionContext* scriptContext = currentExecutionContext(info.GetIsolate()) ;
1723 v8SetReturnValue(info, impl->callWithExecutionContextAnyAttribute(scriptCont ext).v8Value());
1724 }
1725
1726 static void callWithExecutionContextAnyAttributeAttributeGetterCallback(v8::Loca l<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1727 {
1728 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1729 TestObjectPythonV8Internal::callWithExecutionContextAnyAttributeAttributeGet ter(info);
1730 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1731 }
1732
1733 static void callWithExecutionContextAnyAttributeAttributeSetter(v8::Local<v8::Va lue> v8Value, const v8::PropertyCallbackInfo<void>& info)
1734 {
1735 v8::Handle<v8::Object> holder = info.Holder();
1736 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
1737 V8TRYCATCH_VOID(ScriptValue, cppValue, ScriptValue(v8Value, info.GetIsolate( )));
1738 ExecutionContext* scriptContext = currentExecutionContext(info.GetIsolate()) ;
1739 impl->setCallWithExecutionContextAnyAttribute(scriptContext, cppValue);
1740 }
1741
1742 static void callWithExecutionContextAnyAttributeAttributeSetterCallback(v8::Loca l<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void >& info)
1743 {
1744 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1745 TestObjectPythonV8Internal::callWithExecutionContextAnyAttributeAttributeSet ter(v8Value, info);
1746 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1747 }
1748
1749 static void checkSecurityForNodeReadonlyDocumentAttributeAttributeGetter(const v 8::PropertyCallbackInfo<v8::Value>& info)
1750 {
1751 v8::Handle<v8::Object> holder = info.Holder();
1752 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
1753 ExceptionState exceptionState(ExceptionState::GetterContext, "checkSecurityF orNodeReadonlyDocumentAttribute", "TestObjectPython", holder, info.GetIsolate()) ;
1754 if (!BindingSecurity::shouldAllowAccessToNode(info.GetIsolate(), impl->check SecurityForNodeReadonlyDocumentAttribute(), exceptionState)) {
1755 v8SetReturnValueNull(info);
1756 exceptionState.throwIfNeeded();
1757 return;
1758 }
1759 v8SetReturnValueFast(info, WTF::getPtr(impl->checkSecurityForNodeReadonlyDoc umentAttribute()), impl);
1760 }
1761
1762 static void checkSecurityForNodeReadonlyDocumentAttributeAttributeGetterCallback (v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1763 {
1764 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1765 TestObjectPythonV8Internal::checkSecurityForNodeReadonlyDocumentAttributeAtt ributeGetter(info);
1766 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1767 }
1768
1769 #if ENABLE(CONDITION)
1770 static void conditionalLongAttributeAttributeGetter(const v8::PropertyCallbackIn fo<v8::Value>& info)
1771 {
1772 v8::Handle<v8::Object> holder = info.Holder();
1773 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
1774 v8SetReturnValueInt(info, impl->conditionalLongAttribute());
1775 }
1776 #endif // ENABLE(CONDITION)
1777
1778 #if ENABLE(CONDITION)
1779 static void conditionalLongAttributeAttributeGetterCallback(v8::Local<v8::String >, const v8::PropertyCallbackInfo<v8::Value>& info)
1780 {
1781 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1782 TestObjectPythonV8Internal::conditionalLongAttributeAttributeGetter(info);
1783 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1784 }
1785 #endif // ENABLE(CONDITION)
1786
1787 #if ENABLE(CONDITION)
1788 static void conditionalLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value , const v8::PropertyCallbackInfo<void>& info)
1789 {
1790 v8::Handle<v8::Object> holder = info.Holder();
1791 ExceptionState exceptionState(ExceptionState::SetterContext, "conditionalLon gAttribute", "TestObjectPython", holder, info.GetIsolate());
1792 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
1793 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e xceptionState);
1794 impl->setConditionalLongAttribute(cppValue);
1795 }
1796 #endif // ENABLE(CONDITION)
1797
1798 #if ENABLE(CONDITION)
1799 static void conditionalLongAttributeAttributeSetterCallback(v8::Local<v8::String >, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
1800 {
1801 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1802 TestObjectPythonV8Internal::conditionalLongAttributeAttributeSetter(v8Value, info);
1803 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1804 }
1805 #endif // ENABLE(CONDITION)
1806
1807 #if ENABLE(CONDITION_1) && ENABLE(CONDITION_2)
1808 static void conditionalAndLongAttributeAttributeGetter(const v8::PropertyCallbac kInfo<v8::Value>& info)
1809 {
1810 v8::Handle<v8::Object> holder = info.Holder();
1811 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
1812 v8SetReturnValueInt(info, impl->conditionalAndLongAttribute());
1813 }
1814 #endif // ENABLE(CONDITION_1) && ENABLE(CONDITION_2)
1815
1816 #if ENABLE(CONDITION_1) && ENABLE(CONDITION_2)
1817 static void conditionalAndLongAttributeAttributeGetterCallback(v8::Local<v8::Str ing>, const v8::PropertyCallbackInfo<v8::Value>& info)
1818 {
1819 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1820 TestObjectPythonV8Internal::conditionalAndLongAttributeAttributeGetter(info) ;
1821 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1822 }
1823 #endif // ENABLE(CONDITION_1) && ENABLE(CONDITION_2)
1824
1825 #if ENABLE(CONDITION_1) && ENABLE(CONDITION_2)
1826 static void conditionalAndLongAttributeAttributeSetter(v8::Local<v8::Value> v8Va lue, const v8::PropertyCallbackInfo<void>& info)
1827 {
1828 v8::Handle<v8::Object> holder = info.Holder();
1829 ExceptionState exceptionState(ExceptionState::SetterContext, "conditionalAnd LongAttribute", "TestObjectPython", holder, info.GetIsolate());
1830 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
1831 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e xceptionState);
1832 impl->setConditionalAndLongAttribute(cppValue);
1833 }
1834 #endif // ENABLE(CONDITION_1) && ENABLE(CONDITION_2)
1835
1836 #if ENABLE(CONDITION_1) && ENABLE(CONDITION_2)
1837 static void conditionalAndLongAttributeAttributeSetterCallback(v8::Local<v8::Str ing>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
1838 {
1839 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1840 TestObjectPythonV8Internal::conditionalAndLongAttributeAttributeSetter(v8Val ue, info);
1841 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1842 }
1843 #endif // ENABLE(CONDITION_1) && ENABLE(CONDITION_2)
1844
1845 #if ENABLE(CONDITION_1) || ENABLE(CONDITION_2)
1846 static void conditionalOrLongAttributeAttributeGetter(const v8::PropertyCallback Info<v8::Value>& info)
1847 {
1848 v8::Handle<v8::Object> holder = info.Holder();
1849 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
1850 v8SetReturnValueInt(info, impl->conditionalOrLongAttribute());
1851 }
1852 #endif // ENABLE(CONDITION_1) || ENABLE(CONDITION_2)
1853
1854 #if ENABLE(CONDITION_1) || ENABLE(CONDITION_2)
1855 static void conditionalOrLongAttributeAttributeGetterCallback(v8::Local<v8::Stri ng>, const v8::PropertyCallbackInfo<v8::Value>& info)
1856 {
1857 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1858 TestObjectPythonV8Internal::conditionalOrLongAttributeAttributeGetter(info);
1859 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1860 }
1861 #endif // ENABLE(CONDITION_1) || ENABLE(CONDITION_2)
1862
1863 #if ENABLE(CONDITION_1) || ENABLE(CONDITION_2)
1864 static void conditionalOrLongAttributeAttributeSetter(v8::Local<v8::Value> v8Val ue, const v8::PropertyCallbackInfo<void>& info)
1865 {
1866 v8::Handle<v8::Object> holder = info.Holder();
1867 ExceptionState exceptionState(ExceptionState::SetterContext, "conditionalOrL ongAttribute", "TestObjectPython", holder, info.GetIsolate());
1868 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
1869 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e xceptionState);
1870 impl->setConditionalOrLongAttribute(cppValue);
1871 }
1872 #endif // ENABLE(CONDITION_1) || ENABLE(CONDITION_2)
1873
1874 #if ENABLE(CONDITION_1) || ENABLE(CONDITION_2)
1875 static void conditionalOrLongAttributeAttributeSetterCallback(v8::Local<v8::Stri ng>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
1876 {
1877 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1878 TestObjectPythonV8Internal::conditionalOrLongAttributeAttributeSetter(v8Valu e, info);
1879 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1880 }
1881 #endif // ENABLE(CONDITION_1) || ENABLE(CONDITION_2)
1882
1883 static void customObjectAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1884 {
1885 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1886 V8TestObjectPython::customObjectAttributeAttributeGetterCustom(info);
1887 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1888 }
1889
1890 static void customObjectAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
1891 {
1892 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1893 V8TestObjectPython::customObjectAttributeAttributeSetterCustom(v8Value, info );
1894 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1895 }
1896
1897 static void customGetterLongAttributeAttributeGetterCallback(v8::Local<v8::Strin g>, const v8::PropertyCallbackInfo<v8::Value>& info)
1898 {
1899 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1900 V8TestObjectPython::customGetterLongAttributeAttributeGetterCustom(info);
1901 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1902 }
1903
1904 static void customGetterLongAttributeAttributeSetter(v8::Local<v8::Value> v8Valu e, const v8::PropertyCallbackInfo<void>& info)
1905 {
1906 v8::Handle<v8::Object> holder = info.Holder();
1907 ExceptionState exceptionState(ExceptionState::SetterContext, "customGetterLo ngAttribute", "TestObjectPython", holder, info.GetIsolate());
1908 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
1909 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e xceptionState);
1910 impl->setCustomGetterLongAttribute(cppValue);
1911 }
1912
1913 static void customGetterLongAttributeAttributeSetterCallback(v8::Local<v8::Strin g>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
1914 {
1915 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1916 TestObjectPythonV8Internal::customGetterLongAttributeAttributeSetter(v8Value , info);
1917 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1918 }
1919
1920 static void customGetterReadonlyObjectAttributeAttributeGetterCallback(v8::Local <v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1921 {
1922 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1923 V8TestObjectPython::customGetterReadonlyObjectAttributeAttributeGetterCustom (info);
1924 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1925 }
1926
1927 static void customSetterLongAttributeAttributeGetter(const v8::PropertyCallbackI nfo<v8::Value>& info)
1928 {
1929 v8::Handle<v8::Object> holder = info.Holder();
1930 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
1931 v8SetReturnValueInt(info, impl->customSetterLongAttribute());
1932 }
1933
1934 static void customSetterLongAttributeAttributeGetterCallback(v8::Local<v8::Strin g>, const v8::PropertyCallbackInfo<v8::Value>& info)
1935 {
1936 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1937 TestObjectPythonV8Internal::customSetterLongAttributeAttributeGetter(info);
1938 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1939 }
1940
1941 static void customSetterLongAttributeAttributeSetterCallback(v8::Local<v8::Strin g>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
1942 {
1943 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1944 V8TestObjectPython::customSetterLongAttributeAttributeSetterCustom(v8Value, info);
1945 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1946 }
1947
1948 #if ENABLE(CONDITION)
1949 static void customLongAttributeAttributeGetterCallback(v8::Local<v8::String>, co nst v8::PropertyCallbackInfo<v8::Value>& info)
1950 {
1951 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1952 V8TestObjectPython::customLongAttributeAttributeGetterCustom(info);
1953 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1954 }
1955 #endif // ENABLE(CONDITION)
1956
1957 #if ENABLE(CONDITION)
1958 static void customLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8 ::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
1959 {
1960 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1961 V8TestObjectPython::customLongAttributeAttributeSetterCustom(v8Value, info);
1962 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1963 }
1964 #endif // ENABLE(CONDITION)
1965
1966 static void customElementsCallbacksReadonlyLongAttributeAttributeGetter(const v8 ::PropertyCallbackInfo<v8::Value>& info)
1967 {
1968 v8::Handle<v8::Object> holder = info.Holder();
1969 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
1970 v8SetReturnValueInt(info, impl->customElementsCallbacksReadonlyLongAttribute ());
1971 }
1972
1973 static void customElementsCallbacksReadonlyLongAttributeAttributeGetterCallback( v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1974 {
1975 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1976 TestObjectPythonV8Internal::customElementsCallbacksReadonlyLongAttributeAttr ibuteGetter(info);
1977 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1978 }
1979
1980 static void deprecatedLongAttributeAttributeGetter(const v8::PropertyCallbackInf o<v8::Value>& info)
1981 {
1982 v8::Handle<v8::Object> holder = info.Holder();
1983 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
1984 v8SetReturnValueInt(info, impl->deprecatedLongAttribute());
1985 }
1986
1987 static void deprecatedLongAttributeAttributeGetterCallback(v8::Local<v8::String> , const v8::PropertyCallbackInfo<v8::Value>& info)
1988 {
1989 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1990 UseCounter::countDeprecation(callingExecutionContext(info.GetIsolate()), Use Counter::LongAttribute);
1991 TestObjectPythonV8Internal::deprecatedLongAttributeAttributeGetter(info);
1992 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1993 }
1994
1995 static void deprecatedLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
1996 {
1997 v8::Handle<v8::Object> holder = info.Holder();
1998 ExceptionState exceptionState(ExceptionState::SetterContext, "deprecatedLong Attribute", "TestObjectPython", holder, info.GetIsolate());
1999 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
2000 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e xceptionState);
2001 impl->setDeprecatedLongAttribute(cppValue);
2002 }
2003
2004 static void deprecatedLongAttributeAttributeSetterCallback(v8::Local<v8::String> , v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
2005 {
2006 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2007 UseCounter::countDeprecation(callingExecutionContext(info.GetIsolate()), Use Counter::LongAttribute);
2008 TestObjectPythonV8Internal::deprecatedLongAttributeAttributeSetter(v8Value, info);
2009 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2010 }
2011
2012 static void enforceRangeLongAttributeAttributeGetter(const v8::PropertyCallbackI nfo<v8::Value>& info)
2013 {
2014 v8::Handle<v8::Object> holder = info.Holder();
2015 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
2016 v8SetReturnValueInt(info, impl->enforceRangeLongAttribute());
2017 }
2018
2019 static void enforceRangeLongAttributeAttributeGetterCallback(v8::Local<v8::Strin g>, const v8::PropertyCallbackInfo<v8::Value>& info)
2020 {
2021 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2022 TestObjectPythonV8Internal::enforceRangeLongAttributeAttributeGetter(info);
2023 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2024 }
2025
2026 static void enforceRangeLongAttributeAttributeSetter(v8::Local<v8::Value> v8Valu e, const v8::PropertyCallbackInfo<void>& info)
2027 {
2028 v8::Handle<v8::Object> holder = info.Holder();
2029 ExceptionState exceptionState(ExceptionState::SetterContext, "enforceRangeLo ngAttribute", "TestObjectPython", holder, info.GetIsolate());
2030 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
2031 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, EnforceRange, exce ptionState), exceptionState);
2032 impl->setEnforceRangeLongAttribute(cppValue);
2033 }
2034
2035 static void enforceRangeLongAttributeAttributeSetterCallback(v8::Local<v8::Strin g>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
2036 {
2037 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2038 TestObjectPythonV8Internal::enforceRangeLongAttributeAttributeSetter(v8Value , info);
2039 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2040 }
2041
2042 static void exposeJSAccessorsLongAttributeAttributeGetter(const v8::FunctionCall backInfo<v8::Value>& info)
2043 {
2044 v8::Handle<v8::Object> holder = info.Holder();
2045 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
2046 v8SetReturnValueInt(info, impl->exposeJSAccessorsLongAttribute());
2047 }
2048
2049 static void exposeJSAccessorsLongAttributeAttributeGetterCallback(const v8::Func tionCallbackInfo<v8::Value>& info)
2050 {
2051 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2052 TestObjectPythonV8Internal::exposeJSAccessorsLongAttributeAttributeGetter(in fo);
2053 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2054 }
2055
2056 static void exposeJSAccessorsLongAttributeAttributeSetter(v8::Local<v8::Value> v 8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
2057 {
2058 v8::Handle<v8::Object> holder = info.Holder();
2059 ExceptionState exceptionState(ExceptionState::SetterContext, "exposeJSAccess orsLongAttribute", "TestObjectPython", holder, info.GetIsolate());
2060 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
2061 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e xceptionState);
2062 impl->setExposeJSAccessorsLongAttribute(cppValue);
2063 }
2064
2065 static void exposeJSAccessorsLongAttributeAttributeSetterCallback(const v8::Func tionCallbackInfo<v8::Value>& info)
2066 {
2067 v8::Local<v8::Value> v8Value = info[0];
2068 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2069 TestObjectPythonV8Internal::exposeJSAccessorsLongAttributeAttributeSetter(v8 Value, info);
2070 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2071 }
2072
2073 static void implementedAsLongAttributeAttributeGetter(const v8::PropertyCallback Info<v8::Value>& info)
2074 {
2075 v8::Handle<v8::Object> holder = info.Holder();
2076 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
2077 v8SetReturnValueInt(info, impl->implementedAsName());
2078 }
2079
2080 static void implementedAsLongAttributeAttributeGetterCallback(v8::Local<v8::Stri ng>, const v8::PropertyCallbackInfo<v8::Value>& info)
2081 {
2082 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2083 TestObjectPythonV8Internal::implementedAsLongAttributeAttributeGetter(info);
2084 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2085 }
2086
2087 static void implementedAsLongAttributeAttributeSetter(v8::Local<v8::Value> v8Val ue, const v8::PropertyCallbackInfo<void>& info)
2088 {
2089 v8::Handle<v8::Object> holder = info.Holder();
2090 ExceptionState exceptionState(ExceptionState::SetterContext, "implementedAsL ongAttribute", "TestObjectPython", holder, info.GetIsolate());
2091 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
2092 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e xceptionState);
2093 impl->setImplementedAsName(cppValue);
2094 }
2095
2096 static void implementedAsLongAttributeAttributeSetterCallback(v8::Local<v8::Stri ng>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
2097 {
2098 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2099 TestObjectPythonV8Internal::implementedAsLongAttributeAttributeSetter(v8Valu e, info);
2100 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2101 }
2102
2103 static void customImplementedAsLongAttributeAttributeGetterCallback(v8::Local<v8 ::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2104 {
2105 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2106 V8TestObjectPython::customImplementedAsLongAttributeAttributeGetterCustom(in fo);
2107 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2108 }
2109
2110 static void customImplementedAsLongAttributeAttributeSetterCallback(v8::Local<v8 ::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& i nfo)
2111 {
2112 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2113 V8TestObjectPython::customImplementedAsLongAttributeAttributeSetterCustom(v8 Value, info);
2114 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2115 }
2116
2117 static void customGetterImplementedAsLongAttributeAttributeGetterCallback(v8::Lo cal<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2118 {
2119 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2120 V8TestObjectPython::customGetterImplementedAsLongAttributeAttributeGetterCus tom(info);
2121 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2122 }
2123
2124 static void customGetterImplementedAsLongAttributeAttributeSetter(v8::Local<v8:: Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
2125 {
2126 v8::Handle<v8::Object> holder = info.Holder();
2127 ExceptionState exceptionState(ExceptionState::SetterContext, "customGetterIm plementedAsLongAttribute", "TestObjectPython", holder, info.GetIsolate());
2128 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
2129 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e xceptionState);
2130 impl->setImplementedAsNameWithCustomGetter(cppValue);
2131 }
2132
2133 static void customGetterImplementedAsLongAttributeAttributeSetterCallback(v8::Lo cal<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<vo id>& info)
2134 {
2135 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2136 TestObjectPythonV8Internal::customGetterImplementedAsLongAttributeAttributeS etter(v8Value, info);
2137 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2138 }
2139
2140 static void customSetterImplementedAsLongAttributeAttributeGetter(const v8::Prop ertyCallbackInfo<v8::Value>& info)
2141 {
2142 v8::Handle<v8::Object> holder = info.Holder();
2143 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
2144 v8SetReturnValueInt(info, impl->implementedAsNameWithCustomGetter());
2145 }
2146
2147 static void customSetterImplementedAsLongAttributeAttributeGetterCallback(v8::Lo cal<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2148 {
2149 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2150 TestObjectPythonV8Internal::customSetterImplementedAsLongAttributeAttributeG etter(info);
2151 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2152 }
2153
2154 static void customSetterImplementedAsLongAttributeAttributeSetterCallback(v8::Lo cal<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<vo id>& info)
2155 {
2156 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2157 V8TestObjectPython::customSetterImplementedAsLongAttributeAttributeSetterCus tom(v8Value, info);
2158 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2159 }
2160
2161 static void measureAsLongAttributeAttributeGetter(const v8::PropertyCallbackInfo <v8::Value>& info)
2162 {
2163 v8::Handle<v8::Object> holder = info.Holder();
2164 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
2165 v8SetReturnValueInt(info, impl->measureAsLongAttribute());
2166 }
2167
2168 static void measureAsLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2169 {
2170 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2171 UseCounter::count(callingExecutionContext(info.GetIsolate()), UseCounter::Te stFeature);
2172 TestObjectPythonV8Internal::measureAsLongAttributeAttributeGetter(info);
2173 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2174 }
2175
2176 static void measureAsLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
2177 {
2178 v8::Handle<v8::Object> holder = info.Holder();
2179 ExceptionState exceptionState(ExceptionState::SetterContext, "measureAsLongA ttribute", "TestObjectPython", holder, info.GetIsolate());
2180 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
2181 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e xceptionState);
2182 impl->setMeasureAsLongAttribute(cppValue);
2183 }
2184
2185 static void measureAsLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
2186 {
2187 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2188 UseCounter::count(callingExecutionContext(info.GetIsolate()), UseCounter::Te stFeature);
2189 TestObjectPythonV8Internal::measureAsLongAttributeAttributeSetter(v8Value, i nfo);
2190 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2191 }
2192
2193 static void notEnumerableLongAttributeAttributeGetter(const v8::PropertyCallback Info<v8::Value>& info)
2194 {
2195 v8::Handle<v8::Object> holder = info.Holder();
2196 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
2197 v8SetReturnValueInt(info, impl->notEnumerableLongAttribute());
2198 }
2199
2200 static void notEnumerableLongAttributeAttributeGetterCallback(v8::Local<v8::Stri ng>, const v8::PropertyCallbackInfo<v8::Value>& info)
2201 {
2202 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2203 TestObjectPythonV8Internal::notEnumerableLongAttributeAttributeGetter(info);
2204 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2205 }
2206
2207 static void notEnumerableLongAttributeAttributeSetter(v8::Local<v8::Value> v8Val ue, const v8::PropertyCallbackInfo<void>& info)
2208 {
2209 v8::Handle<v8::Object> holder = info.Holder();
2210 ExceptionState exceptionState(ExceptionState::SetterContext, "notEnumerableL ongAttribute", "TestObjectPython", holder, info.GetIsolate());
2211 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
2212 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e xceptionState);
2213 impl->setNotEnumerableLongAttribute(cppValue);
2214 }
2215
2216 static void notEnumerableLongAttributeAttributeSetterCallback(v8::Local<v8::Stri ng>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
2217 {
2218 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2219 TestObjectPythonV8Internal::notEnumerableLongAttributeAttributeSetter(v8Valu e, info);
2220 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2221 }
2222
2223 static void perContextEnabledLongAttributeAttributeGetter(const v8::PropertyCall backInfo<v8::Value>& info)
2224 {
2225 v8::Handle<v8::Object> holder = info.Holder();
2226 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
2227 v8SetReturnValueInt(info, impl->perContextEnabledLongAttribute());
2228 }
2229
2230 static void perContextEnabledLongAttributeAttributeGetterCallback(v8::Local<v8:: String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2231 {
2232 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2233 TestObjectPythonV8Internal::perContextEnabledLongAttributeAttributeGetter(in fo);
2234 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2235 }
2236
2237 static void perContextEnabledLongAttributeAttributeSetter(v8::Local<v8::Value> v 8Value, const v8::PropertyCallbackInfo<void>& info)
2238 {
2239 v8::Handle<v8::Object> holder = info.Holder();
2240 ExceptionState exceptionState(ExceptionState::SetterContext, "perContextEnab ledLongAttribute", "TestObjectPython", holder, info.GetIsolate());
2241 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
2242 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e xceptionState);
2243 impl->setPerContextEnabledLongAttribute(cppValue);
2244 }
2245
2246 static void perContextEnabledLongAttributeAttributeSetterCallback(v8::Local<v8:: String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& inf o)
2247 {
2248 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2249 TestObjectPythonV8Internal::perContextEnabledLongAttributeAttributeSetter(v8 Value, info);
2250 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2251 }
2252
2253 static void perWorldBindingsLongAttributeAttributeGetter(const v8::PropertyCallb ackInfo<v8::Value>& info)
2254 {
2255 v8::Handle<v8::Object> holder = info.Holder();
2256 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
2257 v8SetReturnValueInt(info, impl->perWorldBindingsLongAttribute());
2258 }
2259
2260 static void perWorldBindingsLongAttributeAttributeGetterCallback(v8::Local<v8::S tring>, const v8::PropertyCallbackInfo<v8::Value>& info)
2261 {
2262 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2263 TestObjectPythonV8Internal::perWorldBindingsLongAttributeAttributeGetter(inf o);
2264 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2265 }
2266
2267 static void perWorldBindingsLongAttributeAttributeSetter(v8::Local<v8::Value> v8 Value, const v8::PropertyCallbackInfo<void>& info)
2268 {
2269 v8::Handle<v8::Object> holder = info.Holder();
2270 ExceptionState exceptionState(ExceptionState::SetterContext, "perWorldBindin gsLongAttribute", "TestObjectPython", holder, info.GetIsolate());
2271 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
2272 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e xceptionState);
2273 impl->setPerWorldBindingsLongAttribute(cppValue);
2274 }
2275
2276 static void perWorldBindingsLongAttributeAttributeSetterCallback(v8::Local<v8::S tring>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info )
2277 {
2278 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2279 TestObjectPythonV8Internal::perWorldBindingsLongAttributeAttributeSetter(v8V alue, info);
2280 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2281 }
2282
2283 static void perWorldBindingsLongAttributeAttributeGetterForMainWorld(const v8::P ropertyCallbackInfo<v8::Value>& info)
2284 {
2285 v8::Handle<v8::Object> holder = info.Holder();
2286 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
2287 v8SetReturnValueInt(info, impl->perWorldBindingsLongAttribute());
2288 }
2289
2290 static void perWorldBindingsLongAttributeAttributeGetterCallbackForMainWorld(v8: :Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2291 {
2292 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2293 TestObjectPythonV8Internal::perWorldBindingsLongAttributeAttributeGetterForM ainWorld(info);
2294 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2295 }
2296
2297 static void perWorldBindingsLongAttributeAttributeSetterForMainWorld(v8::Local<v 8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
2298 {
2299 v8::Handle<v8::Object> holder = info.Holder();
2300 ExceptionState exceptionState(ExceptionState::SetterContext, "perWorldBindin gsLongAttribute", "TestObjectPython", holder, info.GetIsolate());
2301 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
2302 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e xceptionState);
2303 impl->setPerWorldBindingsLongAttribute(cppValue);
2304 }
2305
2306 static void perWorldBindingsLongAttributeAttributeSetterCallbackForMainWorld(v8: :Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo <void>& info)
2307 {
2308 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2309 TestObjectPythonV8Internal::perWorldBindingsLongAttributeAttributeSetterForM ainWorld(v8Value, info);
2310 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2311 }
2312
2313 static void perWorldBindingsReadonlyLongAttributeAttributeGetter(const v8::Prope rtyCallbackInfo<v8::Value>& info)
2314 {
2315 v8::Handle<v8::Object> holder = info.Holder();
2316 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
2317 v8SetReturnValueInt(info, impl->perWorldBindingsReadonlyLongAttribute());
2318 }
2319
2320 static void perWorldBindingsReadonlyLongAttributeAttributeGetterCallback(v8::Loc al<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2321 {
2322 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2323 TestObjectPythonV8Internal::perWorldBindingsReadonlyLongAttributeAttributeGe tter(info);
2324 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2325 }
2326
2327 static void perWorldBindingsReadonlyLongAttributeAttributeGetterForMainWorld(con st v8::PropertyCallbackInfo<v8::Value>& info)
2328 {
2329 v8::Handle<v8::Object> holder = info.Holder();
2330 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
2331 v8SetReturnValueInt(info, impl->perWorldBindingsReadonlyLongAttribute());
2332 }
2333
2334 static void perWorldBindingsReadonlyLongAttributeAttributeGetterCallbackForMainW orld(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2335 {
2336 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2337 TestObjectPythonV8Internal::perWorldBindingsReadonlyLongAttributeAttributeGe tterForMainWorld(info);
2338 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2339 }
2340
2341 static void perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetter(c onst v8::PropertyCallbackInfo<v8::Value>& info)
2342 {
2343 v8::Handle<v8::Object> holder = info.Holder();
2344 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
2345 RefPtr<TestInterfaceEmpty> result(impl->perWorldBindingsReadonlyTestInterfac eEmptyAttribute());
2346 if (result && DOMDataStore::setReturnValueFromWrapper<V8TestInterfaceEmpty>( info.GetReturnValue(), result.get()))
2347 return;
2348 v8::Handle<v8::Value> wrapper = toV8(result.get(), holder, info.GetIsolate() );
2349 if (!wrapper.IsEmpty()) {
2350 V8HiddenValue::setHiddenValue(info.GetIsolate(), holder, v8AtomicString( info.GetIsolate(), "perWorldBindingsReadonlyTestInterfaceEmptyAttribute"), wrapp er);
2351 v8SetReturnValue(info, wrapper);
2352 }
2353 }
2354
2355 static void perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetterCa llback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2356 {
2357 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2358 TestObjectPythonV8Internal::perWorldBindingsReadonlyTestInterfaceEmptyAttrib uteAttributeGetter(info);
2359 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2360 }
2361
2362 static void perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetterFo rMainWorld(const v8::PropertyCallbackInfo<v8::Value>& info)
2363 {
2364 v8::Handle<v8::Object> holder = info.Holder();
2365 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
2366 RefPtr<TestInterfaceEmpty> result(impl->perWorldBindingsReadonlyTestInterfac eEmptyAttribute());
2367 if (result && DOMDataStore::setReturnValueFromWrapperForMainWorld<V8TestInte rfaceEmpty>(info.GetReturnValue(), result.get()))
2368 return;
2369 v8::Handle<v8::Value> wrapper = toV8(result.get(), holder, info.GetIsolate() );
2370 if (!wrapper.IsEmpty()) {
2371 V8HiddenValue::setHiddenValue(info.GetIsolate(), holder, v8AtomicString( info.GetIsolate(), "perWorldBindingsReadonlyTestInterfaceEmptyAttribute"), wrapp er);
2372 v8SetReturnValue(info, wrapper);
2373 }
2374 }
2375
2376 static void perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetterCa llbackForMainWorld(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Val ue>& info)
2377 {
2378 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2379 TestObjectPythonV8Internal::perWorldBindingsReadonlyTestInterfaceEmptyAttrib uteAttributeGetterForMainWorld(info);
2380 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2381 }
2382
2383 static void activityLoggingAccessPerWorldBindingsLongAttributeAttributeGetter(co nst v8::PropertyCallbackInfo<v8::Value>& info)
2384 {
2385 v8::Handle<v8::Object> holder = info.Holder();
2386 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
2387 v8SetReturnValueInt(info, impl->activityLoggingAccessPerWorldBindingsLongAtt ribute());
2388 }
2389
2390 static void activityLoggingAccessPerWorldBindingsLongAttributeAttributeGetterCal lback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2391 {
2392 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2393 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext());
2394 if (contextData && contextData->activityLogger())
2395 contextData->activityLogger()->log("TestObjectPython.activityLoggingAcce ssPerWorldBindingsLongAttribute", 0, 0, "Getter");
2396 TestObjectPythonV8Internal::activityLoggingAccessPerWorldBindingsLongAttribu teAttributeGetter(info);
2397 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2398 }
2399
2400 static void activityLoggingAccessPerWorldBindingsLongAttributeAttributeSetter(v8 ::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
2401 {
2402 v8::Handle<v8::Object> holder = info.Holder();
2403 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggin gAccessPerWorldBindingsLongAttribute", "TestObjectPython", holder, info.GetIsola te());
2404 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
2405 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e xceptionState);
2406 impl->setActivityLoggingAccessPerWorldBindingsLongAttribute(cppValue);
2407 }
2408
2409 static void activityLoggingAccessPerWorldBindingsLongAttributeAttributeSetterCal lback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCal lbackInfo<void>& info)
2410 {
2411 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2412 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext());
2413 if (contextData && contextData->activityLogger()) {
2414 v8::Handle<v8::Value> loggerArg[] = { v8Value };
2415 contextData->activityLogger()->log("TestObjectPython.activityLoggingAcce ssPerWorldBindingsLongAttribute", 1, &loggerArg[0], "Setter");
2416 }
2417 TestObjectPythonV8Internal::activityLoggingAccessPerWorldBindingsLongAttribu teAttributeSetter(v8Value, info);
2418 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2419 }
2420
2421 static void activityLoggingAccessPerWorldBindingsLongAttributeAttributeGetterFor MainWorld(const v8::PropertyCallbackInfo<v8::Value>& info)
2422 {
2423 v8::Handle<v8::Object> holder = info.Holder();
2424 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
2425 v8SetReturnValueInt(info, impl->activityLoggingAccessPerWorldBindingsLongAtt ribute());
2426 }
2427
2428 static void activityLoggingAccessPerWorldBindingsLongAttributeAttributeGetterCal lbackForMainWorld(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Valu e>& info)
2429 {
2430 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2431 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext());
2432 if (contextData && contextData->activityLogger())
2433 contextData->activityLogger()->log("TestObjectPython.activityLoggingAcce ssPerWorldBindingsLongAttribute", 0, 0, "Getter");
2434 TestObjectPythonV8Internal::activityLoggingAccessPerWorldBindingsLongAttribu teAttributeGetterForMainWorld(info);
2435 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2436 }
2437
2438 static void activityLoggingAccessPerWorldBindingsLongAttributeAttributeSetterFor MainWorld(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& in fo)
2439 {
2440 v8::Handle<v8::Object> holder = info.Holder();
2441 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggin gAccessPerWorldBindingsLongAttribute", "TestObjectPython", holder, info.GetIsola te());
2442 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
2443 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e xceptionState);
2444 impl->setActivityLoggingAccessPerWorldBindingsLongAttribute(cppValue);
2445 }
2446
2447 static void activityLoggingAccessPerWorldBindingsLongAttributeAttributeSetterCal lbackForMainWorld(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8: :PropertyCallbackInfo<void>& info)
2448 {
2449 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2450 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext());
2451 if (contextData && contextData->activityLogger()) {
2452 v8::Handle<v8::Value> loggerArg[] = { v8Value };
2453 contextData->activityLogger()->log("TestObjectPython.activityLoggingAcce ssPerWorldBindingsLongAttribute", 1, &loggerArg[0], "Setter");
2454 }
2455 TestObjectPythonV8Internal::activityLoggingAccessPerWorldBindingsLongAttribu teAttributeSetterForMainWorld(v8Value, info);
2456 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2457 }
2458
2459 static void activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeA ttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
2460 {
2461 v8::Handle<v8::Object> holder = info.Holder();
2462 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
2463 v8SetReturnValueInt(info, impl->activityLoggingAccessForIsolatedWorldsPerWor ldBindingsLongAttribute());
2464 }
2465
2466 static void activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeA ttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8: :Value>& info)
2467 {
2468 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2469 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext());
2470 if (contextData && contextData->activityLogger())
2471 contextData->activityLogger()->log("TestObjectPython.activityLoggingAcce ssForIsolatedWorldsPerWorldBindingsLongAttribute", 0, 0, "Getter");
2472 TestObjectPythonV8Internal::activityLoggingAccessForIsolatedWorldsPerWorldBi ndingsLongAttributeAttributeGetter(info);
2473 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2474 }
2475
2476 static void activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeA ttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void >& info)
2477 {
2478 v8::Handle<v8::Object> holder = info.Holder();
2479 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggin gAccessForIsolatedWorldsPerWorldBindingsLongAttribute", "TestObjectPython", hold er, info.GetIsolate());
2480 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
2481 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e xceptionState);
2482 impl->setActivityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttribute (cppValue);
2483 }
2484
2485 static void activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeA ttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, cons t v8::PropertyCallbackInfo<void>& info)
2486 {
2487 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2488 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext());
2489 if (contextData && contextData->activityLogger()) {
2490 v8::Handle<v8::Value> loggerArg[] = { v8Value };
2491 contextData->activityLogger()->log("TestObjectPython.activityLoggingAcce ssForIsolatedWorldsPerWorldBindingsLongAttribute", 1, &loggerArg[0], "Setter");
2492 }
2493 TestObjectPythonV8Internal::activityLoggingAccessForIsolatedWorldsPerWorldBi ndingsLongAttributeAttributeSetter(v8Value, info);
2494 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2495 }
2496
2497 static void activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeA ttributeGetterForMainWorld(const v8::PropertyCallbackInfo<v8::Value>& info)
2498 {
2499 v8::Handle<v8::Object> holder = info.Holder();
2500 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
2501 v8SetReturnValueInt(info, impl->activityLoggingAccessForIsolatedWorldsPerWor ldBindingsLongAttribute());
2502 }
2503
2504 static void activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeA ttributeGetterCallbackForMainWorld(v8::Local<v8::String>, const v8::PropertyCall backInfo<v8::Value>& info)
2505 {
2506 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2507 TestObjectPythonV8Internal::activityLoggingAccessForIsolatedWorldsPerWorldBi ndingsLongAttributeAttributeGetterForMainWorld(info);
2508 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2509 }
2510
2511 static void activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeA ttributeSetterForMainWorld(v8::Local<v8::Value> v8Value, const v8::PropertyCallb ackInfo<void>& info)
2512 {
2513 v8::Handle<v8::Object> holder = info.Holder();
2514 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggin gAccessForIsolatedWorldsPerWorldBindingsLongAttribute", "TestObjectPython", hold er, info.GetIsolate());
2515 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
2516 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e xceptionState);
2517 impl->setActivityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttribute (cppValue);
2518 }
2519
2520 static void activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeA ttributeSetterCallbackForMainWorld(v8::Local<v8::String>, v8::Local<v8::Value> v 8Value, const v8::PropertyCallbackInfo<void>& info)
2521 {
2522 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2523 TestObjectPythonV8Internal::activityLoggingAccessForIsolatedWorldsPerWorldBi ndingsLongAttributeAttributeSetterForMainWorld(v8Value, info);
2524 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2525 }
2526
2527 static void activityLoggingGetterPerWorldBindingsLongAttributeAttributeGetter(co nst v8::PropertyCallbackInfo<v8::Value>& info)
2528 {
2529 v8::Handle<v8::Object> holder = info.Holder();
2530 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
2531 v8SetReturnValueInt(info, impl->activityLoggingGetterPerWorldBindingsLongAtt ribute());
2532 }
2533
2534 static void activityLoggingGetterPerWorldBindingsLongAttributeAttributeGetterCal lback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2535 {
2536 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2537 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext());
2538 if (contextData && contextData->activityLogger())
2539 contextData->activityLogger()->log("TestObjectPython.activityLoggingGett erPerWorldBindingsLongAttribute", 0, 0, "Getter");
2540 TestObjectPythonV8Internal::activityLoggingGetterPerWorldBindingsLongAttribu teAttributeGetter(info);
2541 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2542 }
2543
2544 static void activityLoggingGetterPerWorldBindingsLongAttributeAttributeSetter(v8 ::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
2545 {
2546 v8::Handle<v8::Object> holder = info.Holder();
2547 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggin gGetterPerWorldBindingsLongAttribute", "TestObjectPython", holder, info.GetIsola te());
2548 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
2549 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e xceptionState);
2550 impl->setActivityLoggingGetterPerWorldBindingsLongAttribute(cppValue);
2551 }
2552
2553 static void activityLoggingGetterPerWorldBindingsLongAttributeAttributeSetterCal lback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCal lbackInfo<void>& info)
2554 {
2555 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2556 TestObjectPythonV8Internal::activityLoggingGetterPerWorldBindingsLongAttribu teAttributeSetter(v8Value, info);
2557 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2558 }
2559
2560 static void activityLoggingGetterPerWorldBindingsLongAttributeAttributeGetterFor MainWorld(const v8::PropertyCallbackInfo<v8::Value>& info)
2561 {
2562 v8::Handle<v8::Object> holder = info.Holder();
2563 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
2564 v8SetReturnValueInt(info, impl->activityLoggingGetterPerWorldBindingsLongAtt ribute());
2565 }
2566
2567 static void activityLoggingGetterPerWorldBindingsLongAttributeAttributeGetterCal lbackForMainWorld(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Valu e>& info)
2568 {
2569 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2570 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext());
2571 if (contextData && contextData->activityLogger())
2572 contextData->activityLogger()->log("TestObjectPython.activityLoggingGett erPerWorldBindingsLongAttribute", 0, 0, "Getter");
2573 TestObjectPythonV8Internal::activityLoggingGetterPerWorldBindingsLongAttribu teAttributeGetterForMainWorld(info);
2574 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2575 }
2576
2577 static void activityLoggingGetterPerWorldBindingsLongAttributeAttributeSetterFor MainWorld(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& in fo)
2578 {
2579 v8::Handle<v8::Object> holder = info.Holder();
2580 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggin gGetterPerWorldBindingsLongAttribute", "TestObjectPython", holder, info.GetIsola te());
2581 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
2582 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e xceptionState);
2583 impl->setActivityLoggingGetterPerWorldBindingsLongAttribute(cppValue);
2584 }
2585
2586 static void activityLoggingGetterPerWorldBindingsLongAttributeAttributeSetterCal lbackForMainWorld(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8: :PropertyCallbackInfo<void>& info)
2587 {
2588 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2589 TestObjectPythonV8Internal::activityLoggingGetterPerWorldBindingsLongAttribu teAttributeSetterForMainWorld(v8Value, info);
2590 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2591 }
2592
2593 static void activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeA ttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
2594 {
2595 v8::Handle<v8::Object> holder = info.Holder();
2596 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
2597 v8SetReturnValueInt(info, impl->activityLoggingGetterForIsolatedWorldsPerWor ldBindingsLongAttribute());
2598 }
2599
2600 static void activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeA ttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8: :Value>& info)
2601 {
2602 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2603 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext());
2604 if (contextData && contextData->activityLogger())
2605 contextData->activityLogger()->log("TestObjectPython.activityLoggingGett erForIsolatedWorldsPerWorldBindingsLongAttribute", 0, 0, "Getter");
2606 TestObjectPythonV8Internal::activityLoggingGetterForIsolatedWorldsPerWorldBi ndingsLongAttributeAttributeGetter(info);
2607 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2608 }
2609
2610 static void activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeA ttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void >& info)
2611 {
2612 v8::Handle<v8::Object> holder = info.Holder();
2613 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggin gGetterForIsolatedWorldsPerWorldBindingsLongAttribute", "TestObjectPython", hold er, info.GetIsolate());
2614 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
2615 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e xceptionState);
2616 impl->setActivityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttribute (cppValue);
2617 }
2618
2619 static void activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeA ttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, cons t v8::PropertyCallbackInfo<void>& info)
2620 {
2621 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2622 TestObjectPythonV8Internal::activityLoggingGetterForIsolatedWorldsPerWorldBi ndingsLongAttributeAttributeSetter(v8Value, info);
2623 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2624 }
2625
2626 static void activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeA ttributeGetterForMainWorld(const v8::PropertyCallbackInfo<v8::Value>& info)
2627 {
2628 v8::Handle<v8::Object> holder = info.Holder();
2629 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
2630 v8SetReturnValueInt(info, impl->activityLoggingGetterForIsolatedWorldsPerWor ldBindingsLongAttribute());
2631 }
2632
2633 static void activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeA ttributeGetterCallbackForMainWorld(v8::Local<v8::String>, const v8::PropertyCall backInfo<v8::Value>& info)
2634 {
2635 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2636 TestObjectPythonV8Internal::activityLoggingGetterForIsolatedWorldsPerWorldBi ndingsLongAttributeAttributeGetterForMainWorld(info);
2637 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2638 }
2639
2640 static void activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeA ttributeSetterForMainWorld(v8::Local<v8::Value> v8Value, const v8::PropertyCallb ackInfo<void>& info)
2641 {
2642 v8::Handle<v8::Object> holder = info.Holder();
2643 ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggin gGetterForIsolatedWorldsPerWorldBindingsLongAttribute", "TestObjectPython", hold er, info.GetIsolate());
2644 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
2645 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e xceptionState);
2646 impl->setActivityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttribute (cppValue);
2647 }
2648
2649 static void activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeA ttributeSetterCallbackForMainWorld(v8::Local<v8::String>, v8::Local<v8::Value> v 8Value, const v8::PropertyCallbackInfo<void>& info)
2650 {
2651 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2652 TestObjectPythonV8Internal::activityLoggingGetterForIsolatedWorldsPerWorldBi ndingsLongAttributeAttributeSetterForMainWorld(v8Value, info);
2653 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2654 }
2655
2656 static void locationAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& i nfo)
2657 {
2658 v8::Handle<v8::Object> holder = info.Holder();
2659 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
2660 v8SetReturnValueFast(info, WTF::getPtr(impl->location()), impl);
2661 }
2662
2663 static void locationAttributeGetterCallback(v8::Local<v8::String>, const v8::Pro pertyCallbackInfo<v8::Value>& info)
2664 {
2665 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2666 TestObjectPythonV8Internal::locationAttributeGetter(info);
2667 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2668 }
2669
2670 static void locationAttributeSetter(v8::Local<v8::Value> v8Value, const v8::Prop ertyCallbackInfo<void>& info)
2671 {
2672 v8::Handle<v8::Object> holder = info.Holder();
2673 TestObjectPython* proxyImpl = V8TestObjectPython::toNative(holder);
2674 RefPtr<TestNode> impl = WTF::getPtr(proxyImpl->location());
2675 if (!impl)
2676 return;
2677 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, v8Value);
2678 impl->setHref(cppValue);
2679 }
2680
2681 static void locationAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8: :Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
2682 {
2683 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2684 TestObjectPythonV8Internal::locationAttributeSetter(v8Value, info);
2685 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2686 }
2687
2688 static void locationWithExceptionAttributeGetter(const v8::PropertyCallbackInfo< v8::Value>& info)
2689 {
2690 v8::Handle<v8::Object> holder = info.Holder();
2691 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
2692 v8SetReturnValueFast(info, WTF::getPtr(impl->locationWithException()), impl) ;
2693 }
2694
2695 static void locationWithExceptionAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2696 {
2697 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2698 TestObjectPythonV8Internal::locationWithExceptionAttributeGetter(info);
2699 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2700 }
2701
2702 static void locationWithExceptionAttributeSetter(v8::Local<v8::Value> v8Value, c onst v8::PropertyCallbackInfo<void>& info)
2703 {
2704 v8::Handle<v8::Object> holder = info.Holder();
2705 TestObjectPython* proxyImpl = V8TestObjectPython::toNative(holder);
2706 RefPtr<TestNode> impl = WTF::getPtr(proxyImpl->locationWithException());
2707 if (!impl)
2708 return;
2709 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, v8Value);
2710 impl->setHrefThrows(cppValue);
2711 }
2712
2713 static void locationWithExceptionAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
2714 {
2715 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2716 TestObjectPythonV8Internal::locationWithExceptionAttributeSetter(v8Value, in fo);
2717 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2718 }
2719
2720 static void locationWithCallWithAttributeGetter(const v8::PropertyCallbackInfo<v 8::Value>& info)
2721 {
2722 v8::Handle<v8::Object> holder = info.Holder();
2723 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
2724 v8SetReturnValueFast(info, WTF::getPtr(impl->locationWithCallWith()), impl);
2725 }
2726
2727 static void locationWithCallWithAttributeGetterCallback(v8::Local<v8::String>, c onst v8::PropertyCallbackInfo<v8::Value>& info)
2728 {
2729 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2730 TestObjectPythonV8Internal::locationWithCallWithAttributeGetter(info);
2731 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2732 }
2733
2734 static void locationWithCallWithAttributeSetter(v8::Local<v8::Value> v8Value, co nst v8::PropertyCallbackInfo<void>& info)
2735 {
2736 v8::Handle<v8::Object> holder = info.Holder();
2737 TestObjectPython* proxyImpl = V8TestObjectPython::toNative(holder);
2738 RefPtr<TestNode> impl = WTF::getPtr(proxyImpl->locationWithCallWith());
2739 if (!impl)
2740 return;
2741 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, v8Value);
2742 impl->setHrefCallWith(callingDOMWindow(info.GetIsolate()), enteredDOMWindow( info.GetIsolate()), cppValue);
2743 }
2744
2745 static void locationWithCallWithAttributeSetterCallback(v8::Local<v8::String>, v 8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
2746 {
2747 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2748 TestObjectPythonV8Internal::locationWithCallWithAttributeSetter(v8Value, inf o);
2749 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2750 }
2751
2752 static void locationWithPerWorldBindingsAttributeGetter(const v8::PropertyCallba ckInfo<v8::Value>& info)
2753 {
2754 v8::Handle<v8::Object> holder = info.Holder();
2755 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
2756 v8SetReturnValueFast(info, WTF::getPtr(impl->locationWithPerWorldBindings()) , impl);
2757 }
2758
2759 static void locationWithPerWorldBindingsAttributeGetterCallback(v8::Local<v8::St ring>, const v8::PropertyCallbackInfo<v8::Value>& info)
2760 {
2761 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2762 TestObjectPythonV8Internal::locationWithPerWorldBindingsAttributeGetter(info );
2763 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2764 }
2765
2766 static void locationWithPerWorldBindingsAttributeSetter(v8::Local<v8::Value> v8V alue, const v8::PropertyCallbackInfo<void>& info)
2767 {
2768 v8::Handle<v8::Object> holder = info.Holder();
2769 TestObjectPython* proxyImpl = V8TestObjectPython::toNative(holder);
2770 RefPtr<TestNode> impl = WTF::getPtr(proxyImpl->locationWithPerWorldBindings( ));
2771 if (!impl)
2772 return;
2773 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, v8Value);
2774 impl->setHref(cppValue);
2775 }
2776
2777 static void locationWithPerWorldBindingsAttributeSetterCallback(v8::Local<v8::St ring>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
2778 {
2779 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2780 TestObjectPythonV8Internal::locationWithPerWorldBindingsAttributeSetter(v8Va lue, info);
2781 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2782 }
2783
2784 static void locationWithPerWorldBindingsAttributeGetterForMainWorld(const v8::Pr opertyCallbackInfo<v8::Value>& info)
2785 {
2786 v8::Handle<v8::Object> holder = info.Holder();
2787 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
2788 v8SetReturnValueForMainWorld(info, WTF::getPtr(impl->locationWithPerWorldBin dings()));
2789 }
2790
2791 static void locationWithPerWorldBindingsAttributeGetterCallbackForMainWorld(v8:: Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2792 {
2793 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2794 TestObjectPythonV8Internal::locationWithPerWorldBindingsAttributeGetterForMa inWorld(info);
2795 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2796 }
2797
2798 static void locationWithPerWorldBindingsAttributeSetterForMainWorld(v8::Local<v8 ::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
2799 {
2800 v8::Handle<v8::Object> holder = info.Holder();
2801 TestObjectPython* proxyImpl = V8TestObjectPython::toNative(holder);
2802 RefPtr<TestNode> impl = WTF::getPtr(proxyImpl->locationWithPerWorldBindings( ));
2803 if (!impl)
2804 return;
2805 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, v8Value);
2806 impl->setHref(cppValue);
2807 }
2808
2809 static void locationWithPerWorldBindingsAttributeSetterCallbackForMainWorld(v8:: Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo< void>& info)
2810 {
2811 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2812 TestObjectPythonV8Internal::locationWithPerWorldBindingsAttributeSetterForMa inWorld(v8Value, info);
2813 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2814 }
2815
2816 static void locationWillBeGarbageCollectedAttributeGetter(const v8::PropertyCall backInfo<v8::Value>& info)
2817 {
2818 v8::Handle<v8::Object> holder = info.Holder();
2819 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
2820 RefPtrWillBeRawPtr<TestInterfaceWillBeGarbageCollected> result(impl->locatio nWillBeGarbageCollected());
2821 if (result && DOMDataStore::setReturnValueFromWrapper<V8TestInterfaceWillBeG arbageCollected>(info.GetReturnValue(), result.get()))
2822 return;
2823 v8::Handle<v8::Value> wrapper = toV8(result.get(), holder, info.GetIsolate() );
2824 if (!wrapper.IsEmpty()) {
2825 V8HiddenValue::setHiddenValue(info.GetIsolate(), holder, v8AtomicString( info.GetIsolate(), "locationWillBeGarbageCollected"), wrapper);
2826 v8SetReturnValue(info, wrapper);
2827 }
2828 }
2829
2830 static void locationWillBeGarbageCollectedAttributeGetterCallback(v8::Local<v8:: String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2831 {
2832 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2833 TestObjectPythonV8Internal::locationWillBeGarbageCollectedAttributeGetter(in fo);
2834 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2835 }
2836
2837 static void locationWillBeGarbageCollectedAttributeSetter(v8::Local<v8::Value> v 8Value, const v8::PropertyCallbackInfo<void>& info)
2838 {
2839 v8::Handle<v8::Object> holder = info.Holder();
2840 TestObjectPython* proxyImpl = V8TestObjectPython::toNative(holder);
2841 RefPtrWillBeRawPtr<TestInterfaceWillBeGarbageCollected> impl = WTF::getPtr(p roxyImpl->locationWillBeGarbageCollected());
2842 if (!impl)
2843 return;
2844 V8TRYCATCH_VOID(TestInterfaceWillBeGarbageCollected*, cppValue, V8TestInterf aceWillBeGarbageCollected::toNativeWithTypeCheck(info.GetIsolate(), v8Value));
2845 impl->setAttr1(WTF::getPtr(cppValue));
2846 }
2847
2848 static void locationWillBeGarbageCollectedAttributeSetterCallback(v8::Local<v8:: String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& inf o)
2849 {
2850 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2851 TestObjectPythonV8Internal::locationWillBeGarbageCollectedAttributeSetter(v8 Value, info);
2852 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2853 }
2854
2855 static void raisesExceptionLongAttributeAttributeGetter(const v8::PropertyCallba ckInfo<v8::Value>& info)
2856 {
2857 v8::Handle<v8::Object> holder = info.Holder();
2858 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
2859 ExceptionState exceptionState(ExceptionState::GetterContext, "raisesExceptio nLongAttribute", "TestObjectPython", holder, info.GetIsolate());
2860 int v8Value = impl->raisesExceptionLongAttribute(exceptionState);
2861 if (UNLIKELY(exceptionState.throwIfNeeded()))
2862 return;
2863 v8SetReturnValueInt(info, v8Value);
2864 }
2865
2866 static void raisesExceptionLongAttributeAttributeGetterCallback(v8::Local<v8::St ring>, const v8::PropertyCallbackInfo<v8::Value>& info)
2867 {
2868 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2869 TestObjectPythonV8Internal::raisesExceptionLongAttributeAttributeGetter(info );
2870 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2871 }
2872
2873 static void raisesExceptionLongAttributeAttributeSetter(v8::Local<v8::Value> v8V alue, const v8::PropertyCallbackInfo<void>& info)
2874 {
2875 v8::Handle<v8::Object> holder = info.Holder();
2876 ExceptionState exceptionState(ExceptionState::SetterContext, "raisesExceptio nLongAttribute", "TestObjectPython", holder, info.GetIsolate());
2877 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
2878 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e xceptionState);
2879 impl->setRaisesExceptionLongAttribute(cppValue, exceptionState);
2880 exceptionState.throwIfNeeded();
2881 }
2882
2883 static void raisesExceptionLongAttributeAttributeSetterCallback(v8::Local<v8::St ring>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
2884 {
2885 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2886 TestObjectPythonV8Internal::raisesExceptionLongAttributeAttributeSetter(v8Va lue, info);
2887 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2888 }
2889
2890 static void raisesExceptionGetterLongAttributeAttributeGetter(const v8::Property CallbackInfo<v8::Value>& info)
2891 {
2892 v8::Handle<v8::Object> holder = info.Holder();
2893 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
2894 ExceptionState exceptionState(ExceptionState::GetterContext, "raisesExceptio nGetterLongAttribute", "TestObjectPython", holder, info.GetIsolate());
2895 int v8Value = impl->raisesExceptionGetterLongAttribute(exceptionState);
2896 if (UNLIKELY(exceptionState.throwIfNeeded()))
2897 return;
2898 v8SetReturnValueInt(info, v8Value);
2899 }
2900
2901 static void raisesExceptionGetterLongAttributeAttributeGetterCallback(v8::Local< v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2902 {
2903 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2904 TestObjectPythonV8Internal::raisesExceptionGetterLongAttributeAttributeGette r(info);
2905 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2906 }
2907
2908 static void raisesExceptionGetterLongAttributeAttributeSetter(v8::Local<v8::Valu e> v8Value, const v8::PropertyCallbackInfo<void>& info)
2909 {
2910 v8::Handle<v8::Object> holder = info.Holder();
2911 ExceptionState exceptionState(ExceptionState::SetterContext, "raisesExceptio nGetterLongAttribute", "TestObjectPython", holder, info.GetIsolate());
2912 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
2913 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e xceptionState);
2914 impl->setRaisesExceptionGetterLongAttribute(cppValue);
2915 }
2916
2917 static void raisesExceptionGetterLongAttributeAttributeSetterCallback(v8::Local< v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
2918 {
2919 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2920 TestObjectPythonV8Internal::raisesExceptionGetterLongAttributeAttributeSette r(v8Value, info);
2921 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2922 }
2923
2924 static void setterRaisesExceptionLongAttributeAttributeGetter(const v8::Property CallbackInfo<v8::Value>& info)
2925 {
2926 v8::Handle<v8::Object> holder = info.Holder();
2927 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
2928 v8SetReturnValueInt(info, impl->setterRaisesExceptionLongAttribute());
2929 }
2930
2931 static void setterRaisesExceptionLongAttributeAttributeGetterCallback(v8::Local< v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2932 {
2933 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2934 TestObjectPythonV8Internal::setterRaisesExceptionLongAttributeAttributeGette r(info);
2935 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2936 }
2937
2938 static void setterRaisesExceptionLongAttributeAttributeSetter(v8::Local<v8::Valu e> v8Value, const v8::PropertyCallbackInfo<void>& info)
2939 {
2940 v8::Handle<v8::Object> holder = info.Holder();
2941 ExceptionState exceptionState(ExceptionState::SetterContext, "setterRaisesEx ceptionLongAttribute", "TestObjectPython", holder, info.GetIsolate());
2942 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
2943 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e xceptionState);
2944 impl->setSetterRaisesExceptionLongAttribute(cppValue, exceptionState);
2945 exceptionState.throwIfNeeded();
2946 }
2947
2948 static void setterRaisesExceptionLongAttributeAttributeSetterCallback(v8::Local< v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
2949 {
2950 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2951 TestObjectPythonV8Internal::setterRaisesExceptionLongAttributeAttributeSette r(v8Value, info);
2952 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2953 }
2954
2955 static void raisesExceptionTestInterfaceEmptyAttributeAttributeGetter(const v8:: PropertyCallbackInfo<v8::Value>& info)
2956 {
2957 v8::Handle<v8::Object> holder = info.Holder();
2958 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
2959 ExceptionState exceptionState(ExceptionState::GetterContext, "raisesExceptio nTestInterfaceEmptyAttribute", "TestObjectPython", holder, info.GetIsolate());
2960 RefPtr<TestInterfaceEmpty> v8Value = impl->raisesExceptionTestInterfaceEmpty Attribute(exceptionState);
2961 if (UNLIKELY(exceptionState.throwIfNeeded()))
2962 return;
2963 v8SetReturnValueFast(info, WTF::getPtr(v8Value.release()), impl);
2964 }
2965
2966 static void raisesExceptionTestInterfaceEmptyAttributeAttributeGetterCallback(v8 ::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2967 {
2968 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2969 TestObjectPythonV8Internal::raisesExceptionTestInterfaceEmptyAttributeAttrib uteGetter(info);
2970 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2971 }
2972
2973 static void raisesExceptionTestInterfaceEmptyAttributeAttributeSetter(v8::Local< v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
2974 {
2975 v8::Handle<v8::Object> holder = info.Holder();
2976 ExceptionState exceptionState(ExceptionState::SetterContext, "raisesExceptio nTestInterfaceEmptyAttribute", "TestObjectPython", holder, info.GetIsolate());
2977 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
2978 V8TRYCATCH_VOID(TestInterfaceEmpty*, cppValue, V8TestInterfaceEmpty::toNativ eWithTypeCheck(info.GetIsolate(), v8Value));
2979 impl->setRaisesExceptionTestInterfaceEmptyAttribute(WTF::getPtr(cppValue), e xceptionState);
2980 exceptionState.throwIfNeeded();
2981 }
2982
2983 static void raisesExceptionTestInterfaceEmptyAttributeAttributeSetterCallback(v8 ::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInf o<void>& info)
2984 {
2985 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2986 TestObjectPythonV8Internal::raisesExceptionTestInterfaceEmptyAttributeAttrib uteSetter(v8Value, info);
2987 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2988 }
2989
2990 static void cachedAttributeRaisesExceptionGetterAnyAttributeAttributeGetter(cons t v8::PropertyCallbackInfo<v8::Value>& info)
2991 {
2992 v8::Handle<v8::Object> holder = info.Holder();
2993 v8::Handle<v8::String> propertyName = v8AtomicString(info.GetIsolate(), "cac hedAttributeRaisesExceptionGetterAnyAttribute");
2994 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
2995 if (!impl->isValueDirty()) {
2996 v8::Handle<v8::Value> v8Value = V8HiddenValue::getHiddenValue(info.GetIs olate(), holder, propertyName);
2997 if (!v8Value.IsEmpty()) {
2998 v8SetReturnValue(info, v8Value);
2999 return;
3000 }
3001 }
3002 ExceptionState exceptionState(ExceptionState::GetterContext, "cachedAttribut eRaisesExceptionGetterAnyAttribute", "TestObjectPython", holder, info.GetIsolate ());
3003 ScriptValue v8Value = impl->cachedAttributeRaisesExceptionGetterAnyAttribute (exceptionState);
3004 if (UNLIKELY(exceptionState.throwIfNeeded()))
3005 return;
3006 V8HiddenValue::setHiddenValue(info.GetIsolate(), holder, propertyName, v8Val ue.v8Value());
3007 v8SetReturnValue(info, v8Value.v8Value());
3008 }
3009
3010 static void cachedAttributeRaisesExceptionGetterAnyAttributeAttributeGetterCallb ack(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3011 {
3012 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3013 TestObjectPythonV8Internal::cachedAttributeRaisesExceptionGetterAnyAttribute AttributeGetter(info);
3014 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3015 }
3016
3017 static void cachedAttributeRaisesExceptionGetterAnyAttributeAttributeSetter(v8:: Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
3018 {
3019 v8::Handle<v8::Object> holder = info.Holder();
3020 ExceptionState exceptionState(ExceptionState::SetterContext, "cachedAttribut eRaisesExceptionGetterAnyAttribute", "TestObjectPython", holder, info.GetIsolate ());
3021 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
3022 V8TRYCATCH_VOID(ScriptValue, cppValue, ScriptValue(v8Value, info.GetIsolate( )));
3023 impl->setCachedAttributeRaisesExceptionGetterAnyAttribute(cppValue, exceptio nState);
3024 exceptionState.throwIfNeeded();
3025 V8HiddenValue::deleteHiddenValue(info.GetIsolate(), holder, v8AtomicString(i nfo.GetIsolate(), "cachedAttributeRaisesExceptionGetterAnyAttribute")); // Inval idate the cached value.
3026 }
3027
3028 static void cachedAttributeRaisesExceptionGetterAnyAttributeAttributeSetterCallb ack(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallb ackInfo<void>& info)
3029 {
3030 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
3031 TestObjectPythonV8Internal::cachedAttributeRaisesExceptionGetterAnyAttribute AttributeSetter(v8Value, info);
3032 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3033 }
3034
3035 static void reflectTestInterfaceAttributeAttributeGetter(const v8::PropertyCallb ackInfo<v8::Value>& info)
3036 {
3037 v8::Handle<v8::Object> holder = info.Holder();
3038 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
3039 v8SetReturnValueFast(info, WTF::getPtr(impl->fastGetAttribute(HTMLNames::ref lecttestinterfaceattributeAttr)), impl);
3040 }
3041
3042 static void reflectTestInterfaceAttributeAttributeGetterCallback(v8::Local<v8::S tring>, const v8::PropertyCallbackInfo<v8::Value>& info)
3043 {
3044 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3045 TestObjectPythonV8Internal::reflectTestInterfaceAttributeAttributeGetter(inf o);
3046 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3047 }
3048
3049 static void reflectTestInterfaceAttributeAttributeSetter(v8::Local<v8::Value> v8 Value, const v8::PropertyCallbackInfo<void>& info)
3050 {
3051 v8::Handle<v8::Object> holder = info.Holder();
3052 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
3053 V8TRYCATCH_VOID(TestInterface*, cppValue, V8TestInterface::toNativeWithTypeC heck(info.GetIsolate(), v8Value));
3054 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
3055 impl->setAttribute(HTMLNames::reflecttestinterfaceattributeAttr, WTF::getPtr (cppValue));
3056 }
3057
3058 static void reflectTestInterfaceAttributeAttributeSetterCallback(v8::Local<v8::S tring>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info )
3059 {
3060 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
3061 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
3062 TestObjectPythonV8Internal::reflectTestInterfaceAttributeAttributeSetter(v8V alue, info);
3063 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3064 }
3065
3066 static void reflectReflectedNameAttributeTestAttributeAttributeGetter(const v8:: PropertyCallbackInfo<v8::Value>& info)
3067 {
3068 v8::Handle<v8::Object> holder = info.Holder();
3069 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
3070 v8SetReturnValueFast(info, WTF::getPtr(impl->fastGetAttribute(HTMLNames::ref lectedNameAttributeAttr)), impl);
3071 }
3072
3073 static void reflectReflectedNameAttributeTestAttributeAttributeGetterCallback(v8 ::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3074 {
3075 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3076 TestObjectPythonV8Internal::reflectReflectedNameAttributeTestAttributeAttrib uteGetter(info);
3077 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3078 }
3079
3080 static void reflectReflectedNameAttributeTestAttributeAttributeSetter(v8::Local< v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
3081 {
3082 v8::Handle<v8::Object> holder = info.Holder();
3083 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
3084 V8TRYCATCH_VOID(TestInterface*, cppValue, V8TestInterface::toNativeWithTypeC heck(info.GetIsolate(), v8Value));
3085 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
3086 impl->setAttribute(HTMLNames::reflectedNameAttributeAttr, WTF::getPtr(cppVal ue));
3087 }
3088
3089 static void reflectReflectedNameAttributeTestAttributeAttributeSetterCallback(v8 ::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInf o<void>& info)
3090 {
3091 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
3092 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
3093 TestObjectPythonV8Internal::reflectReflectedNameAttributeTestAttributeAttrib uteSetter(v8Value, info);
3094 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3095 }
3096
3097 static void reflectBooleanAttributeAttributeGetter(const v8::PropertyCallbackInf o<v8::Value>& info)
3098 {
3099 v8::Handle<v8::Object> holder = info.Holder();
3100 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
3101 v8SetReturnValueBool(info, impl->fastHasAttribute(HTMLNames::reflectbooleana ttributeAttr));
3102 }
3103
3104 static void reflectBooleanAttributeAttributeGetterCallback(v8::Local<v8::String> , const v8::PropertyCallbackInfo<v8::Value>& info)
3105 {
3106 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3107 TestObjectPythonV8Internal::reflectBooleanAttributeAttributeGetter(info);
3108 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3109 }
3110
3111 static void reflectBooleanAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
3112 {
3113 v8::Handle<v8::Object> holder = info.Holder();
3114 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
3115 V8TRYCATCH_VOID(bool, cppValue, v8Value->BooleanValue());
3116 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
3117 impl->setBooleanAttribute(HTMLNames::reflectbooleanattributeAttr, cppValue);
3118 }
3119
3120 static void reflectBooleanAttributeAttributeSetterCallback(v8::Local<v8::String> , v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
3121 {
3122 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
3123 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
3124 TestObjectPythonV8Internal::reflectBooleanAttributeAttributeSetter(v8Value, info);
3125 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3126 }
3127
3128 static void reflectLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v 8::Value>& info)
3129 {
3130 v8::Handle<v8::Object> holder = info.Holder();
3131 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
3132 v8SetReturnValueInt(info, impl->getIntegralAttribute(HTMLNames::reflectlonga ttributeAttr));
3133 }
3134
3135 static void reflectLongAttributeAttributeGetterCallback(v8::Local<v8::String>, c onst v8::PropertyCallbackInfo<v8::Value>& info)
3136 {
3137 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3138 TestObjectPythonV8Internal::reflectLongAttributeAttributeGetter(info);
3139 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3140 }
3141
3142 static void reflectLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, co nst v8::PropertyCallbackInfo<void>& info)
3143 {
3144 v8::Handle<v8::Object> holder = info.Holder();
3145 ExceptionState exceptionState(ExceptionState::SetterContext, "reflectLongAtt ribute", "TestObjectPython", holder, info.GetIsolate());
3146 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
3147 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e xceptionState);
3148 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
3149 impl->setIntegralAttribute(HTMLNames::reflectlongattributeAttr, cppValue);
3150 }
3151
3152 static void reflectLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v 8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
3153 {
3154 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
3155 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
3156 TestObjectPythonV8Internal::reflectLongAttributeAttributeSetter(v8Value, inf o);
3157 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3158 }
3159
3160 static void reflectUnsignedShortAttributeAttributeGetter(const v8::PropertyCallb ackInfo<v8::Value>& info)
3161 {
3162 v8::Handle<v8::Object> holder = info.Holder();
3163 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
3164 v8SetReturnValueUnsigned(info, std::max(0, impl->fastGetAttribute(HTMLNames: :reflectunsignedshortattributeAttr)));
3165 }
3166
3167 static void reflectUnsignedShortAttributeAttributeGetterCallback(v8::Local<v8::S tring>, const v8::PropertyCallbackInfo<v8::Value>& info)
3168 {
3169 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3170 TestObjectPythonV8Internal::reflectUnsignedShortAttributeAttributeGetter(inf o);
3171 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3172 }
3173
3174 static void reflectUnsignedShortAttributeAttributeSetter(v8::Local<v8::Value> v8 Value, const v8::PropertyCallbackInfo<void>& info)
3175 {
3176 v8::Handle<v8::Object> holder = info.Holder();
3177 ExceptionState exceptionState(ExceptionState::SetterContext, "reflectUnsigne dShortAttribute", "TestObjectPython", holder, info.GetIsolate());
3178 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
3179 V8TRYCATCH_EXCEPTION_VOID(unsigned, cppValue, toUInt16(v8Value, exceptionSta te), exceptionState);
3180 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
3181 impl->setAttribute(HTMLNames::reflectunsignedshortattributeAttr, cppValue);
3182 }
3183
3184 static void reflectUnsignedShortAttributeAttributeSetterCallback(v8::Local<v8::S tring>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info )
3185 {
3186 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
3187 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
3188 TestObjectPythonV8Internal::reflectUnsignedShortAttributeAttributeSetter(v8V alue, info);
3189 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3190 }
3191
3192 static void reflectUnsignedLongAttributeAttributeGetter(const v8::PropertyCallba ckInfo<v8::Value>& info)
3193 {
3194 v8::Handle<v8::Object> holder = info.Holder();
3195 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
3196 v8SetReturnValueUnsigned(info, std::max(0, impl->getIntegralAttribute(HTMLNa mes::reflectunsignedlongattributeAttr)));
3197 }
3198
3199 static void reflectUnsignedLongAttributeAttributeGetterCallback(v8::Local<v8::St ring>, const v8::PropertyCallbackInfo<v8::Value>& info)
3200 {
3201 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3202 TestObjectPythonV8Internal::reflectUnsignedLongAttributeAttributeGetter(info );
3203 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3204 }
3205
3206 static void reflectUnsignedLongAttributeAttributeSetter(v8::Local<v8::Value> v8V alue, const v8::PropertyCallbackInfo<void>& info)
3207 {
3208 v8::Handle<v8::Object> holder = info.Holder();
3209 ExceptionState exceptionState(ExceptionState::SetterContext, "reflectUnsigne dLongAttribute", "TestObjectPython", holder, info.GetIsolate());
3210 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
3211 V8TRYCATCH_EXCEPTION_VOID(unsigned, cppValue, toUInt32(v8Value, exceptionSta te), exceptionState);
3212 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
3213 impl->setUnsignedIntegralAttribute(HTMLNames::reflectunsignedlongattributeAt tr, cppValue);
3214 }
3215
3216 static void reflectUnsignedLongAttributeAttributeSetterCallback(v8::Local<v8::St ring>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
3217 {
3218 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
3219 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
3220 TestObjectPythonV8Internal::reflectUnsignedLongAttributeAttributeSetter(v8Va lue, info);
3221 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3222 }
3223
3224 static void idAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
3225 {
3226 v8::Handle<v8::Object> holder = info.Holder();
3227 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
3228 v8SetReturnValueString(info, impl->getIdAttribute(), info.GetIsolate());
3229 }
3230
3231 static void idAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyC allbackInfo<v8::Value>& info)
3232 {
3233 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3234 TestObjectPythonV8Internal::idAttributeGetter(info);
3235 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3236 }
3237
3238 static void idAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCa llbackInfo<void>& info)
3239 {
3240 v8::Handle<v8::Object> holder = info.Holder();
3241 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
3242 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, v8Value);
3243 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
3244 impl->setAttribute(HTMLNames::idAttr, cppValue);
3245 }
3246
3247 static void idAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value > v8Value, const v8::PropertyCallbackInfo<void>& info)
3248 {
3249 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
3250 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
3251 TestObjectPythonV8Internal::idAttributeSetter(v8Value, info);
3252 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3253 }
3254
3255 static void nameAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
3256 {
3257 v8::Handle<v8::Object> holder = info.Holder();
3258 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
3259 v8SetReturnValueString(info, impl->getNameAttribute(), info.GetIsolate());
3260 }
3261
3262 static void nameAttributeGetterCallback(v8::Local<v8::String>, const v8::Propert yCallbackInfo<v8::Value>& info)
3263 {
3264 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3265 TestObjectPythonV8Internal::nameAttributeGetter(info);
3266 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3267 }
3268
3269 static void nameAttributeSetter(v8::Local<v8::Value> v8Value, const v8::Property CallbackInfo<void>& info)
3270 {
3271 v8::Handle<v8::Object> holder = info.Holder();
3272 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
3273 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, v8Value);
3274 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
3275 impl->setAttribute(HTMLNames::nameAttr, cppValue);
3276 }
3277
3278 static void nameAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Val ue> v8Value, const v8::PropertyCallbackInfo<void>& info)
3279 {
3280 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
3281 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
3282 TestObjectPythonV8Internal::nameAttributeSetter(v8Value, info);
3283 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3284 }
3285
3286 static void classAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info )
3287 {
3288 v8::Handle<v8::Object> holder = info.Holder();
3289 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
3290 v8SetReturnValueString(info, impl->getClassAttribute(), info.GetIsolate());
3291 }
3292
3293 static void classAttributeGetterCallback(v8::Local<v8::String>, const v8::Proper tyCallbackInfo<v8::Value>& info)
3294 {
3295 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3296 TestObjectPythonV8Internal::classAttributeGetter(info);
3297 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3298 }
3299
3300 static void classAttributeSetter(v8::Local<v8::Value> v8Value, const v8::Propert yCallbackInfo<void>& info)
3301 {
3302 v8::Handle<v8::Object> holder = info.Holder();
3303 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
3304 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, v8Value);
3305 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
3306 impl->setAttribute(HTMLNames::classAttr, cppValue);
3307 }
3308
3309 static void classAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Va lue> v8Value, const v8::PropertyCallbackInfo<void>& info)
3310 {
3311 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
3312 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
3313 TestObjectPythonV8Internal::classAttributeSetter(v8Value, info);
3314 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3315 }
3316
3317 static void reflectedIdAttributeGetter(const v8::PropertyCallbackInfo<v8::Value> & info)
3318 {
3319 v8::Handle<v8::Object> holder = info.Holder();
3320 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
3321 v8SetReturnValueString(info, impl->getIdAttribute(), info.GetIsolate());
3322 }
3323
3324 static void reflectedIdAttributeGetterCallback(v8::Local<v8::String>, const v8:: PropertyCallbackInfo<v8::Value>& info)
3325 {
3326 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3327 TestObjectPythonV8Internal::reflectedIdAttributeGetter(info);
3328 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3329 }
3330
3331 static void reflectedIdAttributeSetter(v8::Local<v8::Value> v8Value, const v8::P ropertyCallbackInfo<void>& info)
3332 {
3333 v8::Handle<v8::Object> holder = info.Holder();
3334 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
3335 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, v8Value);
3336 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
3337 impl->setAttribute(HTMLNames::idAttr, cppValue);
3338 }
3339
3340 static void reflectedIdAttributeSetterCallback(v8::Local<v8::String>, v8::Local< v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
3341 {
3342 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
3343 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
3344 TestObjectPythonV8Internal::reflectedIdAttributeSetter(v8Value, info);
3345 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3346 }
3347
3348 static void reflectedNameAttributeGetter(const v8::PropertyCallbackInfo<v8::Valu e>& info)
3349 {
3350 v8::Handle<v8::Object> holder = info.Holder();
3351 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
3352 v8SetReturnValueString(info, impl->getNameAttribute(), info.GetIsolate());
3353 }
3354
3355 static void reflectedNameAttributeGetterCallback(v8::Local<v8::String>, const v8 ::PropertyCallbackInfo<v8::Value>& info)
3356 {
3357 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3358 TestObjectPythonV8Internal::reflectedNameAttributeGetter(info);
3359 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3360 }
3361
3362 static void reflectedNameAttributeSetter(v8::Local<v8::Value> v8Value, const v8: :PropertyCallbackInfo<void>& info)
3363 {
3364 v8::Handle<v8::Object> holder = info.Holder();
3365 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
3366 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, v8Value);
3367 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
3368 impl->setAttribute(HTMLNames::nameAttr, cppValue);
3369 }
3370
3371 static void reflectedNameAttributeSetterCallback(v8::Local<v8::String>, v8::Loca l<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
3372 {
3373 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
3374 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
3375 TestObjectPythonV8Internal::reflectedNameAttributeSetter(v8Value, info);
3376 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3377 }
3378
3379 static void reflectedClassAttributeGetter(const v8::PropertyCallbackInfo<v8::Val ue>& info)
3380 {
3381 v8::Handle<v8::Object> holder = info.Holder();
3382 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
3383 v8SetReturnValueString(info, impl->getClassAttribute(), info.GetIsolate());
3384 }
3385
3386 static void reflectedClassAttributeGetterCallback(v8::Local<v8::String>, const v 8::PropertyCallbackInfo<v8::Value>& info)
3387 {
3388 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3389 TestObjectPythonV8Internal::reflectedClassAttributeGetter(info);
3390 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3391 }
3392
3393 static void reflectedClassAttributeSetter(v8::Local<v8::Value> v8Value, const v8 ::PropertyCallbackInfo<void>& info)
3394 {
3395 v8::Handle<v8::Object> holder = info.Holder();
3396 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
3397 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, v8Value);
3398 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
3399 impl->setAttribute(HTMLNames::classAttr, cppValue);
3400 }
3401
3402 static void reflectedClassAttributeSetterCallback(v8::Local<v8::String>, v8::Loc al<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
3403 {
3404 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
3405 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
3406 TestObjectPythonV8Internal::reflectedClassAttributeSetter(v8Value, info);
3407 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3408 }
3409
3410 static void limitedToOnlyOneAttributeAttributeGetter(const v8::PropertyCallbackI nfo<v8::Value>& info)
3411 {
3412 v8::Handle<v8::Object> holder = info.Holder();
3413 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
3414 String v8Value = impl->fastGetAttribute(HTMLNames::limitedtoonlyoneattribute Attr);
3415 if (v8Value.isEmpty()) {
3416 ;
3417 } else if (equalIgnoringCase(v8Value, "unique")) {
3418 v8Value = "unique";
3419 } else {
3420 v8Value = "";
3421 }
3422 v8SetReturnValueString(info, v8Value, info.GetIsolate());
3423 }
3424
3425 static void limitedToOnlyOneAttributeAttributeGetterCallback(v8::Local<v8::Strin g>, const v8::PropertyCallbackInfo<v8::Value>& info)
3426 {
3427 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3428 TestObjectPythonV8Internal::limitedToOnlyOneAttributeAttributeGetter(info);
3429 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3430 }
3431
3432 static void limitedToOnlyOneAttributeAttributeSetter(v8::Local<v8::Value> v8Valu e, const v8::PropertyCallbackInfo<void>& info)
3433 {
3434 v8::Handle<v8::Object> holder = info.Holder();
3435 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
3436 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, v8Value);
3437 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
3438 impl->setAttribute(HTMLNames::limitedtoonlyoneattributeAttr, cppValue);
3439 }
3440
3441 static void limitedToOnlyOneAttributeAttributeSetterCallback(v8::Local<v8::Strin g>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
3442 {
3443 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
3444 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
3445 TestObjectPythonV8Internal::limitedToOnlyOneAttributeAttributeSetter(v8Value , info);
3446 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3447 }
3448
3449 static void limitedToOnlyAttributeAttributeGetter(const v8::PropertyCallbackInfo <v8::Value>& info)
3450 {
3451 v8::Handle<v8::Object> holder = info.Holder();
3452 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
3453 String v8Value = impl->fastGetAttribute(HTMLNames::limitedtoonlyattributeAtt r);
3454 if (v8Value.isEmpty()) {
3455 ;
3456 } else if (equalIgnoringCase(v8Value, "Per")) {
3457 v8Value = "Per";
3458 } else if (equalIgnoringCase(v8Value, "Paal")) {
3459 v8Value = "Paal";
3460 } else if (equalIgnoringCase(v8Value, "Espen")) {
3461 v8Value = "Espen";
3462 } else {
3463 v8Value = "";
3464 }
3465 v8SetReturnValueString(info, v8Value, info.GetIsolate());
3466 }
3467
3468 static void limitedToOnlyAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3469 {
3470 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3471 TestObjectPythonV8Internal::limitedToOnlyAttributeAttributeGetter(info);
3472 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3473 }
3474
3475 static void limitedToOnlyAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
3476 {
3477 v8::Handle<v8::Object> holder = info.Holder();
3478 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
3479 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, v8Value);
3480 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
3481 impl->setAttribute(HTMLNames::limitedtoonlyattributeAttr, cppValue);
3482 }
3483
3484 static void limitedToOnlyAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
3485 {
3486 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
3487 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
3488 TestObjectPythonV8Internal::limitedToOnlyAttributeAttributeSetter(v8Value, i nfo);
3489 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3490 }
3491
3492 static void limitedToOnlyOtherAttributeAttributeGetter(const v8::PropertyCallbac kInfo<v8::Value>& info)
3493 {
3494 v8::Handle<v8::Object> holder = info.Holder();
3495 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
3496 String v8Value = impl->fastGetAttribute(HTMLNames::OtherAttr);
3497 if (v8Value.isEmpty()) {
3498 ;
3499 } else if (equalIgnoringCase(v8Value, "Value1")) {
3500 v8Value = "Value1";
3501 } else if (equalIgnoringCase(v8Value, "Value2")) {
3502 v8Value = "Value2";
3503 } else {
3504 v8Value = "";
3505 }
3506 v8SetReturnValueString(info, v8Value, info.GetIsolate());
3507 }
3508
3509 static void limitedToOnlyOtherAttributeAttributeGetterCallback(v8::Local<v8::Str ing>, const v8::PropertyCallbackInfo<v8::Value>& info)
3510 {
3511 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3512 TestObjectPythonV8Internal::limitedToOnlyOtherAttributeAttributeGetter(info) ;
3513 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3514 }
3515
3516 static void limitedToOnlyOtherAttributeAttributeSetter(v8::Local<v8::Value> v8Va lue, const v8::PropertyCallbackInfo<void>& info)
3517 {
3518 v8::Handle<v8::Object> holder = info.Holder();
3519 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
3520 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, v8Value);
3521 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
3522 impl->setAttribute(HTMLNames::OtherAttr, cppValue);
3523 }
3524
3525 static void limitedToOnlyOtherAttributeAttributeSetterCallback(v8::Local<v8::Str ing>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
3526 {
3527 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
3528 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
3529 TestObjectPythonV8Internal::limitedToOnlyOtherAttributeAttributeSetter(v8Val ue, info);
3530 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3531 }
3532
3533 static void limitedWithMissingDefaultAttributeAttributeGetter(const v8::Property CallbackInfo<v8::Value>& info)
3534 {
3535 v8::Handle<v8::Object> holder = info.Holder();
3536 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
3537 String v8Value = impl->fastGetAttribute(HTMLNames::limitedwithmissingdefault attributeAttr);
3538 if (v8Value.isEmpty()) {
3539 v8Value = "rsa";
3540 } else if (equalIgnoringCase(v8Value, "rsa")) {
3541 v8Value = "rsa";
3542 } else if (equalIgnoringCase(v8Value, "dsa")) {
3543 v8Value = "dsa";
3544 } else {
3545 v8Value = "";
3546 }
3547 v8SetReturnValueString(info, v8Value, info.GetIsolate());
3548 }
3549
3550 static void limitedWithMissingDefaultAttributeAttributeGetterCallback(v8::Local< v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3551 {
3552 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3553 TestObjectPythonV8Internal::limitedWithMissingDefaultAttributeAttributeGette r(info);
3554 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3555 }
3556
3557 static void limitedWithMissingDefaultAttributeAttributeSetter(v8::Local<v8::Valu e> v8Value, const v8::PropertyCallbackInfo<void>& info)
3558 {
3559 v8::Handle<v8::Object> holder = info.Holder();
3560 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
3561 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, v8Value);
3562 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
3563 impl->setAttribute(HTMLNames::limitedwithmissingdefaultattributeAttr, cppVal ue);
3564 }
3565
3566 static void limitedWithMissingDefaultAttributeAttributeSetterCallback(v8::Local< v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
3567 {
3568 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
3569 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
3570 TestObjectPythonV8Internal::limitedWithMissingDefaultAttributeAttributeSette r(v8Value, info);
3571 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3572 }
3573
3574 static void limitedWithInvalidMissingDefaultAttributeAttributeGetter(const v8::P ropertyCallbackInfo<v8::Value>& info)
3575 {
3576 v8::Handle<v8::Object> holder = info.Holder();
3577 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
3578 String v8Value = impl->fastGetAttribute(HTMLNames::limitedwithinvalidmissing defaultattributeAttr);
3579 if (v8Value.isEmpty()) {
3580 v8Value = "auto";
3581 } else if (equalIgnoringCase(v8Value, "ltr")) {
3582 v8Value = "ltr";
3583 } else if (equalIgnoringCase(v8Value, "rtl")) {
3584 v8Value = "rtl";
3585 } else if (equalIgnoringCase(v8Value, "auto")) {
3586 v8Value = "auto";
3587 } else {
3588 v8Value = "ltr";
3589 }
3590 v8SetReturnValueString(info, v8Value, info.GetIsolate());
3591 }
3592
3593 static void limitedWithInvalidMissingDefaultAttributeAttributeGetterCallback(v8: :Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3594 {
3595 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3596 TestObjectPythonV8Internal::limitedWithInvalidMissingDefaultAttributeAttribu teGetter(info);
3597 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3598 }
3599
3600 static void limitedWithInvalidMissingDefaultAttributeAttributeSetter(v8::Local<v 8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
3601 {
3602 v8::Handle<v8::Object> holder = info.Holder();
3603 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
3604 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, v8Value);
3605 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
3606 impl->setAttribute(HTMLNames::limitedwithinvalidmissingdefaultattributeAttr, cppValue);
3607 }
3608
3609 static void limitedWithInvalidMissingDefaultAttributeAttributeSetterCallback(v8: :Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo <void>& info)
3610 {
3611 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
3612 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
3613 TestObjectPythonV8Internal::limitedWithInvalidMissingDefaultAttributeAttribu teSetter(v8Value, info);
3614 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3615 }
3616
3617 static void corsSettingAttributeAttributeGetter(const v8::PropertyCallbackInfo<v 8::Value>& info)
3618 {
3619 v8::Handle<v8::Object> holder = info.Holder();
3620 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
3621 String v8Value = impl->fastGetAttribute(HTMLNames::corssettingattributeAttr) ;
3622 if (v8Value.isNull()) {
3623 ;
3624 } else if (v8Value.isEmpty()) {
3625 v8Value = "anonymous";
3626 } else if (equalIgnoringCase(v8Value, "anonymous")) {
3627 v8Value = "anonymous";
3628 } else if (equalIgnoringCase(v8Value, "use-credentials")) {
3629 v8Value = "use-credentials";
3630 } else {
3631 v8Value = "anonymous";
3632 }
3633 v8SetReturnValueString(info, v8Value, info.GetIsolate());
3634 }
3635
3636 static void corsSettingAttributeAttributeGetterCallback(v8::Local<v8::String>, c onst v8::PropertyCallbackInfo<v8::Value>& info)
3637 {
3638 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3639 TestObjectPythonV8Internal::corsSettingAttributeAttributeGetter(info);
3640 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3641 }
3642
3643 static void limitedWithEmptyMissingInvalidAttributeAttributeGetter(const v8::Pro pertyCallbackInfo<v8::Value>& info)
3644 {
3645 v8::Handle<v8::Object> holder = info.Holder();
3646 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
3647 String v8Value = impl->fastGetAttribute(HTMLNames::limitedwithemptymissingin validattributeAttr);
3648 if (v8Value.isNull()) {
3649 v8Value = "missing";
3650 } else if (v8Value.isEmpty()) {
3651 v8Value = "empty";
3652 } else if (equalIgnoringCase(v8Value, "empty")) {
3653 v8Value = "empty";
3654 } else if (equalIgnoringCase(v8Value, "missing")) {
3655 v8Value = "missing";
3656 } else if (equalIgnoringCase(v8Value, "invalid")) {
3657 v8Value = "invalid";
3658 } else if (equalIgnoringCase(v8Value, "a-normal")) {
3659 v8Value = "a-normal";
3660 } else {
3661 v8Value = "invalid";
3662 }
3663 v8SetReturnValueString(info, v8Value, info.GetIsolate());
3664 }
3665
3666 static void limitedWithEmptyMissingInvalidAttributeAttributeGetterCallback(v8::L ocal<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3667 {
3668 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3669 TestObjectPythonV8Internal::limitedWithEmptyMissingInvalidAttributeAttribute Getter(info);
3670 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3671 }
3672
3673 static void replaceableReadonlyLongAttributeAttributeGetter(const v8::PropertyCa llbackInfo<v8::Value>& info)
3674 {
3675 v8::Handle<v8::Object> holder = info.Holder();
3676 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
3677 v8SetReturnValueInt(info, impl->replaceableReadonlyLongAttribute());
3678 }
3679
3680 static void replaceableReadonlyLongAttributeAttributeGetterCallback(v8::Local<v8 ::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3681 {
3682 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3683 TestObjectPythonV8Internal::replaceableReadonlyLongAttributeAttributeGetter( info);
3684 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3685 }
3686
3687 static void locationReplaceableAttributeGetter(const v8::PropertyCallbackInfo<v8 ::Value>& info)
3688 {
3689 v8::Handle<v8::Object> holder = info.Holder();
3690 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
3691 v8SetReturnValueFast(info, WTF::getPtr(impl->locationReplaceable()), impl);
3692 }
3693
3694 static void locationReplaceableAttributeGetterCallback(v8::Local<v8::String>, co nst v8::PropertyCallbackInfo<v8::Value>& info)
3695 {
3696 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3697 TestObjectPythonV8Internal::locationReplaceableAttributeGetter(info);
3698 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3699 }
3700
3701 static void locationReplaceableAttributeSetter(v8::Local<v8::Value> v8Value, con st v8::PropertyCallbackInfo<void>& info)
3702 {
3703 v8::Handle<v8::Object> holder = info.Holder();
3704 TestObjectPython* proxyImpl = V8TestObjectPython::toNative(holder);
3705 RefPtr<TestNode> impl = WTF::getPtr(proxyImpl->locationReplaceable());
3706 if (!impl)
3707 return;
3708 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, v8Value);
3709 impl->setHref(cppValue);
3710 }
3711
3712 static void locationReplaceableAttributeSetterCallback(v8::Local<v8::String>, v8 ::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
3713 {
3714 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
3715 TestObjectPythonV8Internal::locationReplaceableAttributeSetter(v8Value, info );
3716 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3717 }
3718
3719 static void runtimeEnabledLongAttributeAttributeGetter(const v8::PropertyCallbac kInfo<v8::Value>& info)
3720 {
3721 v8::Handle<v8::Object> holder = info.Holder();
3722 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
3723 v8SetReturnValueInt(info, impl->runtimeEnabledLongAttribute());
3724 }
3725
3726 static void runtimeEnabledLongAttributeAttributeGetterCallback(v8::Local<v8::Str ing>, const v8::PropertyCallbackInfo<v8::Value>& info)
3727 {
3728 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3729 TestObjectPythonV8Internal::runtimeEnabledLongAttributeAttributeGetter(info) ;
3730 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3731 }
3732
3733 static void runtimeEnabledLongAttributeAttributeSetter(v8::Local<v8::Value> v8Va lue, const v8::PropertyCallbackInfo<void>& info)
3734 {
3735 v8::Handle<v8::Object> holder = info.Holder();
3736 ExceptionState exceptionState(ExceptionState::SetterContext, "runtimeEnabled LongAttribute", "TestObjectPython", holder, info.GetIsolate());
3737 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
3738 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e xceptionState);
3739 impl->setRuntimeEnabledLongAttribute(cppValue);
3740 }
3741
3742 static void runtimeEnabledLongAttributeAttributeSetterCallback(v8::Local<v8::Str ing>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
3743 {
3744 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
3745 TestObjectPythonV8Internal::runtimeEnabledLongAttributeAttributeSetter(v8Val ue, info);
3746 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3747 }
3748
3749 static void perContextEnabledRuntimeEnabledLongAttributeAttributeGetter(const v8 ::PropertyCallbackInfo<v8::Value>& info)
3750 {
3751 v8::Handle<v8::Object> holder = info.Holder();
3752 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
3753 v8SetReturnValueInt(info, impl->perContextEnabledRuntimeEnabledLongAttribute ());
3754 }
3755
3756 static void perContextEnabledRuntimeEnabledLongAttributeAttributeGetterCallback( v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3757 {
3758 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3759 TestObjectPythonV8Internal::perContextEnabledRuntimeEnabledLongAttributeAttr ibuteGetter(info);
3760 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3761 }
3762
3763 static void perContextEnabledRuntimeEnabledLongAttributeAttributeSetter(v8::Loca l<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
3764 {
3765 v8::Handle<v8::Object> holder = info.Holder();
3766 ExceptionState exceptionState(ExceptionState::SetterContext, "perContextEnab ledRuntimeEnabledLongAttribute", "TestObjectPython", holder, info.GetIsolate());
3767 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
3768 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e xceptionState);
3769 impl->setPerContextEnabledRuntimeEnabledLongAttribute(cppValue);
3770 }
3771
3772 static void perContextEnabledRuntimeEnabledLongAttributeAttributeSetterCallback( v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackI nfo<void>& info)
3773 {
3774 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
3775 TestObjectPythonV8Internal::perContextEnabledRuntimeEnabledLongAttributeAttr ibuteSetter(v8Value, info);
3776 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3777 }
3778
3779 #if ENABLE(CONDITION)
3780 static void conditionalRuntimeEnabledLongAttributeAttributeGetter(const v8::Prop ertyCallbackInfo<v8::Value>& info)
3781 {
3782 v8::Handle<v8::Object> holder = info.Holder();
3783 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
3784 v8SetReturnValueInt(info, impl->conditionalRuntimeEnabledLongAttribute());
3785 }
3786 #endif // ENABLE(CONDITION)
3787
3788 #if ENABLE(CONDITION)
3789 static void conditionalRuntimeEnabledLongAttributeAttributeGetterCallback(v8::Lo cal<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3790 {
3791 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3792 TestObjectPythonV8Internal::conditionalRuntimeEnabledLongAttributeAttributeG etter(info);
3793 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3794 }
3795 #endif // ENABLE(CONDITION)
3796
3797 #if ENABLE(CONDITION)
3798 static void conditionalRuntimeEnabledLongAttributeAttributeSetter(v8::Local<v8:: Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
3799 {
3800 v8::Handle<v8::Object> holder = info.Holder();
3801 ExceptionState exceptionState(ExceptionState::SetterContext, "conditionalRun timeEnabledLongAttribute", "TestObjectPython", holder, info.GetIsolate());
3802 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
3803 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e xceptionState);
3804 impl->setConditionalRuntimeEnabledLongAttribute(cppValue);
3805 }
3806 #endif // ENABLE(CONDITION)
3807
3808 #if ENABLE(CONDITION)
3809 static void conditionalRuntimeEnabledLongAttributeAttributeSetterCallback(v8::Lo cal<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<vo id>& info)
3810 {
3811 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
3812 TestObjectPythonV8Internal::conditionalRuntimeEnabledLongAttributeAttributeS etter(v8Value, info);
3813 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3814 }
3815 #endif // ENABLE(CONDITION)
3816
3817 static void setterCallWithActiveWindowAndFirstWindowStringAttributeAttributeGett er(const v8::PropertyCallbackInfo<v8::Value>& info)
3818 {
3819 v8::Handle<v8::Object> holder = info.Holder();
3820 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
3821 v8SetReturnValueString(info, impl->setterCallWithActiveWindowAndFirstWindowS tringAttribute(), info.GetIsolate());
3822 }
3823
3824 static void setterCallWithActiveWindowAndFirstWindowStringAttributeAttributeGett erCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& inf o)
3825 {
3826 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3827 TestObjectPythonV8Internal::setterCallWithActiveWindowAndFirstWindowStringAt tributeAttributeGetter(info);
3828 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3829 }
3830
3831 static void setterCallWithActiveWindowAndFirstWindowStringAttributeAttributeSett er(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
3832 {
3833 v8::Handle<v8::Object> holder = info.Holder();
3834 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
3835 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, v8Value);
3836 impl->setSetterCallWithActiveWindowAndFirstWindowStringAttribute(callingDOMW indow(info.GetIsolate()), enteredDOMWindow(info.GetIsolate()), cppValue);
3837 }
3838
3839 static void setterCallWithActiveWindowAndFirstWindowStringAttributeAttributeSett erCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::Proper tyCallbackInfo<void>& info)
3840 {
3841 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
3842 TestObjectPythonV8Internal::setterCallWithActiveWindowAndFirstWindowStringAt tributeAttributeSetter(v8Value, info);
3843 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3844 }
3845
3846 static void setterCallWithExecutionContextStringAttributeAttributeGetter(const v 8::PropertyCallbackInfo<v8::Value>& info)
3847 {
3848 v8::Handle<v8::Object> holder = info.Holder();
3849 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
3850 v8SetReturnValueString(info, impl->setterCallWithExecutionContextStringAttri bute(), info.GetIsolate());
3851 }
3852
3853 static void setterCallWithExecutionContextStringAttributeAttributeGetterCallback (v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3854 {
3855 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3856 TestObjectPythonV8Internal::setterCallWithExecutionContextStringAttributeAtt ributeGetter(info);
3857 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3858 }
3859
3860 static void setterCallWithExecutionContextStringAttributeAttributeSetter(v8::Loc al<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
3861 {
3862 v8::Handle<v8::Object> holder = info.Holder();
3863 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
3864 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, v8Value);
3865 ExecutionContext* scriptContext = currentExecutionContext(info.GetIsolate()) ;
3866 impl->setSetterCallWithExecutionContextStringAttribute(scriptContext, cppVal ue);
3867 }
3868
3869 static void setterCallWithExecutionContextStringAttributeAttributeSetterCallback (v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallback Info<void>& info)
3870 {
3871 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
3872 TestObjectPythonV8Internal::setterCallWithExecutionContextStringAttributeAtt ributeSetter(v8Value, info);
3873 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3874 }
3875
3876 static void strictTypeCheckingFloatAttributeAttributeGetter(const v8::PropertyCa llbackInfo<v8::Value>& info)
3877 {
3878 v8::Handle<v8::Object> holder = info.Holder();
3879 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
3880 v8SetReturnValue(info, impl->strictTypeCheckingFloatAttribute());
3881 }
3882
3883 static void strictTypeCheckingFloatAttributeAttributeGetterCallback(v8::Local<v8 ::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3884 {
3885 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3886 TestObjectPythonV8Internal::strictTypeCheckingFloatAttributeAttributeGetter( info);
3887 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3888 }
3889
3890 static void strictTypeCheckingFloatAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
3891 {
3892 v8::Handle<v8::Object> holder = info.Holder();
3893 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
3894 V8TRYCATCH_VOID(float, cppValue, static_cast<float>(v8Value->NumberValue())) ;
3895 impl->setStrictTypeCheckingFloatAttribute(cppValue);
3896 }
3897
3898 static void strictTypeCheckingFloatAttributeAttributeSetterCallback(v8::Local<v8 ::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& i nfo)
3899 {
3900 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
3901 TestObjectPythonV8Internal::strictTypeCheckingFloatAttributeAttributeSetter( v8Value, info);
3902 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3903 }
3904
3905 static void strictTypeCheckingTestInterfaceAttributeAttributeGetter(const v8::Pr opertyCallbackInfo<v8::Value>& info)
3906 {
3907 v8::Handle<v8::Object> holder = info.Holder();
3908 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
3909 v8SetReturnValueFast(info, WTF::getPtr(impl->strictTypeCheckingTestInterface Attribute()), impl);
3910 }
3911
3912 static void strictTypeCheckingTestInterfaceAttributeAttributeGetterCallback(v8:: Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3913 {
3914 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3915 TestObjectPythonV8Internal::strictTypeCheckingTestInterfaceAttributeAttribut eGetter(info);
3916 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3917 }
3918
3919 static void strictTypeCheckingTestInterfaceAttributeAttributeSetter(v8::Local<v8 ::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
3920 {
3921 v8::Handle<v8::Object> holder = info.Holder();
3922 ExceptionState exceptionState(ExceptionState::SetterContext, "strictTypeChec kingTestInterfaceAttribute", "TestObjectPython", holder, info.GetIsolate());
3923 if (!isUndefinedOrNull(v8Value) && !V8TestInterface::hasInstance(v8Value, in fo.GetIsolate())) {
3924 exceptionState.throwTypeError("The provided value is not of type 'TestIn terface'.");
3925 exceptionState.throwIfNeeded();
3926 return;
3927 }
3928 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
3929 V8TRYCATCH_VOID(TestInterface*, cppValue, V8TestInterface::toNativeWithTypeC heck(info.GetIsolate(), v8Value));
3930 impl->setStrictTypeCheckingTestInterfaceAttribute(WTF::getPtr(cppValue));
3931 }
3932
3933 static void strictTypeCheckingTestInterfaceAttributeAttributeSetterCallback(v8:: Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo< void>& info)
3934 {
3935 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
3936 TestObjectPythonV8Internal::strictTypeCheckingTestInterfaceAttributeAttribut eSetter(v8Value, info);
3937 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3938 }
3939
3940 static void treatNullAsNullStringStringAttributeAttributeGetter(const v8::Proper tyCallbackInfo<v8::Value>& info)
3941 {
3942 v8::Handle<v8::Object> holder = info.Holder();
3943 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
3944 v8SetReturnValueString(info, impl->treatNullAsNullStringStringAttribute(), i nfo.GetIsolate());
3945 }
3946
3947 static void treatNullAsNullStringStringAttributeAttributeGetterCallback(v8::Loca l<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3948 {
3949 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3950 TestObjectPythonV8Internal::treatNullAsNullStringStringAttributeAttributeGet ter(info);
3951 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3952 }
3953
3954 static void treatNullAsNullStringStringAttributeAttributeSetter(v8::Local<v8::Va lue> v8Value, const v8::PropertyCallbackInfo<void>& info)
3955 {
3956 v8::Handle<v8::Object> holder = info.Holder();
3957 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
3958 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithNullCheck>, cppVal ue, v8Value);
3959 impl->setTreatNullAsNullStringStringAttribute(cppValue);
3960 }
3961
3962 static void treatNullAsNullStringStringAttributeAttributeSetterCallback(v8::Loca l<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void >& info)
3963 {
3964 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
3965 TestObjectPythonV8Internal::treatNullAsNullStringStringAttributeAttributeSet ter(v8Value, info);
3966 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3967 }
3968
3969 static void treatReturnedNullStringAsNullStringAttributeAttributeGetter(const v8 ::PropertyCallbackInfo<v8::Value>& info)
3970 {
3971 v8::Handle<v8::Object> holder = info.Holder();
3972 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
3973 v8SetReturnValueStringOrNull(info, impl->treatReturnedNullStringAsNullString Attribute(), info.GetIsolate());
3974 }
3975
3976 static void treatReturnedNullStringAsNullStringAttributeAttributeGetterCallback( v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3977 {
3978 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3979 TestObjectPythonV8Internal::treatReturnedNullStringAsNullStringAttributeAttr ibuteGetter(info);
3980 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3981 }
3982
3983 static void treatReturnedNullStringAsNullStringAttributeAttributeSetter(v8::Loca l<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
3984 {
3985 v8::Handle<v8::Object> holder = info.Holder();
3986 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
3987 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, v8Value);
3988 impl->setTreatReturnedNullStringAsNullStringAttribute(cppValue);
3989 }
3990
3991 static void treatReturnedNullStringAsNullStringAttributeAttributeSetterCallback( v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackI nfo<void>& info)
3992 {
3993 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
3994 TestObjectPythonV8Internal::treatReturnedNullStringAsNullStringAttributeAttr ibuteSetter(v8Value, info);
3995 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3996 }
3997
3998 static void treatReturnedNullStringAsUndefinedStringAttributeAttributeGetter(con st v8::PropertyCallbackInfo<v8::Value>& info)
3999 {
4000 v8::Handle<v8::Object> holder = info.Holder();
4001 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
4002 v8SetReturnValueStringOrUndefined(info, impl->treatReturnedNullStringAsUndef inedStringAttribute(), info.GetIsolate());
4003 }
4004
4005 static void treatReturnedNullStringAsUndefinedStringAttributeAttributeGetterCall back(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
4006 {
4007 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
4008 TestObjectPythonV8Internal::treatReturnedNullStringAsUndefinedStringAttribut eAttributeGetter(info);
4009 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4010 }
4011
4012 static void treatReturnedNullStringAsUndefinedStringAttributeAttributeSetter(v8: :Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
4013 {
4014 v8::Handle<v8::Object> holder = info.Holder();
4015 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
4016 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, v8Value);
4017 impl->setTreatReturnedNullStringAsUndefinedStringAttribute(cppValue);
4018 }
4019
4020 static void treatReturnedNullStringAsUndefinedStringAttributeAttributeSetterCall back(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCall backInfo<void>& info)
4021 {
4022 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
4023 TestObjectPythonV8Internal::treatReturnedNullStringAsUndefinedStringAttribut eAttributeSetter(v8Value, info);
4024 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4025 }
4026
4027 static void urlStringAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8: :Value>& info)
4028 {
4029 v8::Handle<v8::Object> holder = info.Holder();
4030 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
4031 v8SetReturnValueString(info, impl->getURLAttribute(HTMLNames::urlstringattri buteAttr), info.GetIsolate());
4032 }
4033
4034 static void urlStringAttributeAttributeGetterCallback(v8::Local<v8::String>, con st v8::PropertyCallbackInfo<v8::Value>& info)
4035 {
4036 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
4037 TestObjectPythonV8Internal::urlStringAttributeAttributeGetter(info);
4038 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4039 }
4040
4041 static void urlStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, cons t v8::PropertyCallbackInfo<void>& info)
4042 {
4043 v8::Handle<v8::Object> holder = info.Holder();
4044 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
4045 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, v8Value);
4046 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
4047 impl->setAttribute(HTMLNames::urlstringattributeAttr, cppValue);
4048 }
4049
4050 static void urlStringAttributeAttributeSetterCallback(v8::Local<v8::String>, v8: :Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
4051 {
4052 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
4053 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
4054 TestObjectPythonV8Internal::urlStringAttributeAttributeSetter(v8Value, info) ;
4055 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4056 }
4057
4058 static void urlStringAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8: :Value>& info)
4059 {
4060 v8::Handle<v8::Object> holder = info.Holder();
4061 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
4062 v8SetReturnValueString(info, impl->getURLAttribute(HTMLNames::ReflectUrlAttr ibuteAttr), info.GetIsolate());
4063 }
4064
4065 static void urlStringAttributeAttributeGetterCallback(v8::Local<v8::String>, con st v8::PropertyCallbackInfo<v8::Value>& info)
4066 {
4067 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
4068 TestObjectPythonV8Internal::urlStringAttributeAttributeGetter(info);
4069 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4070 }
4071
4072 static void urlStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, cons t v8::PropertyCallbackInfo<void>& info)
4073 {
4074 v8::Handle<v8::Object> holder = info.Holder();
4075 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
4076 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, v8Value);
4077 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
4078 impl->setAttribute(HTMLNames::ReflectUrlAttributeAttr, cppValue);
4079 }
4080
4081 static void urlStringAttributeAttributeSetterCallback(v8::Local<v8::String>, v8: :Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
4082 {
4083 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
4084 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
4085 TestObjectPythonV8Internal::urlStringAttributeAttributeSetter(v8Value, info) ;
4086 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4087 }
4088
4089 static void unforgeableLongAttributeAttributeGetter(const v8::PropertyCallbackIn fo<v8::Value>& info)
4090 {
4091 v8::Handle<v8::Object> holder = V8TestObjectPython::findInstanceInPrototypeC hain(info.This(), info.GetIsolate());
4092 if (holder.IsEmpty())
4093 return;
4094 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
4095 v8SetReturnValueInt(info, impl->unforgeableLongAttribute());
4096 }
4097
4098 static void unforgeableLongAttributeAttributeGetterCallback(v8::Local<v8::String >, const v8::PropertyCallbackInfo<v8::Value>& info)
4099 {
4100 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
4101 TestObjectPythonV8Internal::unforgeableLongAttributeAttributeGetter(info);
4102 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4103 }
4104
4105 static void unforgeableLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value , const v8::PropertyCallbackInfo<void>& info)
4106 {
4107 v8::Handle<v8::Object> holder = info.Holder();
4108 ExceptionState exceptionState(ExceptionState::SetterContext, "unforgeableLon gAttribute", "TestObjectPython", holder, info.GetIsolate());
4109 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
4110 V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(v8Value, exceptionState), e xceptionState);
4111 impl->setUnforgeableLongAttribute(cppValue);
4112 }
4113
4114 static void unforgeableLongAttributeAttributeSetterCallback(v8::Local<v8::String >, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
4115 {
4116 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
4117 TestObjectPythonV8Internal::unforgeableLongAttributeAttributeSetter(v8Value, info);
4118 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4119 }
4120
4121 static void anotherStringAttributeAttributeGetter(const v8::PropertyCallbackInfo <v8::Value>& info)
4122 {
4123 v8::Handle<v8::Object> holder = info.Holder();
4124 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
4125 v8SetReturnValueString(info, impl->fastGetAttribute(HTMLNames::ReflectUrlAtt ributeAsAStringAttr), info.GetIsolate());
4126 }
4127
4128 static void anotherStringAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
4129 {
4130 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
4131 TestObjectPythonV8Internal::anotherStringAttributeAttributeGetter(info);
4132 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4133 }
4134
4135 static void anotherStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
4136 {
4137 v8::Handle<v8::Object> holder = info.Holder();
4138 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
4139 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, v8Value);
4140 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
4141 impl->setAttribute(HTMLNames::ReflectUrlAttributeAsAStringAttr, cppValue);
4142 }
4143
4144 static void anotherStringAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
4145 {
4146 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
4147 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
4148 TestObjectPythonV8Internal::anotherStringAttributeAttributeSetter(v8Value, i nfo);
4149 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4150 }
4151
4152 static void testInterfacePythonAttributeAttributeGetter(const v8::PropertyCallba ckInfo<v8::Value>& info)
4153 {
4154 v8::Handle<v8::Object> holder = info.Holder();
4155 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
4156 v8SetReturnValueFast(info, WTF::getPtr(impl->testInterfacePythonAttribute()) , impl);
4157 }
4158
4159 static void testInterfacePythonAttributeAttributeGetterCallback(v8::Local<v8::St ring>, const v8::PropertyCallbackInfo<v8::Value>& info)
4160 {
4161 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
4162 TestObjectPythonV8Internal::testInterfacePythonAttributeAttributeGetter(info );
4163 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4164 }
4165
4166 static void testInterfacePythonAttributeAttributeSetter(v8::Local<v8::Value> v8V alue, const v8::PropertyCallbackInfo<void>& info)
4167 {
4168 v8::Handle<v8::Object> holder = info.Holder();
4169 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
4170 V8TRYCATCH_VOID(TestInterfacePythonImplementation*, cppValue, V8TestInterfac ePython::toNativeWithTypeCheck(info.GetIsolate(), v8Value));
4171 impl->setTestInterfacePythonAttribute(WTF::getPtr(cppValue));
4172 }
4173
4174 static void testInterfacePythonAttributeAttributeSetterCallback(v8::Local<v8::St ring>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
4175 {
4176 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
4177 TestObjectPythonV8Internal::testInterfacePythonAttributeAttributeSetter(v8Va lue, info);
4178 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4179 }
4180
4181 static void testInterfaceWillBeGarbageCollectedAttributeAttributeGetter(const v8 ::PropertyCallbackInfo<v8::Value>& info)
4182 {
4183 v8::Handle<v8::Object> holder = info.Holder();
4184 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
4185 v8SetReturnValueFast(info, WTF::getPtr(impl->testInterfaceWillBeGarbageColle ctedAttribute()), impl);
4186 }
4187
4188 static void testInterfaceWillBeGarbageCollectedAttributeAttributeGetterCallback( v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
4189 {
4190 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
4191 TestObjectPythonV8Internal::testInterfaceWillBeGarbageCollectedAttributeAttr ibuteGetter(info);
4192 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4193 }
4194
4195 static void testInterfaceWillBeGarbageCollectedAttributeAttributeSetter(v8::Loca l<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
4196 {
4197 v8::Handle<v8::Object> holder = info.Holder();
4198 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
4199 V8TRYCATCH_VOID(TestInterfaceWillBeGarbageCollected*, cppValue, V8TestInterf aceWillBeGarbageCollected::toNativeWithTypeCheck(info.GetIsolate(), v8Value));
4200 impl->setTestInterfaceWillBeGarbageCollectedAttribute(WTF::getPtr(cppValue)) ;
4201 }
4202
4203 static void testInterfaceWillBeGarbageCollectedAttributeAttributeSetterCallback( v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackI nfo<void>& info)
4204 {
4205 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
4206 TestObjectPythonV8Internal::testInterfaceWillBeGarbageCollectedAttributeAttr ibuteSetter(v8Value, info);
4207 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4208 }
4209
4210 static void testInterfaceWillBeGarbageCollectedOrNullAttributeAttributeGetter(co nst v8::PropertyCallbackInfo<v8::Value>& info)
4211 {
4212 v8::Handle<v8::Object> holder = info.Holder();
4213 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
4214 bool isNull = false;
4215 RefPtrWillBeRawPtr<TestInterfaceWillBeGarbageCollected> v8Value = impl->test InterfaceWillBeGarbageCollectedOrNullAttribute(isNull);
4216 if (isNull) {
4217 v8SetReturnValueNull(info);
4218 return;
4219 }
4220 v8SetReturnValueFast(info, WTF::getPtr(v8Value.release()), impl);
4221 }
4222
4223 static void testInterfaceWillBeGarbageCollectedOrNullAttributeAttributeGetterCal lback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
4224 {
4225 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
4226 TestObjectPythonV8Internal::testInterfaceWillBeGarbageCollectedOrNullAttribu teAttributeGetter(info);
4227 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4228 }
4229
4230 static void testInterfaceWillBeGarbageCollectedOrNullAttributeAttributeSetter(v8 ::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
4231 {
4232 v8::Handle<v8::Object> holder = info.Holder();
4233 TestObjectPython* impl = V8TestObjectPython::toNative(holder);
4234 V8TRYCATCH_VOID(TestInterfaceWillBeGarbageCollected*, cppValue, V8TestInterf aceWillBeGarbageCollected::toNativeWithTypeCheck(info.GetIsolate(), v8Value));
4235 impl->setTestInterfaceWillBeGarbageCollectedOrNullAttribute(WTF::getPtr(cppV alue));
4236 }
4237
4238 static void testInterfaceWillBeGarbageCollectedOrNullAttributeAttributeSetterCal lback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCal lbackInfo<void>& info)
4239 {
4240 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
4241 TestObjectPythonV8Internal::testInterfaceWillBeGarbageCollectedOrNullAttribu teAttributeSetter(v8Value, info);
4242 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4243 }
4244
4245 static void TestObjectPythonConstructorGetter(v8::Local<v8::String>, const v8::P ropertyCallbackInfo<v8::Value>& info)
4246 {
4247 v8::Handle<v8::Value> data = info.Data();
4248 ASSERT(data->IsExternal());
4249 V8PerContextData* perContextData = V8PerContextData::from(info.Holder()->Cre ationContext());
4250 if (!perContextData)
4251 return;
4252 v8SetReturnValue(info, perContextData->constructorForType(WrapperTypeInfo::u nwrap(data)));
4253 }
4254
4255 static void TestObjectPythonReplaceableAttributeSetter(v8::Local<v8::String> nam e, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
4256 {
4257 info.This()->ForceSet(name, v8Value);
4258 }
4259
4260 static void TestObjectPythonReplaceableAttributeSetterCallback(v8::Local<v8::Str ing> name, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& i nfo)
4261 {
4262 TestObjectPythonV8Internal::TestObjectPythonReplaceableAttributeSetter(name, v8Value, info);
4263 }
4264
4265 static void voidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4266 {
4267 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
4268 impl->voidMethod();
4269 }
4270
4271 static void voidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4272 {
4273 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4274 TestObjectPythonV8Internal::voidMethodMethod(info);
4275 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4276 }
4277
4278 static void staticVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& in fo)
4279 {
4280 TestObjectPython::staticVoidMethod();
4281 }
4282
4283 static void staticVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Va lue>& info)
4284 {
4285 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4286 TestObjectPythonV8Internal::staticVoidMethodMethod(info);
4287 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4288 }
4289
4290 static void dateMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4291 {
4292 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
4293 v8SetReturnValue(info, v8DateOrNull(impl->dateMethod(), info.GetIsolate()));
4294 }
4295
4296 static void dateMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4297 {
4298 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4299 TestObjectPythonV8Internal::dateMethodMethod(info);
4300 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4301 }
4302
4303 static void stringMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4304 {
4305 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
4306 v8SetReturnValueString(info, impl->stringMethod(), info.GetIsolate());
4307 }
4308
4309 static void stringMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value> & info)
4310 {
4311 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4312 TestObjectPythonV8Internal::stringMethodMethod(info);
4313 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4314 }
4315
4316 static void readonlyDOMTimeStampMethodMethod(const v8::FunctionCallbackInfo<v8:: Value>& info)
4317 {
4318 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
4319 v8SetReturnValue(info, static_cast<double>(impl->readonlyDOMTimeStampMethod( )));
4320 }
4321
4322 static void readonlyDOMTimeStampMethodMethodCallback(const v8::FunctionCallbackI nfo<v8::Value>& info)
4323 {
4324 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4325 TestObjectPythonV8Internal::readonlyDOMTimeStampMethodMethod(info);
4326 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4327 }
4328
4329 static void booleanMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4330 {
4331 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
4332 v8SetReturnValueBool(info, impl->booleanMethod());
4333 }
4334
4335 static void booleanMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value >& info)
4336 {
4337 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4338 TestObjectPythonV8Internal::booleanMethodMethod(info);
4339 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4340 }
4341
4342 static void byteMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4343 {
4344 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
4345 v8SetReturnValueInt(info, impl->byteMethod());
4346 }
4347
4348 static void byteMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4349 {
4350 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4351 TestObjectPythonV8Internal::byteMethodMethod(info);
4352 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4353 }
4354
4355 static void doubleMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4356 {
4357 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
4358 v8SetReturnValue(info, impl->doubleMethod());
4359 }
4360
4361 static void doubleMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value> & info)
4362 {
4363 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4364 TestObjectPythonV8Internal::doubleMethodMethod(info);
4365 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4366 }
4367
4368 static void floatMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4369 {
4370 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
4371 v8SetReturnValue(info, impl->floatMethod());
4372 }
4373
4374 static void floatMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4375 {
4376 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4377 TestObjectPythonV8Internal::floatMethodMethod(info);
4378 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4379 }
4380
4381 static void longMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4382 {
4383 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
4384 v8SetReturnValueInt(info, impl->longMethod());
4385 }
4386
4387 static void longMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4388 {
4389 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4390 TestObjectPythonV8Internal::longMethodMethod(info);
4391 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4392 }
4393
4394 static void longLongMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info )
4395 {
4396 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
4397 v8SetReturnValue(info, static_cast<double>(impl->longLongMethod()));
4398 }
4399
4400 static void longLongMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Valu e>& info)
4401 {
4402 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4403 TestObjectPythonV8Internal::longLongMethodMethod(info);
4404 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4405 }
4406
4407 static void octetMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4408 {
4409 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
4410 v8SetReturnValueUnsigned(info, impl->octetMethod());
4411 }
4412
4413 static void octetMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4414 {
4415 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4416 TestObjectPythonV8Internal::octetMethodMethod(info);
4417 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4418 }
4419
4420 static void shortMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4421 {
4422 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
4423 v8SetReturnValueInt(info, impl->shortMethod());
4424 }
4425
4426 static void shortMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4427 {
4428 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4429 TestObjectPythonV8Internal::shortMethodMethod(info);
4430 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4431 }
4432
4433 static void unsignedLongMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4434 {
4435 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
4436 v8SetReturnValueUnsigned(info, impl->unsignedLongMethod());
4437 }
4438
4439 static void unsignedLongMethodMethodCallback(const v8::FunctionCallbackInfo<v8:: Value>& info)
4440 {
4441 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4442 TestObjectPythonV8Internal::unsignedLongMethodMethod(info);
4443 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4444 }
4445
4446 static void unsignedLongLongMethodMethod(const v8::FunctionCallbackInfo<v8::Valu e>& info)
4447 {
4448 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
4449 v8SetReturnValue(info, static_cast<double>(impl->unsignedLongLongMethod()));
4450 }
4451
4452 static void unsignedLongLongMethodMethodCallback(const v8::FunctionCallbackInfo< v8::Value>& info)
4453 {
4454 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4455 TestObjectPythonV8Internal::unsignedLongLongMethodMethod(info);
4456 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4457 }
4458
4459 static void unsignedShortMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4460 {
4461 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
4462 v8SetReturnValueUnsigned(info, impl->unsignedShortMethod());
4463 }
4464
4465 static void unsignedShortMethodMethodCallback(const v8::FunctionCallbackInfo<v8: :Value>& info)
4466 {
4467 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4468 TestObjectPythonV8Internal::unsignedShortMethodMethod(info);
4469 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4470 }
4471
4472 static void voidMethodDateArgMethod(const v8::FunctionCallbackInfo<v8::Value>& i nfo)
4473 {
4474 if (UNLIKELY(info.Length() < 1)) {
4475 throwTypeError(ExceptionMessages::failedToExecute("voidMethodDateArg", " TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), inf o.GetIsolate());
4476 return;
4477 }
4478 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
4479 V8TRYCATCH_VOID(double, dateArg, toCoreDate(info[0]));
4480 impl->voidMethodDateArg(dateArg);
4481 }
4482
4483 static void voidMethodDateArgMethodCallback(const v8::FunctionCallbackInfo<v8::V alue>& info)
4484 {
4485 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4486 TestObjectPythonV8Internal::voidMethodDateArgMethod(info);
4487 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4488 }
4489
4490 static void voidMethodStringArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4491 {
4492 if (UNLIKELY(info.Length() < 1)) {
4493 throwTypeError(ExceptionMessages::failedToExecute("voidMethodStringArg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), i nfo.GetIsolate());
4494 return;
4495 }
4496 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
4497 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, stringArg, info[0]) ;
4498 impl->voidMethodStringArg(stringArg);
4499 }
4500
4501 static void voidMethodStringArgMethodCallback(const v8::FunctionCallbackInfo<v8: :Value>& info)
4502 {
4503 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4504 TestObjectPythonV8Internal::voidMethodStringArgMethod(info);
4505 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4506 }
4507
4508 static void voidMethodBooleanArgMethod(const v8::FunctionCallbackInfo<v8::Value> & info)
4509 {
4510 if (UNLIKELY(info.Length() < 1)) {
4511 throwTypeError(ExceptionMessages::failedToExecute("voidMethodBooleanArg" , "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
4512 return;
4513 }
4514 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
4515 V8TRYCATCH_VOID(bool, booleanArg, info[0]->BooleanValue());
4516 impl->voidMethodBooleanArg(booleanArg);
4517 }
4518
4519 static void voidMethodBooleanArgMethodCallback(const v8::FunctionCallbackInfo<v8 ::Value>& info)
4520 {
4521 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4522 TestObjectPythonV8Internal::voidMethodBooleanArgMethod(info);
4523 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4524 }
4525
4526 static void voidMethodByteArgMethod(const v8::FunctionCallbackInfo<v8::Value>& i nfo)
4527 {
4528 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodB yteArg", "TestObjectPython", info.Holder(), info.GetIsolate());
4529 if (UNLIKELY(info.Length() < 1)) {
4530 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
4531 exceptionState.throwIfNeeded();
4532 return;
4533 }
4534 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
4535 V8TRYCATCH_EXCEPTION_VOID(int, byteArg, toInt8(info[0], exceptionState), exc eptionState);
4536 impl->voidMethodByteArg(byteArg);
4537 }
4538
4539 static void voidMethodByteArgMethodCallback(const v8::FunctionCallbackInfo<v8::V alue>& info)
4540 {
4541 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4542 TestObjectPythonV8Internal::voidMethodByteArgMethod(info);
4543 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4544 }
4545
4546 static void voidMethodDoubleArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4547 {
4548 if (UNLIKELY(info.Length() < 1)) {
4549 throwTypeError(ExceptionMessages::failedToExecute("voidMethodDoubleArg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), i nfo.GetIsolate());
4550 return;
4551 }
4552 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
4553 V8TRYCATCH_VOID(double, doubleArg, static_cast<double>(info[0]->NumberValue( )));
4554 impl->voidMethodDoubleArg(doubleArg);
4555 }
4556
4557 static void voidMethodDoubleArgMethodCallback(const v8::FunctionCallbackInfo<v8: :Value>& info)
4558 {
4559 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4560 TestObjectPythonV8Internal::voidMethodDoubleArgMethod(info);
4561 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4562 }
4563
4564 static void voidMethodFloatArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4565 {
4566 if (UNLIKELY(info.Length() < 1)) {
4567 throwTypeError(ExceptionMessages::failedToExecute("voidMethodFloatArg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), in fo.GetIsolate());
4568 return;
4569 }
4570 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
4571 V8TRYCATCH_VOID(float, floatArg, static_cast<float>(info[0]->NumberValue())) ;
4572 impl->voidMethodFloatArg(floatArg);
4573 }
4574
4575 static void voidMethodFloatArgMethodCallback(const v8::FunctionCallbackInfo<v8:: Value>& info)
4576 {
4577 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4578 TestObjectPythonV8Internal::voidMethodFloatArgMethod(info);
4579 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4580 }
4581
4582 static void voidMethodLongArgMethod(const v8::FunctionCallbackInfo<v8::Value>& i nfo)
4583 {
4584 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodL ongArg", "TestObjectPython", info.Holder(), info.GetIsolate());
4585 if (UNLIKELY(info.Length() < 1)) {
4586 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
4587 exceptionState.throwIfNeeded();
4588 return;
4589 }
4590 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
4591 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), ex ceptionState);
4592 impl->voidMethodLongArg(longArg);
4593 }
4594
4595 static void voidMethodLongArgMethodCallback(const v8::FunctionCallbackInfo<v8::V alue>& info)
4596 {
4597 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4598 TestObjectPythonV8Internal::voidMethodLongArgMethod(info);
4599 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4600 }
4601
4602 static void voidMethodLongLongArgMethod(const v8::FunctionCallbackInfo<v8::Value >& info)
4603 {
4604 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodL ongLongArg", "TestObjectPython", info.Holder(), info.GetIsolate());
4605 if (UNLIKELY(info.Length() < 1)) {
4606 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
4607 exceptionState.throwIfNeeded();
4608 return;
4609 }
4610 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
4611 V8TRYCATCH_EXCEPTION_VOID(long long, longLongArg, toInt64(info[0], exception State), exceptionState);
4612 impl->voidMethodLongLongArg(longLongArg);
4613 }
4614
4615 static void voidMethodLongLongArgMethodCallback(const v8::FunctionCallbackInfo<v 8::Value>& info)
4616 {
4617 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4618 TestObjectPythonV8Internal::voidMethodLongLongArgMethod(info);
4619 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4620 }
4621
4622 static void voidMethodOctetArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4623 {
4624 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodO ctetArg", "TestObjectPython", info.Holder(), info.GetIsolate());
4625 if (UNLIKELY(info.Length() < 1)) {
4626 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
4627 exceptionState.throwIfNeeded();
4628 return;
4629 }
4630 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
4631 V8TRYCATCH_EXCEPTION_VOID(unsigned, octetArg, toUInt8(info[0], exceptionStat e), exceptionState);
4632 impl->voidMethodOctetArg(octetArg);
4633 }
4634
4635 static void voidMethodOctetArgMethodCallback(const v8::FunctionCallbackInfo<v8:: Value>& info)
4636 {
4637 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4638 TestObjectPythonV8Internal::voidMethodOctetArgMethod(info);
4639 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4640 }
4641
4642 static void voidMethodShortArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4643 {
4644 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodS hortArg", "TestObjectPython", info.Holder(), info.GetIsolate());
4645 if (UNLIKELY(info.Length() < 1)) {
4646 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
4647 exceptionState.throwIfNeeded();
4648 return;
4649 }
4650 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
4651 V8TRYCATCH_EXCEPTION_VOID(int, shortArg, toInt16(info[0], exceptionState), e xceptionState);
4652 impl->voidMethodShortArg(shortArg);
4653 }
4654
4655 static void voidMethodShortArgMethodCallback(const v8::FunctionCallbackInfo<v8:: Value>& info)
4656 {
4657 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4658 TestObjectPythonV8Internal::voidMethodShortArgMethod(info);
4659 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4660 }
4661
4662 static void voidMethodUnsignedLongArgMethod(const v8::FunctionCallbackInfo<v8::V alue>& info)
4663 {
4664 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodU nsignedLongArg", "TestObjectPython", info.Holder(), info.GetIsolate());
4665 if (UNLIKELY(info.Length() < 1)) {
4666 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
4667 exceptionState.throwIfNeeded();
4668 return;
4669 }
4670 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
4671 V8TRYCATCH_EXCEPTION_VOID(unsigned, unsignedLongArg, toUInt32(info[0], excep tionState), exceptionState);
4672 impl->voidMethodUnsignedLongArg(unsignedLongArg);
4673 }
4674
4675 static void voidMethodUnsignedLongArgMethodCallback(const v8::FunctionCallbackIn fo<v8::Value>& info)
4676 {
4677 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4678 TestObjectPythonV8Internal::voidMethodUnsignedLongArgMethod(info);
4679 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4680 }
4681
4682 static void voidMethodUnsignedLongLongArgMethod(const v8::FunctionCallbackInfo<v 8::Value>& info)
4683 {
4684 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodU nsignedLongLongArg", "TestObjectPython", info.Holder(), info.GetIsolate());
4685 if (UNLIKELY(info.Length() < 1)) {
4686 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
4687 exceptionState.throwIfNeeded();
4688 return;
4689 }
4690 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
4691 V8TRYCATCH_EXCEPTION_VOID(unsigned long long, unsignedLongLongArg, toUInt64( info[0], exceptionState), exceptionState);
4692 impl->voidMethodUnsignedLongLongArg(unsignedLongLongArg);
4693 }
4694
4695 static void voidMethodUnsignedLongLongArgMethodCallback(const v8::FunctionCallba ckInfo<v8::Value>& info)
4696 {
4697 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4698 TestObjectPythonV8Internal::voidMethodUnsignedLongLongArgMethod(info);
4699 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4700 }
4701
4702 static void voidMethodUnsignedShortArgMethod(const v8::FunctionCallbackInfo<v8:: Value>& info)
4703 {
4704 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodU nsignedShortArg", "TestObjectPython", info.Holder(), info.GetIsolate());
4705 if (UNLIKELY(info.Length() < 1)) {
4706 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
4707 exceptionState.throwIfNeeded();
4708 return;
4709 }
4710 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
4711 V8TRYCATCH_EXCEPTION_VOID(unsigned, unsignedShortArg, toUInt16(info[0], exce ptionState), exceptionState);
4712 impl->voidMethodUnsignedShortArg(unsignedShortArg);
4713 }
4714
4715 static void voidMethodUnsignedShortArgMethodCallback(const v8::FunctionCallbackI nfo<v8::Value>& info)
4716 {
4717 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4718 TestObjectPythonV8Internal::voidMethodUnsignedShortArgMethod(info);
4719 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4720 }
4721
4722 static void testInterfaceEmptyMethodMethod(const v8::FunctionCallbackInfo<v8::Va lue>& info)
4723 {
4724 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
4725 v8SetReturnValue(info, impl->testInterfaceEmptyMethod());
4726 }
4727
4728 static void testInterfaceEmptyMethodMethodCallback(const v8::FunctionCallbackInf o<v8::Value>& info)
4729 {
4730 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4731 TestObjectPythonV8Internal::testInterfaceEmptyMethodMethod(info);
4732 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4733 }
4734
4735 static void voidMethodTestInterfaceEmptyArgMethod(const v8::FunctionCallbackInfo <v8::Value>& info)
4736 {
4737 if (UNLIKELY(info.Length() < 1)) {
4738 throwTypeError(ExceptionMessages::failedToExecute("voidMethodTestInterfa ceEmptyArg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.L ength())), info.GetIsolate());
4739 return;
4740 }
4741 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
4742 V8TRYCATCH_VOID(TestInterfaceEmpty*, testInterfaceEmptyArg, V8TestInterfaceE mpty::toNativeWithTypeCheck(info.GetIsolate(), info[0]));
4743 impl->voidMethodTestInterfaceEmptyArg(testInterfaceEmptyArg);
4744 }
4745
4746 static void voidMethodTestInterfaceEmptyArgMethodCallback(const v8::FunctionCall backInfo<v8::Value>& info)
4747 {
4748 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4749 TestObjectPythonV8Internal::voidMethodTestInterfaceEmptyArgMethod(info);
4750 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4751 }
4752
4753 static void voidMethodLongArgTestInterfaceEmptyArgMethod(const v8::FunctionCallb ackInfo<v8::Value>& info)
4754 {
4755 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodL ongArgTestInterfaceEmptyArg", "TestObjectPython", info.Holder(), info.GetIsolate ());
4756 if (UNLIKELY(info.Length() < 2)) {
4757 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(2, i nfo.Length()));
4758 exceptionState.throwIfNeeded();
4759 return;
4760 }
4761 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
4762 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), ex ceptionState);
4763 V8TRYCATCH_VOID(TestInterfaceEmpty*, testInterfaceEmptyArg, V8TestInterfaceE mpty::toNativeWithTypeCheck(info.GetIsolate(), info[1]));
4764 impl->voidMethodLongArgTestInterfaceEmptyArg(longArg, testInterfaceEmptyArg) ;
4765 }
4766
4767 static void voidMethodLongArgTestInterfaceEmptyArgMethodCallback(const v8::Funct ionCallbackInfo<v8::Value>& info)
4768 {
4769 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4770 TestObjectPythonV8Internal::voidMethodLongArgTestInterfaceEmptyArgMethod(inf o);
4771 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4772 }
4773
4774 static void voidCallbackFunctionMethodMethod(const v8::FunctionCallbackInfo<v8:: Value>& info)
4775 {
4776 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
4777 v8SetReturnValue(info, impl->voidCallbackFunctionMethod().v8Value());
4778 }
4779
4780 static void voidCallbackFunctionMethodMethodCallback(const v8::FunctionCallbackI nfo<v8::Value>& info)
4781 {
4782 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4783 TestObjectPythonV8Internal::voidCallbackFunctionMethodMethod(info);
4784 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4785 }
4786
4787 static void anyCallbackFunctionOptionalAnyArgMethodMethod(const v8::FunctionCall backInfo<v8::Value>& info)
4788 {
4789 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
4790 v8SetReturnValue(info, impl->anyCallbackFunctionOptionalAnyArgMethod().v8Val ue());
4791 }
4792
4793 static void anyCallbackFunctionOptionalAnyArgMethodMethodCallback(const v8::Func tionCallbackInfo<v8::Value>& info)
4794 {
4795 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4796 TestObjectPythonV8Internal::anyCallbackFunctionOptionalAnyArgMethodMethod(in fo);
4797 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4798 }
4799
4800 static void voidMethodVoidCallbackFunctionArgMethod(const v8::FunctionCallbackIn fo<v8::Value>& info)
4801 {
4802 if (UNLIKELY(info.Length() < 1)) {
4803 throwTypeError(ExceptionMessages::failedToExecute("voidMethodVoidCallbac kFunctionArg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info .Length())), info.GetIsolate());
4804 return;
4805 }
4806 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
4807 V8TRYCATCH_VOID(ScriptValue, voidCallbackFunctionArg, ScriptValue(info[0], i nfo.GetIsolate()));
4808 impl->voidMethodVoidCallbackFunctionArg(voidCallbackFunctionArg);
4809 }
4810
4811 static void voidMethodVoidCallbackFunctionArgMethodCallback(const v8::FunctionCa llbackInfo<v8::Value>& info)
4812 {
4813 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4814 TestObjectPythonV8Internal::voidMethodVoidCallbackFunctionArgMethod(info);
4815 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4816 }
4817
4818 static void voidMethodAnyCallbackFunctionOptionalAnyArgMethod(const v8::Function CallbackInfo<v8::Value>& info)
4819 {
4820 if (UNLIKELY(info.Length() < 1)) {
4821 throwTypeError(ExceptionMessages::failedToExecute("voidMethodAnyCallback FunctionOptionalAnyArg", "TestObjectPython", ExceptionMessages::notEnoughArgumen ts(1, info.Length())), info.GetIsolate());
4822 return;
4823 }
4824 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
4825 V8TRYCATCH_VOID(ScriptValue, anyCallbackFunctionOptionalAnyArgArg, ScriptVal ue(info[0], info.GetIsolate()));
4826 impl->voidMethodAnyCallbackFunctionOptionalAnyArg(anyCallbackFunctionOptiona lAnyArgArg);
4827 }
4828
4829 static void voidMethodAnyCallbackFunctionOptionalAnyArgMethodCallback(const v8:: FunctionCallbackInfo<v8::Value>& info)
4830 {
4831 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4832 TestObjectPythonV8Internal::voidMethodAnyCallbackFunctionOptionalAnyArgMetho d(info);
4833 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4834 }
4835
4836 static void compareHowMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& in fo)
4837 {
4838 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
4839 v8SetReturnValue(info, impl->compareHowMethod());
4840 }
4841
4842 static void compareHowMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Va lue>& info)
4843 {
4844 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4845 TestObjectPythonV8Internal::compareHowMethodMethod(info);
4846 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4847 }
4848
4849 static void anyMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4850 {
4851 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
4852 v8SetReturnValue(info, impl->anyMethod().v8Value());
4853 }
4854
4855 static void anyMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& i nfo)
4856 {
4857 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4858 TestObjectPythonV8Internal::anyMethodMethod(info);
4859 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4860 }
4861
4862 static void voidMethodCompareHowArgMethod(const v8::FunctionCallbackInfo<v8::Val ue>& info)
4863 {
4864 if (UNLIKELY(info.Length() < 1)) {
4865 throwTypeError(ExceptionMessages::failedToExecute("voidMethodCompareHowA rg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length()) ), info.GetIsolate());
4866 return;
4867 }
4868 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
4869 V8TRYCATCH_VOID(Range::CompareHow, compareHowArg, static_cast<Range::Compare How>(info[0]->Int32Value()));
4870 impl->voidMethodCompareHowArg(compareHowArg);
4871 }
4872
4873 static void voidMethodCompareHowArgMethodCallback(const v8::FunctionCallbackInfo <v8::Value>& info)
4874 {
4875 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4876 TestObjectPythonV8Internal::voidMethodCompareHowArgMethod(info);
4877 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4878 }
4879
4880 static void voidMethodEventTargetArgMethod(const v8::FunctionCallbackInfo<v8::Va lue>& info)
4881 {
4882 if (UNLIKELY(info.Length() < 1)) {
4883 throwTypeError(ExceptionMessages::failedToExecute("voidMethodEventTarget Arg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length() )), info.GetIsolate());
4884 return;
4885 }
4886 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
4887 V8TRYCATCH_VOID(EventTarget*, eventTargetArg, V8DOMWrapper::isDOMWrapper(inf o[0]) ? toWrapperTypeInfo(v8::Handle<v8::Object>::Cast(info[0]))->toEventTarget( v8::Handle<v8::Object>::Cast(info[0])) : 0);
4888 impl->voidMethodEventTargetArg(eventTargetArg);
4889 }
4890
4891 static void voidMethodEventTargetArgMethodCallback(const v8::FunctionCallbackInf o<v8::Value>& info)
4892 {
4893 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4894 TestObjectPythonV8Internal::voidMethodEventTargetArgMethod(info);
4895 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4896 }
4897
4898 static void voidMethodMediaQueryListListenerArgMethod(const v8::FunctionCallback Info<v8::Value>& info)
4899 {
4900 if (UNLIKELY(info.Length() < 1)) {
4901 throwTypeError(ExceptionMessages::failedToExecute("voidMethodMediaQueryL istListenerArg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, in fo.Length())), info.GetIsolate());
4902 return;
4903 }
4904 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
4905 V8TRYCATCH_VOID(RefPtrWillBeRawPtr<MediaQueryListListener>, mediaQueryListLi stenerArg, MediaQueryListListener::create(ScriptValue(info[0], info.GetIsolate() )));
4906 impl->voidMethodMediaQueryListListenerArg(mediaQueryListListenerArg);
4907 }
4908
4909 static void voidMethodMediaQueryListListenerArgMethodCallback(const v8::Function CallbackInfo<v8::Value>& info)
4910 {
4911 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4912 TestObjectPythonV8Internal::voidMethodMediaQueryListListenerArgMethod(info);
4913 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4914 }
4915
4916 static void voidMethodAnyArgMethod(const v8::FunctionCallbackInfo<v8::Value>& in fo)
4917 {
4918 if (UNLIKELY(info.Length() < 1)) {
4919 throwTypeError(ExceptionMessages::failedToExecute("voidMethodAnyArg", "T estObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), info .GetIsolate());
4920 return;
4921 }
4922 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
4923 V8TRYCATCH_VOID(ScriptValue, anyArg, ScriptValue(info[0], info.GetIsolate()) );
4924 impl->voidMethodAnyArg(anyArg);
4925 }
4926
4927 static void voidMethodAnyArgMethodCallback(const v8::FunctionCallbackInfo<v8::Va lue>& info)
4928 {
4929 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4930 TestObjectPythonV8Internal::voidMethodAnyArgMethod(info);
4931 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4932 }
4933
4934 static void voidMethodAttrArgMethod(const v8::FunctionCallbackInfo<v8::Value>& i nfo)
4935 {
4936 if (UNLIKELY(info.Length() < 1)) {
4937 throwTypeError(ExceptionMessages::failedToExecute("voidMethodAttrArg", " TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), inf o.GetIsolate());
4938 return;
4939 }
4940 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
4941 V8TRYCATCH_VOID(Attr*, attrArg, V8Attr::toNativeWithTypeCheck(info.GetIsolat e(), info[0]));
4942 impl->voidMethodAttrArg(attrArg);
4943 }
4944
4945 static void voidMethodAttrArgMethodCallback(const v8::FunctionCallbackInfo<v8::V alue>& info)
4946 {
4947 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4948 TestObjectPythonV8Internal::voidMethodAttrArgMethod(info);
4949 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4950 }
4951
4952 static void voidMethodDocumentArgMethod(const v8::FunctionCallbackInfo<v8::Value >& info)
4953 {
4954 if (UNLIKELY(info.Length() < 1)) {
4955 throwTypeError(ExceptionMessages::failedToExecute("voidMethodDocumentArg ", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
4956 return;
4957 }
4958 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
4959 V8TRYCATCH_VOID(Document*, documentArg, V8Document::toNativeWithTypeCheck(in fo.GetIsolate(), info[0]));
4960 impl->voidMethodDocumentArg(documentArg);
4961 }
4962
4963 static void voidMethodDocumentArgMethodCallback(const v8::FunctionCallbackInfo<v 8::Value>& info)
4964 {
4965 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4966 TestObjectPythonV8Internal::voidMethodDocumentArgMethod(info);
4967 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4968 }
4969
4970 static void voidMethodDocumentTypeArgMethod(const v8::FunctionCallbackInfo<v8::V alue>& info)
4971 {
4972 if (UNLIKELY(info.Length() < 1)) {
4973 throwTypeError(ExceptionMessages::failedToExecute("voidMethodDocumentTyp eArg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length( ))), info.GetIsolate());
4974 return;
4975 }
4976 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
4977 V8TRYCATCH_VOID(DocumentType*, documentTypeArg, V8DocumentType::toNativeWith TypeCheck(info.GetIsolate(), info[0]));
4978 impl->voidMethodDocumentTypeArg(documentTypeArg);
4979 }
4980
4981 static void voidMethodDocumentTypeArgMethodCallback(const v8::FunctionCallbackIn fo<v8::Value>& info)
4982 {
4983 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4984 TestObjectPythonV8Internal::voidMethodDocumentTypeArgMethod(info);
4985 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4986 }
4987
4988 static void voidMethodElementArgMethod(const v8::FunctionCallbackInfo<v8::Value> & info)
4989 {
4990 if (UNLIKELY(info.Length() < 1)) {
4991 throwTypeError(ExceptionMessages::failedToExecute("voidMethodElementArg" , "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
4992 return;
4993 }
4994 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
4995 V8TRYCATCH_VOID(Element*, elementArg, V8Element::toNativeWithTypeCheck(info. GetIsolate(), info[0]));
4996 impl->voidMethodElementArg(elementArg);
4997 }
4998
4999 static void voidMethodElementArgMethodCallback(const v8::FunctionCallbackInfo<v8 ::Value>& info)
5000 {
5001 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5002 TestObjectPythonV8Internal::voidMethodElementArgMethod(info);
5003 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5004 }
5005
5006 static void voidMethodNodeArgMethod(const v8::FunctionCallbackInfo<v8::Value>& i nfo)
5007 {
5008 if (UNLIKELY(info.Length() < 1)) {
5009 throwTypeError(ExceptionMessages::failedToExecute("voidMethodNodeArg", " TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), inf o.GetIsolate());
5010 return;
5011 }
5012 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
5013 V8TRYCATCH_VOID(Node*, nodeArg, V8Node::toNativeWithTypeCheck(info.GetIsolat e(), info[0]));
5014 impl->voidMethodNodeArg(nodeArg);
5015 }
5016
5017 static void voidMethodNodeArgMethodCallback(const v8::FunctionCallbackInfo<v8::V alue>& info)
5018 {
5019 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5020 TestObjectPythonV8Internal::voidMethodNodeArgMethod(info);
5021 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5022 }
5023
5024 static void arrayBufferMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& i nfo)
5025 {
5026 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
5027 v8SetReturnValue(info, impl->arrayBufferMethod());
5028 }
5029
5030 static void arrayBufferMethodMethodCallback(const v8::FunctionCallbackInfo<v8::V alue>& info)
5031 {
5032 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5033 TestObjectPythonV8Internal::arrayBufferMethodMethod(info);
5034 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5035 }
5036
5037 static void arrayBufferViewMethodMethod(const v8::FunctionCallbackInfo<v8::Value >& info)
5038 {
5039 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
5040 v8SetReturnValue(info, impl->arrayBufferViewMethod());
5041 }
5042
5043 static void arrayBufferViewMethodMethodCallback(const v8::FunctionCallbackInfo<v 8::Value>& info)
5044 {
5045 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5046 TestObjectPythonV8Internal::arrayBufferViewMethodMethod(info);
5047 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5048 }
5049
5050 static void float32ArrayMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5051 {
5052 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
5053 v8SetReturnValue(info, impl->float32ArrayMethod());
5054 }
5055
5056 static void float32ArrayMethodMethodCallback(const v8::FunctionCallbackInfo<v8:: Value>& info)
5057 {
5058 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5059 TestObjectPythonV8Internal::float32ArrayMethodMethod(info);
5060 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5061 }
5062
5063 static void int32ArrayMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& in fo)
5064 {
5065 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
5066 v8SetReturnValue(info, impl->int32ArrayMethod());
5067 }
5068
5069 static void int32ArrayMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Va lue>& info)
5070 {
5071 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5072 TestObjectPythonV8Internal::int32ArrayMethodMethod(info);
5073 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5074 }
5075
5076 static void uint8ArrayMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& in fo)
5077 {
5078 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
5079 v8SetReturnValue(info, impl->uint8ArrayMethod());
5080 }
5081
5082 static void uint8ArrayMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Va lue>& info)
5083 {
5084 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5085 TestObjectPythonV8Internal::uint8ArrayMethodMethod(info);
5086 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5087 }
5088
5089 static void voidMethodArrayBufferArgMethod(const v8::FunctionCallbackInfo<v8::Va lue>& info)
5090 {
5091 if (UNLIKELY(info.Length() < 1)) {
5092 throwTypeError(ExceptionMessages::failedToExecute("voidMethodArrayBuffer Arg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length() )), info.GetIsolate());
5093 return;
5094 }
5095 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
5096 V8TRYCATCH_VOID(ArrayBuffer*, arrayBufferArg, info[0]->IsArrayBuffer() ? V8A rrayBuffer::toNative(v8::Handle<v8::ArrayBuffer>::Cast(info[0])) : 0);
5097 impl->voidMethodArrayBufferArg(arrayBufferArg);
5098 }
5099
5100 static void voidMethodArrayBufferArgMethodCallback(const v8::FunctionCallbackInf o<v8::Value>& info)
5101 {
5102 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5103 TestObjectPythonV8Internal::voidMethodArrayBufferArgMethod(info);
5104 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5105 }
5106
5107 static void voidMethodArrayBufferOrNullArgMethod(const v8::FunctionCallbackInfo< v8::Value>& info)
5108 {
5109 if (UNLIKELY(info.Length() < 1)) {
5110 throwTypeError(ExceptionMessages::failedToExecute("voidMethodArrayBuffer OrNullArg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Le ngth())), info.GetIsolate());
5111 return;
5112 }
5113 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
5114 V8TRYCATCH_VOID(ArrayBuffer*, arrayBufferArg, info[0]->IsArrayBuffer() ? V8A rrayBuffer::toNative(v8::Handle<v8::ArrayBuffer>::Cast(info[0])) : 0);
5115 impl->voidMethodArrayBufferOrNullArg(arrayBufferArg);
5116 }
5117
5118 static void voidMethodArrayBufferOrNullArgMethodCallback(const v8::FunctionCallb ackInfo<v8::Value>& info)
5119 {
5120 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5121 TestObjectPythonV8Internal::voidMethodArrayBufferOrNullArgMethod(info);
5122 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5123 }
5124
5125 static void voidMethodArrayBufferViewArgMethod(const v8::FunctionCallbackInfo<v8 ::Value>& info)
5126 {
5127 if (UNLIKELY(info.Length() < 1)) {
5128 throwTypeError(ExceptionMessages::failedToExecute("voidMethodArrayBuffer ViewArg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Leng th())), info.GetIsolate());
5129 return;
5130 }
5131 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
5132 V8TRYCATCH_VOID(ArrayBufferView*, arrayBufferViewArg, info[0]->IsArrayBuffer View() ? V8ArrayBufferView::toNative(v8::Handle<v8::ArrayBufferView>::Cast(info[ 0])) : 0);
5133 impl->voidMethodArrayBufferViewArg(arrayBufferViewArg);
5134 }
5135
5136 static void voidMethodArrayBufferViewArgMethodCallback(const v8::FunctionCallbac kInfo<v8::Value>& info)
5137 {
5138 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5139 TestObjectPythonV8Internal::voidMethodArrayBufferViewArgMethod(info);
5140 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5141 }
5142
5143 static void voidMethodFloat32ArrayArgMethod(const v8::FunctionCallbackInfo<v8::V alue>& info)
5144 {
5145 if (UNLIKELY(info.Length() < 1)) {
5146 throwTypeError(ExceptionMessages::failedToExecute("voidMethodFloat32Arra yArg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length( ))), info.GetIsolate());
5147 return;
5148 }
5149 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
5150 V8TRYCATCH_VOID(Float32Array*, float32ArrayArg, info[0]->IsFloat32Array() ? V8Float32Array::toNative(v8::Handle<v8::Float32Array>::Cast(info[0])) : 0);
5151 impl->voidMethodFloat32ArrayArg(float32ArrayArg);
5152 }
5153
5154 static void voidMethodFloat32ArrayArgMethodCallback(const v8::FunctionCallbackIn fo<v8::Value>& info)
5155 {
5156 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5157 TestObjectPythonV8Internal::voidMethodFloat32ArrayArgMethod(info);
5158 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5159 }
5160
5161 static void voidMethodInt32ArrayArgMethod(const v8::FunctionCallbackInfo<v8::Val ue>& info)
5162 {
5163 if (UNLIKELY(info.Length() < 1)) {
5164 throwTypeError(ExceptionMessages::failedToExecute("voidMethodInt32ArrayA rg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length()) ), info.GetIsolate());
5165 return;
5166 }
5167 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
5168 V8TRYCATCH_VOID(Int32Array*, int32ArrayArg, info[0]->IsInt32Array() ? V8Int3 2Array::toNative(v8::Handle<v8::Int32Array>::Cast(info[0])) : 0);
5169 impl->voidMethodInt32ArrayArg(int32ArrayArg);
5170 }
5171
5172 static void voidMethodInt32ArrayArgMethodCallback(const v8::FunctionCallbackInfo <v8::Value>& info)
5173 {
5174 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5175 TestObjectPythonV8Internal::voidMethodInt32ArrayArgMethod(info);
5176 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5177 }
5178
5179 static void voidMethodUint8ArrayArgMethod(const v8::FunctionCallbackInfo<v8::Val ue>& info)
5180 {
5181 if (UNLIKELY(info.Length() < 1)) {
5182 throwTypeError(ExceptionMessages::failedToExecute("voidMethodUint8ArrayA rg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length()) ), info.GetIsolate());
5183 return;
5184 }
5185 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
5186 V8TRYCATCH_VOID(Uint8Array*, uint8ArrayArg, info[0]->IsUint8Array() ? V8Uint 8Array::toNative(v8::Handle<v8::Uint8Array>::Cast(info[0])) : 0);
5187 impl->voidMethodUint8ArrayArg(uint8ArrayArg);
5188 }
5189
5190 static void voidMethodUint8ArrayArgMethodCallback(const v8::FunctionCallbackInfo <v8::Value>& info)
5191 {
5192 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5193 TestObjectPythonV8Internal::voidMethodUint8ArrayArgMethod(info);
5194 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5195 }
5196
5197 static void longArrayMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& inf o)
5198 {
5199 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
5200 v8SetReturnValue(info, v8Array(impl->longArrayMethod(), info.GetIsolate()));
5201 }
5202
5203 static void longArrayMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Val ue>& info)
5204 {
5205 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5206 TestObjectPythonV8Internal::longArrayMethodMethod(info);
5207 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5208 }
5209
5210 static void stringArrayMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& i nfo)
5211 {
5212 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
5213 v8SetReturnValue(info, v8Array(impl->stringArrayMethod(), info.GetIsolate()) );
5214 }
5215
5216 static void stringArrayMethodMethodCallback(const v8::FunctionCallbackInfo<v8::V alue>& info)
5217 {
5218 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5219 TestObjectPythonV8Internal::stringArrayMethodMethod(info);
5220 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5221 }
5222
5223 static void testInterfaceEmptyArrayMethodMethod(const v8::FunctionCallbackInfo<v 8::Value>& info)
5224 {
5225 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
5226 v8SetReturnValue(info, v8Array(impl->testInterfaceEmptyArrayMethod(), info.G etIsolate()));
5227 }
5228
5229 static void testInterfaceEmptyArrayMethodMethodCallback(const v8::FunctionCallba ckInfo<v8::Value>& info)
5230 {
5231 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5232 TestObjectPythonV8Internal::testInterfaceEmptyArrayMethodMethod(info);
5233 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5234 }
5235
5236 static void voidMethodArrayLongArgMethod(const v8::FunctionCallbackInfo<v8::Valu e>& info)
5237 {
5238 if (UNLIKELY(info.Length() < 1)) {
5239 throwTypeError(ExceptionMessages::failedToExecute("voidMethodArrayLongAr g", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())) , info.GetIsolate());
5240 return;
5241 }
5242 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
5243 V8TRYCATCH_VOID(Vector<int>, arrayLongArg, toNativeArray<int>(info[0], 1, in fo.GetIsolate()));
5244 impl->voidMethodArrayLongArg(arrayLongArg);
5245 }
5246
5247 static void voidMethodArrayLongArgMethodCallback(const v8::FunctionCallbackInfo< v8::Value>& info)
5248 {
5249 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5250 TestObjectPythonV8Internal::voidMethodArrayLongArgMethod(info);
5251 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5252 }
5253
5254 static void voidMethodArrayStringArgMethod(const v8::FunctionCallbackInfo<v8::Va lue>& info)
5255 {
5256 if (UNLIKELY(info.Length() < 1)) {
5257 throwTypeError(ExceptionMessages::failedToExecute("voidMethodArrayString Arg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length() )), info.GetIsolate());
5258 return;
5259 }
5260 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
5261 V8TRYCATCH_VOID(Vector<String>, arrayStringArg, toNativeArray<String>(info[0 ], 1, info.GetIsolate()));
5262 impl->voidMethodArrayStringArg(arrayStringArg);
5263 }
5264
5265 static void voidMethodArrayStringArgMethodCallback(const v8::FunctionCallbackInf o<v8::Value>& info)
5266 {
5267 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5268 TestObjectPythonV8Internal::voidMethodArrayStringArgMethod(info);
5269 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5270 }
5271
5272 static void voidMethodArrayTestInterfaceEmptyArgMethod(const v8::FunctionCallbac kInfo<v8::Value>& info)
5273 {
5274 if (UNLIKELY(info.Length() < 1)) {
5275 throwTypeError(ExceptionMessages::failedToExecute("voidMethodArrayTestIn terfaceEmptyArg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, i nfo.Length())), info.GetIsolate());
5276 return;
5277 }
5278 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
5279 V8TRYCATCH_VOID(Vector<RefPtr<TestInterfaceEmpty> >, arrayTestInterfaceEmpty Arg, (toRefPtrNativeArray<TestInterfaceEmpty, V8TestInterfaceEmpty>(info[0], 1, info.GetIsolate())));
5280 impl->voidMethodArrayTestInterfaceEmptyArg(arrayTestInterfaceEmptyArg);
5281 }
5282
5283 static void voidMethodArrayTestInterfaceEmptyArgMethodCallback(const v8::Functio nCallbackInfo<v8::Value>& info)
5284 {
5285 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5286 TestObjectPythonV8Internal::voidMethodArrayTestInterfaceEmptyArgMethod(info) ;
5287 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5288 }
5289
5290 static void longSequenceMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5291 {
5292 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
5293 v8SetReturnValue(info, v8Array(impl->longSequenceMethod(), info.GetIsolate() ));
5294 }
5295
5296 static void longSequenceMethodMethodCallback(const v8::FunctionCallbackInfo<v8:: Value>& info)
5297 {
5298 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5299 TestObjectPythonV8Internal::longSequenceMethodMethod(info);
5300 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5301 }
5302
5303 static void stringSequenceMethodMethod(const v8::FunctionCallbackInfo<v8::Value> & info)
5304 {
5305 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
5306 v8SetReturnValue(info, v8Array(impl->stringSequenceMethod(), info.GetIsolate ()));
5307 }
5308
5309 static void stringSequenceMethodMethodCallback(const v8::FunctionCallbackInfo<v8 ::Value>& info)
5310 {
5311 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5312 TestObjectPythonV8Internal::stringSequenceMethodMethod(info);
5313 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5314 }
5315
5316 static void testInterfaceEmptySequenceMethodMethod(const v8::FunctionCallbackInf o<v8::Value>& info)
5317 {
5318 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
5319 v8SetReturnValue(info, v8Array(impl->testInterfaceEmptySequenceMethod(), inf o.GetIsolate()));
5320 }
5321
5322 static void testInterfaceEmptySequenceMethodMethodCallback(const v8::FunctionCal lbackInfo<v8::Value>& info)
5323 {
5324 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5325 TestObjectPythonV8Internal::testInterfaceEmptySequenceMethodMethod(info);
5326 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5327 }
5328
5329 static void voidMethodSequenceLongArgMethod(const v8::FunctionCallbackInfo<v8::V alue>& info)
5330 {
5331 if (UNLIKELY(info.Length() < 1)) {
5332 throwTypeError(ExceptionMessages::failedToExecute("voidMethodSequenceLon gArg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length( ))), info.GetIsolate());
5333 return;
5334 }
5335 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
5336 V8TRYCATCH_VOID(Vector<int>, longSequenceArg, toNativeArray<int>(info[0], 1, info.GetIsolate()));
5337 impl->voidMethodSequenceLongArg(longSequenceArg);
5338 }
5339
5340 static void voidMethodSequenceLongArgMethodCallback(const v8::FunctionCallbackIn fo<v8::Value>& info)
5341 {
5342 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5343 TestObjectPythonV8Internal::voidMethodSequenceLongArgMethod(info);
5344 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5345 }
5346
5347 static void voidMethodSequenceStringArgMethod(const v8::FunctionCallbackInfo<v8: :Value>& info)
5348 {
5349 if (UNLIKELY(info.Length() < 1)) {
5350 throwTypeError(ExceptionMessages::failedToExecute("voidMethodSequenceStr ingArg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Lengt h())), info.GetIsolate());
5351 return;
5352 }
5353 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
5354 V8TRYCATCH_VOID(Vector<String>, stringSequenceArg, toNativeArray<String>(inf o[0], 1, info.GetIsolate()));
5355 impl->voidMethodSequenceStringArg(stringSequenceArg);
5356 }
5357
5358 static void voidMethodSequenceStringArgMethodCallback(const v8::FunctionCallback Info<v8::Value>& info)
5359 {
5360 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5361 TestObjectPythonV8Internal::voidMethodSequenceStringArgMethod(info);
5362 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5363 }
5364
5365 static void voidMethodSequenceTestInterfaceEmptyArgMethod(const v8::FunctionCall backInfo<v8::Value>& info)
5366 {
5367 if (UNLIKELY(info.Length() < 1)) {
5368 throwTypeError(ExceptionMessages::failedToExecute("voidMethodSequenceTes tInterfaceEmptyArg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1 , info.Length())), info.GetIsolate());
5369 return;
5370 }
5371 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
5372 V8TRYCATCH_VOID(Vector<RefPtr<TestInterfaceEmpty> >, testInterfaceEmptySeque nceArg, (toRefPtrNativeArray<TestInterfaceEmpty, V8TestInterfaceEmpty>(info[0], 1, info.GetIsolate())));
5373 impl->voidMethodSequenceTestInterfaceEmptyArg(testInterfaceEmptySequenceArg) ;
5374 }
5375
5376 static void voidMethodSequenceTestInterfaceEmptyArgMethodCallback(const v8::Func tionCallbackInfo<v8::Value>& info)
5377 {
5378 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5379 TestObjectPythonV8Internal::voidMethodSequenceTestInterfaceEmptyArgMethod(in fo);
5380 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5381 }
5382
5383 static void voidMethodTestInterfaceEmptyOrNullArgMethod(const v8::FunctionCallba ckInfo<v8::Value>& info)
5384 {
5385 if (UNLIKELY(info.Length() < 1)) {
5386 throwTypeError(ExceptionMessages::failedToExecute("voidMethodTestInterfa ceEmptyOrNullArg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
5387 return;
5388 }
5389 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
5390 V8TRYCATCH_VOID(TestInterfaceEmpty*, nullableTestInterfaceEmptyArg, V8TestIn terfaceEmpty::toNativeWithTypeCheck(info.GetIsolate(), info[0]));
5391 impl->voidMethodTestInterfaceEmptyOrNullArg(nullableTestInterfaceEmptyArg);
5392 }
5393
5394 static void voidMethodTestInterfaceEmptyOrNullArgMethodCallback(const v8::Functi onCallbackInfo<v8::Value>& info)
5395 {
5396 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5397 TestObjectPythonV8Internal::voidMethodTestInterfaceEmptyOrNullArgMethod(info );
5398 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5399 }
5400
5401 static void voidMethodTestCallbackInterfaceArgMethod(const v8::FunctionCallbackI nfo<v8::Value>& info)
5402 {
5403 if (UNLIKELY(info.Length() < 1)) {
5404 throwTypeError(ExceptionMessages::failedToExecute("voidMethodTestCallbac kInterfaceArg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, inf o.Length())), info.GetIsolate());
5405 return;
5406 }
5407 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
5408 if (info.Length() <= 0 || !info[0]->IsFunction()) {
5409 throwTypeError(ExceptionMessages::failedToExecute("voidMethodTestCallbac kInterfaceArg", "TestObjectPython", "The callback provided as parameter 1 is not a function."), info.GetIsolate());
5410 return;
5411 }
5412 OwnPtr<TestCallbackInterface> testCallbackInterfaceArg = V8TestCallbackInter face::create(v8::Handle<v8::Function>::Cast(info[0]), currentExecutionContext(in fo.GetIsolate()));
5413 impl->voidMethodTestCallbackInterfaceArg(testCallbackInterfaceArg.release()) ;
5414 }
5415
5416 static void voidMethodTestCallbackInterfaceArgMethodCallback(const v8::FunctionC allbackInfo<v8::Value>& info)
5417 {
5418 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5419 TestObjectPythonV8Internal::voidMethodTestCallbackInterfaceArgMethod(info);
5420 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5421 }
5422
5423 static void voidMethodOptionalTestCallbackInterfaceArgMethod(const v8::FunctionC allbackInfo<v8::Value>& info)
5424 {
5425 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
5426 OwnPtr<TestCallbackInterface> optionalTestCallbackInterfaceArg;
5427 if (info.Length() > 0 && !isUndefinedOrNull(info[0])) {
5428 if (!info[0]->IsFunction()) {
5429 throwTypeError(ExceptionMessages::failedToExecute("voidMethodOptiona lTestCallbackInterfaceArg", "TestObjectPython", "The callback provided as parame ter 1 is not a function."), info.GetIsolate());
5430 return;
5431 }
5432 optionalTestCallbackInterfaceArg = V8TestCallbackInterface::create(v8::H andle<v8::Function>::Cast(info[0]), currentExecutionContext(info.GetIsolate()));
5433 }
5434 impl->voidMethodOptionalTestCallbackInterfaceArg(optionalTestCallbackInterfa ceArg.release());
5435 }
5436
5437 static void voidMethodOptionalTestCallbackInterfaceArgMethodCallback(const v8::F unctionCallbackInfo<v8::Value>& info)
5438 {
5439 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5440 TestObjectPythonV8Internal::voidMethodOptionalTestCallbackInterfaceArgMethod (info);
5441 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5442 }
5443
5444 static void voidMethodTestCallbackInterfaceOrNullArgMethod(const v8::FunctionCal lbackInfo<v8::Value>& info)
5445 {
5446 if (UNLIKELY(info.Length() < 1)) {
5447 throwTypeError(ExceptionMessages::failedToExecute("voidMethodTestCallbac kInterfaceOrNullArg", "TestObjectPython", ExceptionMessages::notEnoughArguments( 1, info.Length())), info.GetIsolate());
5448 return;
5449 }
5450 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
5451 if (info.Length() <= 0 || !(info[0]->IsFunction() || info[0]->IsNull())) {
5452 throwTypeError(ExceptionMessages::failedToExecute("voidMethodTestCallbac kInterfaceOrNullArg", "TestObjectPython", "The callback provided as parameter 1 is not a function."), info.GetIsolate());
5453 return;
5454 }
5455 OwnPtr<TestCallbackInterface> testCallbackInterfaceArg = info[0]->IsNull() ? nullptr : V8TestCallbackInterface::create(v8::Handle<v8::Function>::Cast(info[0 ]), currentExecutionContext(info.GetIsolate()));
5456 impl->voidMethodTestCallbackInterfaceOrNullArg(testCallbackInterfaceArg.rele ase());
5457 }
5458
5459 static void voidMethodTestCallbackInterfaceOrNullArgMethodCallback(const v8::Fun ctionCallbackInfo<v8::Value>& info)
5460 {
5461 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5462 TestObjectPythonV8Internal::voidMethodTestCallbackInterfaceOrNullArgMethod(i nfo);
5463 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5464 }
5465
5466 static void testEnumMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info )
5467 {
5468 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
5469 v8SetReturnValueString(info, impl->testEnumMethod(), info.GetIsolate());
5470 }
5471
5472 static void testEnumMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Valu e>& info)
5473 {
5474 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5475 TestObjectPythonV8Internal::testEnumMethodMethod(info);
5476 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5477 }
5478
5479 static void voidMethodTestEnumArgMethod(const v8::FunctionCallbackInfo<v8::Value >& info)
5480 {
5481 if (UNLIKELY(info.Length() < 1)) {
5482 throwTypeError(ExceptionMessages::failedToExecute("voidMethodTestEnumArg ", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
5483 return;
5484 }
5485 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
5486 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, testEnumTypeArg, in fo[0]);
5487 String string = testEnumTypeArg;
5488 if (!(string == "" || string == "EnumValue1" || string == "EnumValue2" || st ring == "EnumValue3")) {
5489 throwTypeError(ExceptionMessages::failedToExecute("voidMethodTestEnumArg ", "TestObjectPython", "parameter 1 ('" + string + "') is not a valid enum value ."), info.GetIsolate());
5490 return;
5491 }
5492 impl->voidMethodTestEnumArg(testEnumTypeArg);
5493 }
5494
5495 static void voidMethodTestEnumArgMethodCallback(const v8::FunctionCallbackInfo<v 8::Value>& info)
5496 {
5497 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5498 TestObjectPythonV8Internal::voidMethodTestEnumArgMethod(info);
5499 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5500 }
5501
5502 static void dictionaryMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& in fo)
5503 {
5504 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
5505 v8SetReturnValue(info, impl->dictionaryMethod());
5506 }
5507
5508 static void dictionaryMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Va lue>& info)
5509 {
5510 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5511 TestObjectPythonV8Internal::dictionaryMethodMethod(info);
5512 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5513 }
5514
5515 static void nodeFilterMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& in fo)
5516 {
5517 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
5518 v8SetReturnValue(info, impl->nodeFilterMethod());
5519 }
5520
5521 static void nodeFilterMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Va lue>& info)
5522 {
5523 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5524 TestObjectPythonV8Internal::nodeFilterMethodMethod(info);
5525 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5526 }
5527
5528 static void promiseMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5529 {
5530 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
5531 v8SetReturnValue(info, impl->promiseMethod().v8Value());
5532 }
5533
5534 static void promiseMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value >& info)
5535 {
5536 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5537 TestObjectPythonV8Internal::promiseMethodMethod(info);
5538 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5539 }
5540
5541 static void serializedScriptValueMethodMethod(const v8::FunctionCallbackInfo<v8: :Value>& info)
5542 {
5543 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
5544 v8SetReturnValue(info, impl->serializedScriptValueMethod() ? impl->serialize dScriptValueMethod()->deserialize() : v8::Handle<v8::Value>(v8::Null(info.GetIso late())));
5545 }
5546
5547 static void serializedScriptValueMethodMethodCallback(const v8::FunctionCallback Info<v8::Value>& info)
5548 {
5549 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5550 TestObjectPythonV8Internal::serializedScriptValueMethodMethod(info);
5551 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5552 }
5553
5554 static void xPathNSResolverMethodMethod(const v8::FunctionCallbackInfo<v8::Value >& info)
5555 {
5556 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
5557 v8SetReturnValue(info, impl->xPathNSResolverMethod());
5558 }
5559
5560 static void xPathNSResolverMethodMethodCallback(const v8::FunctionCallbackInfo<v 8::Value>& info)
5561 {
5562 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5563 TestObjectPythonV8Internal::xPathNSResolverMethodMethod(info);
5564 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5565 }
5566
5567 static void voidMethodDictionaryArgMethod(const v8::FunctionCallbackInfo<v8::Val ue>& info)
5568 {
5569 if (UNLIKELY(info.Length() < 1)) {
5570 throwTypeError(ExceptionMessages::failedToExecute("voidMethodDictionaryA rg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length()) ), info.GetIsolate());
5571 return;
5572 }
5573 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
5574 V8TRYCATCH_VOID(Dictionary, dictionaryArg, Dictionary(info[0], info.GetIsola te()));
5575 if (!dictionaryArg.isUndefinedOrNull() && !dictionaryArg.isObject()) {
5576 throwTypeError(ExceptionMessages::failedToExecute("voidMethodDictionaryA rg", "TestObjectPython", "parameter 1 ('dictionaryArg') is not an object."), inf o.GetIsolate());
5577 return;
5578 }
5579 impl->voidMethodDictionaryArg(dictionaryArg);
5580 }
5581
5582 static void voidMethodDictionaryArgMethodCallback(const v8::FunctionCallbackInfo <v8::Value>& info)
5583 {
5584 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5585 TestObjectPythonV8Internal::voidMethodDictionaryArgMethod(info);
5586 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5587 }
5588
5589 static void voidMethodEventListenerArgMethod(const v8::FunctionCallbackInfo<v8:: Value>& info)
5590 {
5591 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodE ventListenerArg", "TestObjectPython", info.Holder(), info.GetIsolate());
5592 if (UNLIKELY(info.Length() < 1)) {
5593 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
5594 exceptionState.throwIfNeeded();
5595 return;
5596 }
5597 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
5598 RefPtr<EventListener> eventListenerArg = V8EventListenerList::getEventListen er(info[1], false, ListenerFindOrCreate);
5599 impl->voidMethodEventListenerArg(eventListenerArg);
5600 if (listener && !impl->toNode())
5601 removeHiddenValueFromArray(info.Holder(), info[1], V8TestObjectPython::e ventListenerCacheIndex, info.GetIsolate());
5602 }
5603
5604 static void voidMethodEventListenerArgMethodCallback(const v8::FunctionCallbackI nfo<v8::Value>& info)
5605 {
5606 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5607 TestObjectPythonV8Internal::voidMethodEventListenerArgMethod(info);
5608 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5609 }
5610
5611 static void voidMethodNodeFilterArgMethod(const v8::FunctionCallbackInfo<v8::Val ue>& info)
5612 {
5613 if (UNLIKELY(info.Length() < 1)) {
5614 throwTypeError(ExceptionMessages::failedToExecute("voidMethodNodeFilterA rg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length()) ), info.GetIsolate());
5615 return;
5616 }
5617 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
5618 V8TRYCATCH_VOID(RefPtr<NodeFilter>, nodeFilterArg, toNodeFilter(info[0], inf o.GetIsolate()));
5619 impl->voidMethodNodeFilterArg(nodeFilterArg.release());
5620 }
5621
5622 static void voidMethodNodeFilterArgMethodCallback(const v8::FunctionCallbackInfo <v8::Value>& info)
5623 {
5624 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5625 TestObjectPythonV8Internal::voidMethodNodeFilterArgMethod(info);
5626 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5627 }
5628
5629 static void voidMethodPromiseArgMethod(const v8::FunctionCallbackInfo<v8::Value> & info)
5630 {
5631 if (UNLIKELY(info.Length() < 1)) {
5632 throwTypeError(ExceptionMessages::failedToExecute("voidMethodPromiseArg" , "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate());
5633 return;
5634 }
5635 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
5636 V8TRYCATCH_VOID(ScriptPromise, promiseArg, ScriptPromise(info[0], info.GetIs olate()));
5637 if (!promiseArg.isUndefinedOrNull() && !promiseArg.isObject()) {
5638 throwTypeError(ExceptionMessages::failedToExecute("voidMethodPromiseArg" , "TestObjectPython", "parameter 1 ('promiseArg') is not an object."), info.GetI solate());
5639 return;
5640 }
5641 impl->voidMethodPromiseArg(promiseArg);
5642 }
5643
5644 static void voidMethodPromiseArgMethodCallback(const v8::FunctionCallbackInfo<v8 ::Value>& info)
5645 {
5646 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5647 TestObjectPythonV8Internal::voidMethodPromiseArgMethod(info);
5648 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5649 }
5650
5651 static void voidMethodSerializedScriptValueArgMethod(const v8::FunctionCallbackI nfo<v8::Value>& info)
5652 {
5653 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodS erializedScriptValueArg", "TestObjectPython", info.Holder(), info.GetIsolate());
5654 if (UNLIKELY(info.Length() < 1)) {
5655 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
5656 exceptionState.throwIfNeeded();
5657 return;
5658 }
5659 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
5660 RefPtr<SerializedScriptValue> serializedScriptValueArg = SerializedScriptVal ue::create(info[0], 0, 0, exceptionState, info.GetIsolate());
5661 if (exceptionState.throwIfNeeded())
5662 return;
5663 impl->voidMethodSerializedScriptValueArg(serializedScriptValueArg);
5664 }
5665
5666 static void voidMethodSerializedScriptValueArgMethodCallback(const v8::FunctionC allbackInfo<v8::Value>& info)
5667 {
5668 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5669 TestObjectPythonV8Internal::voidMethodSerializedScriptValueArgMethod(info);
5670 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5671 }
5672
5673 static void voidMethodXPathNSResolverArgMethod(const v8::FunctionCallbackInfo<v8 ::Value>& info)
5674 {
5675 if (UNLIKELY(info.Length() < 1)) {
5676 throwTypeError(ExceptionMessages::failedToExecute("voidMethodXPathNSReso lverArg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Leng th())), info.GetIsolate());
5677 return;
5678 }
5679 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
5680 V8TRYCATCH_VOID(RefPtrWillBeRawPtr<XPathNSResolver>, xPathNSResolverArg, toX PathNSResolver(info[0], info.GetIsolate()));
5681 impl->voidMethodXPathNSResolverArg(xPathNSResolverArg.release());
5682 }
5683
5684 static void voidMethodXPathNSResolverArgMethodCallback(const v8::FunctionCallbac kInfo<v8::Value>& info)
5685 {
5686 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5687 TestObjectPythonV8Internal::voidMethodXPathNSResolverArgMethod(info);
5688 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5689 }
5690
5691 static void voidMethodSequenceDictionaryArgMethod(const v8::FunctionCallbackInfo <v8::Value>& info)
5692 {
5693 if (UNLIKELY(info.Length() < 1)) {
5694 throwTypeError(ExceptionMessages::failedToExecute("voidMethodSequenceDic tionaryArg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.L ength())), info.GetIsolate());
5695 return;
5696 }
5697 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
5698 V8TRYCATCH_VOID(Vector<Dictionary>, dictionarySequenceArg, toNativeArray<Dic tionary>(info[0], 1, info.GetIsolate()));
5699 impl->voidMethodSequenceDictionaryArg(dictionarySequenceArg);
5700 }
5701
5702 static void voidMethodSequenceDictionaryArgMethodCallback(const v8::FunctionCall backInfo<v8::Value>& info)
5703 {
5704 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5705 TestObjectPythonV8Internal::voidMethodSequenceDictionaryArgMethod(info);
5706 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5707 }
5708
5709 static void voidMethodStringArgLongArgMethod(const v8::FunctionCallbackInfo<v8:: Value>& info)
5710 {
5711 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodS tringArgLongArg", "TestObjectPython", info.Holder(), info.GetIsolate());
5712 if (UNLIKELY(info.Length() < 2)) {
5713 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(2, i nfo.Length()));
5714 exceptionState.throwIfNeeded();
5715 return;
5716 }
5717 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
5718 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, stringArg, info[0]) ;
5719 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[1], exceptionState), ex ceptionState);
5720 impl->voidMethodStringArgLongArg(stringArg, longArg);
5721 }
5722
5723 static void voidMethodStringArgLongArgMethodCallback(const v8::FunctionCallbackI nfo<v8::Value>& info)
5724 {
5725 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5726 TestObjectPythonV8Internal::voidMethodStringArgLongArgMethod(info);
5727 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5728 }
5729
5730 static void voidMethodOptionalStringArgMethod(const v8::FunctionCallbackInfo<v8: :Value>& info)
5731 {
5732 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
5733 if (UNLIKELY(info.Length() <= 0)) {
5734 impl->voidMethodOptionalStringArg();
5735 return;
5736 }
5737 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, optionalStringArg, info[0]);
5738 impl->voidMethodOptionalStringArg(optionalStringArg);
5739 }
5740
5741 static void voidMethodOptionalStringArgMethodCallback(const v8::FunctionCallback Info<v8::Value>& info)
5742 {
5743 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5744 TestObjectPythonV8Internal::voidMethodOptionalStringArgMethod(info);
5745 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5746 }
5747
5748 static void voidMethodOptionalTestInterfaceEmptyArgMethod(const v8::FunctionCall backInfo<v8::Value>& info)
5749 {
5750 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
5751 if (UNLIKELY(info.Length() <= 0)) {
5752 impl->voidMethodOptionalTestInterfaceEmptyArg();
5753 return;
5754 }
5755 V8TRYCATCH_VOID(TestInterfaceEmpty*, optionalTestInterfaceEmptyArg, V8TestIn terfaceEmpty::toNativeWithTypeCheck(info.GetIsolate(), info[0]));
5756 impl->voidMethodOptionalTestInterfaceEmptyArg(optionalTestInterfaceEmptyArg) ;
5757 }
5758
5759 static void voidMethodOptionalTestInterfaceEmptyArgMethodCallback(const v8::Func tionCallbackInfo<v8::Value>& info)
5760 {
5761 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5762 TestObjectPythonV8Internal::voidMethodOptionalTestInterfaceEmptyArgMethod(in fo);
5763 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5764 }
5765
5766 static void voidMethodOptionalLongArgMethod(const v8::FunctionCallbackInfo<v8::V alue>& info)
5767 {
5768 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodO ptionalLongArg", "TestObjectPython", info.Holder(), info.GetIsolate());
5769 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
5770 if (UNLIKELY(info.Length() <= 0)) {
5771 impl->voidMethodOptionalLongArg();
5772 return;
5773 }
5774 V8TRYCATCH_EXCEPTION_VOID(int, optionalLongArg, toInt32(info[0], exceptionSt ate), exceptionState);
5775 impl->voidMethodOptionalLongArg(optionalLongArg);
5776 }
5777
5778 static void voidMethodOptionalLongArgMethodCallback(const v8::FunctionCallbackIn fo<v8::Value>& info)
5779 {
5780 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5781 TestObjectPythonV8Internal::voidMethodOptionalLongArgMethod(info);
5782 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5783 }
5784
5785 static void stringMethodOptionalLongArgMethod(const v8::FunctionCallbackInfo<v8: :Value>& info)
5786 {
5787 ExceptionState exceptionState(ExceptionState::ExecutionContext, "stringMetho dOptionalLongArg", "TestObjectPython", info.Holder(), info.GetIsolate());
5788 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
5789 if (UNLIKELY(info.Length() <= 0)) {
5790 v8SetReturnValueString(info, impl->stringMethodOptionalLongArg(), info.G etIsolate());
5791 return;
5792 }
5793 V8TRYCATCH_EXCEPTION_VOID(int, optionalLongArg, toInt32(info[0], exceptionSt ate), exceptionState);
5794 v8SetReturnValueString(info, impl->stringMethodOptionalLongArg(optionalLongA rg), info.GetIsolate());
5795 }
5796
5797 static void stringMethodOptionalLongArgMethodCallback(const v8::FunctionCallback Info<v8::Value>& info)
5798 {
5799 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5800 TestObjectPythonV8Internal::stringMethodOptionalLongArgMethod(info);
5801 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5802 }
5803
5804 static void testInterfaceEmptyMethodOptionalLongArgMethod(const v8::FunctionCall backInfo<v8::Value>& info)
5805 {
5806 ExceptionState exceptionState(ExceptionState::ExecutionContext, "testInterfa ceEmptyMethodOptionalLongArg", "TestObjectPython", info.Holder(), info.GetIsolat e());
5807 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
5808 if (UNLIKELY(info.Length() <= 0)) {
5809 v8SetReturnValue(info, impl->testInterfaceEmptyMethodOptionalLongArg());
5810 return;
5811 }
5812 V8TRYCATCH_EXCEPTION_VOID(int, optionalLongArg, toInt32(info[0], exceptionSt ate), exceptionState);
5813 v8SetReturnValue(info, impl->testInterfaceEmptyMethodOptionalLongArg(optiona lLongArg));
5814 }
5815
5816 static void testInterfaceEmptyMethodOptionalLongArgMethodCallback(const v8::Func tionCallbackInfo<v8::Value>& info)
5817 {
5818 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5819 TestObjectPythonV8Internal::testInterfaceEmptyMethodOptionalLongArgMethod(in fo);
5820 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5821 }
5822
5823 static void longMethodOptionalLongArgMethod(const v8::FunctionCallbackInfo<v8::V alue>& info)
5824 {
5825 ExceptionState exceptionState(ExceptionState::ExecutionContext, "longMethodO ptionalLongArg", "TestObjectPython", info.Holder(), info.GetIsolate());
5826 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
5827 if (UNLIKELY(info.Length() <= 0)) {
5828 v8SetReturnValueInt(info, impl->longMethodOptionalLongArg());
5829 return;
5830 }
5831 V8TRYCATCH_EXCEPTION_VOID(int, optionalLongArg, toInt32(info[0], exceptionSt ate), exceptionState);
5832 v8SetReturnValueInt(info, impl->longMethodOptionalLongArg(optionalLongArg));
5833 }
5834
5835 static void longMethodOptionalLongArgMethodCallback(const v8::FunctionCallbackIn fo<v8::Value>& info)
5836 {
5837 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5838 TestObjectPythonV8Internal::longMethodOptionalLongArgMethod(info);
5839 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5840 }
5841
5842 static void voidMethodLongArgOptionalLongArgMethod(const v8::FunctionCallbackInf o<v8::Value>& info)
5843 {
5844 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodL ongArgOptionalLongArg", "TestObjectPython", info.Holder(), info.GetIsolate());
5845 if (UNLIKELY(info.Length() < 1)) {
5846 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
5847 exceptionState.throwIfNeeded();
5848 return;
5849 }
5850 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
5851 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), ex ceptionState);
5852 if (UNLIKELY(info.Length() <= 1)) {
5853 impl->voidMethodLongArgOptionalLongArg(longArg);
5854 return;
5855 }
5856 V8TRYCATCH_EXCEPTION_VOID(int, optionalLongArg, toInt32(info[1], exceptionSt ate), exceptionState);
5857 impl->voidMethodLongArgOptionalLongArg(longArg, optionalLongArg);
5858 }
5859
5860 static void voidMethodLongArgOptionalLongArgMethodCallback(const v8::FunctionCal lbackInfo<v8::Value>& info)
5861 {
5862 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5863 TestObjectPythonV8Internal::voidMethodLongArgOptionalLongArgMethod(info);
5864 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5865 }
5866
5867 static void voidMethodLongArgOptionalLongArgOptionalLongArgMethod(const v8::Func tionCallbackInfo<v8::Value>& info)
5868 {
5869 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodL ongArgOptionalLongArgOptionalLongArg", "TestObjectPython", info.Holder(), info.G etIsolate());
5870 if (UNLIKELY(info.Length() < 1)) {
5871 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
5872 exceptionState.throwIfNeeded();
5873 return;
5874 }
5875 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
5876 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), ex ceptionState);
5877 if (UNLIKELY(info.Length() <= 1)) {
5878 impl->voidMethodLongArgOptionalLongArgOptionalLongArg(longArg);
5879 return;
5880 }
5881 V8TRYCATCH_EXCEPTION_VOID(int, optionalLongArg1, toInt32(info[1], exceptionS tate), exceptionState);
5882 if (UNLIKELY(info.Length() <= 2)) {
5883 impl->voidMethodLongArgOptionalLongArgOptionalLongArg(longArg, optionalL ongArg1);
5884 return;
5885 }
5886 V8TRYCATCH_EXCEPTION_VOID(int, optionalLongArg2, toInt32(info[2], exceptionS tate), exceptionState);
5887 impl->voidMethodLongArgOptionalLongArgOptionalLongArg(longArg, optionalLongA rg1, optionalLongArg2);
5888 }
5889
5890 static void voidMethodLongArgOptionalLongArgOptionalLongArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5891 {
5892 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5893 TestObjectPythonV8Internal::voidMethodLongArgOptionalLongArgOptionalLongArgM ethod(info);
5894 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5895 }
5896
5897 static void voidMethodLongArgOptionalTestInterfaceEmptyArgMethod(const v8::Funct ionCallbackInfo<v8::Value>& info)
5898 {
5899 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodL ongArgOptionalTestInterfaceEmptyArg", "TestObjectPython", info.Holder(), info.Ge tIsolate());
5900 if (UNLIKELY(info.Length() < 1)) {
5901 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
5902 exceptionState.throwIfNeeded();
5903 return;
5904 }
5905 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
5906 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), ex ceptionState);
5907 if (UNLIKELY(info.Length() <= 1)) {
5908 impl->voidMethodLongArgOptionalTestInterfaceEmptyArg(longArg);
5909 return;
5910 }
5911 V8TRYCATCH_VOID(TestInterfaceEmpty*, optionalTestInterfaceEmpty, V8TestInter faceEmpty::toNativeWithTypeCheck(info.GetIsolate(), info[1]));
5912 impl->voidMethodLongArgOptionalTestInterfaceEmptyArg(longArg, optionalTestIn terfaceEmpty);
5913 }
5914
5915 static void voidMethodLongArgOptionalTestInterfaceEmptyArgMethodCallback(const v 8::FunctionCallbackInfo<v8::Value>& info)
5916 {
5917 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5918 TestObjectPythonV8Internal::voidMethodLongArgOptionalTestInterfaceEmptyArgMe thod(info);
5919 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5920 }
5921
5922 static void voidMethodTestInterfaceEmptyArgOptionalLongArgMethod(const v8::Funct ionCallbackInfo<v8::Value>& info)
5923 {
5924 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodT estInterfaceEmptyArgOptionalLongArg", "TestObjectPython", info.Holder(), info.Ge tIsolate());
5925 if (UNLIKELY(info.Length() < 1)) {
5926 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
5927 exceptionState.throwIfNeeded();
5928 return;
5929 }
5930 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
5931 V8TRYCATCH_VOID(TestInterfaceEmpty*, optionalTestInterfaceEmpty, V8TestInter faceEmpty::toNativeWithTypeCheck(info.GetIsolate(), info[0]));
5932 if (UNLIKELY(info.Length() <= 1)) {
5933 impl->voidMethodTestInterfaceEmptyArgOptionalLongArg(optionalTestInterfa ceEmpty);
5934 return;
5935 }
5936 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[1], exceptionState), ex ceptionState);
5937 impl->voidMethodTestInterfaceEmptyArgOptionalLongArg(optionalTestInterfaceEm pty, longArg);
5938 }
5939
5940 static void voidMethodTestInterfaceEmptyArgOptionalLongArgMethodCallback(const v 8::FunctionCallbackInfo<v8::Value>& info)
5941 {
5942 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5943 TestObjectPythonV8Internal::voidMethodTestInterfaceEmptyArgOptionalLongArgMe thod(info);
5944 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5945 }
5946
5947 static void voidMethodOptionalDictionaryArgMethod(const v8::FunctionCallbackInfo <v8::Value>& info)
5948 {
5949 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
5950 V8TRYCATCH_VOID(Dictionary, optionalDictionaryArg, Dictionary(info[0], info. GetIsolate()));
5951 if (!optionalDictionaryArg.isUndefinedOrNull() && !optionalDictionaryArg.isO bject()) {
5952 throwTypeError(ExceptionMessages::failedToExecute("voidMethodOptionalDic tionaryArg", "TestObjectPython", "parameter 1 ('optionalDictionaryArg') is not a n object."), info.GetIsolate());
5953 return;
5954 }
5955 impl->voidMethodOptionalDictionaryArg(optionalDictionaryArg);
5956 }
5957
5958 static void voidMethodOptionalDictionaryArgMethodCallback(const v8::FunctionCall backInfo<v8::Value>& info)
5959 {
5960 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5961 TestObjectPythonV8Internal::voidMethodOptionalDictionaryArgMethod(info);
5962 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5963 }
5964
5965 static void voidMethodVariadicStringArgMethod(const v8::FunctionCallbackInfo<v8: :Value>& info)
5966 {
5967 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
5968 V8TRYCATCH_VOID(Vector<String>, variadicStringArgs, toNativeArguments<String >(info, 0));
5969 impl->voidMethodVariadicStringArg(variadicStringArgs);
5970 }
5971
5972 static void voidMethodVariadicStringArgMethodCallback(const v8::FunctionCallback Info<v8::Value>& info)
5973 {
5974 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5975 TestObjectPythonV8Internal::voidMethodVariadicStringArgMethod(info);
5976 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5977 }
5978
5979 static void voidMethodStringArgVariadicStringArgMethod(const v8::FunctionCallbac kInfo<v8::Value>& info)
5980 {
5981 if (UNLIKELY(info.Length() < 1)) {
5982 throwTypeError(ExceptionMessages::failedToExecute("voidMethodStringArgVa riadicStringArg", "TestObjectPython", ExceptionMessages::notEnoughArguments(1, i nfo.Length())), info.GetIsolate());
5983 return;
5984 }
5985 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
5986 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, stringArg, info[0]) ;
5987 V8TRYCATCH_VOID(Vector<String>, variadicStringArgs, toNativeArguments<String >(info, 1));
5988 impl->voidMethodStringArgVariadicStringArg(stringArg, variadicStringArgs);
5989 }
5990
5991 static void voidMethodStringArgVariadicStringArgMethodCallback(const v8::Functio nCallbackInfo<v8::Value>& info)
5992 {
5993 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5994 TestObjectPythonV8Internal::voidMethodStringArgVariadicStringArgMethod(info) ;
5995 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5996 }
5997
5998 static void voidMethodVariadicTestInterfaceEmptyArgMethod(const v8::FunctionCall backInfo<v8::Value>& info)
5999 {
6000 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
6001 Vector<RefPtr<TestInterfaceEmpty> > variadicTestInterfaceEmptyArgs;
6002 for (int i = 0; i < info.Length(); ++i) {
6003 if (!V8TestInterfaceEmpty::hasInstance(info[i], info.GetIsolate())) {
6004 throwTypeError(ExceptionMessages::failedToExecute("voidMethodVariadi cTestInterfaceEmptyArg", "TestObjectPython", "parameter 1 is not of type 'TestIn terfaceEmpty'."), info.GetIsolate());
6005 return;
6006 }
6007 variadicTestInterfaceEmptyArgs.append(V8TestInterfaceEmpty::toNative(v8: :Handle<v8::Object>::Cast(info[i])));
6008 }
6009 impl->voidMethodVariadicTestInterfaceEmptyArg(variadicTestInterfaceEmptyArgs );
6010 }
6011
6012 static void voidMethodVariadicTestInterfaceEmptyArgMethodCallback(const v8::Func tionCallbackInfo<v8::Value>& info)
6013 {
6014 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6015 TestObjectPythonV8Internal::voidMethodVariadicTestInterfaceEmptyArgMethod(in fo);
6016 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6017 }
6018
6019 static void voidMethodTestInterfaceEmptyArgVariadicTestInterfaceEmptyArgMethod(c onst v8::FunctionCallbackInfo<v8::Value>& info)
6020 {
6021 if (UNLIKELY(info.Length() < 1)) {
6022 throwTypeError(ExceptionMessages::failedToExecute("voidMethodTestInterfa ceEmptyArgVariadicTestInterfaceEmptyArg", "TestObjectPython", ExceptionMessages: :notEnoughArguments(1, info.Length())), info.GetIsolate());
6023 return;
6024 }
6025 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
6026 V8TRYCATCH_VOID(TestInterfaceEmpty*, testInterfaceEmptyArg, V8TestInterfaceE mpty::toNativeWithTypeCheck(info.GetIsolate(), info[0]));
6027 Vector<RefPtr<TestInterfaceEmpty> > variadicTestInterfaceEmptyArgs;
6028 for (int i = 1; i < info.Length(); ++i) {
6029 if (!V8TestInterfaceEmpty::hasInstance(info[i], info.GetIsolate())) {
6030 throwTypeError(ExceptionMessages::failedToExecute("voidMethodTestInt erfaceEmptyArgVariadicTestInterfaceEmptyArg", "TestObjectPython", "parameter 2 i s not of type 'TestInterfaceEmpty'."), info.GetIsolate());
6031 return;
6032 }
6033 variadicTestInterfaceEmptyArgs.append(V8TestInterfaceEmpty::toNative(v8: :Handle<v8::Object>::Cast(info[i])));
6034 }
6035 impl->voidMethodTestInterfaceEmptyArgVariadicTestInterfaceEmptyArg(testInter faceEmptyArg, variadicTestInterfaceEmptyArgs);
6036 }
6037
6038 static void voidMethodTestInterfaceEmptyArgVariadicTestInterfaceEmptyArgMethodCa llback(const v8::FunctionCallbackInfo<v8::Value>& info)
6039 {
6040 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6041 TestObjectPythonV8Internal::voidMethodTestInterfaceEmptyArgVariadicTestInter faceEmptyArgMethod(info);
6042 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6043 }
6044
6045 static void voidMethodVariadicTestInterfaceWillBeGarbageCollectedArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6046 {
6047 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
6048 WillBeHeapVector<RefPtrWillBeMember<TestInterfaceWillBeGarbageCollected> > v ariadicTestInterfaceWillBeGarbageCollectedArg;
6049 for (int i = 0; i < info.Length(); ++i) {
6050 if (!V8TestInterfaceWillBeGarbageCollected::hasInstance(info[i], info.Ge tIsolate())) {
6051 throwTypeError(ExceptionMessages::failedToExecute("voidMethodVariadi cTestInterfaceWillBeGarbageCollectedArg", "TestObjectPython", "parameter 1 is no t of type 'TestInterfaceWillBeGarbageCollected'."), info.GetIsolate());
6052 return;
6053 }
6054 variadicTestInterfaceWillBeGarbageCollectedArg.append(V8TestInterfaceWil lBeGarbageCollected::toNative(v8::Handle<v8::Object>::Cast(info[i])));
6055 }
6056 impl->voidMethodVariadicTestInterfaceWillBeGarbageCollectedArg(variadicTestI nterfaceWillBeGarbageCollectedArg);
6057 }
6058
6059 static void voidMethodVariadicTestInterfaceWillBeGarbageCollectedArgMethodCallba ck(const v8::FunctionCallbackInfo<v8::Value>& info)
6060 {
6061 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6062 TestObjectPythonV8Internal::voidMethodVariadicTestInterfaceWillBeGarbageColl ectedArgMethod(info);
6063 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6064 }
6065
6066 static void overloadedMethodA1Method(const v8::FunctionCallbackInfo<v8::Value>& info)
6067 {
6068 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM ethodA", "TestObjectPython", info.Holder(), info.GetIsolate());
6069 if (UNLIKELY(info.Length() < 1)) {
6070 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
6071 exceptionState.throwIfNeeded();
6072 return;
6073 }
6074 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
6075 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), ex ceptionState);
6076 impl->overloadedMethodA(longArg);
6077 }
6078
6079 static void overloadedMethodA2Method(const v8::FunctionCallbackInfo<v8::Value>& info)
6080 {
6081 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM ethodA", "TestObjectPython", info.Holder(), info.GetIsolate());
6082 if (UNLIKELY(info.Length() < 2)) {
6083 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(2, i nfo.Length()));
6084 exceptionState.throwIfNeeded();
6085 return;
6086 }
6087 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
6088 V8TRYCATCH_EXCEPTION_VOID(int, longArg1, toInt32(info[0], exceptionState), e xceptionState);
6089 V8TRYCATCH_EXCEPTION_VOID(int, longArg2, toInt32(info[1], exceptionState), e xceptionState);
6090 impl->overloadedMethodA(longArg1, longArg2);
6091 }
6092
6093 static void overloadedMethodAMethod(const v8::FunctionCallbackInfo<v8::Value>& i nfo)
6094 {
6095 if (((info.Length() == 1))) {
6096 overloadedMethodA1Method(info);
6097 return;
6098 }
6099 if (((info.Length() == 2))) {
6100 overloadedMethodA2Method(info);
6101 return;
6102 }
6103 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM ethodA", "TestObjectPython", info.Holder(), info.GetIsolate());
6104 if (UNLIKELY(info.Length() < 1)) {
6105 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
6106 exceptionState.throwIfNeeded();
6107 return;
6108 }
6109 exceptionState.throwTypeError("No function was found that matched the signat ure provided.");
6110 exceptionState.throwIfNeeded();
6111 }
6112
6113 static void overloadedMethodAMethodCallback(const v8::FunctionCallbackInfo<v8::V alue>& info)
6114 {
6115 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6116 TestObjectPythonV8Internal::overloadedMethodAMethod(info);
6117 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6118 }
6119
6120 static void overloadedMethodB1Method(const v8::FunctionCallbackInfo<v8::Value>& info)
6121 {
6122 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM ethodB", "TestObjectPython", info.Holder(), info.GetIsolate());
6123 if (UNLIKELY(info.Length() < 1)) {
6124 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
6125 exceptionState.throwIfNeeded();
6126 return;
6127 }
6128 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
6129 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), ex ceptionState);
6130 impl->overloadedMethodB(longArg);
6131 }
6132
6133 static void overloadedMethodB2Method(const v8::FunctionCallbackInfo<v8::Value>& info)
6134 {
6135 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM ethodB", "TestObjectPython", info.Holder(), info.GetIsolate());
6136 if (UNLIKELY(info.Length() < 1)) {
6137 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
6138 exceptionState.throwIfNeeded();
6139 return;
6140 }
6141 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
6142 V8TRYCATCH_EXCEPTION_VOID(int, longArg1, toInt32(info[0], exceptionState), e xceptionState);
6143 if (UNLIKELY(info.Length() <= 1)) {
6144 impl->overloadedMethodB(longArg1);
6145 return;
6146 }
6147 V8TRYCATCH_EXCEPTION_VOID(int, longArg2, toInt32(info[1], exceptionState), e xceptionState);
6148 impl->overloadedMethodB(longArg1, longArg2);
6149 }
6150
6151 static void overloadedMethodBMethod(const v8::FunctionCallbackInfo<v8::Value>& i nfo)
6152 {
6153 if (((info.Length() == 1))) {
6154 overloadedMethodB1Method(info);
6155 return;
6156 }
6157 if (((info.Length() == 1)) || ((info.Length() == 2))) {
6158 overloadedMethodB2Method(info);
6159 return;
6160 }
6161 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM ethodB", "TestObjectPython", info.Holder(), info.GetIsolate());
6162 if (UNLIKELY(info.Length() < 1)) {
6163 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
6164 exceptionState.throwIfNeeded();
6165 return;
6166 }
6167 exceptionState.throwTypeError("No function was found that matched the signat ure provided.");
6168 exceptionState.throwIfNeeded();
6169 }
6170
6171 static void overloadedMethodBMethodCallback(const v8::FunctionCallbackInfo<v8::V alue>& info)
6172 {
6173 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6174 TestObjectPythonV8Internal::overloadedMethodBMethod(info);
6175 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6176 }
6177
6178 static void overloadedMethodC1Method(const v8::FunctionCallbackInfo<v8::Value>& info)
6179 {
6180 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM ethodC", "TestObjectPython", info.Holder(), info.GetIsolate());
6181 if (UNLIKELY(info.Length() < 1)) {
6182 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
6183 exceptionState.throwIfNeeded();
6184 return;
6185 }
6186 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
6187 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), ex ceptionState);
6188 impl->overloadedMethodC(longArg);
6189 }
6190
6191 static void overloadedMethodC2Method(const v8::FunctionCallbackInfo<v8::Value>& info)
6192 {
6193 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM ethodC", "TestObjectPython", info.Holder(), info.GetIsolate());
6194 if (UNLIKELY(info.Length() < 1)) {
6195 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
6196 exceptionState.throwIfNeeded();
6197 return;
6198 }
6199 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
6200 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), ex ceptionState);
6201 V8TRYCATCH_VOID(Vector<int>, longArgs, toNativeArguments<int>(info, 1));
6202 impl->overloadedMethodC(longArg, longArgs);
6203 }
6204
6205 static void overloadedMethodCMethod(const v8::FunctionCallbackInfo<v8::Value>& i nfo)
6206 {
6207 if (((info.Length() == 1))) {
6208 overloadedMethodC1Method(info);
6209 return;
6210 }
6211 if () {
6212 overloadedMethodC2Method(info);
6213 return;
6214 }
6215 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM ethodC", "TestObjectPython", info.Holder(), info.GetIsolate());
6216 if (UNLIKELY(info.Length() < 1)) {
6217 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
6218 exceptionState.throwIfNeeded();
6219 return;
6220 }
6221 exceptionState.throwTypeError("No function was found that matched the signat ure provided.");
6222 exceptionState.throwIfNeeded();
6223 }
6224
6225 static void overloadedMethodCMethodCallback(const v8::FunctionCallbackInfo<v8::V alue>& info)
6226 {
6227 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6228 TestObjectPythonV8Internal::overloadedMethodCMethod(info);
6229 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6230 }
6231
6232 static void overloadedMethodD1Method(const v8::FunctionCallbackInfo<v8::Value>& info)
6233 {
6234 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM ethodD", "TestObjectPython", info.Holder(), info.GetIsolate());
6235 if (UNLIKELY(info.Length() < 1)) {
6236 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
6237 exceptionState.throwIfNeeded();
6238 return;
6239 }
6240 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
6241 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), ex ceptionState);
6242 impl->overloadedMethodD(longArg);
6243 }
6244
6245 static void overloadedMethodD2Method(const v8::FunctionCallbackInfo<v8::Value>& info)
6246 {
6247 if (UNLIKELY(info.Length() < 1)) {
6248 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethodD", " TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), inf o.GetIsolate());
6249 return;
6250 }
6251 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
6252 V8TRYCATCH_VOID(TestInterfaceEmpty*, testInterfaceEmptyArg, V8TestInterfaceE mpty::toNativeWithTypeCheck(info.GetIsolate(), info[0]));
6253 impl->overloadedMethodD(testInterfaceEmptyArg);
6254 }
6255
6256 static void overloadedMethodDMethod(const v8::FunctionCallbackInfo<v8::Value>& i nfo)
6257 {
6258 if (((info.Length() == 1))) {
6259 overloadedMethodD1Method(info);
6260 return;
6261 }
6262 if (((info.Length() == 1) && (V8TestInterfaceEmpty::hasInstance(info[0], inf o.GetIsolate())))) {
6263 overloadedMethodD2Method(info);
6264 return;
6265 }
6266 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM ethodD", "TestObjectPython", info.Holder(), info.GetIsolate());
6267 if (UNLIKELY(info.Length() < 1)) {
6268 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
6269 exceptionState.throwIfNeeded();
6270 return;
6271 }
6272 exceptionState.throwTypeError("No function was found that matched the signat ure provided.");
6273 exceptionState.throwIfNeeded();
6274 }
6275
6276 static void overloadedMethodDMethodCallback(const v8::FunctionCallbackInfo<v8::V alue>& info)
6277 {
6278 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6279 TestObjectPythonV8Internal::overloadedMethodDMethod(info);
6280 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6281 }
6282
6283 static void overloadedMethodE1Method(const v8::FunctionCallbackInfo<v8::Value>& info)
6284 {
6285 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM ethodE", "TestObjectPython", info.Holder(), info.GetIsolate());
6286 if (UNLIKELY(info.Length() < 1)) {
6287 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
6288 exceptionState.throwIfNeeded();
6289 return;
6290 }
6291 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
6292 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), ex ceptionState);
6293 impl->overloadedMethodE(longArg);
6294 }
6295
6296 static void overloadedMethodE2Method(const v8::FunctionCallbackInfo<v8::Value>& info)
6297 {
6298 if (UNLIKELY(info.Length() < 1)) {
6299 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethodE", " TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), inf o.GetIsolate());
6300 return;
6301 }
6302 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
6303 V8TRYCATCH_VOID(Vector<int>, longArrayArg, toNativeArray<int>(info[0], 1, in fo.GetIsolate()));
6304 impl->overloadedMethodE(longArrayArg);
6305 }
6306
6307 static void overloadedMethodEMethod(const v8::FunctionCallbackInfo<v8::Value>& i nfo)
6308 {
6309 if (((info.Length() == 1))) {
6310 overloadedMethodE1Method(info);
6311 return;
6312 }
6313 if (((info.Length() == 1) && (info[0]->IsArray()))) {
6314 overloadedMethodE2Method(info);
6315 return;
6316 }
6317 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM ethodE", "TestObjectPython", info.Holder(), info.GetIsolate());
6318 if (UNLIKELY(info.Length() < 1)) {
6319 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
6320 exceptionState.throwIfNeeded();
6321 return;
6322 }
6323 exceptionState.throwTypeError("No function was found that matched the signat ure provided.");
6324 exceptionState.throwIfNeeded();
6325 }
6326
6327 static void overloadedMethodEMethodCallback(const v8::FunctionCallbackInfo<v8::V alue>& info)
6328 {
6329 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6330 TestObjectPythonV8Internal::overloadedMethodEMethod(info);
6331 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6332 }
6333
6334 static void overloadedMethodF1Method(const v8::FunctionCallbackInfo<v8::Value>& info)
6335 {
6336 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM ethodF", "TestObjectPython", info.Holder(), info.GetIsolate());
6337 if (UNLIKELY(info.Length() < 1)) {
6338 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
6339 exceptionState.throwIfNeeded();
6340 return;
6341 }
6342 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
6343 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), ex ceptionState);
6344 impl->overloadedMethodF(longArg);
6345 }
6346
6347 static void overloadedMethodF2Method(const v8::FunctionCallbackInfo<v8::Value>& info)
6348 {
6349 if (UNLIKELY(info.Length() < 1)) {
6350 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethodF", " TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), inf o.GetIsolate());
6351 return;
6352 }
6353 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
6354 V8TRYCATCH_VOID(TestInterfaceEmpty*, testInterfaceEmptyNullableArg, V8TestIn terfaceEmpty::toNativeWithTypeCheck(info.GetIsolate(), info[0]));
6355 impl->overloadedMethodF(testInterfaceEmptyNullableArg);
6356 }
6357
6358 static void overloadedMethodFMethod(const v8::FunctionCallbackInfo<v8::Value>& i nfo)
6359 {
6360 if (((info.Length() == 1))) {
6361 overloadedMethodF1Method(info);
6362 return;
6363 }
6364 if (((info.Length() == 1) && (info[0]->IsNull() || V8TestInterfaceEmpty::has Instance(info[0], info.GetIsolate())))) {
6365 overloadedMethodF2Method(info);
6366 return;
6367 }
6368 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM ethodF", "TestObjectPython", info.Holder(), info.GetIsolate());
6369 if (UNLIKELY(info.Length() < 1)) {
6370 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
6371 exceptionState.throwIfNeeded();
6372 return;
6373 }
6374 exceptionState.throwTypeError("No function was found that matched the signat ure provided.");
6375 exceptionState.throwIfNeeded();
6376 }
6377
6378 static void overloadedMethodFMethodCallback(const v8::FunctionCallbackInfo<v8::V alue>& info)
6379 {
6380 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6381 TestObjectPythonV8Internal::overloadedMethodFMethod(info);
6382 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6383 }
6384
6385 static void overloadedMethodG1Method(const v8::FunctionCallbackInfo<v8::Value>& info)
6386 {
6387 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
6388 impl->overloadedMethodG();
6389 }
6390
6391 static void overloadedMethodG2Method(const v8::FunctionCallbackInfo<v8::Value>& info)
6392 {
6393 if (UNLIKELY(info.Length() < 1)) {
6394 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethodG", " TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), inf o.GetIsolate());
6395 return;
6396 }
6397 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
6398 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strictTypeCheckingS tringArg, info[0]);
6399 impl->overloadedMethodG(strictTypeCheckingStringArg);
6400 }
6401
6402 static void overloadedMethodGMethod(const v8::FunctionCallbackInfo<v8::Value>& i nfo)
6403 {
6404 if (((info.Length() == 0))) {
6405 overloadedMethodG1Method(info);
6406 return;
6407 }
6408 if (((info.Length() == 1) && (isUndefinedOrNull(info[0]) || info[0]->IsStrin g() || info[0]->IsObject()))) {
6409 overloadedMethodG2Method(info);
6410 return;
6411 }
6412 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethodG", "Test ObjectPython", "No function was found that matched the signature provided."), in fo.GetIsolate());
6413 }
6414
6415 static void overloadedMethodGMethodCallback(const v8::FunctionCallbackInfo<v8::V alue>& info)
6416 {
6417 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6418 TestObjectPythonV8Internal::overloadedMethodGMethod(info);
6419 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6420 }
6421
6422 static void overloadedMethodH1Method(const v8::FunctionCallbackInfo<v8::Value>& info)
6423 {
6424 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
6425 impl->overloadedMethodH();
6426 }
6427
6428 static void overloadedMethodH2Method(const v8::FunctionCallbackInfo<v8::Value>& info)
6429 {
6430 if (UNLIKELY(info.Length() < 1)) {
6431 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethodH", " TestObjectPython", ExceptionMessages::notEnoughArguments(1, info.Length())), inf o.GetIsolate());
6432 return;
6433 }
6434 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
6435 if (info.Length() <= 0 || !info[0]->IsFunction()) {
6436 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethodH", " TestObjectPython", "The callback provided as parameter 1 is not a function."), i nfo.GetIsolate());
6437 return;
6438 }
6439 OwnPtr<TestCallbackInterface> testCallbackInterfaceArg = V8TestCallbackInter face::create(v8::Handle<v8::Function>::Cast(info[0]), currentExecutionContext(in fo.GetIsolate()));
6440 impl->overloadedMethodH(testCallbackInterfaceArg.release());
6441 }
6442
6443 static void overloadedMethodHMethod(const v8::FunctionCallbackInfo<v8::Value>& i nfo)
6444 {
6445 if (((info.Length() == 0))) {
6446 overloadedMethodH1Method(info);
6447 return;
6448 }
6449 if (((info.Length() == 1) && (info[0]->IsNull() || info[0]->IsFunction()))) {
6450 overloadedMethodH2Method(info);
6451 return;
6452 }
6453 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethodH", "Test ObjectPython", "No function was found that matched the signature provided."), in fo.GetIsolate());
6454 }
6455
6456 static void overloadedMethodHMethodCallback(const v8::FunctionCallbackInfo<v8::V alue>& info)
6457 {
6458 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6459 TestObjectPythonV8Internal::overloadedMethodHMethod(info);
6460 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6461 }
6462
6463 static void overloadedPerWorldBindingsMethod1Method(const v8::FunctionCallbackIn fo<v8::Value>& info)
6464 {
6465 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
6466 impl->overloadedPerWorldBindingsMethod();
6467 }
6468
6469 static void overloadedPerWorldBindingsMethod1MethodForMainWorld(const v8::Functi onCallbackInfo<v8::Value>& info)
6470 {
6471 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
6472 impl->overloadedPerWorldBindingsMethod();
6473 }
6474
6475 static void overloadedPerWorldBindingsMethod2Method(const v8::FunctionCallbackIn fo<v8::Value>& info)
6476 {
6477 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedP erWorldBindingsMethod", "TestObjectPython", info.Holder(), info.GetIsolate());
6478 if (UNLIKELY(info.Length() < 1)) {
6479 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
6480 exceptionState.throwIfNeeded();
6481 return;
6482 }
6483 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
6484 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), ex ceptionState);
6485 impl->overloadedPerWorldBindingsMethod(longArg);
6486 }
6487
6488 static void overloadedPerWorldBindingsMethodMethod(const v8::FunctionCallbackInf o<v8::Value>& info)
6489 {
6490 if (((info.Length() == 0))) {
6491 overloadedPerWorldBindingsMethod1Method(info);
6492 return;
6493 }
6494 if (((info.Length() == 1))) {
6495 overloadedPerWorldBindingsMethod2Method(info);
6496 return;
6497 }
6498 throwTypeError(ExceptionMessages::failedToExecute("overloadedPerWorldBinding sMethod", "TestObjectPython", "No function was found that matched the signature provided."), info.GetIsolate());
6499 }
6500
6501 static void overloadedPerWorldBindingsMethodMethodCallback(const v8::FunctionCal lbackInfo<v8::Value>& info)
6502 {
6503 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6504 TestObjectPythonV8Internal::overloadedPerWorldBindingsMethodMethod(info);
6505 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6506 }
6507
6508 static void overloadedPerWorldBindingsMethod2MethodForMainWorld(const v8::Functi onCallbackInfo<v8::Value>& info)
6509 {
6510 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedP erWorldBindingsMethod", "TestObjectPython", info.Holder(), info.GetIsolate());
6511 if (UNLIKELY(info.Length() < 1)) {
6512 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
6513 exceptionState.throwIfNeeded();
6514 return;
6515 }
6516 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
6517 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), ex ceptionState);
6518 impl->overloadedPerWorldBindingsMethod(longArg);
6519 }
6520
6521 static void overloadedPerWorldBindingsMethodMethodForMainWorld(const v8::Functio nCallbackInfo<v8::Value>& info)
6522 {
6523 if (((info.Length() == 0))) {
6524 overloadedPerWorldBindingsMethod1MethodForMainWorld(info);
6525 return;
6526 }
6527 if (((info.Length() == 1))) {
6528 overloadedPerWorldBindingsMethod2MethodForMainWorld(info);
6529 return;
6530 }
6531 throwTypeError(ExceptionMessages::failedToExecute("overloadedPerWorldBinding sMethod", "TestObjectPython", "No function was found that matched the signature provided."), info.GetIsolate());
6532 }
6533
6534 static void overloadedPerWorldBindingsMethodMethodCallbackForMainWorld(const v8: :FunctionCallbackInfo<v8::Value>& info)
6535 {
6536 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6537 TestObjectPythonV8Internal::overloadedPerWorldBindingsMethodMethodForMainWor ld(info);
6538 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6539 }
6540
6541 static void overloadedStaticMethod1Method(const v8::FunctionCallbackInfo<v8::Val ue>& info)
6542 {
6543 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedS taticMethod", "TestObjectPython", info.Holder(), info.GetIsolate());
6544 if (UNLIKELY(info.Length() < 1)) {
6545 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
6546 exceptionState.throwIfNeeded();
6547 return;
6548 }
6549 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), ex ceptionState);
6550 TestObjectPython::overloadedStaticMethod(longArg);
6551 }
6552
6553 static void overloadedStaticMethod2Method(const v8::FunctionCallbackInfo<v8::Val ue>& info)
6554 {
6555 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedS taticMethod", "TestObjectPython", info.Holder(), info.GetIsolate());
6556 if (UNLIKELY(info.Length() < 2)) {
6557 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(2, i nfo.Length()));
6558 exceptionState.throwIfNeeded();
6559 return;
6560 }
6561 V8TRYCATCH_EXCEPTION_VOID(int, longArg1, toInt32(info[0], exceptionState), e xceptionState);
6562 V8TRYCATCH_EXCEPTION_VOID(int, longArg2, toInt32(info[1], exceptionState), e xceptionState);
6563 TestObjectPython::overloadedStaticMethod(longArg1, longArg2);
6564 }
6565
6566 static void overloadedStaticMethodMethod(const v8::FunctionCallbackInfo<v8::Valu e>& info)
6567 {
6568 if (((info.Length() == 1))) {
6569 overloadedStaticMethod1Method(info);
6570 return;
6571 }
6572 if (((info.Length() == 2))) {
6573 overloadedStaticMethod2Method(info);
6574 return;
6575 }
6576 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedS taticMethod", "TestObjectPython", info.Holder(), info.GetIsolate());
6577 if (UNLIKELY(info.Length() < 1)) {
6578 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
6579 exceptionState.throwIfNeeded();
6580 return;
6581 }
6582 exceptionState.throwTypeError("No function was found that matched the signat ure provided.");
6583 exceptionState.throwIfNeeded();
6584 }
6585
6586 static void overloadedStaticMethodMethodCallback(const v8::FunctionCallbackInfo< v8::Value>& info)
6587 {
6588 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6589 TestObjectPythonV8Internal::overloadedStaticMethodMethod(info);
6590 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6591 }
6592
6593 static void voidMethodClampUnsignedShortArgMethod(const v8::FunctionCallbackInfo <v8::Value>& info)
6594 {
6595 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodC lampUnsignedShortArg", "TestObjectPython", info.Holder(), info.GetIsolate());
6596 if (UNLIKELY(info.Length() < 1)) {
6597 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
6598 exceptionState.throwIfNeeded();
6599 return;
6600 }
6601 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
6602 unsigned clampUnsignedShortArg = 0;
6603 V8TRYCATCH_VOID(double, clampUnsignedShortArgNativeValue, info[0]->NumberVal ue());
6604 if (!std::isnan(clampUnsignedShortArgNativeValue))
6605 clampUnsignedShortArg = clampTo<unsigned short>(clampUnsignedShortArgNat iveValue);
6606 impl->voidMethodClampUnsignedShortArg(clampUnsignedShortArg);
6607 }
6608
6609 static void voidMethodClampUnsignedShortArgMethodCallback(const v8::FunctionCall backInfo<v8::Value>& info)
6610 {
6611 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6612 TestObjectPythonV8Internal::voidMethodClampUnsignedShortArgMethod(info);
6613 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6614 }
6615
6616 static void voidMethodClampUnsignedLongArgMethod(const v8::FunctionCallbackInfo< v8::Value>& info)
6617 {
6618 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodC lampUnsignedLongArg", "TestObjectPython", info.Holder(), info.GetIsolate());
6619 if (UNLIKELY(info.Length() < 1)) {
6620 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
6621 exceptionState.throwIfNeeded();
6622 return;
6623 }
6624 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
6625 unsigned clampUnsignedLongArg = 0;
6626 V8TRYCATCH_VOID(double, clampUnsignedLongArgNativeValue, info[0]->NumberValu e());
6627 if (!std::isnan(clampUnsignedLongArgNativeValue))
6628 clampUnsignedLongArg = clampTo<unsigned long>(clampUnsignedLongArgNative Value);
6629 impl->voidMethodClampUnsignedLongArg(clampUnsignedLongArg);
6630 }
6631
6632 static void voidMethodClampUnsignedLongArgMethodCallback(const v8::FunctionCallb ackInfo<v8::Value>& info)
6633 {
6634 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6635 TestObjectPythonV8Internal::voidMethodClampUnsignedLongArgMethod(info);
6636 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6637 }
6638
6639 static void voidMethodDefaultUndefinedTestInterfaceEmptyArgMethod(const v8::Func tionCallbackInfo<v8::Value>& info)
6640 {
6641 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
6642 V8TRYCATCH_VOID(TestInterfaceEmpty*, defaultUndefinedTestInterfaceEmptyArg, V8TestInterfaceEmpty::toNativeWithTypeCheck(info.GetIsolate(), info[0]));
6643 impl->voidMethodDefaultUndefinedTestInterfaceEmptyArg(defaultUndefinedTestIn terfaceEmptyArg);
6644 }
6645
6646 static void voidMethodDefaultUndefinedTestInterfaceEmptyArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6647 {
6648 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6649 TestObjectPythonV8Internal::voidMethodDefaultUndefinedTestInterfaceEmptyArgM ethod(info);
6650 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6651 }
6652
6653 static void voidMethodDefaultUndefinedLongArgMethod(const v8::FunctionCallbackIn fo<v8::Value>& info)
6654 {
6655 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodD efaultUndefinedLongArg", "TestObjectPython", info.Holder(), info.GetIsolate());
6656 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
6657 V8TRYCATCH_EXCEPTION_VOID(int, defaultUndefinedLongArg, toInt32(info[0], exc eptionState), exceptionState);
6658 impl->voidMethodDefaultUndefinedLongArg(defaultUndefinedLongArg);
6659 }
6660
6661 static void voidMethodDefaultUndefinedLongArgMethodCallback(const v8::FunctionCa llbackInfo<v8::Value>& info)
6662 {
6663 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6664 TestObjectPythonV8Internal::voidMethodDefaultUndefinedLongArgMethod(info);
6665 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6666 }
6667
6668 static void voidMethodDefaultUndefinedStringArgMethod(const v8::FunctionCallback Info<v8::Value>& info)
6669 {
6670 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
6671 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, defaultUndefinedStr ingArg, info[0]);
6672 impl->voidMethodDefaultUndefinedStringArg(defaultUndefinedStringArg);
6673 }
6674
6675 static void voidMethodDefaultUndefinedStringArgMethodCallback(const v8::Function CallbackInfo<v8::Value>& info)
6676 {
6677 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6678 TestObjectPythonV8Internal::voidMethodDefaultUndefinedStringArgMethod(info);
6679 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6680 }
6681
6682 static void voidMethodDefaultNullStringStringArgMethod(const v8::FunctionCallbac kInfo<v8::Value>& info)
6683 {
6684 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
6685 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, defaultNullStringSt ringArg, argumentOrNull(info, 0));
6686 impl->voidMethodDefaultNullStringStringArg(defaultNullStringStringArg);
6687 }
6688
6689 static void voidMethodDefaultNullStringStringArgMethodCallback(const v8::Functio nCallbackInfo<v8::Value>& info)
6690 {
6691 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6692 TestObjectPythonV8Internal::voidMethodDefaultNullStringStringArgMethod(info) ;
6693 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6694 }
6695
6696 static void voidMethodEnforceRangeLongArgMethod(const v8::FunctionCallbackInfo<v 8::Value>& info)
6697 {
6698 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodE nforceRangeLongArg", "TestObjectPython", info.Holder(), info.GetIsolate());
6699 if (UNLIKELY(info.Length() < 1)) {
6700 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
6701 exceptionState.throwIfNeeded();
6702 return;
6703 }
6704 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
6705 V8TRYCATCH_EXCEPTION_VOID(int, enforceRangeLongArg, toInt32(info[0], Enforce Range, exceptionState), exceptionState);
6706 impl->voidMethodEnforceRangeLongArg(enforceRangeLongArg);
6707 }
6708
6709 static void voidMethodEnforceRangeLongArgMethodCallback(const v8::FunctionCallba ckInfo<v8::Value>& info)
6710 {
6711 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6712 TestObjectPythonV8Internal::voidMethodEnforceRangeLongArgMethod(info);
6713 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6714 }
6715
6716 static void voidMethodTreatNullAsNullStringStringArgMethod(const v8::FunctionCal lbackInfo<v8::Value>& info)
6717 {
6718 if (UNLIKELY(info.Length() < 1)) {
6719 throwTypeError(ExceptionMessages::failedToExecute("voidMethodTreatNullAs NullStringStringArg", "TestObjectPython", ExceptionMessages::notEnoughArguments( 1, info.Length())), info.GetIsolate());
6720 return;
6721 }
6722 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
6723 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithNullCheck>, treatN ullAsNullStringStringArg, info[0]);
6724 impl->voidMethodTreatNullAsNullStringStringArg(treatNullAsNullStringStringAr g);
6725 }
6726
6727 static void voidMethodTreatNullAsNullStringStringArgMethodCallback(const v8::Fun ctionCallbackInfo<v8::Value>& info)
6728 {
6729 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6730 TestObjectPythonV8Internal::voidMethodTreatNullAsNullStringStringArgMethod(i nfo);
6731 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6732 }
6733
6734 static void voidMethodTreatNullAsNullStringTreatUndefinedAsNullStringStringArgMe thod(const v8::FunctionCallbackInfo<v8::Value>& info)
6735 {
6736 if (UNLIKELY(info.Length() < 1)) {
6737 throwTypeError(ExceptionMessages::failedToExecute("voidMethodTreatNullAs NullStringTreatUndefinedAsNullStringStringArg", "TestObjectPython", ExceptionMes sages::notEnoughArguments(1, info.Length())), info.GetIsolate());
6738 return;
6739 }
6740 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
6741 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithUndefinedOrNullChe ck>, treatNullAsNullStringStringArg, info[0]);
6742 impl->voidMethodTreatNullAsNullStringTreatUndefinedAsNullStringStringArg(tre atNullAsNullStringStringArg);
6743 }
6744
6745 static void voidMethodTreatNullAsNullStringTreatUndefinedAsNullStringStringArgMe thodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6746 {
6747 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6748 TestObjectPythonV8Internal::voidMethodTreatNullAsNullStringTreatUndefinedAsN ullStringStringArgMethod(info);
6749 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6750 }
6751
6752 static void activityLoggingAccessForAllWorldsMethodMethod(const v8::FunctionCall backInfo<v8::Value>& info)
6753 {
6754 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
6755 impl->activityLoggingAccessForAllWorldsMethod();
6756 }
6757
6758 static void activityLoggingAccessForAllWorldsMethodMethodCallback(const v8::Func tionCallbackInfo<v8::Value>& info)
6759 {
6760 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6761 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext());
6762 if (contextData && contextData->activityLogger()) {
6763 Vector<v8::Handle<v8::Value> > loggerArgs = toNativeArguments<v8::Handle <v8::Value> >(info, 0);
6764 contextData->activityLogger()->log("TestObjectPython.activityLoggingAcce ssForAllWorldsMethod", info.Length(), loggerArgs.data(), "Method");
6765 }
6766 TestObjectPythonV8Internal::activityLoggingAccessForAllWorldsMethodMethod(in fo);
6767 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6768 }
6769
6770 static void callWithScriptStateVoidMethodMethod(const v8::FunctionCallbackInfo<v 8::Value>& info)
6771 {
6772 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
6773 ScriptState* currentState = ScriptState::current();
6774 if (!currentState)
6775 return;
6776 ScriptState& state = *currentState;
6777 impl->callWithScriptStateVoidMethod(&state);
6778 if (state.hadException()) {
6779 v8::Local<v8::Value> exception = state.exception();
6780 state.clearException();
6781 throwError(exception, info.GetIsolate());
6782 return;
6783 }
6784 }
6785
6786 static void callWithScriptStateVoidMethodMethodCallback(const v8::FunctionCallba ckInfo<v8::Value>& info)
6787 {
6788 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6789 TestObjectPythonV8Internal::callWithScriptStateVoidMethodMethod(info);
6790 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6791 }
6792
6793 static void callWithScriptStateLongMethodMethod(const v8::FunctionCallbackInfo<v 8::Value>& info)
6794 {
6795 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
6796 ScriptState* currentState = ScriptState::current();
6797 if (!currentState)
6798 return;
6799 ScriptState& state = *currentState;
6800 int result = impl->callWithScriptStateLongMethod(&state);
6801 if (state.hadException()) {
6802 v8::Local<v8::Value> exception = state.exception();
6803 state.clearException();
6804 throwError(exception, info.GetIsolate());
6805 return;
6806 }
6807 v8SetReturnValueInt(info, result);
6808 }
6809
6810 static void callWithScriptStateLongMethodMethodCallback(const v8::FunctionCallba ckInfo<v8::Value>& info)
6811 {
6812 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6813 TestObjectPythonV8Internal::callWithScriptStateLongMethodMethod(info);
6814 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6815 }
6816
6817 static void callWithExecutionContextVoidMethodMethod(const v8::FunctionCallbackI nfo<v8::Value>& info)
6818 {
6819 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
6820 ExecutionContext* scriptContext = currentExecutionContext(info.GetIsolate()) ;
6821 impl->callWithExecutionContextVoidMethod(scriptContext);
6822 }
6823
6824 static void callWithExecutionContextVoidMethodMethodCallback(const v8::FunctionC allbackInfo<v8::Value>& info)
6825 {
6826 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6827 TestObjectPythonV8Internal::callWithExecutionContextVoidMethodMethod(info);
6828 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6829 }
6830
6831 static void callWithScriptStateExecutionContextVoidMethodMethod(const v8::Functi onCallbackInfo<v8::Value>& info)
6832 {
6833 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
6834 ScriptState* currentState = ScriptState::current();
6835 if (!currentState)
6836 return;
6837 ScriptState& state = *currentState;
6838 ExecutionContext* scriptContext = currentExecutionContext(info.GetIsolate()) ;
6839 impl->callWithScriptStateExecutionContextVoidMethod(&state, scriptContext);
6840 if (state.hadException()) {
6841 v8::Local<v8::Value> exception = state.exception();
6842 state.clearException();
6843 throwError(exception, info.GetIsolate());
6844 return;
6845 }
6846 }
6847
6848 static void callWithScriptStateExecutionContextVoidMethodMethodCallback(const v8 ::FunctionCallbackInfo<v8::Value>& info)
6849 {
6850 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6851 TestObjectPythonV8Internal::callWithScriptStateExecutionContextVoidMethodMet hod(info);
6852 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6853 }
6854
6855 static void callWithScriptStateScriptArgumentsVoidMethodMethod(const v8::Functio nCallbackInfo<v8::Value>& info)
6856 {
6857 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
6858 ScriptState* currentState = ScriptState::current();
6859 if (!currentState)
6860 return;
6861 ScriptState& state = *currentState;
6862 RefPtr<ScriptArguments> scriptArguments(createScriptArguments(info, 0));
6863 impl->callWithScriptStateScriptArgumentsVoidMethod(&state, scriptArguments.r elease());
6864 if (state.hadException()) {
6865 v8::Local<v8::Value> exception = state.exception();
6866 state.clearException();
6867 throwError(exception, info.GetIsolate());
6868 return;
6869 }
6870 }
6871
6872 static void callWithScriptStateScriptArgumentsVoidMethodMethodCallback(const v8: :FunctionCallbackInfo<v8::Value>& info)
6873 {
6874 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6875 TestObjectPythonV8Internal::callWithScriptStateScriptArgumentsVoidMethodMeth od(info);
6876 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6877 }
6878
6879 static void callWithScriptStateScriptArgumentsVoidMethodOptionalBooleanArgMethod (const v8::FunctionCallbackInfo<v8::Value>& info)
6880 {
6881 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
6882 if (UNLIKELY(info.Length() <= 0)) {
6883 ScriptState* currentState = ScriptState::current();
6884 if (!currentState)
6885 return;
6886 ScriptState& state = *currentState;
6887 RefPtr<ScriptArguments> scriptArguments(createScriptArguments(info, 1));
6888 impl->callWithScriptStateScriptArgumentsVoidMethodOptionalBooleanArg(&st ate, scriptArguments.release());
6889 if (state.hadException()) {
6890 v8::Local<v8::Value> exception = state.exception();
6891 state.clearException();
6892 throwError(exception, info.GetIsolate());
6893 return;
6894 }
6895 return;
6896 }
6897 V8TRYCATCH_VOID(bool, optionalBooleanArg, info[0]->BooleanValue());
6898 ScriptState* currentState = ScriptState::current();
6899 if (!currentState)
6900 return;
6901 ScriptState& state = *currentState;
6902 RefPtr<ScriptArguments> scriptArguments(createScriptArguments(info, 1));
6903 impl->callWithScriptStateScriptArgumentsVoidMethodOptionalBooleanArg(&state, scriptArguments.release(), optionalBooleanArg);
6904 if (state.hadException()) {
6905 v8::Local<v8::Value> exception = state.exception();
6906 state.clearException();
6907 throwError(exception, info.GetIsolate());
6908 return;
6909 }
6910 }
6911
6912 static void callWithScriptStateScriptArgumentsVoidMethodOptionalBooleanArgMethod Callback(const v8::FunctionCallbackInfo<v8::Value>& info)
6913 {
6914 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6915 TestObjectPythonV8Internal::callWithScriptStateScriptArgumentsVoidMethodOpti onalBooleanArgMethod(info);
6916 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6917 }
6918
6919 static void callWithActiveWindowMethod(const v8::FunctionCallbackInfo<v8::Value> & info)
6920 {
6921 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
6922 impl->callWithActiveWindow(callingDOMWindow(info.GetIsolate()));
6923 }
6924
6925 static void callWithActiveWindowMethodCallback(const v8::FunctionCallbackInfo<v8 ::Value>& info)
6926 {
6927 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6928 TestObjectPythonV8Internal::callWithActiveWindowMethod(info);
6929 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6930 }
6931
6932 static void callWithActiveWindowScriptWindowMethod(const v8::FunctionCallbackInf o<v8::Value>& info)
6933 {
6934 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
6935 impl->callWithActiveWindowScriptWindow(callingDOMWindow(info.GetIsolate()), enteredDOMWindow(info.GetIsolate()));
6936 }
6937
6938 static void callWithActiveWindowScriptWindowMethodCallback(const v8::FunctionCal lbackInfo<v8::Value>& info)
6939 {
6940 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6941 TestObjectPythonV8Internal::callWithActiveWindowScriptWindowMethod(info);
6942 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6943 }
6944
6945 static void checkSecurityForNodeVoidMethodMethod(const v8::FunctionCallbackInfo< v8::Value>& info)
6946 {
6947 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
6948 if (!BindingSecurity::shouldAllowAccessToNode(info.GetIsolate(), impl->check SecurityForNodeVoidMethod(exceptionState), exceptionState)) {
6949 v8SetReturnValueNull(info);
6950 exceptionState.throwIfNeeded();
6951 return;
6952 }
6953 impl->checkSecurityForNodeVoidMethod();
6954 }
6955
6956 static void checkSecurityForNodeVoidMethodMethodCallback(const v8::FunctionCallb ackInfo<v8::Value>& info)
6957 {
6958 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6959 TestObjectPythonV8Internal::checkSecurityForNodeVoidMethodMethod(info);
6960 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6961 }
6962
6963 #if ENABLE(CONDITION)
6964 static void conditionalConditionVoidMethodMethod(const v8::FunctionCallbackInfo< v8::Value>& info)
6965 {
6966 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
6967 impl->conditionalConditionVoidMethod();
6968 }
6969 #endif // ENABLE(CONDITION)
6970
6971 #if ENABLE(CONDITION)
6972 static void conditionalConditionVoidMethodMethodCallback(const v8::FunctionCallb ackInfo<v8::Value>& info)
6973 {
6974 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6975 TestObjectPythonV8Internal::conditionalConditionVoidMethodMethod(info);
6976 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6977 }
6978 #endif // ENABLE(CONDITION)
6979
6980 #if ENABLE(CONDITION_1) && ENABLE(CONDITION_2)
6981 static void conditionalCondition1AndCondition2VoidMethodMethod(const v8::Functio nCallbackInfo<v8::Value>& info)
6982 {
6983 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
6984 impl->conditionalCondition1AndCondition2VoidMethod();
6985 }
6986 #endif // ENABLE(CONDITION_1) && ENABLE(CONDITION_2)
6987
6988 #if ENABLE(CONDITION_1) && ENABLE(CONDITION_2)
6989 static void conditionalCondition1AndCondition2VoidMethodMethodCallback(const v8: :FunctionCallbackInfo<v8::Value>& info)
6990 {
6991 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6992 TestObjectPythonV8Internal::conditionalCondition1AndCondition2VoidMethodMeth od(info);
6993 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6994 }
6995 #endif // ENABLE(CONDITION_1) && ENABLE(CONDITION_2)
6996
6997 #if ENABLE(CONDITION)
6998 static void conditionalConditionStaticVoidMethodMethod(const v8::FunctionCallbac kInfo<v8::Value>& info)
6999 {
7000 TestObjectPython::conditionalConditionStaticVoidMethod();
7001 }
7002 #endif // ENABLE(CONDITION)
7003
7004 #if ENABLE(CONDITION)
7005 static void conditionalConditionStaticVoidMethodMethodCallback(const v8::Functio nCallbackInfo<v8::Value>& info)
7006 {
7007 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7008 TestObjectPythonV8Internal::conditionalConditionStaticVoidMethodMethod(info) ;
7009 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7010 }
7011 #endif // ENABLE(CONDITION)
7012
7013 static void customVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Va lue>& info)
7014 {
7015 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7016 V8TestObjectPython::customVoidMethodMethodCustom(info);
7017 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7018 }
7019
7020 #if ENABLE(CONDITION)
7021 static void conditionalConditionCustomVoidMethodMethodCallback(const v8::Functio nCallbackInfo<v8::Value>& info)
7022 {
7023 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7024 V8TestObjectPython::conditionalConditionCustomVoidMethodMethodCustom(info);
7025 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7026 }
7027 #endif // ENABLE(CONDITION)
7028
7029 static void customElementCallbacksVoidMethodMethod(const v8::FunctionCallbackInf o<v8::Value>& info)
7030 {
7031 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
7032 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
7033 impl->customElementCallbacksVoidMethod();
7034 }
7035
7036 static void customElementCallbacksVoidMethodMethodCallback(const v8::FunctionCal lbackInfo<v8::Value>& info)
7037 {
7038 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7039 TestObjectPythonV8Internal::customElementCallbacksVoidMethodMethod(info);
7040 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7041 }
7042
7043 static void deprecatedVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value> & info)
7044 {
7045 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
7046 impl->deprecatedVoidMethod();
7047 }
7048
7049 static void deprecatedVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8 ::Value>& info)
7050 {
7051 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7052 UseCounter::countDeprecation(callingExecutionContext(info.GetIsolate()), Use Counter::voidMethod);
7053 TestObjectPythonV8Internal::deprecatedVoidMethodMethod(info);
7054 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7055 }
7056
7057 static void doNotCheckSignatureVoidMethodMethod(const v8::FunctionCallbackInfo<v 8::Value>& info)
7058 {
7059 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
7060 impl->doNotCheckSignatureVoidMethod();
7061 }
7062
7063 static void doNotCheckSignatureVoidMethodMethodCallback(const v8::FunctionCallba ckInfo<v8::Value>& info)
7064 {
7065 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7066 TestObjectPythonV8Internal::doNotCheckSignatureVoidMethodMethod(info);
7067 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7068 }
7069
7070 static void implementedAsVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Val ue>& info)
7071 {
7072 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
7073 impl->implementedAsMethodName();
7074 }
7075
7076 static void implementedAsVoidMethodMethodCallback(const v8::FunctionCallbackInfo <v8::Value>& info)
7077 {
7078 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7079 TestObjectPythonV8Internal::implementedAsVoidMethodMethod(info);
7080 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7081 }
7082
7083 static void measureAsVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
7084 {
7085 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
7086 impl->measureAsVoidMethod();
7087 }
7088
7089 static void measureAsVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8: :Value>& info)
7090 {
7091 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7092 UseCounter::count(callingExecutionContext(info.GetIsolate()), UseCounter::Te stFeature);
7093 TestObjectPythonV8Internal::measureAsVoidMethodMethod(info);
7094 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7095 }
7096
7097 static void notEnumerableVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Val ue>& info)
7098 {
7099 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
7100 impl->notEnumerableVoidMethod();
7101 }
7102
7103 static void notEnumerableVoidMethodMethodCallback(const v8::FunctionCallbackInfo <v8::Value>& info)
7104 {
7105 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7106 TestObjectPythonV8Internal::notEnumerableVoidMethodMethod(info);
7107 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7108 }
7109
7110 static void perContextEnabledVoidMethodMethod(const v8::FunctionCallbackInfo<v8: :Value>& info)
7111 {
7112 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
7113 impl->perContextEnabledVoidMethod();
7114 }
7115
7116 static void perContextEnabledVoidMethodMethodCallback(const v8::FunctionCallback Info<v8::Value>& info)
7117 {
7118 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7119 TestObjectPythonV8Internal::perContextEnabledVoidMethodMethod(info);
7120 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7121 }
7122
7123 static void perWorldBindingsVoidMethodMethod(const v8::FunctionCallbackInfo<v8:: Value>& info)
7124 {
7125 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
7126 impl->perWorldBindingsVoidMethod();
7127 }
7128
7129 static void perWorldBindingsVoidMethodMethodCallback(const v8::FunctionCallbackI nfo<v8::Value>& info)
7130 {
7131 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7132 TestObjectPythonV8Internal::perWorldBindingsVoidMethodMethod(info);
7133 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7134 }
7135
7136 static void perWorldBindingsVoidMethodMethodForMainWorld(const v8::FunctionCallb ackInfo<v8::Value>& info)
7137 {
7138 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
7139 impl->perWorldBindingsVoidMethod();
7140 }
7141
7142 static void perWorldBindingsVoidMethodMethodCallbackForMainWorld(const v8::Funct ionCallbackInfo<v8::Value>& info)
7143 {
7144 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7145 TestObjectPythonV8Internal::perWorldBindingsVoidMethodMethodForMainWorld(inf o);
7146 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7147 }
7148
7149 static void perWorldBindingsVoidMethodTestInterfaceEmptyArgMethod(const v8::Func tionCallbackInfo<v8::Value>& info)
7150 {
7151 if (UNLIKELY(info.Length() < 1)) {
7152 throwTypeError(ExceptionMessages::failedToExecute("perWorldBindingsVoidM ethodTestInterfaceEmptyArg", "TestObjectPython", ExceptionMessages::notEnoughArg uments(1, info.Length())), info.GetIsolate());
7153 return;
7154 }
7155 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
7156 V8TRYCATCH_VOID(TestInterfaceEmpty*, testInterfaceEmptyArg, V8TestInterfaceE mpty::toNativeWithTypeCheck(info.GetIsolate(), info[0]));
7157 impl->perWorldBindingsVoidMethodTestInterfaceEmptyArg(testInterfaceEmptyArg) ;
7158 }
7159
7160 static void perWorldBindingsVoidMethodTestInterfaceEmptyArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
7161 {
7162 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7163 TestObjectPythonV8Internal::perWorldBindingsVoidMethodTestInterfaceEmptyArgM ethod(info);
7164 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7165 }
7166
7167 static void perWorldBindingsVoidMethodTestInterfaceEmptyArgMethodForMainWorld(co nst v8::FunctionCallbackInfo<v8::Value>& info)
7168 {
7169 if (UNLIKELY(info.Length() < 1)) {
7170 throwTypeError(ExceptionMessages::failedToExecute("perWorldBindingsVoidM ethodTestInterfaceEmptyArg", "TestObjectPython", ExceptionMessages::notEnoughArg uments(1, info.Length())), info.GetIsolate());
7171 return;
7172 }
7173 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
7174 V8TRYCATCH_VOID(TestInterfaceEmpty*, testInterfaceEmptyArg, V8TestInterfaceE mpty::toNativeWithTypeCheck(info.GetIsolate(), info[0]));
7175 impl->perWorldBindingsVoidMethodTestInterfaceEmptyArg(testInterfaceEmptyArg) ;
7176 }
7177
7178 static void perWorldBindingsVoidMethodTestInterfaceEmptyArgMethodCallbackForMain World(const v8::FunctionCallbackInfo<v8::Value>& info)
7179 {
7180 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7181 TestObjectPythonV8Internal::perWorldBindingsVoidMethodTestInterfaceEmptyArgM ethodForMainWorld(info);
7182 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7183 }
7184
7185 static void activityLoggingForAllWorldsPerWorldBindingsVoidMethodMethod(const v8 ::FunctionCallbackInfo<v8::Value>& info)
7186 {
7187 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
7188 impl->activityLoggingForAllWorldsPerWorldBindingsVoidMethod();
7189 }
7190
7191 static void activityLoggingForAllWorldsPerWorldBindingsVoidMethodMethodCallback( const v8::FunctionCallbackInfo<v8::Value>& info)
7192 {
7193 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7194 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext());
7195 if (contextData && contextData->activityLogger()) {
7196 Vector<v8::Handle<v8::Value> > loggerArgs = toNativeArguments<v8::Handle <v8::Value> >(info, 0);
7197 contextData->activityLogger()->log("TestObjectPython.activityLoggingForA llWorldsPerWorldBindingsVoidMethod", info.Length(), loggerArgs.data(), "Method") ;
7198 }
7199 TestObjectPythonV8Internal::activityLoggingForAllWorldsPerWorldBindingsVoidM ethodMethod(info);
7200 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7201 }
7202
7203 static void activityLoggingForAllWorldsPerWorldBindingsVoidMethodMethodForMainWo rld(const v8::FunctionCallbackInfo<v8::Value>& info)
7204 {
7205 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
7206 impl->activityLoggingForAllWorldsPerWorldBindingsVoidMethod();
7207 }
7208
7209 static void activityLoggingForAllWorldsPerWorldBindingsVoidMethodMethodCallbackF orMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info)
7210 {
7211 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7212 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext());
7213 if (contextData && contextData->activityLogger()) {
7214 Vector<v8::Handle<v8::Value> > loggerArgs = toNativeArguments<v8::Handle <v8::Value> >(info, 0);
7215 contextData->activityLogger()->log("TestObjectPython.activityLoggingForA llWorldsPerWorldBindingsVoidMethod", info.Length(), loggerArgs.data(), "Method") ;
7216 }
7217 TestObjectPythonV8Internal::activityLoggingForAllWorldsPerWorldBindingsVoidM ethodMethodForMainWorld(info);
7218 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7219 }
7220
7221 static void activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethodMethod(con st v8::FunctionCallbackInfo<v8::Value>& info)
7222 {
7223 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
7224 impl->activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethod();
7225 }
7226
7227 static void activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethodMethodCall back(const v8::FunctionCallbackInfo<v8::Value>& info)
7228 {
7229 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7230 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext());
7231 if (contextData && contextData->activityLogger()) {
7232 Vector<v8::Handle<v8::Value> > loggerArgs = toNativeArguments<v8::Handle <v8::Value> >(info, 0);
7233 contextData->activityLogger()->log("TestObjectPython.activityLoggingForI solatedWorldsPerWorldBindingsVoidMethod", info.Length(), loggerArgs.data(), "Met hod");
7234 }
7235 TestObjectPythonV8Internal::activityLoggingForIsolatedWorldsPerWorldBindings VoidMethodMethod(info);
7236 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7237 }
7238
7239 static void activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethodMethodForM ainWorld(const v8::FunctionCallbackInfo<v8::Value>& info)
7240 {
7241 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
7242 impl->activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethod();
7243 }
7244
7245 static void activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethodMethodCall backForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info)
7246 {
7247 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7248 TestObjectPythonV8Internal::activityLoggingForIsolatedWorldsPerWorldBindings VoidMethodMethodForMainWorld(info);
7249 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7250 }
7251
7252 static void raisesExceptionVoidMethodMethod(const v8::FunctionCallbackInfo<v8::V alue>& info)
7253 {
7254 ExceptionState exceptionState(ExceptionState::ExecutionContext, "raisesExcep tionVoidMethod", "TestObjectPython", info.Holder(), info.GetIsolate());
7255 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
7256 impl->raisesExceptionVoidMethod(exceptionState);
7257 if (exceptionState.throwIfNeeded())
7258 return;
7259 }
7260
7261 static void raisesExceptionVoidMethodMethodCallback(const v8::FunctionCallbackIn fo<v8::Value>& info)
7262 {
7263 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7264 TestObjectPythonV8Internal::raisesExceptionVoidMethodMethod(info);
7265 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7266 }
7267
7268 static void raisesExceptionStringMethodMethod(const v8::FunctionCallbackInfo<v8: :Value>& info)
7269 {
7270 ExceptionState exceptionState(ExceptionState::ExecutionContext, "raisesExcep tionStringMethod", "TestObjectPython", info.Holder(), info.GetIsolate());
7271 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
7272 String result = impl->raisesExceptionStringMethod(exceptionState);
7273 if (exceptionState.throwIfNeeded())
7274 return;
7275 v8SetReturnValueString(info, result, info.GetIsolate());
7276 }
7277
7278 static void raisesExceptionStringMethodMethodCallback(const v8::FunctionCallback Info<v8::Value>& info)
7279 {
7280 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7281 TestObjectPythonV8Internal::raisesExceptionStringMethodMethod(info);
7282 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7283 }
7284
7285 static void raisesExceptionVoidMethodOptionalLongArgMethod(const v8::FunctionCal lbackInfo<v8::Value>& info)
7286 {
7287 ExceptionState exceptionState(ExceptionState::ExecutionContext, "raisesExcep tionVoidMethodOptionalLongArg", "TestObjectPython", info.Holder(), info.GetIsola te());
7288 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
7289 if (UNLIKELY(info.Length() <= 0)) {
7290 impl->raisesExceptionVoidMethodOptionalLongArg(exceptionState);
7291 if (exceptionState.throwIfNeeded())
7292 return;
7293 return;
7294 }
7295 V8TRYCATCH_EXCEPTION_VOID(int, optionalLongArg, toInt32(info[0], exceptionSt ate), exceptionState);
7296 impl->raisesExceptionVoidMethodOptionalLongArg(optionalLongArg, exceptionSta te);
7297 if (exceptionState.throwIfNeeded())
7298 return;
7299 }
7300
7301 static void raisesExceptionVoidMethodOptionalLongArgMethodCallback(const v8::Fun ctionCallbackInfo<v8::Value>& info)
7302 {
7303 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7304 TestObjectPythonV8Internal::raisesExceptionVoidMethodOptionalLongArgMethod(i nfo);
7305 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7306 }
7307
7308 static void raisesExceptionVoidMethodTestCallbackInterfaceArgMethod(const v8::Fu nctionCallbackInfo<v8::Value>& info)
7309 {
7310 ExceptionState exceptionState(ExceptionState::ExecutionContext, "raisesExcep tionVoidMethodTestCallbackInterfaceArg", "TestObjectPython", info.Holder(), info .GetIsolate());
7311 if (UNLIKELY(info.Length() < 1)) {
7312 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
7313 exceptionState.throwIfNeeded();
7314 return;
7315 }
7316 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
7317 if (info.Length() <= 0 || !info[0]->IsFunction()) {
7318 exceptionState.throwTypeError("The callback provided as parameter 1 is n ot a function.");
7319 exceptionState.throwIfNeeded();
7320 return;
7321 }
7322 OwnPtr<TestCallbackInterface> testCallbackInterfaceArg = V8TestCallbackInter face::create(v8::Handle<v8::Function>::Cast(info[0]), currentExecutionContext(in fo.GetIsolate()));
7323 impl->raisesExceptionVoidMethodTestCallbackInterfaceArg(testCallbackInterfac eArg.release(), exceptionState);
7324 if (exceptionState.throwIfNeeded())
7325 return;
7326 }
7327
7328 static void raisesExceptionVoidMethodTestCallbackInterfaceArgMethodCallback(cons t v8::FunctionCallbackInfo<v8::Value>& info)
7329 {
7330 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7331 TestObjectPythonV8Internal::raisesExceptionVoidMethodTestCallbackInterfaceAr gMethod(info);
7332 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7333 }
7334
7335 static void raisesExceptionVoidMethodOptionalTestCallbackInterfaceArgMethod(cons t v8::FunctionCallbackInfo<v8::Value>& info)
7336 {
7337 ExceptionState exceptionState(ExceptionState::ExecutionContext, "raisesExcep tionVoidMethodOptionalTestCallbackInterfaceArg", "TestObjectPython", info.Holder (), info.GetIsolate());
7338 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
7339 OwnPtr<TestCallbackInterface> optionalTestCallbackInterfaceArg;
7340 if (info.Length() > 0 && !isUndefinedOrNull(info[0])) {
7341 if (!info[0]->IsFunction()) {
7342 exceptionState.throwTypeError("The callback provided as parameter 1 is not a function.");
7343 exceptionState.throwIfNeeded();
7344 return;
7345 }
7346 optionalTestCallbackInterfaceArg = V8TestCallbackInterface::create(v8::H andle<v8::Function>::Cast(info[0]), currentExecutionContext(info.GetIsolate()));
7347 }
7348 impl->raisesExceptionVoidMethodOptionalTestCallbackInterfaceArg(optionalTest CallbackInterfaceArg.release(), exceptionState);
7349 if (exceptionState.throwIfNeeded())
7350 return;
7351 }
7352
7353 static void raisesExceptionVoidMethodOptionalTestCallbackInterfaceArgMethodCallb ack(const v8::FunctionCallbackInfo<v8::Value>& info)
7354 {
7355 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7356 TestObjectPythonV8Internal::raisesExceptionVoidMethodOptionalTestCallbackInt erfaceArgMethod(info);
7357 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7358 }
7359
7360 static void raisesExceptionTestInterfaceEmptyVoidMethodMethod(const v8::Function CallbackInfo<v8::Value>& info)
7361 {
7362 ExceptionState exceptionState(ExceptionState::ExecutionContext, "raisesExcep tionTestInterfaceEmptyVoidMethod", "TestObjectPython", info.Holder(), info.GetIs olate());
7363 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
7364 RefPtr<TestInterfaceEmpty> result = impl->raisesExceptionTestInterfaceEmptyV oidMethod(exceptionState);
7365 if (exceptionState.throwIfNeeded())
7366 return;
7367 v8SetReturnValue(info, result.release());
7368 }
7369
7370 static void raisesExceptionTestInterfaceEmptyVoidMethodMethodCallback(const v8:: FunctionCallbackInfo<v8::Value>& info)
7371 {
7372 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7373 TestObjectPythonV8Internal::raisesExceptionTestInterfaceEmptyVoidMethodMetho d(info);
7374 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7375 }
7376
7377 static void readOnlyVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
7378 {
7379 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
7380 impl->readOnlyVoidMethod();
7381 }
7382
7383 static void readOnlyVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8:: Value>& info)
7384 {
7385 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7386 TestObjectPythonV8Internal::readOnlyVoidMethodMethod(info);
7387 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7388 }
7389
7390 static void notEnumerableReadOnlyVoidMethodMethod(const v8::FunctionCallbackInfo <v8::Value>& info)
7391 {
7392 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
7393 impl->notEnumerableReadOnlyVoidMethod();
7394 }
7395
7396 static void notEnumerableReadOnlyVoidMethodMethodCallback(const v8::FunctionCall backInfo<v8::Value>& info)
7397 {
7398 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7399 TestObjectPythonV8Internal::notEnumerableReadOnlyVoidMethodMethod(info);
7400 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7401 }
7402
7403 static void runtimeEnabledVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Va lue>& info)
7404 {
7405 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
7406 impl->runtimeEnabledVoidMethod();
7407 }
7408
7409 static void runtimeEnabledVoidMethodMethodCallback(const v8::FunctionCallbackInf o<v8::Value>& info)
7410 {
7411 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7412 TestObjectPythonV8Internal::runtimeEnabledVoidMethodMethod(info);
7413 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7414 }
7415
7416 static void perWorldBindingsRuntimeEnabledVoidMethodMethod(const v8::FunctionCal lbackInfo<v8::Value>& info)
7417 {
7418 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
7419 impl->perWorldBindingsRuntimeEnabledVoidMethod();
7420 }
7421
7422 static void perWorldBindingsRuntimeEnabledVoidMethodMethodCallback(const v8::Fun ctionCallbackInfo<v8::Value>& info)
7423 {
7424 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7425 TestObjectPythonV8Internal::perWorldBindingsRuntimeEnabledVoidMethodMethod(i nfo);
7426 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7427 }
7428
7429 static void perWorldBindingsRuntimeEnabledVoidMethodMethodForMainWorld(const v8: :FunctionCallbackInfo<v8::Value>& info)
7430 {
7431 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
7432 impl->perWorldBindingsRuntimeEnabledVoidMethod();
7433 }
7434
7435 static void perWorldBindingsRuntimeEnabledVoidMethodMethodCallbackForMainWorld(c onst v8::FunctionCallbackInfo<v8::Value>& info)
7436 {
7437 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7438 TestObjectPythonV8Internal::perWorldBindingsRuntimeEnabledVoidMethodMethodFo rMainWorld(info);
7439 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7440 }
7441
7442 static void strictTypeCheckingVoidMethodTestInterfaceEmptyArgMethod(const v8::Fu nctionCallbackInfo<v8::Value>& info)
7443 {
7444 if (UNLIKELY(info.Length() < 1)) {
7445 throwTypeError(ExceptionMessages::failedToExecute("strictTypeCheckingVoi dMethodTestInterfaceEmptyArg", "TestObjectPython", ExceptionMessages::notEnoughA rguments(1, info.Length())), info.GetIsolate());
7446 return;
7447 }
7448 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
7449 if (info.Length() > 0 && !V8TestInterfaceEmpty::hasInstance(info[0], info.Ge tIsolate())) {
7450 throwTypeError(ExceptionMessages::failedToExecute("strictTypeCheckingVoi dMethodTestInterfaceEmptyArg", "TestObjectPython", "parameter 1 is not of type ' TestInterfaceEmpty'."), info.GetIsolate());
7451 return;
7452 }
7453 V8TRYCATCH_VOID(TestInterfaceEmpty*, testInterfaceEmptyArg, V8TestInterfaceE mpty::toNativeWithTypeCheck(info.GetIsolate(), info[0]));
7454 impl->strictTypeCheckingVoidMethodTestInterfaceEmptyArg(testInterfaceEmptyAr g);
7455 }
7456
7457 static void strictTypeCheckingVoidMethodTestInterfaceEmptyArgMethodCallback(cons t v8::FunctionCallbackInfo<v8::Value>& info)
7458 {
7459 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7460 TestObjectPythonV8Internal::strictTypeCheckingVoidMethodTestInterfaceEmptyAr gMethod(info);
7461 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7462 }
7463
7464 static void strictTypeCheckingVoidMethodTestInterfaceEmptyOrNullArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
7465 {
7466 if (UNLIKELY(info.Length() < 1)) {
7467 throwTypeError(ExceptionMessages::failedToExecute("strictTypeCheckingVoi dMethodTestInterfaceEmptyOrNullArg", "TestObjectPython", ExceptionMessages::notE noughArguments(1, info.Length())), info.GetIsolate());
7468 return;
7469 }
7470 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
7471 if (info.Length() > 0 && !isUndefinedOrNull(info[0]) && !V8TestInterfaceEmpt y::hasInstance(info[0], info.GetIsolate())) {
7472 throwTypeError(ExceptionMessages::failedToExecute("strictTypeCheckingVoi dMethodTestInterfaceEmptyOrNullArg", "TestObjectPython", "parameter 1 is not of type 'TestInterfaceEmpty'."), info.GetIsolate());
7473 return;
7474 }
7475 V8TRYCATCH_VOID(TestInterfaceEmpty*, testInterfaceEmptyArg, V8TestInterfaceE mpty::toNativeWithTypeCheck(info.GetIsolate(), info[0]));
7476 impl->strictTypeCheckingVoidMethodTestInterfaceEmptyOrNullArg(testInterfaceE mptyArg);
7477 }
7478
7479 static void strictTypeCheckingVoidMethodTestInterfaceEmptyOrNullArgMethodCallbac k(const v8::FunctionCallbackInfo<v8::Value>& info)
7480 {
7481 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7482 TestObjectPythonV8Internal::strictTypeCheckingVoidMethodTestInterfaceEmptyOr NullArgMethod(info);
7483 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7484 }
7485
7486 static void treatReturnedNullStringAsNullStringMethodMethod(const v8::FunctionCa llbackInfo<v8::Value>& info)
7487 {
7488 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
7489 v8SetReturnValueStringOrNull(info, impl->treatReturnedNullStringAsNullString Method(), info.GetIsolate());
7490 }
7491
7492 static void treatReturnedNullStringAsNullStringMethodMethodCallback(const v8::Fu nctionCallbackInfo<v8::Value>& info)
7493 {
7494 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7495 TestObjectPythonV8Internal::treatReturnedNullStringAsNullStringMethodMethod( info);
7496 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7497 }
7498
7499 static void treatReturnedNullStringAsUndefinedStringMethodMethod(const v8::Funct ionCallbackInfo<v8::Value>& info)
7500 {
7501 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
7502 v8SetReturnValueStringOrUndefined(info, impl->treatReturnedNullStringAsUndef inedStringMethod(), info.GetIsolate());
7503 }
7504
7505 static void treatReturnedNullStringAsUndefinedStringMethodMethodCallback(const v 8::FunctionCallbackInfo<v8::Value>& info)
7506 {
7507 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7508 TestObjectPythonV8Internal::treatReturnedNullStringAsUndefinedStringMethodMe thod(info);
7509 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7510 }
7511
7512 static void unforgeableVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value >& info)
7513 {
7514 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
7515 impl->unforgeableVoidMethod();
7516 }
7517
7518 static void unforgeableVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v 8::Value>& info)
7519 {
7520 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7521 TestObjectPythonV8Internal::unforgeableVoidMethodMethod(info);
7522 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7523 }
7524
7525 static void voidMethodTestInterfaceWillBeGarbageCollectedSequenceArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
7526 {
7527 if (UNLIKELY(info.Length() < 1)) {
7528 throwTypeError(ExceptionMessages::failedToExecute("voidMethodTestInterfa ceWillBeGarbageCollectedSequenceArg", "TestObjectPython", ExceptionMessages::not EnoughArguments(1, info.Length())), info.GetIsolate());
7529 return;
7530 }
7531 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
7532 V8TRYCATCH_VOID(WillBeHeapVector<RefPtrWillBeMember<TestInterfaceWillBeGarba geCollected> >, testInterfaceWillBeGarbageCollectedSequenceArg, (toMemberNativeA rray<TestInterfaceWillBeGarbageCollected, V8TestInterfaceWillBeGarbageCollected> (info[0], 1, info.GetIsolate())));
7533 impl->voidMethodTestInterfaceWillBeGarbageCollectedSequenceArg(testInterface WillBeGarbageCollectedSequenceArg);
7534 }
7535
7536 static void voidMethodTestInterfaceWillBeGarbageCollectedSequenceArgMethodCallba ck(const v8::FunctionCallbackInfo<v8::Value>& info)
7537 {
7538 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7539 TestObjectPythonV8Internal::voidMethodTestInterfaceWillBeGarbageCollectedSeq uenceArgMethod(info);
7540 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7541 }
7542
7543 static void voidMethodTestInterfaceWillBeGarbageCollectedArrayArgMethod(const v8 ::FunctionCallbackInfo<v8::Value>& info)
7544 {
7545 if (UNLIKELY(info.Length() < 1)) {
7546 throwTypeError(ExceptionMessages::failedToExecute("voidMethodTestInterfa ceWillBeGarbageCollectedArrayArg", "TestObjectPython", ExceptionMessages::notEno ughArguments(1, info.Length())), info.GetIsolate());
7547 return;
7548 }
7549 TestObjectPython* impl = V8TestObjectPython::toNative(info.Holder());
7550 V8TRYCATCH_VOID(WillBeHeapVector<RefPtrWillBeMember<TestInterfaceWillBeGarba geCollected> >, testInterfaceWillBeGarbageCollectedArrayArg, (toMemberNativeArra y<TestInterfaceWillBeGarbageCollected, V8TestInterfaceWillBeGarbageCollected>(in fo[0], 1, info.GetIsolate())));
7551 impl->voidMethodTestInterfaceWillBeGarbageCollectedArrayArg(testInterfaceWil lBeGarbageCollectedArrayArg);
7552 }
7553
7554 static void voidMethodTestInterfaceWillBeGarbageCollectedArrayArgMethodCallback( const v8::FunctionCallbackInfo<v8::Value>& info)
7555 {
7556 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7557 TestObjectPythonV8Internal::voidMethodTestInterfaceWillBeGarbageCollectedArr ayArgMethod(info);
7558 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7559 }
7560
7561 } // namespace TestObjectPythonV8Internal
7562
7563 static const V8DOMConfiguration::AttributeConfiguration V8TestObjectPythonAttrib utes[] = {
7564 {"readonlyStringAttribute", TestObjectPythonV8Internal::readonlyStringAttrib uteAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAU LT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7565 {"readonlyTestInterfaceEmptyAttribute", TestObjectPythonV8Internal::readonly TestInterfaceEmptyAttributeAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8:: AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7566 {"readonlyLongAttribute", TestObjectPythonV8Internal::readonlyLongAttributeA ttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7567 {"dateAttribute", TestObjectPythonV8Internal::dateAttributeAttributeGetterCa llback, TestObjectPythonV8Internal::dateAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribut e>(v8::None), 0 /* on instance */},
7568 {"stringAttribute", TestObjectPythonV8Internal::stringAttributeAttributeGett erCallback, TestObjectPythonV8Internal::stringAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAt tribute>(v8::None), 0 /* on instance */},
7569 {"readonlyDOMTimeStampAttribute", TestObjectPythonV8Internal::readonlyDOMTim eStampAttributeAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessContro l>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7570 {"booleanAttribute", TestObjectPythonV8Internal::booleanAttributeAttributeGe tterCallback, TestObjectPythonV8Internal::booleanAttributeAttributeSetterCallbac k, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::Propert yAttribute>(v8::None), 0 /* on instance */},
7571 {"byteAttribute", TestObjectPythonV8Internal::byteAttributeAttributeGetterCa llback, TestObjectPythonV8Internal::byteAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribut e>(v8::None), 0 /* on instance */},
7572 {"doubleAttribute", TestObjectPythonV8Internal::doubleAttributeAttributeGett erCallback, TestObjectPythonV8Internal::doubleAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAt tribute>(v8::None), 0 /* on instance */},
7573 {"floatAttribute", TestObjectPythonV8Internal::floatAttributeAttributeGetter Callback, TestObjectPythonV8Internal::floatAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttri bute>(v8::None), 0 /* on instance */},
7574 {"longAttribute", TestObjectPythonV8Internal::longAttributeAttributeGetterCa llback, TestObjectPythonV8Internal::longAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribut e>(v8::None), 0 /* on instance */},
7575 {"longLongAttribute", TestObjectPythonV8Internal::longLongAttributeAttribute GetterCallback, TestObjectPythonV8Internal::longLongAttributeAttributeSetterCall back, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::Prop ertyAttribute>(v8::None), 0 /* on instance */},
7576 {"octetAttribute", TestObjectPythonV8Internal::octetAttributeAttributeGetter Callback, TestObjectPythonV8Internal::octetAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttri bute>(v8::None), 0 /* on instance */},
7577 {"shortAttribute", TestObjectPythonV8Internal::shortAttributeAttributeGetter Callback, TestObjectPythonV8Internal::shortAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttri bute>(v8::None), 0 /* on instance */},
7578 {"unsignedLongAttribute", TestObjectPythonV8Internal::unsignedLongAttributeA ttributeGetterCallback, TestObjectPythonV8Internal::unsignedLongAttributeAttribu teSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_c ast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7579 {"unsignedLongLongAttribute", TestObjectPythonV8Internal::unsignedLongLongAt tributeAttributeGetterCallback, TestObjectPythonV8Internal::unsignedLongLongAttr ibuteAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAUL T), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7580 {"unsignedShortAttribute", TestObjectPythonV8Internal::unsignedShortAttribut eAttributeGetterCallback, TestObjectPythonV8Internal::unsignedShortAttributeAttr ibuteSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), stati c_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7581 {"testInterfaceEmptyAttribute", TestObjectPythonV8Internal::testInterfaceEmp tyAttributeAttributeGetterCallback, TestObjectPythonV8Internal::testInterfaceEmp tyAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8:: DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7582 {"testObjectPythonAttribute", TestObjectPythonV8Internal::testObjectPythonAt tributeAttributeGetterCallback, TestObjectPythonV8Internal::testObjectPythonAttr ibuteAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAUL T), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7583 {"voidCallbackFunctionAttribute", TestObjectPythonV8Internal::voidCallbackFu nctionAttributeAttributeGetterCallback, TestObjectPythonV8Internal::voidCallback FunctionAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl >(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance * /},
7584 {"anyCallbackFunctionOptionalAnyArgAttribute", TestObjectPythonV8Internal::a nyCallbackFunctionOptionalAnyArgAttributeAttributeGetterCallback, TestObjectPyth onV8Internal::anyCallbackFunctionOptionalAnyArgAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyA ttribute>(v8::None), 0 /* on instance */},
7585 {"cssAttribute", TestObjectPythonV8Internal::cssAttributeAttributeGetterCall back, TestObjectPythonV8Internal::cssAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>( v8::None), 0 /* on instance */},
7586 {"imeAttribute", TestObjectPythonV8Internal::imeAttributeAttributeGetterCall back, TestObjectPythonV8Internal::imeAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>( v8::None), 0 /* on instance */},
7587 {"svgAttribute", TestObjectPythonV8Internal::svgAttributeAttributeGetterCall back, TestObjectPythonV8Internal::svgAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>( v8::None), 0 /* on instance */},
7588 {"xmlAttribute", TestObjectPythonV8Internal::xmlAttributeAttributeGetterCall back, TestObjectPythonV8Internal::xmlAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>( v8::None), 0 /* on instance */},
7589 {"nodeFilterAttribute", TestObjectPythonV8Internal::nodeFilterAttributeAttri buteGetterCallback, TestObjectPythonV8Internal::nodeFilterAttributeAttributeSett erCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8 ::PropertyAttribute>(v8::None), 0 /* on instance */},
7590 {"serializedScriptValueAttribute", TestObjectPythonV8Internal::serializedScr iptValueAttributeAttributeGetterCallback, TestObjectPythonV8Internal::serialized ScriptValueAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessCont rol>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instanc e */},
7591 {"anyAttribute", TestObjectPythonV8Internal::anyAttributeAttributeGetterCall back, TestObjectPythonV8Internal::anyAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>( v8::None), 0 /* on instance */},
7592 {"promiseAttribute", TestObjectPythonV8Internal::promiseAttributeAttributeGe tterCallback, TestObjectPythonV8Internal::promiseAttributeAttributeSetterCallbac k, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::Propert yAttribute>(v8::None), 0 /* on instance */},
7593 {"windowAttribute", TestObjectPythonV8Internal::windowAttributeAttributeGett erCallback, TestObjectPythonV8Internal::windowAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAt tribute>(v8::None), 0 /* on instance */},
7594 {"documentAttribute", TestObjectPythonV8Internal::documentAttributeAttribute GetterCallback, TestObjectPythonV8Internal::documentAttributeAttributeSetterCall back, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::Prop ertyAttribute>(v8::None), 0 /* on instance */},
7595 {"documentFragmentAttribute", TestObjectPythonV8Internal::documentFragmentAt tributeAttributeGetterCallback, TestObjectPythonV8Internal::documentFragmentAttr ibuteAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAUL T), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7596 {"documentTypeAttribute", TestObjectPythonV8Internal::documentTypeAttributeA ttributeGetterCallback, TestObjectPythonV8Internal::documentTypeAttributeAttribu teSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_c ast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7597 {"elementAttribute", TestObjectPythonV8Internal::elementAttributeAttributeGe tterCallback, TestObjectPythonV8Internal::elementAttributeAttributeSetterCallbac k, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::Propert yAttribute>(v8::None), 0 /* on instance */},
7598 {"nodeAttribute", TestObjectPythonV8Internal::nodeAttributeAttributeGetterCa llback, TestObjectPythonV8Internal::nodeAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribut e>(v8::None), 0 /* on instance */},
7599 {"shadowRootAttribute", TestObjectPythonV8Internal::shadowRootAttributeAttri buteGetterCallback, TestObjectPythonV8Internal::shadowRootAttributeAttributeSett erCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8 ::PropertyAttribute>(v8::None), 0 /* on instance */},
7600 {"arrayBufferAttribute", TestObjectPythonV8Internal::arrayBufferAttributeAtt ributeGetterCallback, TestObjectPythonV8Internal::arrayBufferAttributeAttributeS etterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast <v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7601 {"float32ArrayAttribute", TestObjectPythonV8Internal::float32ArrayAttributeA ttributeGetterCallback, TestObjectPythonV8Internal::float32ArrayAttributeAttribu teSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_c ast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7602 {"uint8ArrayAttribute", TestObjectPythonV8Internal::uint8ArrayAttributeAttri buteGetterCallback, TestObjectPythonV8Internal::uint8ArrayAttributeAttributeSett erCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8 ::PropertyAttribute>(v8::None), 0 /* on instance */},
7603 {"self", TestObjectPythonV8Internal::selfAttributeGetterCallback, 0, 0, 0, 0 , static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute >(v8::None), 0 /* on instance */},
7604 {"readonlyEventTargetAttribute", TestObjectPythonV8Internal::readonlyEventTa rgetAttributeAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl> (v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */ },
7605 {"readonlyEventTargetOrNullAttribute", TestObjectPythonV8Internal::readonlyE ventTargetOrNullAttributeAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::Ac cessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7606 {"readonlyWindowAttribute", TestObjectPythonV8Internal::readonlyWindowAttrib uteAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAU LT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7607 {"htmlCollectionAttribute", TestObjectPythonV8Internal::htmlCollectionAttrib uteAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAU LT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7608 {"htmlElementAttribute", TestObjectPythonV8Internal::htmlElementAttributeAtt ributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), s tatic_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7609 {"stringArrayAttribute", TestObjectPythonV8Internal::stringArrayAttributeAtt ributeGetterCallback, TestObjectPythonV8Internal::stringArrayAttributeAttributeS etterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast <v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7610 {"testInterfaceEmptyArrayAttribute", TestObjectPythonV8Internal::testInterfa ceEmptyArrayAttributeAttributeGetterCallback, TestObjectPythonV8Internal::testIn terfaceEmptyArrayAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::Acce ssControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on i nstance */},
7611 {"floatArrayAttribute", TestObjectPythonV8Internal::floatArrayAttributeAttri buteGetterCallback, TestObjectPythonV8Internal::floatArrayAttributeAttributeSett erCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8 ::PropertyAttribute>(v8::None), 0 /* on instance */},
7612 {"stringOrNullAttribute", TestObjectPythonV8Internal::stringOrNullAttributeA ttributeGetterCallback, TestObjectPythonV8Internal::stringOrNullAttributeAttribu teSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_c ast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7613 {"longOrNullAttribute", TestObjectPythonV8Internal::longOrNullAttributeAttri buteGetterCallback, TestObjectPythonV8Internal::longOrNullAttributeAttributeSett erCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8 ::PropertyAttribute>(v8::None), 0 /* on instance */},
7614 {"testInterfaceOrNullAttribute", TestObjectPythonV8Internal::testInterfaceOr NullAttributeAttributeGetterCallback, TestObjectPythonV8Internal::testInterfaceO rNullAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v 8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7615 {"testEnumAttribute", TestObjectPythonV8Internal::testEnumAttributeAttribute GetterCallback, TestObjectPythonV8Internal::testEnumAttributeAttributeSetterCall back, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::Prop ertyAttribute>(v8::None), 0 /* on instance */},
7616 {"testObjectAConstructorAttribute", TestObjectPythonV8Internal::TestObjectPy thonConstructorGetter, TestObjectPythonV8Internal::TestObjectPythonReplaceableAt tributeSetterCallback, 0, 0, const_cast<WrapperTypeInfo*>(&V8TestObjectA::wrappe rTypeInfo), static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::Propert yAttribute>(v8::DontEnum), 0 /* on instance */},
7617 {"eventHandlerAttribute", TestObjectPythonV8Internal::eventHandlerAttributeA ttributeGetterCallback, TestObjectPythonV8Internal::eventHandlerAttributeAttribu teSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_c ast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7618 {"activityLoggingAccessForAllWorldsLongAttribute", TestObjectPythonV8Interna l::activityLoggingAccessForAllWorldsLongAttributeAttributeGetterCallback, TestOb jectPythonV8Internal::activityLoggingAccessForAllWorldsLongAttributeAttributeSet terCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v 8::PropertyAttribute>(v8::None), 0 /* on instance */},
7619 {"activityLoggingGetterForAllWorldsLongAttribute", TestObjectPythonV8Interna l::activityLoggingGetterForAllWorldsLongAttributeAttributeGetterCallback, TestOb jectPythonV8Internal::activityLoggingGetterForAllWorldsLongAttributeAttributeSet terCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v 8::PropertyAttribute>(v8::None), 0 /* on instance */},
7620 {"activityLoggingSetterForAllWorldsLongAttribute", TestObjectPythonV8Interna l::activityLoggingSetterForAllWorldsLongAttributeAttributeGetterCallback, TestOb jectPythonV8Internal::activityLoggingSetterForAllWorldsLongAttributeAttributeSet terCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v 8::PropertyAttribute>(v8::None), 0 /* on instance */},
7621 {"cachedAttributeAnyAttribute", TestObjectPythonV8Internal::cachedAttributeA nyAttributeAttributeGetterCallback, TestObjectPythonV8Internal::cachedAttributeA nyAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8:: DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7622 {"callWithExecutionContextAnyAttribute", TestObjectPythonV8Internal::callWit hExecutionContextAnyAttributeAttributeGetterCallback, TestObjectPythonV8Internal ::callWithExecutionContextAnyAttributeAttributeSetterCallback, 0, 0, 0, static_c ast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None ), 0 /* on instance */},
7623 {"checkSecurityForNodeReadonlyDocumentAttribute", TestObjectPythonV8Internal ::checkSecurityForNodeReadonlyDocumentAttributeAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribu te>(v8::None), 0 /* on instance */},
7624 #if ENABLE(CONDITION)
7625 {"conditionalLongAttribute", TestObjectPythonV8Internal::conditionalLongAttr ibuteAttributeGetterCallback, TestObjectPythonV8Internal::conditionalLongAttribu teAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7626 #endif // ENABLE(CONDITION)
7627 #if ENABLE(CONDITION_1) && ENABLE(CONDITION_2)
7628 {"conditionalAndLongAttribute", TestObjectPythonV8Internal::conditionalAndLo ngAttributeAttributeGetterCallback, TestObjectPythonV8Internal::conditionalAndLo ngAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8:: DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7629 #endif // ENABLE(CONDITION_1) && ENABLE(CONDITION_2)
7630 #if ENABLE(CONDITION_1) || ENABLE(CONDITION_2)
7631 {"conditionalOrLongAttribute", TestObjectPythonV8Internal::conditionalOrLong AttributeAttributeGetterCallback, TestObjectPythonV8Internal::conditionalOrLongA ttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEF AULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7632 #endif // ENABLE(CONDITION_1) || ENABLE(CONDITION_2)
7633 {"customObjectAttribute", TestObjectPythonV8Internal::customObjectAttributeA ttributeGetterCallback, TestObjectPythonV8Internal::customObjectAttributeAttribu teSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_c ast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7634 {"customGetterLongAttribute", TestObjectPythonV8Internal::customGetterLongAt tributeAttributeGetterCallback, TestObjectPythonV8Internal::customGetterLongAttr ibuteAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAUL T), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7635 {"customGetterReadonlyObjectAttribute", TestObjectPythonV8Internal::customGe tterReadonlyObjectAttributeAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8:: AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7636 {"customSetterLongAttribute", TestObjectPythonV8Internal::customSetterLongAt tributeAttributeGetterCallback, TestObjectPythonV8Internal::customSetterLongAttr ibuteAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAUL T), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7637 #if ENABLE(CONDITION)
7638 {"customLongAttribute", TestObjectPythonV8Internal::customLongAttributeAttri buteGetterCallback, TestObjectPythonV8Internal::customLongAttributeAttributeSett erCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8 ::PropertyAttribute>(v8::None), 0 /* on instance */},
7639 #endif // ENABLE(CONDITION)
7640 {"customElementsCallbacksReadonlyLongAttribute", TestObjectPythonV8Internal: :customElementsCallbacksReadonlyLongAttributeAttributeGetterCallback, 0, 0, 0, 0 , static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute >(v8::None), 0 /* on instance */},
7641 {"deprecatedLongAttribute", TestObjectPythonV8Internal::deprecatedLongAttrib uteAttributeGetterCallback, TestObjectPythonV8Internal::deprecatedLongAttributeA ttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), st atic_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7642 {"enforceRangeLongAttribute", TestObjectPythonV8Internal::enforceRangeLongAt tributeAttributeGetterCallback, TestObjectPythonV8Internal::enforceRangeLongAttr ibuteAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAUL T), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7643 {"implementedAsLongAttribute", TestObjectPythonV8Internal::implementedAsLong AttributeAttributeGetterCallback, TestObjectPythonV8Internal::implementedAsLongA ttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEF AULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7644 {"customImplementedAsLongAttribute", TestObjectPythonV8Internal::customImple mentedAsLongAttributeAttributeGetterCallback, TestObjectPythonV8Internal::custom ImplementedAsLongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::Acce ssControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on i nstance */},
7645 {"customGetterImplementedAsLongAttribute", TestObjectPythonV8Internal::custo mGetterImplementedAsLongAttributeAttributeGetterCallback, TestObjectPythonV8Inte rnal::customGetterImplementedAsLongAttributeAttributeSetterCallback, 0, 0, 0, st atic_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8 ::None), 0 /* on instance */},
7646 {"customSetterImplementedAsLongAttribute", TestObjectPythonV8Internal::custo mSetterImplementedAsLongAttributeAttributeGetterCallback, TestObjectPythonV8Inte rnal::customSetterImplementedAsLongAttributeAttributeSetterCallback, 0, 0, 0, st atic_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8 ::None), 0 /* on instance */},
7647 {"measureAsLongAttribute", TestObjectPythonV8Internal::measureAsLongAttribut eAttributeGetterCallback, TestObjectPythonV8Internal::measureAsLongAttributeAttr ibuteSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), stati c_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7648 {"notEnumerableLongAttribute", TestObjectPythonV8Internal::notEnumerableLong AttributeAttributeGetterCallback, TestObjectPythonV8Internal::notEnumerableLongA ttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEF AULT), static_cast<v8::PropertyAttribute>(v8::DontEnum), 0 /* on instance */},
7649 {"perWorldBindingsLongAttribute", TestObjectPythonV8Internal::perWorldBindin gsLongAttributeAttributeGetterCallback, TestObjectPythonV8Internal::perWorldBind ingsLongAttributeAttributeSetterCallback, TestObjectPythonV8Internal::perWorldBi ndingsLongAttributeAttributeGetterCallbackForMainWorld, TestObjectPythonV8Intern al::perWorldBindingsLongAttributeAttributeSetterCallbackForMainWorld, 0, static_ cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::Non e), 0 /* on instance */},
7650 {"perWorldBindingsReadonlyLongAttribute", TestObjectPythonV8Internal::perWor ldBindingsReadonlyLongAttributeAttributeGetterCallback, 0, TestObjectPythonV8Int ernal::perWorldBindingsReadonlyLongAttributeAttributeGetterCallbackForMainWorld, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttr ibute>(v8::None), 0 /* on instance */},
7651 {"perWorldBindingsReadonlyTestInterfaceEmptyAttribute", TestObjectPythonV8In ternal::perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetterCallba ck, 0, TestObjectPythonV8Internal::perWorldBindingsReadonlyTestInterfaceEmptyAtt ributeAttributeGetterCallbackForMainWorld, 0, 0, static_cast<v8::AccessControl>( v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */} ,
7652 {"activityLoggingAccessPerWorldBindingsLongAttribute", TestObjectPythonV8Int ernal::activityLoggingAccessPerWorldBindingsLongAttributeAttributeGetterCallback , TestObjectPythonV8Internal::activityLoggingAccessPerWorldBindingsLongAttribute AttributeSetterCallback, TestObjectPythonV8Internal::activityLoggingAccessPerWor ldBindingsLongAttributeAttributeGetterCallbackForMainWorld, TestObjectPythonV8In ternal::activityLoggingAccessPerWorldBindingsLongAttributeAttributeSetterCallbac kForMainWorld, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::P ropertyAttribute>(v8::None), 0 /* on instance */},
7653 {"activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttribute", Test ObjectPythonV8Internal::activityLoggingAccessForIsolatedWorldsPerWorldBindingsLo ngAttributeAttributeGetterCallback, TestObjectPythonV8Internal::activityLoggingA ccessForIsolatedWorldsPerWorldBindingsLongAttributeAttributeSetterCallback, Test ObjectPythonV8Internal::activityLoggingAccessForIsolatedWorldsPerWorldBindingsLo ngAttributeAttributeGetterCallbackForMainWorld, TestObjectPythonV8Internal::acti vityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeAttributeSetterCa llbackForMainWorld, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast< v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7654 {"activityLoggingGetterPerWorldBindingsLongAttribute", TestObjectPythonV8Int ernal::activityLoggingGetterPerWorldBindingsLongAttributeAttributeGetterCallback , TestObjectPythonV8Internal::activityLoggingGetterPerWorldBindingsLongAttribute AttributeSetterCallback, TestObjectPythonV8Internal::activityLoggingGetterPerWor ldBindingsLongAttributeAttributeGetterCallbackForMainWorld, TestObjectPythonV8In ternal::activityLoggingGetterPerWorldBindingsLongAttributeAttributeSetterCallbac kForMainWorld, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::P ropertyAttribute>(v8::None), 0 /* on instance */},
7655 {"activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttribute", Test ObjectPythonV8Internal::activityLoggingGetterForIsolatedWorldsPerWorldBindingsLo ngAttributeAttributeGetterCallback, TestObjectPythonV8Internal::activityLoggingG etterForIsolatedWorldsPerWorldBindingsLongAttributeAttributeSetterCallback, Test ObjectPythonV8Internal::activityLoggingGetterForIsolatedWorldsPerWorldBindingsLo ngAttributeAttributeGetterCallbackForMainWorld, TestObjectPythonV8Internal::acti vityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeAttributeSetterCa llbackForMainWorld, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast< v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7656 {"location", TestObjectPythonV8Internal::locationAttributeGetterCallback, Te stObjectPythonV8Internal::locationAttributeSetterCallback, 0, 0, 0, static_cast< v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7657 {"locationWithException", TestObjectPythonV8Internal::locationWithExceptionA ttributeGetterCallback, TestObjectPythonV8Internal::locationWithExceptionAttribu teSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_c ast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7658 {"locationWithCallWith", TestObjectPythonV8Internal::locationWithCallWithAtt ributeGetterCallback, TestObjectPythonV8Internal::locationWithCallWithAttributeS etterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast <v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7659 {"locationWithPerWorldBindings", TestObjectPythonV8Internal::locationWithPer WorldBindingsAttributeGetterCallback, TestObjectPythonV8Internal::locationWithPe rWorldBindingsAttributeSetterCallback, TestObjectPythonV8Internal::locationWithP erWorldBindingsAttributeGetterCallbackForMainWorld, TestObjectPythonV8Internal:: locationWithPerWorldBindingsAttributeSetterCallbackForMainWorld, 0, static_cast< v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7660 {"locationWillBeGarbageCollected", TestObjectPythonV8Internal::locationWillB eGarbageCollectedAttributeGetterCallback, TestObjectPythonV8Internal::locationWi llBeGarbageCollectedAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessCont rol>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instanc e */},
7661 {"raisesExceptionLongAttribute", TestObjectPythonV8Internal::raisesException LongAttributeAttributeGetterCallback, TestObjectPythonV8Internal::raisesExceptio nLongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v 8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7662 {"raisesExceptionGetterLongAttribute", TestObjectPythonV8Internal::raisesExc eptionGetterLongAttributeAttributeGetterCallback, TestObjectPythonV8Internal::ra isesExceptionGetterLongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8 ::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 / * on instance */},
7663 {"setterRaisesExceptionLongAttribute", TestObjectPythonV8Internal::setterRai sesExceptionLongAttributeAttributeGetterCallback, TestObjectPythonV8Internal::se tterRaisesExceptionLongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8 ::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 / * on instance */},
7664 {"raisesExceptionTestInterfaceEmptyAttribute", TestObjectPythonV8Internal::r aisesExceptionTestInterfaceEmptyAttributeAttributeGetterCallback, TestObjectPyth onV8Internal::raisesExceptionTestInterfaceEmptyAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyA ttribute>(v8::None), 0 /* on instance */},
7665 {"cachedAttributeRaisesExceptionGetterAnyAttribute", TestObjectPythonV8Inter nal::cachedAttributeRaisesExceptionGetterAnyAttributeAttributeGetterCallback, Te stObjectPythonV8Internal::cachedAttributeRaisesExceptionGetterAnyAttributeAttrib uteSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_ cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7666 {"reflectTestInterfaceAttribute", TestObjectPythonV8Internal::reflectTestInt erfaceAttributeAttributeGetterCallback, TestObjectPythonV8Internal::reflectTestI nterfaceAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl >(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance * /},
7667 {"reflectReflectedNameAttributeTestAttribute", TestObjectPythonV8Internal::r eflectReflectedNameAttributeTestAttributeAttributeGetterCallback, TestObjectPyth onV8Internal::reflectReflectedNameAttributeTestAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyA ttribute>(v8::None), 0 /* on instance */},
7668 {"reflectBooleanAttribute", TestObjectPythonV8Internal::reflectBooleanAttrib uteAttributeGetterCallback, TestObjectPythonV8Internal::reflectBooleanAttributeA ttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), st atic_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7669 {"reflectLongAttribute", TestObjectPythonV8Internal::reflectLongAttributeAtt ributeGetterCallback, TestObjectPythonV8Internal::reflectLongAttributeAttributeS etterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast <v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7670 {"reflectUnsignedShortAttribute", TestObjectPythonV8Internal::reflectUnsigne dShortAttributeAttributeGetterCallback, TestObjectPythonV8Internal::reflectUnsig nedShortAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl >(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance * /},
7671 {"reflectUnsignedLongAttribute", TestObjectPythonV8Internal::reflectUnsigned LongAttributeAttributeGetterCallback, TestObjectPythonV8Internal::reflectUnsigne dLongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v 8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7672 {"id", TestObjectPythonV8Internal::idAttributeGetterCallback, TestObjectPyth onV8Internal::idAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl> (v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */ },
7673 {"name", TestObjectPythonV8Internal::nameAttributeGetterCallback, TestObject PythonV8Internal::nameAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessCo ntrol>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on insta nce */},
7674 {"class", TestObjectPythonV8Internal::classAttributeGetterCallback, TestObje ctPythonV8Internal::classAttributeSetterCallback, 0, 0, 0, static_cast<v8::Acces sControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on in stance */},
7675 {"reflectedId", TestObjectPythonV8Internal::reflectedIdAttributeGetterCallba ck, TestObjectPythonV8Internal::reflectedIdAttributeSetterCallback, 0, 0, 0, sta tic_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8: :None), 0 /* on instance */},
7676 {"reflectedName", TestObjectPythonV8Internal::reflectedNameAttributeGetterCa llback, TestObjectPythonV8Internal::reflectedNameAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribut e>(v8::None), 0 /* on instance */},
7677 {"reflectedClass", TestObjectPythonV8Internal::reflectedClassAttributeGetter Callback, TestObjectPythonV8Internal::reflectedClassAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttri bute>(v8::None), 0 /* on instance */},
7678 {"limitedToOnlyOneAttribute", TestObjectPythonV8Internal::limitedToOnlyOneAt tributeAttributeGetterCallback, TestObjectPythonV8Internal::limitedToOnlyOneAttr ibuteAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAUL T), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7679 {"limitedToOnlyAttribute", TestObjectPythonV8Internal::limitedToOnlyAttribut eAttributeGetterCallback, TestObjectPythonV8Internal::limitedToOnlyAttributeAttr ibuteSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), stati c_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7680 {"limitedToOnlyOtherAttribute", TestObjectPythonV8Internal::limitedToOnlyOth erAttributeAttributeGetterCallback, TestObjectPythonV8Internal::limitedToOnlyOth erAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8:: DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7681 {"limitedWithMissingDefaultAttribute", TestObjectPythonV8Internal::limitedWi thMissingDefaultAttributeAttributeGetterCallback, TestObjectPythonV8Internal::li mitedWithMissingDefaultAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8 ::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 / * on instance */},
7682 {"limitedWithInvalidMissingDefaultAttribute", TestObjectPythonV8Internal::li mitedWithInvalidMissingDefaultAttributeAttributeGetterCallback, TestObjectPython V8Internal::limitedWithInvalidMissingDefaultAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttr ibute>(v8::None), 0 /* on instance */},
7683 {"corsSettingAttribute", TestObjectPythonV8Internal::corsSettingAttributeAtt ributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), s tatic_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7684 {"limitedWithEmptyMissingInvalidAttribute", TestObjectPythonV8Internal::limi tedWithEmptyMissingInvalidAttributeAttributeGetterCallback, 0, 0, 0, 0, static_c ast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None ), 0 /* on instance */},
7685 {"replaceableReadonlyLongAttribute", TestObjectPythonV8Internal::replaceable ReadonlyLongAttributeAttributeGetterCallback, TestObjectPythonV8Internal::TestOb jectPythonReplaceableAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessCon trol>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instan ce */},
7686 {"locationReplaceable", TestObjectPythonV8Internal::locationReplaceableAttri buteGetterCallback, TestObjectPythonV8Internal::locationReplaceableAttributeSett erCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8 ::PropertyAttribute>(v8::None), 0 /* on instance */},
7687 {"setterCallWithActiveWindowAndFirstWindowStringAttribute", TestObjectPython V8Internal::setterCallWithActiveWindowAndFirstWindowStringAttributeAttributeGett erCallback, TestObjectPythonV8Internal::setterCallWithActiveWindowAndFirstWindow StringAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>( v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */} ,
7688 {"setterCallWithExecutionContextStringAttribute", TestObjectPythonV8Internal ::setterCallWithExecutionContextStringAttributeAttributeGetterCallback, TestObje ctPythonV8Internal::setterCallWithExecutionContextStringAttributeAttributeSetter Callback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8:: PropertyAttribute>(v8::None), 0 /* on instance */},
7689 {"strictTypeCheckingFloatAttribute", TestObjectPythonV8Internal::strictTypeC heckingFloatAttributeAttributeGetterCallback, TestObjectPythonV8Internal::strict TypeCheckingFloatAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::Acce ssControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on i nstance */},
7690 {"strictTypeCheckingTestInterfaceAttribute", TestObjectPythonV8Internal::str ictTypeCheckingTestInterfaceAttributeAttributeGetterCallback, TestObjectPythonV8 Internal::strictTypeCheckingTestInterfaceAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribu te>(v8::None), 0 /* on instance */},
7691 {"treatNullAsNullStringStringAttribute", TestObjectPythonV8Internal::treatNu llAsNullStringStringAttributeAttributeGetterCallback, TestObjectPythonV8Internal ::treatNullAsNullStringStringAttributeAttributeSetterCallback, 0, 0, 0, static_c ast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None ), 0 /* on instance */},
7692 {"treatReturnedNullStringAsNullStringAttribute", TestObjectPythonV8Internal: :treatReturnedNullStringAsNullStringAttributeAttributeGetterCallback, TestObject PythonV8Internal::treatReturnedNullStringAsNullStringAttributeAttributeSetterCal lback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::Pro pertyAttribute>(v8::None), 0 /* on instance */},
7693 {"treatReturnedNullStringAsUndefinedStringAttribute", TestObjectPythonV8Inte rnal::treatReturnedNullStringAsUndefinedStringAttributeAttributeGetterCallback, TestObjectPythonV8Internal::treatReturnedNullStringAsUndefinedStringAttributeAtt ributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), stat ic_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7694 {"urlStringAttribute", TestObjectPythonV8Internal::urlStringAttributeAttribu teGetterCallback, TestObjectPythonV8Internal::urlStringAttributeAttributeSetterC allback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::P ropertyAttribute>(v8::None), 0 /* on instance */},
7695 {"urlStringAttribute", TestObjectPythonV8Internal::urlStringAttributeAttribu teGetterCallback, TestObjectPythonV8Internal::urlStringAttributeAttributeSetterC allback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::P ropertyAttribute>(v8::None), 0 /* on instance */},
7696 {"unforgeableLongAttribute", TestObjectPythonV8Internal::unforgeableLongAttr ibuteAttributeGetterCallback, TestObjectPythonV8Internal::unforgeableLongAttribu teAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::PROHIBITS _OVERWRITING), static_cast<v8::PropertyAttribute>(v8::DontDelete), 0 /* on insta nce */},
7697 {"anotherStringAttribute", TestObjectPythonV8Internal::anotherStringAttribut eAttributeGetterCallback, TestObjectPythonV8Internal::anotherStringAttributeAttr ibuteSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), stati c_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7698 {"testInterfacePythonAttribute", TestObjectPythonV8Internal::testInterfacePy thonAttributeAttributeGetterCallback, TestObjectPythonV8Internal::testInterfaceP ythonAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v 8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7699 {"testInterfaceWillBeGarbageCollectedAttribute", TestObjectPythonV8Internal: :testInterfaceWillBeGarbageCollectedAttributeAttributeGetterCallback, TestObject PythonV8Internal::testInterfaceWillBeGarbageCollectedAttributeAttributeSetterCal lback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::Pro pertyAttribute>(v8::None), 0 /* on instance */},
7700 {"testInterfaceWillBeGarbageCollectedOrNullAttribute", TestObjectPythonV8Int ernal::testInterfaceWillBeGarbageCollectedOrNullAttributeAttributeGetterCallback , TestObjectPythonV8Internal::testInterfaceWillBeGarbageCollectedOrNullAttribute AttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), s tatic_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
7701 };
7702
7703 static const V8DOMConfiguration::AccessorConfiguration V8TestObjectPythonAccesso rs[] = {
7704 {"exposeJSAccessorsLongAttribute", TestObjectPythonV8Internal::exposeJSAcces sorsLongAttributeAttributeGetterCallback, TestObjectPythonV8Internal::exposeJSAc cessorsLongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessCont rol>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None)},
7705 };
7706
7707 static const V8DOMConfiguration::MethodConfiguration V8TestObjectPythonMethods[] = {
7708 {"voidMethod", TestObjectPythonV8Internal::voidMethodMethodCallback, 0, 0},
7709 {"dateMethod", TestObjectPythonV8Internal::dateMethodMethodCallback, 0, 0},
7710 {"stringMethod", TestObjectPythonV8Internal::stringMethodMethodCallback, 0, 0},
7711 {"readonlyDOMTimeStampMethod", TestObjectPythonV8Internal::readonlyDOMTimeSt ampMethodMethodCallback, 0, 0},
7712 {"booleanMethod", TestObjectPythonV8Internal::booleanMethodMethodCallback, 0 , 0},
7713 {"byteMethod", TestObjectPythonV8Internal::byteMethodMethodCallback, 0, 0},
7714 {"doubleMethod", TestObjectPythonV8Internal::doubleMethodMethodCallback, 0, 0},
7715 {"floatMethod", TestObjectPythonV8Internal::floatMethodMethodCallback, 0, 0} ,
7716 {"longMethod", TestObjectPythonV8Internal::longMethodMethodCallback, 0, 0},
7717 {"longLongMethod", TestObjectPythonV8Internal::longLongMethodMethodCallback, 0, 0},
7718 {"octetMethod", TestObjectPythonV8Internal::octetMethodMethodCallback, 0, 0} ,
7719 {"shortMethod", TestObjectPythonV8Internal::shortMethodMethodCallback, 0, 0} ,
7720 {"unsignedLongMethod", TestObjectPythonV8Internal::unsignedLongMethodMethodC allback, 0, 0},
7721 {"unsignedLongLongMethod", TestObjectPythonV8Internal::unsignedLongLongMetho dMethodCallback, 0, 0},
7722 {"unsignedShortMethod", TestObjectPythonV8Internal::unsignedShortMethodMetho dCallback, 0, 0},
7723 {"voidMethodDateArg", TestObjectPythonV8Internal::voidMethodDateArgMethodCal lback, 0, 1},
7724 {"voidMethodStringArg", TestObjectPythonV8Internal::voidMethodStringArgMetho dCallback, 0, 1},
7725 {"voidMethodBooleanArg", TestObjectPythonV8Internal::voidMethodBooleanArgMet hodCallback, 0, 1},
7726 {"voidMethodByteArg", TestObjectPythonV8Internal::voidMethodByteArgMethodCal lback, 0, 1},
7727 {"voidMethodDoubleArg", TestObjectPythonV8Internal::voidMethodDoubleArgMetho dCallback, 0, 1},
7728 {"voidMethodFloatArg", TestObjectPythonV8Internal::voidMethodFloatArgMethodC allback, 0, 1},
7729 {"voidMethodLongArg", TestObjectPythonV8Internal::voidMethodLongArgMethodCal lback, 0, 1},
7730 {"voidMethodLongLongArg", TestObjectPythonV8Internal::voidMethodLongLongArgM ethodCallback, 0, 1},
7731 {"voidMethodOctetArg", TestObjectPythonV8Internal::voidMethodOctetArgMethodC allback, 0, 1},
7732 {"voidMethodShortArg", TestObjectPythonV8Internal::voidMethodShortArgMethodC allback, 0, 1},
7733 {"voidMethodUnsignedLongArg", TestObjectPythonV8Internal::voidMethodUnsigned LongArgMethodCallback, 0, 1},
7734 {"voidMethodUnsignedLongLongArg", TestObjectPythonV8Internal::voidMethodUnsi gnedLongLongArgMethodCallback, 0, 1},
7735 {"voidMethodUnsignedShortArg", TestObjectPythonV8Internal::voidMethodUnsigne dShortArgMethodCallback, 0, 1},
7736 {"testInterfaceEmptyMethod", TestObjectPythonV8Internal::testInterfaceEmptyM ethodMethodCallback, 0, 0},
7737 {"voidMethodTestInterfaceEmptyArg", TestObjectPythonV8Internal::voidMethodTe stInterfaceEmptyArgMethodCallback, 0, 1},
7738 {"voidMethodLongArgTestInterfaceEmptyArg", TestObjectPythonV8Internal::voidM ethodLongArgTestInterfaceEmptyArgMethodCallback, 0, 2},
7739 {"voidCallbackFunctionMethod", TestObjectPythonV8Internal::voidCallbackFunct ionMethodMethodCallback, 0, 0},
7740 {"anyCallbackFunctionOptionalAnyArgMethod", TestObjectPythonV8Internal::anyC allbackFunctionOptionalAnyArgMethodMethodCallback, 0, 0},
7741 {"voidMethodVoidCallbackFunctionArg", TestObjectPythonV8Internal::voidMethod VoidCallbackFunctionArgMethodCallback, 0, 1},
7742 {"voidMethodAnyCallbackFunctionOptionalAnyArg", TestObjectPythonV8Internal:: voidMethodAnyCallbackFunctionOptionalAnyArgMethodCallback, 0, 1},
7743 {"compareHowMethod", TestObjectPythonV8Internal::compareHowMethodMethodCallb ack, 0, 0},
7744 {"anyMethod", TestObjectPythonV8Internal::anyMethodMethodCallback, 0, 0},
7745 {"voidMethodCompareHowArg", TestObjectPythonV8Internal::voidMethodCompareHow ArgMethodCallback, 0, 1},
7746 {"voidMethodEventTargetArg", TestObjectPythonV8Internal::voidMethodEventTarg etArgMethodCallback, 0, 1},
7747 {"voidMethodMediaQueryListListenerArg", TestObjectPythonV8Internal::voidMeth odMediaQueryListListenerArgMethodCallback, 0, 1},
7748 {"voidMethodAnyArg", TestObjectPythonV8Internal::voidMethodAnyArgMethodCallb ack, 0, 1},
7749 {"voidMethodAttrArg", TestObjectPythonV8Internal::voidMethodAttrArgMethodCal lback, 0, 1},
7750 {"voidMethodDocumentArg", TestObjectPythonV8Internal::voidMethodDocumentArgM ethodCallback, 0, 1},
7751 {"voidMethodDocumentTypeArg", TestObjectPythonV8Internal::voidMethodDocument TypeArgMethodCallback, 0, 1},
7752 {"voidMethodElementArg", TestObjectPythonV8Internal::voidMethodElementArgMet hodCallback, 0, 1},
7753 {"voidMethodNodeArg", TestObjectPythonV8Internal::voidMethodNodeArgMethodCal lback, 0, 1},
7754 {"arrayBufferMethod", TestObjectPythonV8Internal::arrayBufferMethodMethodCal lback, 0, 0},
7755 {"arrayBufferViewMethod", TestObjectPythonV8Internal::arrayBufferViewMethodM ethodCallback, 0, 0},
7756 {"float32ArrayMethod", TestObjectPythonV8Internal::float32ArrayMethodMethodC allback, 0, 0},
7757 {"int32ArrayMethod", TestObjectPythonV8Internal::int32ArrayMethodMethodCallb ack, 0, 0},
7758 {"uint8ArrayMethod", TestObjectPythonV8Internal::uint8ArrayMethodMethodCallb ack, 0, 0},
7759 {"voidMethodArrayBufferArg", TestObjectPythonV8Internal::voidMethodArrayBuff erArgMethodCallback, 0, 1},
7760 {"voidMethodArrayBufferOrNullArg", TestObjectPythonV8Internal::voidMethodArr ayBufferOrNullArgMethodCallback, 0, 1},
7761 {"voidMethodArrayBufferViewArg", TestObjectPythonV8Internal::voidMethodArray BufferViewArgMethodCallback, 0, 1},
7762 {"voidMethodFloat32ArrayArg", TestObjectPythonV8Internal::voidMethodFloat32A rrayArgMethodCallback, 0, 1},
7763 {"voidMethodInt32ArrayArg", TestObjectPythonV8Internal::voidMethodInt32Array ArgMethodCallback, 0, 1},
7764 {"voidMethodUint8ArrayArg", TestObjectPythonV8Internal::voidMethodUint8Array ArgMethodCallback, 0, 1},
7765 {"longArrayMethod", TestObjectPythonV8Internal::longArrayMethodMethodCallbac k, 0, 0},
7766 {"stringArrayMethod", TestObjectPythonV8Internal::stringArrayMethodMethodCal lback, 0, 0},
7767 {"testInterfaceEmptyArrayMethod", TestObjectPythonV8Internal::testInterfaceE mptyArrayMethodMethodCallback, 0, 0},
7768 {"voidMethodArrayLongArg", TestObjectPythonV8Internal::voidMethodArrayLongAr gMethodCallback, 0, 1},
7769 {"voidMethodArrayStringArg", TestObjectPythonV8Internal::voidMethodArrayStri ngArgMethodCallback, 0, 1},
7770 {"voidMethodArrayTestInterfaceEmptyArg", TestObjectPythonV8Internal::voidMet hodArrayTestInterfaceEmptyArgMethodCallback, 0, 1},
7771 {"longSequenceMethod", TestObjectPythonV8Internal::longSequenceMethodMethodC allback, 0, 0},
7772 {"stringSequenceMethod", TestObjectPythonV8Internal::stringSequenceMethodMet hodCallback, 0, 0},
7773 {"testInterfaceEmptySequenceMethod", TestObjectPythonV8Internal::testInterfa ceEmptySequenceMethodMethodCallback, 0, 0},
7774 {"voidMethodSequenceLongArg", TestObjectPythonV8Internal::voidMethodSequence LongArgMethodCallback, 0, 1},
7775 {"voidMethodSequenceStringArg", TestObjectPythonV8Internal::voidMethodSequen ceStringArgMethodCallback, 0, 1},
7776 {"voidMethodSequenceTestInterfaceEmptyArg", TestObjectPythonV8Internal::void MethodSequenceTestInterfaceEmptyArgMethodCallback, 0, 1},
7777 {"voidMethodTestInterfaceEmptyOrNullArg", TestObjectPythonV8Internal::voidMe thodTestInterfaceEmptyOrNullArgMethodCallback, 0, 1},
7778 {"voidMethodTestCallbackInterfaceArg", TestObjectPythonV8Internal::voidMetho dTestCallbackInterfaceArgMethodCallback, 0, 1},
7779 {"voidMethodOptionalTestCallbackInterfaceArg", TestObjectPythonV8Internal::v oidMethodOptionalTestCallbackInterfaceArgMethodCallback, 0, 0},
7780 {"voidMethodTestCallbackInterfaceOrNullArg", TestObjectPythonV8Internal::voi dMethodTestCallbackInterfaceOrNullArgMethodCallback, 0, 1},
7781 {"testEnumMethod", TestObjectPythonV8Internal::testEnumMethodMethodCallback, 0, 0},
7782 {"voidMethodTestEnumArg", TestObjectPythonV8Internal::voidMethodTestEnumArgM ethodCallback, 0, 1},
7783 {"dictionaryMethod", TestObjectPythonV8Internal::dictionaryMethodMethodCallb ack, 0, 0},
7784 {"nodeFilterMethod", TestObjectPythonV8Internal::nodeFilterMethodMethodCallb ack, 0, 0},
7785 {"promiseMethod", TestObjectPythonV8Internal::promiseMethodMethodCallback, 0 , 0},
7786 {"serializedScriptValueMethod", TestObjectPythonV8Internal::serializedScript ValueMethodMethodCallback, 0, 0},
7787 {"xPathNSResolverMethod", TestObjectPythonV8Internal::xPathNSResolverMethodM ethodCallback, 0, 0},
7788 {"voidMethodDictionaryArg", TestObjectPythonV8Internal::voidMethodDictionary ArgMethodCallback, 0, 1},
7789 {"voidMethodEventListenerArg", TestObjectPythonV8Internal::voidMethodEventLi stenerArgMethodCallback, 0, 1},
7790 {"voidMethodNodeFilterArg", TestObjectPythonV8Internal::voidMethodNodeFilter ArgMethodCallback, 0, 1},
7791 {"voidMethodPromiseArg", TestObjectPythonV8Internal::voidMethodPromiseArgMet hodCallback, 0, 1},
7792 {"voidMethodSerializedScriptValueArg", TestObjectPythonV8Internal::voidMetho dSerializedScriptValueArgMethodCallback, 0, 1},
7793 {"voidMethodXPathNSResolverArg", TestObjectPythonV8Internal::voidMethodXPath NSResolverArgMethodCallback, 0, 1},
7794 {"voidMethodSequenceDictionaryArg", TestObjectPythonV8Internal::voidMethodSe quenceDictionaryArgMethodCallback, 0, 1},
7795 {"voidMethodStringArgLongArg", TestObjectPythonV8Internal::voidMethodStringA rgLongArgMethodCallback, 0, 2},
7796 {"voidMethodOptionalStringArg", TestObjectPythonV8Internal::voidMethodOption alStringArgMethodCallback, 0, 0},
7797 {"voidMethodOptionalTestInterfaceEmptyArg", TestObjectPythonV8Internal::void MethodOptionalTestInterfaceEmptyArgMethodCallback, 0, 0},
7798 {"voidMethodOptionalLongArg", TestObjectPythonV8Internal::voidMethodOptional LongArgMethodCallback, 0, 0},
7799 {"stringMethodOptionalLongArg", TestObjectPythonV8Internal::stringMethodOpti onalLongArgMethodCallback, 0, 0},
7800 {"testInterfaceEmptyMethodOptionalLongArg", TestObjectPythonV8Internal::test InterfaceEmptyMethodOptionalLongArgMethodCallback, 0, 0},
7801 {"longMethodOptionalLongArg", TestObjectPythonV8Internal::longMethodOptional LongArgMethodCallback, 0, 0},
7802 {"voidMethodLongArgOptionalLongArg", TestObjectPythonV8Internal::voidMethodL ongArgOptionalLongArgMethodCallback, 0, 1},
7803 {"voidMethodLongArgOptionalLongArgOptionalLongArg", TestObjectPythonV8Intern al::voidMethodLongArgOptionalLongArgOptionalLongArgMethodCallback, 0, 1},
7804 {"voidMethodLongArgOptionalTestInterfaceEmptyArg", TestObjectPythonV8Interna l::voidMethodLongArgOptionalTestInterfaceEmptyArgMethodCallback, 0, 1},
7805 {"voidMethodTestInterfaceEmptyArgOptionalLongArg", TestObjectPythonV8Interna l::voidMethodTestInterfaceEmptyArgOptionalLongArgMethodCallback, 0, 1},
7806 {"voidMethodOptionalDictionaryArg", TestObjectPythonV8Internal::voidMethodOp tionalDictionaryArgMethodCallback, 0, 0},
7807 {"voidMethodVariadicStringArg", TestObjectPythonV8Internal::voidMethodVariad icStringArgMethodCallback, 0, 1},
7808 {"voidMethodStringArgVariadicStringArg", TestObjectPythonV8Internal::voidMet hodStringArgVariadicStringArgMethodCallback, 0, 2},
7809 {"voidMethodVariadicTestInterfaceEmptyArg", TestObjectPythonV8Internal::void MethodVariadicTestInterfaceEmptyArgMethodCallback, 0, 1},
7810 {"voidMethodTestInterfaceEmptyArgVariadicTestInterfaceEmptyArg", TestObjectP ythonV8Internal::voidMethodTestInterfaceEmptyArgVariadicTestInterfaceEmptyArgMet hodCallback, 0, 2},
7811 {"voidMethodVariadicTestInterfaceWillBeGarbageCollectedArg", TestObjectPytho nV8Internal::voidMethodVariadicTestInterfaceWillBeGarbageCollectedArgMethodCallb ack, 0, 1},
7812 {"overloadedMethodA", TestObjectPythonV8Internal::overloadedMethodAMethodCal lback, 0, 1},
7813 {"overloadedMethodB", TestObjectPythonV8Internal::overloadedMethodBMethodCal lback, 0, 1},
7814 {"overloadedMethodC", TestObjectPythonV8Internal::overloadedMethodCMethodCal lback, 0, 1},
7815 {"overloadedMethodD", TestObjectPythonV8Internal::overloadedMethodDMethodCal lback, 0, 1},
7816 {"overloadedMethodE", TestObjectPythonV8Internal::overloadedMethodEMethodCal lback, 0, 1},
7817 {"overloadedMethodF", TestObjectPythonV8Internal::overloadedMethodFMethodCal lback, 0, 1},
7818 {"overloadedMethodG", TestObjectPythonV8Internal::overloadedMethodGMethodCal lback, 0, 0},
7819 {"overloadedMethodH", TestObjectPythonV8Internal::overloadedMethodHMethodCal lback, 0, 0},
7820 {"overloadedPerWorldBindingsMethod", TestObjectPythonV8Internal::overloadedP erWorldBindingsMethodMethodCallback, TestObjectPythonV8Internal::overloadedPerWo rldBindingsMethodMethodCallbackForMainWorld, 0},
7821 {"voidMethodClampUnsignedShortArg", TestObjectPythonV8Internal::voidMethodCl ampUnsignedShortArgMethodCallback, 0, 1},
7822 {"voidMethodClampUnsignedLongArg", TestObjectPythonV8Internal::voidMethodCla mpUnsignedLongArgMethodCallback, 0, 1},
7823 {"voidMethodDefaultUndefinedTestInterfaceEmptyArg", TestObjectPythonV8Intern al::voidMethodDefaultUndefinedTestInterfaceEmptyArgMethodCallback, 0, 0},
7824 {"voidMethodDefaultUndefinedLongArg", TestObjectPythonV8Internal::voidMethod DefaultUndefinedLongArgMethodCallback, 0, 0},
7825 {"voidMethodDefaultUndefinedStringArg", TestObjectPythonV8Internal::voidMeth odDefaultUndefinedStringArgMethodCallback, 0, 0},
7826 {"voidMethodDefaultNullStringStringArg", TestObjectPythonV8Internal::voidMet hodDefaultNullStringStringArgMethodCallback, 0, 0},
7827 {"voidMethodEnforceRangeLongArg", TestObjectPythonV8Internal::voidMethodEnfo rceRangeLongArgMethodCallback, 0, 1},
7828 {"voidMethodTreatNullAsNullStringStringArg", TestObjectPythonV8Internal::voi dMethodTreatNullAsNullStringStringArgMethodCallback, 0, 1},
7829 {"voidMethodTreatNullAsNullStringTreatUndefinedAsNullStringStringArg", TestO bjectPythonV8Internal::voidMethodTreatNullAsNullStringTreatUndefinedAsNullString StringArgMethodCallback, 0, 1},
7830 {"activityLoggingAccessForAllWorldsMethod", TestObjectPythonV8Internal::acti vityLoggingAccessForAllWorldsMethodMethodCallback, 0, 0},
7831 {"callWithScriptStateVoidMethod", TestObjectPythonV8Internal::callWithScript StateVoidMethodMethodCallback, 0, 0},
7832 {"callWithScriptStateLongMethod", TestObjectPythonV8Internal::callWithScript StateLongMethodMethodCallback, 0, 0},
7833 {"callWithExecutionContextVoidMethod", TestObjectPythonV8Internal::callWithE xecutionContextVoidMethodMethodCallback, 0, 0},
7834 {"callWithScriptStateExecutionContextVoidMethod", TestObjectPythonV8Internal ::callWithScriptStateExecutionContextVoidMethodMethodCallback, 0, 0},
7835 {"callWithScriptStateScriptArgumentsVoidMethod", TestObjectPythonV8Internal: :callWithScriptStateScriptArgumentsVoidMethodMethodCallback, 0, 0},
7836 {"callWithScriptStateScriptArgumentsVoidMethodOptionalBooleanArg", TestObjec tPythonV8Internal::callWithScriptStateScriptArgumentsVoidMethodOptionalBooleanAr gMethodCallback, 0, 0},
7837 {"callWithActiveWindow", TestObjectPythonV8Internal::callWithActiveWindowMet hodCallback, 0, 0},
7838 {"callWithActiveWindowScriptWindow", TestObjectPythonV8Internal::callWithAct iveWindowScriptWindowMethodCallback, 0, 0},
7839 {"checkSecurityForNodeVoidMethod", TestObjectPythonV8Internal::checkSecurity ForNodeVoidMethodMethodCallback, 0, 0},
7840 #if ENABLE(CONDITION)
7841 {"conditionalConditionVoidMethod", TestObjectPythonV8Internal::conditionalCo nditionVoidMethodMethodCallback, 0, 0},
7842 #endif // ENABLE(CONDITION)
7843 #if ENABLE(CONDITION_1) && ENABLE(CONDITION_2)
7844 {"conditionalCondition1AndCondition2VoidMethod", TestObjectPythonV8Internal: :conditionalCondition1AndCondition2VoidMethodMethodCallback, 0, 0},
7845 #endif // ENABLE(CONDITION_1) && ENABLE(CONDITION_2)
7846 {"customVoidMethod", TestObjectPythonV8Internal::customVoidMethodMethodCallb ack, 0, 0},
7847 #if ENABLE(CONDITION)
7848 {"conditionalConditionCustomVoidMethod", TestObjectPythonV8Internal::conditi onalConditionCustomVoidMethodMethodCallback, 0, 0},
7849 #endif // ENABLE(CONDITION)
7850 {"customElementCallbacksVoidMethod", TestObjectPythonV8Internal::customEleme ntCallbacksVoidMethodMethodCallback, 0, 0},
7851 {"deprecatedVoidMethod", TestObjectPythonV8Internal::deprecatedVoidMethodMet hodCallback, 0, 0},
7852 {"implementedAsVoidMethod", TestObjectPythonV8Internal::implementedAsVoidMet hodMethodCallback, 0, 0},
7853 {"measureAsVoidMethod", TestObjectPythonV8Internal::measureAsVoidMethodMetho dCallback, 0, 0},
7854 {"perWorldBindingsVoidMethod", TestObjectPythonV8Internal::perWorldBindingsV oidMethodMethodCallback, TestObjectPythonV8Internal::perWorldBindingsVoidMethodM ethodCallbackForMainWorld, 0},
7855 {"perWorldBindingsVoidMethodTestInterfaceEmptyArg", TestObjectPythonV8Intern al::perWorldBindingsVoidMethodTestInterfaceEmptyArgMethodCallback, TestObjectPyt honV8Internal::perWorldBindingsVoidMethodTestInterfaceEmptyArgMethodCallbackForM ainWorld, 1},
7856 {"activityLoggingForAllWorldsPerWorldBindingsVoidMethod", TestObjectPythonV8 Internal::activityLoggingForAllWorldsPerWorldBindingsVoidMethodMethodCallback, T estObjectPythonV8Internal::activityLoggingForAllWorldsPerWorldBindingsVoidMethod MethodCallbackForMainWorld, 0},
7857 {"activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethod", TestObjectPyt honV8Internal::activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethodMethodC allback, TestObjectPythonV8Internal::activityLoggingForIsolatedWorldsPerWorldBin dingsVoidMethodMethodCallbackForMainWorld, 0},
7858 {"raisesExceptionVoidMethod", TestObjectPythonV8Internal::raisesExceptionVoi dMethodMethodCallback, 0, 0},
7859 {"raisesExceptionStringMethod", TestObjectPythonV8Internal::raisesExceptionS tringMethodMethodCallback, 0, 0},
7860 {"raisesExceptionVoidMethodOptionalLongArg", TestObjectPythonV8Internal::rai sesExceptionVoidMethodOptionalLongArgMethodCallback, 0, 0},
7861 {"raisesExceptionVoidMethodTestCallbackInterfaceArg", TestObjectPythonV8Inte rnal::raisesExceptionVoidMethodTestCallbackInterfaceArgMethodCallback, 0, 1},
7862 {"raisesExceptionVoidMethodOptionalTestCallbackInterfaceArg", TestObjectPyth onV8Internal::raisesExceptionVoidMethodOptionalTestCallbackInterfaceArgMethodCal lback, 0, 0},
7863 {"raisesExceptionTestInterfaceEmptyVoidMethod", TestObjectPythonV8Internal:: raisesExceptionTestInterfaceEmptyVoidMethodMethodCallback, 0, 0},
7864 {"strictTypeCheckingVoidMethodTestInterfaceEmptyArg", TestObjectPythonV8Inte rnal::strictTypeCheckingVoidMethodTestInterfaceEmptyArgMethodCallback, 0, 1},
7865 {"strictTypeCheckingVoidMethodTestInterfaceEmptyOrNullArg", TestObjectPython V8Internal::strictTypeCheckingVoidMethodTestInterfaceEmptyOrNullArgMethodCallbac k, 0, 1},
7866 {"treatReturnedNullStringAsNullStringMethod", TestObjectPythonV8Internal::tr eatReturnedNullStringAsNullStringMethodMethodCallback, 0, 0},
7867 {"treatReturnedNullStringAsUndefinedStringMethod", TestObjectPythonV8Interna l::treatReturnedNullStringAsUndefinedStringMethodMethodCallback, 0, 0},
7868 {"voidMethodTestInterfaceWillBeGarbageCollectedSequenceArg", TestObjectPytho nV8Internal::voidMethodTestInterfaceWillBeGarbageCollectedSequenceArgMethodCallb ack, 0, 1},
7869 {"voidMethodTestInterfaceWillBeGarbageCollectedArrayArg", TestObjectPythonV8 Internal::voidMethodTestInterfaceWillBeGarbageCollectedArrayArgMethodCallback, 0 , 1},
7870 };
7871
7872 static void configureV8TestObjectPythonTemplate(v8::Handle<v8::FunctionTemplate> functionTemplate, v8::Isolate* isolate)
7873 {
7874 functionTemplate->ReadOnlyPrototype();
7875
7876 v8::Local<v8::Signature> defaultSignature;
7877 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(functionTempl ate, "TestObjectPython", v8::Local<v8::FunctionTemplate>(), V8TestObjectPython:: internalFieldCount,
7878 V8TestObjectPythonAttributes, WTF_ARRAY_LENGTH(V8TestObjectPythonAttribu tes),
7879 V8TestObjectPythonAccessors, WTF_ARRAY_LENGTH(V8TestObjectPythonAccessor s),
7880 V8TestObjectPythonMethods, WTF_ARRAY_LENGTH(V8TestObjectPythonMethods),
7881 isolate);
7882 v8::Local<v8::ObjectTemplate> ALLOW_UNUSED instanceTemplate = functionTempla te->InstanceTemplate();
7883 v8::Local<v8::ObjectTemplate> ALLOW_UNUSED prototypeTemplate = functionTempl ate->PrototypeTemplate();
7884 if (RuntimeEnabledFeatures::featureNameEnabled()) {
7885 static const V8DOMConfiguration::AttributeConfiguration attributeConfigu ration =\
7886 {"runtimeEnabledLongAttribute", TestObjectPythonV8Internal::runtimeEnabl edLongAttributeAttributeGetterCallback, TestObjectPythonV8Internal::runtimeEnabl edLongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>( v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */} ;
7887 V8DOMConfiguration::installAttribute(instanceTemplate, prototypeTemplate , attributeConfiguration, isolate);
7888 }
7889 #if ENABLE(CONDITION)
7890 if (RuntimeEnabledFeatures::featureNameEnabled()) {
7891 static const V8DOMConfiguration::AttributeConfiguration attributeConfigu ration =\
7892 {"conditionalRuntimeEnabledLongAttribute", TestObjectPythonV8Internal::c onditionalRuntimeEnabledLongAttributeAttributeGetterCallback, TestObjectPythonV8 Internal::conditionalRuntimeEnabledLongAttributeAttributeSetterCallback, 0, 0, 0 , static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute >(v8::None), 0 /* on instance */};
7893 V8DOMConfiguration::installAttribute(instanceTemplate, prototypeTemplate , attributeConfiguration, isolate);
7894 }
7895 #endif // ENABLE(CONDITION)
7896 static const V8DOMConfiguration::ConstantConfiguration V8TestObjectPythonCon stants[] = {
7897 {"CONST_VALUE_0", 0},
7898 {"CONST_VALUE_1", 1},
7899 {"CONST_VALUE_2", 2},
7900 {"CONST_VALUE_4", 4},
7901 {"CONST_VALUE_8", 8},
7902 {"CONST_VALUE_9", -1},
7903 {"CONST_VALUE_10", "my constant string"},
7904 {"CONST_VALUE_11", 0xffffffff},
7905 {"CONST_VALUE_12", 0x01},
7906 {"CONST_VALUE_13", 0X20},
7907 {"CONST_VALUE_14", 0x1abc},
7908 {"CONST_VALUE_15", 010},
7909 {"CONST_VALUE_16", -010},
7910 {"CONST_VALUE_16", -0x1A},
7911 {"CONST_VALUE_17", -0X1a},
7912 {"DEPRECATED_CONSTANT", 1},
7913 {"CONST_JAVASCRIPT", 1},
7914 };
7915 V8DOMConfiguration::installConstants(functionTemplate, prototypeTemplate, V8 TestObjectPythonConstants, WTF_ARRAY_LENGTH(V8TestObjectPythonConstants), isolat e);
7916 if (RuntimeEnabledFeatures::featureNameEnabled()) {
7917 static const V8DOMConfiguration::ConstantConfiguration constantConfigura tion = {"FEATURE_ENABLED_CONST", static_cast<signed int>(1)};
7918 V8DOMConfiguration::installConstants(functionTemplate, prototypeTemplate , &constantConfiguration, 1, isolate);
7919 }
7920 COMPILE_ASSERT(0 == TestObjectPython::CONST_VALUE_0, TheValueOfTestObjectPyt hon_CONST_VALUE_0DoesntMatchWithImplementation);
7921 COMPILE_ASSERT(1 == TestObjectPython::CONST_VALUE_1, TheValueOfTestObjectPyt hon_CONST_VALUE_1DoesntMatchWithImplementation);
7922 COMPILE_ASSERT(2 == TestObjectPython::CONST_VALUE_2, TheValueOfTestObjectPyt hon_CONST_VALUE_2DoesntMatchWithImplementation);
7923 COMPILE_ASSERT(4 == TestObjectPython::CONST_VALUE_4, TheValueOfTestObjectPyt hon_CONST_VALUE_4DoesntMatchWithImplementation);
7924 COMPILE_ASSERT(8 == TestObjectPython::CONST_VALUE_8, TheValueOfTestObjectPyt hon_CONST_VALUE_8DoesntMatchWithImplementation);
7925 COMPILE_ASSERT(-1 == TestObjectPython::CONST_VALUE_9, TheValueOfTestObjectPy thon_CONST_VALUE_9DoesntMatchWithImplementation);
7926 COMPILE_ASSERT("my constant string" == TestObjectPython::CONST_VALUE_10, The ValueOfTestObjectPython_CONST_VALUE_10DoesntMatchWithImplementation);
7927 COMPILE_ASSERT(0xffffffff == TestObjectPython::CONST_VALUE_11, TheValueOfTes tObjectPython_CONST_VALUE_11DoesntMatchWithImplementation);
7928 COMPILE_ASSERT(0x01 == TestObjectPython::CONST_VALUE_12, TheValueOfTestObjec tPython_CONST_VALUE_12DoesntMatchWithImplementation);
7929 COMPILE_ASSERT(0X20 == TestObjectPython::CONST_VALUE_13, TheValueOfTestObjec tPython_CONST_VALUE_13DoesntMatchWithImplementation);
7930 COMPILE_ASSERT(0x1abc == TestObjectPython::CONST_VALUE_14, TheValueOfTestObj ectPython_CONST_VALUE_14DoesntMatchWithImplementation);
7931 COMPILE_ASSERT(010 == TestObjectPython::CONST_VALUE_15, TheValueOfTestObject Python_CONST_VALUE_15DoesntMatchWithImplementation);
7932 COMPILE_ASSERT(-010 == TestObjectPython::CONST_VALUE_16, TheValueOfTestObjec tPython_CONST_VALUE_16DoesntMatchWithImplementation);
7933 COMPILE_ASSERT(-0x1A == TestObjectPython::CONST_VALUE_16, TheValueOfTestObje ctPython_CONST_VALUE_16DoesntMatchWithImplementation);
7934 COMPILE_ASSERT(-0X1a == TestObjectPython::CONST_VALUE_17, TheValueOfTestObje ctPython_CONST_VALUE_17DoesntMatchWithImplementation);
7935 COMPILE_ASSERT(1 == TestObjectPython::DEPRECATED_CONSTANT, TheValueOfTestObj ectPython_DEPRECATED_CONSTANTDoesntMatchWithImplementation);
7936 COMPILE_ASSERT(1 == TestObjectPython::FEATURE_ENABLED_CONST, TheValueOfTestO bjectPython_FEATURE_ENABLED_CONSTDoesntMatchWithImplementation);
7937 COMPILE_ASSERT(1 == TestObjectPython::CONST_IMPL, TheValueOfTestObjectPython _CONST_IMPLDoesntMatchWithImplementation);
7938 functionTemplate->Set(v8AtomicString(isolate, "staticVoidMethod"), v8::Funct ionTemplate::New(isolate, TestObjectPythonV8Internal::staticVoidMethodMethodCall back, v8Undefined(), v8::Local<v8::Signature>(), 0));
7939 functionTemplate->Set(v8AtomicString(isolate, "overloadedStaticMethod"), v8: :FunctionTemplate::New(isolate, TestObjectPythonV8Internal::overloadedStaticMeth odMethodCallback, v8Undefined(), v8::Local<v8::Signature>(), 1));
7940 #if ENABLE(CONDITION)
7941 functionTemplate->Set(v8AtomicString(isolate, "conditionalConditionStaticVoi dMethod"), v8::FunctionTemplate::New(isolate, TestObjectPythonV8Internal::condit ionalConditionStaticVoidMethodMethodCallback, v8Undefined(), v8::Local<v8::Signa ture>(), 0));
7942 #endif // ENABLE(CONDITION)
7943 prototypeTemplate->Set(v8AtomicString(isolate, "doNotCheckSignatureVoidMetho d"), v8::FunctionTemplate::New(isolate, TestObjectPythonV8Internal::doNotCheckSi gnatureVoidMethodMethodCallback, v8Undefined(), v8::Local<v8::Signature>(), 0));
7944 prototypeTemplate->Set(v8AtomicString(isolate, "notEnumerableVoidMethod"), v 8::FunctionTemplate::New(isolate, TestObjectPythonV8Internal::notEnumerableVoidM ethodMethodCallback, v8Undefined(), defaultSignature, 0), static_cast<v8::Proper tyAttribute>(v8::DontDelete | v8::DontEnum));
7945 prototypeTemplate->Set(v8AtomicString(isolate, "readOnlyVoidMethod"), v8::Fu nctionTemplate::New(isolate, TestObjectPythonV8Internal::readOnlyVoidMethodMetho dCallback, v8Undefined(), defaultSignature, 0), static_cast<v8::PropertyAttribut e>(v8::DontDelete | v8::ReadOnly));
7946 prototypeTemplate->Set(v8AtomicString(isolate, "notEnumerableReadOnlyVoidMet hod"), v8::FunctionTemplate::New(isolate, TestObjectPythonV8Internal::notEnumera bleReadOnlyVoidMethodMethodCallback, v8Undefined(), defaultSignature, 0), static _cast<v8::PropertyAttribute>(v8::DontDelete | v8::DontEnum | v8::ReadOnly));
7947 if (RuntimeEnabledFeatures::featureNameEnabled())
7948 prototypeTemplate->Set(v8AtomicString(isolate, "runtimeEnabledVoidMethod "), v8::FunctionTemplate::New(isolate, TestObjectPythonV8Internal::runtimeEnable dVoidMethodMethodCallback, v8Undefined(), defaultSignature, 0));
7949 if (DOMWrapperWorld::current(isolate)->isMainWorld()) {
7950 if (RuntimeEnabledFeatures::featureNameEnabled())
7951 prototypeTemplate->Set(v8AtomicString(isolate, "perWorldBindingsRunt imeEnabledVoidMethod"), v8::FunctionTemplate::New(isolate, TestObjectPythonV8Int ernal::perWorldBindingsRuntimeEnabledVoidMethodMethodCallbackForMainWorld, v8Und efined(), defaultSignature, 0));
7952 } else {
7953 if (RuntimeEnabledFeatures::featureNameEnabled())
7954 prototypeTemplate->Set(v8AtomicString(isolate, "perWorldBindingsRunt imeEnabledVoidMethod"), v8::FunctionTemplate::New(isolate, TestObjectPythonV8Int ernal::perWorldBindingsRuntimeEnabledVoidMethodMethodCallback, v8Undefined(), de faultSignature, 0));
7955 }
7956 instanceTemplate->Set(v8AtomicString(isolate, "unforgeableVoidMethod"), v8:: FunctionTemplate::New(isolate, TestObjectPythonV8Internal::unforgeableVoidMethod MethodCallback, v8Undefined(), defaultSignature, 0));
7957 functionTemplate->SetNativeDataProperty(v8AtomicString(isolate, "staticStrin gAttribute"), TestObjectPythonV8Internal::staticStringAttributeAttributeGetterCa llback, TestObjectPythonV8Internal::staticStringAttributeAttributeSetterCallback , v8::External::New(isolate, 0), static_cast<v8::PropertyAttribute>(v8::None), v 8::Handle<v8::AccessorSignature>(), static_cast<v8::AccessControl>(v8::DEFAULT)) ;
7958 functionTemplate->SetNativeDataProperty(v8AtomicString(isolate, "staticLongA ttribute"), TestObjectPythonV8Internal::staticLongAttributeAttributeGetterCallba ck, TestObjectPythonV8Internal::staticLongAttributeAttributeSetterCallback, v8:: External::New(isolate, 0), static_cast<v8::PropertyAttribute>(v8::None), v8::Han dle<v8::AccessorSignature>(), static_cast<v8::AccessControl>(v8::DEFAULT));
7959
7960 // Custom toString template
7961 functionTemplate->Set(v8AtomicString(isolate, "toString"), V8PerIsolateData: :current()->toStringTemplate());
7962 }
7963
7964 v8::Handle<v8::FunctionTemplate> V8TestObjectPython::domTemplate(v8::Isolate* is olate)
7965 {
7966 V8PerIsolateData* data = V8PerIsolateData::from(isolate);
7967 v8::Local<v8::FunctionTemplate> result = data->existingDOMTemplate(const_cas t<WrapperTypeInfo*>(&wrapperTypeInfo));
7968 if (!result.IsEmpty())
7969 return result;
7970
7971 TRACE_EVENT_SCOPED_SAMPLING_STATE("Blink", "BuildDOMTemplate");
7972 result = v8::FunctionTemplate::New(isolate, V8ObjectConstructor::isValidCons tructorMode);
7973 configureV8TestObjectPythonTemplate(result, isolate);
7974 data->setDOMTemplate(const_cast<WrapperTypeInfo*>(&wrapperTypeInfo), result) ;
7975 return result;
7976 }
7977
7978 bool V8TestObjectPython::hasInstance(v8::Handle<v8::Value> v8Value, v8::Isolate* isolate)
7979 {
7980 return V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, v8Valu e);
7981 }
7982
7983 v8::Handle<v8::Object> V8TestObjectPython::findInstanceInPrototypeChain(v8::Hand le<v8::Value> v8Value, v8::Isolate* isolate)
7984 {
7985 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe rTypeInfo, v8Value);
7986 }
7987
7988 TestObjectPython* V8TestObjectPython::toNativeWithTypeCheck(v8::Isolate* isolate , v8::Handle<v8::Value> value)
7989 {
7990 return hasInstance(value, isolate) ? fromInternalPointer(v8::Handle<v8::Obje ct>::Cast(value)->GetAlignedPointerFromInternalField(v8DOMWrapperObjectIndex)) : 0;
7991 }
7992
7993 void V8TestObjectPython::installPerContextEnabledProperties(v8::Handle<v8::Objec t> instanceTemplate, TestObjectPython* impl, v8::Isolate* isolate)
7994 {
7995 v8::Local<v8::Object> prototypeTemplate = v8::Local<v8::Object>::Cast(instan ceTemplate->GetPrototype());
7996 if (ContextFeatures::featureNameEnabled(impl->document())) {
7997 static const V8DOMConfiguration::AttributeConfiguration attributeConfigu ration =\
7998 {"perContextEnabledLongAttribute", TestObjectPythonV8Internal::perContex tEnabledLongAttributeAttributeGetterCallback, TestObjectPythonV8Internal::perCon textEnabledLongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::Access Control>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on ins tance */};
7999 V8DOMConfiguration::installAttribute(instanceTemplate, prototypeTemplate , attributeConfiguration, isolate);
8000 }
8001 if (ContextFeatures::featureNameEnabled(impl->document())) {
8002 static const V8DOMConfiguration::AttributeConfiguration attributeConfigu ration =\
8003 {"perContextEnabledRuntimeEnabledLongAttribute", TestObjectPythonV8Inter nal::perContextEnabledRuntimeEnabledLongAttributeAttributeGetterCallback, TestOb jectPythonV8Internal::perContextEnabledRuntimeEnabledLongAttributeAttributeSette rCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8: :PropertyAttribute>(v8::None), 0 /* on instance */};
8004 V8DOMConfiguration::installAttribute(instanceTemplate, prototypeTemplate , attributeConfiguration, isolate);
8005 }
8006 }
8007
8008 void V8TestObjectPython::installPerContextEnabledMethods(v8::Handle<v8::Object> prototypeTemplate, v8::Isolate* isolate)
8009 {
8010 v8::Local<v8::Signature> defaultSignature = v8::Signature::New(isolate, domT emplate(isolate));
8011
8012 ExecutionContext* context = toExecutionContext(prototypeTemplate->CreationCo ntext());
8013 if (context && context->isDocument() && ContextFeatures::featureNameEnabled( toDocument(context)))
8014 prototypeTemplate->Set(v8AtomicString(isolate, "perContextEnabledVoidMet hod"), v8::FunctionTemplate::New(isolate, TestObjectPythonV8Internal::perContext EnabledVoidMethodMethodCallback, v8Undefined(), defaultSignature, 0)->GetFunctio n());
8015 }
8016
8017 v8::Handle<v8::Object> V8TestObjectPython::createWrapper(PassRefPtr<TestObjectPy thon> impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
8018 {
8019 ASSERT(impl);
8020 ASSERT(!DOMDataStore::containsWrapper<V8TestObjectPython>(impl.get(), isolat e));
8021 if (ScriptWrappable::wrapperCanBeStoredInObject(impl.get())) {
8022 const WrapperTypeInfo* actualInfo = ScriptWrappable::getTypeInfoFromObje ct(impl.get());
8023 // Might be a XXXConstructor::wrapperTypeInfo instead of an XXX::wrapper TypeInfo. These will both have
8024 // the same object de-ref functions, though, so use that as the basis of the check.
8025 RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(actualInfo->derefObjectFunction == wrapperTypeInfo.derefObjectFunction);
8026 }
8027
8028 v8::Handle<v8::Object> wrapper = V8DOMWrapper::createWrapper(creationContext , &wrapperTypeInfo, toInternalPointer(impl.get()), isolate);
8029 if (UNLIKELY(wrapper.IsEmpty()))
8030 return wrapper;
8031
8032 installPerContextEnabledProperties(wrapper, impl.get(), isolate);
8033 V8DOMWrapper::associateObjectWithWrapper<V8TestObjectPython>(impl, &wrapperT ypeInfo, wrapper, isolate, WrapperConfiguration::Independent);
8034 return wrapper;
8035 }
8036
8037 void V8TestObjectPython::derefObject(void* object)
8038 {
8039 fromInternalPointer(object)->deref();
8040 }
8041
8042 template<>
8043 v8::Handle<v8::Value> toV8NoInline(TestObjectPython* impl, v8::Handle<v8::Object > creationContext, v8::Isolate* isolate)
8044 {
8045 return toV8(impl, creationContext, isolate);
8046 }
8047
8048 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698