Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / Source / bindings / tests / results / V8TestObject.cpp
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 "V8TestObject.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 "V8TestInterfaceGarbageCollected.h"
27 #include "V8TestInterfaceWillBeGarbageCollected.h"
28 #include "V8TestNode.h"
29 #include "V8Window.h"
30 #include "V8XPathNSResolver.h"
31 #include "bindings/v8/BindingSecurity.h"
32 #include "bindings/v8/Dictionary.h"
33 #include "bindings/v8/ExceptionState.h"
34 #include "bindings/v8/ScriptCallStackFactory.h"
35 #include "bindings/v8/ScriptPromise.h"
36 #include "bindings/v8/ScriptState.h"
37 #include "bindings/v8/ScriptValue.h"
38 #include "bindings/v8/SerializedScriptValue.h"
39 #include "bindings/v8/V8AbstractEventListener.h"
40 #include "bindings/v8/V8DOMActivityLogger.h"
41 #include "bindings/v8/V8DOMConfiguration.h"
42 #include "bindings/v8/V8EventListenerList.h"
43 #include "bindings/v8/V8HiddenValue.h"
44 #include "bindings/v8/V8ObjectConstructor.h"
45 #include "bindings/v8/custom/V8ArrayBufferCustom.h"
46 #include "bindings/v8/custom/V8ArrayBufferViewCustom.h"
47 #include "bindings/v8/custom/V8Float32ArrayCustom.h"
48 #include "bindings/v8/custom/V8Int32ArrayCustom.h"
49 #include "bindings/v8/custom/V8Uint8ArrayCustom.h"
50 #include "core/css/MediaQueryListListener.h"
51 #include "core/dom/ContextFeatures.h"
52 #include "core/dom/Document.h"
53 #include "core/dom/custom/CustomElementCallbackDispatcher.h"
54 #include "core/frame/DOMWindow.h"
55 #include "core/frame/UseCounter.h"
56 #include "core/inspector/ScriptArguments.h"
57 #include "platform/TraceEvent.h"
58 #include "wtf/GetPtr.h"
59 #include "wtf/RefPtr.h"
60
61 namespace WebCore {
62
63 static void initializeScriptWrappableForInterface(TestObject* object)
64 {
65     if (ScriptWrappable::wrapperCanBeStoredInObject(object))
66         ScriptWrappable::fromObject(object)->setTypeInfo(&V8TestObject::wrapperTypeInfo);
67     else
68         ASSERT_NOT_REACHED();
69 }
70
71 } // namespace WebCore
72
73 void webCoreInitializeScriptWrappableForInterface(WebCore::TestObject* object)
74 {
75     WebCore::initializeScriptWrappableForInterface(object);
76 }
77
78 namespace WebCore {
79 const WrapperTypeInfo V8TestObject::wrapperTypeInfo = { gin::kEmbedderBlink, V8TestObject::domTemplate, V8TestObject::derefObject, 0, 0, 0, V8TestObject::installPerContextEnabledMethods, 0, WrapperTypeObjectPrototype, RefCountedObject };
80
81 namespace TestObjectV8Internal {
82
83 template <typename T> void V8_USE(T) { }
84
85 static void readonlyStringAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
86 {
87     v8::Handle<v8::Object> holder = info.Holder();
88     TestObject* impl = V8TestObject::toNative(holder);
89     v8SetReturnValueString(info, impl->readonlyStringAttribute(), info.GetIsolate());
90 }
91
92 static void readonlyStringAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
93 {
94     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
95     TestObjectV8Internal::readonlyStringAttributeAttributeGetter(info);
96     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
97 }
98
99 static void readonlyTestInterfaceEmptyAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
100 {
101     v8::Handle<v8::Object> holder = info.Holder();
102     TestObject* impl = V8TestObject::toNative(holder);
103     RefPtr<TestInterfaceEmpty> result(impl->readonlyTestInterfaceEmptyAttribute());
104     if (result && DOMDataStore::setReturnValueFromWrapper<V8TestInterfaceEmpty>(info.GetReturnValue(), result.get()))
105         return;
106     v8::Handle<v8::Value> wrapper = toV8(result.get(), holder, info.GetIsolate());
107     if (!wrapper.IsEmpty()) {
108         V8HiddenValue::setHiddenValue(info.GetIsolate(), holder, v8AtomicString(info.GetIsolate(), "readonlyTestInterfaceEmptyAttribute"), wrapper);
109         v8SetReturnValue(info, wrapper);
110     }
111 }
112
113 static void readonlyTestInterfaceEmptyAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
114 {
115     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
116     TestObjectV8Internal::readonlyTestInterfaceEmptyAttributeAttributeGetter(info);
117     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
118 }
119
120 static void readonlyLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
121 {
122     v8::Handle<v8::Object> holder = info.Holder();
123     TestObject* impl = V8TestObject::toNative(holder);
124     v8SetReturnValueInt(info, impl->readonlyLongAttribute());
125 }
126
127 static void readonlyLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
128 {
129     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
130     TestObjectV8Internal::readonlyLongAttributeAttributeGetter(info);
131     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
132 }
133
134 static void dateAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
135 {
136     v8::Handle<v8::Object> holder = info.Holder();
137     TestObject* impl = V8TestObject::toNative(holder);
138     v8SetReturnValue(info, v8DateOrNaN(impl->dateAttribute(), info.GetIsolate()));
139 }
140
141 static void dateAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
142 {
143     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
144     TestObjectV8Internal::dateAttributeAttributeGetter(info);
145     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
146 }
147
148 static void dateAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
149 {
150     v8::Handle<v8::Object> holder = info.Holder();
151     TestObject* impl = V8TestObject::toNative(holder);
152     TONATIVE_VOID(double, cppValue, toCoreDate(v8Value));
153     impl->setDateAttribute(cppValue);
154 }
155
156 static void dateAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
157 {
158     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
159     TestObjectV8Internal::dateAttributeAttributeSetter(v8Value, info);
160     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
161 }
162
163 static void stringAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
164 {
165     v8::Handle<v8::Object> holder = info.Holder();
166     TestObject* impl = V8TestObject::toNative(holder);
167     v8SetReturnValueString(info, impl->stringAttribute(), info.GetIsolate());
168 }
169
170 static void stringAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
171 {
172     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
173     TestObjectV8Internal::stringAttributeAttributeGetter(info);
174     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
175 }
176
177 static void stringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
178 {
179     v8::Handle<v8::Object> holder = info.Holder();
180     TestObject* impl = V8TestObject::toNative(holder);
181     TOSTRING_VOID(V8StringResource<>, cppValue, v8Value);
182     impl->setStringAttribute(cppValue);
183 }
184
185 static void stringAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
186 {
187     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
188     TestObjectV8Internal::stringAttributeAttributeSetter(v8Value, info);
189     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
190 }
191
192 static void domTimeStampAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
193 {
194     v8::Handle<v8::Object> holder = info.Holder();
195     TestObject* impl = V8TestObject::toNative(holder);
196     v8SetReturnValue(info, static_cast<double>(impl->domTimeStampAttribute()));
197 }
198
199 static void domTimeStampAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
200 {
201     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
202     TestObjectV8Internal::domTimeStampAttributeAttributeGetter(info);
203     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
204 }
205
206 static void domTimeStampAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
207 {
208     v8::Handle<v8::Object> holder = info.Holder();
209     ExceptionState exceptionState(ExceptionState::SetterContext, "domTimeStampAttribute", "TestObject", holder, info.GetIsolate());
210     TestObject* impl = V8TestObject::toNative(holder);
211     TONATIVE_VOID_EXCEPTIONSTATE(unsigned long long, cppValue, toUInt64(v8Value, exceptionState), exceptionState);
212     impl->setDomTimeStampAttribute(cppValue);
213 }
214
215 static void domTimeStampAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
216 {
217     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
218     TestObjectV8Internal::domTimeStampAttributeAttributeSetter(v8Value, info);
219     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
220 }
221
222 static void booleanAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
223 {
224     v8::Handle<v8::Object> holder = info.Holder();
225     TestObject* impl = V8TestObject::toNative(holder);
226     v8SetReturnValueBool(info, impl->booleanAttribute());
227 }
228
229 static void booleanAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
230 {
231     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
232     TestObjectV8Internal::booleanAttributeAttributeGetter(info);
233     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
234 }
235
236 static void booleanAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
237 {
238     v8::Handle<v8::Object> holder = info.Holder();
239     TestObject* impl = V8TestObject::toNative(holder);
240     TONATIVE_VOID(bool, cppValue, v8Value->BooleanValue());
241     impl->setBooleanAttribute(cppValue);
242 }
243
244 static void booleanAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
245 {
246     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
247     TestObjectV8Internal::booleanAttributeAttributeSetter(v8Value, info);
248     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
249 }
250
251 static void byteAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
252 {
253     v8::Handle<v8::Object> holder = info.Holder();
254     TestObject* impl = V8TestObject::toNative(holder);
255     v8SetReturnValueInt(info, impl->byteAttribute());
256 }
257
258 static void byteAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
259 {
260     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
261     TestObjectV8Internal::byteAttributeAttributeGetter(info);
262     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
263 }
264
265 static void byteAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
266 {
267     v8::Handle<v8::Object> holder = info.Holder();
268     ExceptionState exceptionState(ExceptionState::SetterContext, "byteAttribute", "TestObject", holder, info.GetIsolate());
269     TestObject* impl = V8TestObject::toNative(holder);
270     TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt8(v8Value, exceptionState), exceptionState);
271     impl->setByteAttribute(cppValue);
272 }
273
274 static void byteAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
275 {
276     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
277     TestObjectV8Internal::byteAttributeAttributeSetter(v8Value, info);
278     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
279 }
280
281 static void doubleAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
282 {
283     v8::Handle<v8::Object> holder = info.Holder();
284     TestObject* impl = V8TestObject::toNative(holder);
285     v8SetReturnValue(info, impl->doubleAttribute());
286 }
287
288 static void doubleAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
289 {
290     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
291     TestObjectV8Internal::doubleAttributeAttributeGetter(info);
292     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
293 }
294
295 static void doubleAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
296 {
297     v8::Handle<v8::Object> holder = info.Holder();
298     TestObject* impl = V8TestObject::toNative(holder);
299     TONATIVE_VOID(double, cppValue, static_cast<double>(v8Value->NumberValue()));
300     impl->setDoubleAttribute(cppValue);
301 }
302
303 static void doubleAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
304 {
305     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
306     TestObjectV8Internal::doubleAttributeAttributeSetter(v8Value, info);
307     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
308 }
309
310 static void floatAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
311 {
312     v8::Handle<v8::Object> holder = info.Holder();
313     TestObject* impl = V8TestObject::toNative(holder);
314     v8SetReturnValue(info, impl->floatAttribute());
315 }
316
317 static void floatAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
318 {
319     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
320     TestObjectV8Internal::floatAttributeAttributeGetter(info);
321     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
322 }
323
324 static void floatAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
325 {
326     v8::Handle<v8::Object> holder = info.Holder();
327     TestObject* impl = V8TestObject::toNative(holder);
328     TONATIVE_VOID(float, cppValue, static_cast<float>(v8Value->NumberValue()));
329     impl->setFloatAttribute(cppValue);
330 }
331
332 static void floatAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
333 {
334     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
335     TestObjectV8Internal::floatAttributeAttributeSetter(v8Value, info);
336     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
337 }
338
339 static void longAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
340 {
341     v8::Handle<v8::Object> holder = info.Holder();
342     TestObject* impl = V8TestObject::toNative(holder);
343     v8SetReturnValueInt(info, impl->longAttribute());
344 }
345
346 static void longAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
347 {
348     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
349     TestObjectV8Internal::longAttributeAttributeGetter(info);
350     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
351 }
352
353 static void longAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
354 {
355     v8::Handle<v8::Object> holder = info.Holder();
356     ExceptionState exceptionState(ExceptionState::SetterContext, "longAttribute", "TestObject", holder, info.GetIsolate());
357     TestObject* impl = V8TestObject::toNative(holder);
358     TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState), exceptionState);
359     impl->setLongAttribute(cppValue);
360 }
361
362 static void longAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
363 {
364     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
365     TestObjectV8Internal::longAttributeAttributeSetter(v8Value, info);
366     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
367 }
368
369 static void longLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
370 {
371     v8::Handle<v8::Object> holder = info.Holder();
372     TestObject* impl = V8TestObject::toNative(holder);
373     v8SetReturnValue(info, static_cast<double>(impl->longLongAttribute()));
374 }
375
376 static void longLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
377 {
378     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
379     TestObjectV8Internal::longLongAttributeAttributeGetter(info);
380     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
381 }
382
383 static void longLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
384 {
385     v8::Handle<v8::Object> holder = info.Holder();
386     ExceptionState exceptionState(ExceptionState::SetterContext, "longLongAttribute", "TestObject", holder, info.GetIsolate());
387     TestObject* impl = V8TestObject::toNative(holder);
388     TONATIVE_VOID_EXCEPTIONSTATE(long long, cppValue, toInt64(v8Value, exceptionState), exceptionState);
389     impl->setLongLongAttribute(cppValue);
390 }
391
392 static void longLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
393 {
394     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
395     TestObjectV8Internal::longLongAttributeAttributeSetter(v8Value, info);
396     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
397 }
398
399 static void octetAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
400 {
401     v8::Handle<v8::Object> holder = info.Holder();
402     TestObject* impl = V8TestObject::toNative(holder);
403     v8SetReturnValueUnsigned(info, impl->octetAttribute());
404 }
405
406 static void octetAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
407 {
408     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
409     TestObjectV8Internal::octetAttributeAttributeGetter(info);
410     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
411 }
412
413 static void octetAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
414 {
415     v8::Handle<v8::Object> holder = info.Holder();
416     ExceptionState exceptionState(ExceptionState::SetterContext, "octetAttribute", "TestObject", holder, info.GetIsolate());
417     TestObject* impl = V8TestObject::toNative(holder);
418     TONATIVE_VOID_EXCEPTIONSTATE(unsigned, cppValue, toUInt8(v8Value, exceptionState), exceptionState);
419     impl->setOctetAttribute(cppValue);
420 }
421
422 static void octetAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
423 {
424     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
425     TestObjectV8Internal::octetAttributeAttributeSetter(v8Value, info);
426     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
427 }
428
429 static void shortAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
430 {
431     v8::Handle<v8::Object> holder = info.Holder();
432     TestObject* impl = V8TestObject::toNative(holder);
433     v8SetReturnValueInt(info, impl->shortAttribute());
434 }
435
436 static void shortAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
437 {
438     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
439     TestObjectV8Internal::shortAttributeAttributeGetter(info);
440     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
441 }
442
443 static void shortAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
444 {
445     v8::Handle<v8::Object> holder = info.Holder();
446     ExceptionState exceptionState(ExceptionState::SetterContext, "shortAttribute", "TestObject", holder, info.GetIsolate());
447     TestObject* impl = V8TestObject::toNative(holder);
448     TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt16(v8Value, exceptionState), exceptionState);
449     impl->setShortAttribute(cppValue);
450 }
451
452 static void shortAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
453 {
454     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
455     TestObjectV8Internal::shortAttributeAttributeSetter(v8Value, info);
456     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
457 }
458
459 static void unrestrictedDoubleAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
460 {
461     v8::Handle<v8::Object> holder = info.Holder();
462     TestObject* impl = V8TestObject::toNative(holder);
463     v8SetReturnValue(info, impl->unrestrictedDoubleAttribute());
464 }
465
466 static void unrestrictedDoubleAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
467 {
468     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
469     TestObjectV8Internal::unrestrictedDoubleAttributeAttributeGetter(info);
470     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
471 }
472
473 static void unrestrictedDoubleAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
474 {
475     v8::Handle<v8::Object> holder = info.Holder();
476     TestObject* impl = V8TestObject::toNative(holder);
477     TONATIVE_VOID(double, cppValue, static_cast<double>(v8Value->NumberValue()));
478     impl->setUnrestrictedDoubleAttribute(cppValue);
479 }
480
481 static void unrestrictedDoubleAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
482 {
483     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
484     TestObjectV8Internal::unrestrictedDoubleAttributeAttributeSetter(v8Value, info);
485     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
486 }
487
488 static void unrestrictedFloatAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
489 {
490     v8::Handle<v8::Object> holder = info.Holder();
491     TestObject* impl = V8TestObject::toNative(holder);
492     v8SetReturnValue(info, impl->unrestrictedFloatAttribute());
493 }
494
495 static void unrestrictedFloatAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
496 {
497     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
498     TestObjectV8Internal::unrestrictedFloatAttributeAttributeGetter(info);
499     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
500 }
501
502 static void unrestrictedFloatAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
503 {
504     v8::Handle<v8::Object> holder = info.Holder();
505     TestObject* impl = V8TestObject::toNative(holder);
506     TONATIVE_VOID(float, cppValue, static_cast<float>(v8Value->NumberValue()));
507     impl->setUnrestrictedFloatAttribute(cppValue);
508 }
509
510 static void unrestrictedFloatAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
511 {
512     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
513     TestObjectV8Internal::unrestrictedFloatAttributeAttributeSetter(v8Value, info);
514     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
515 }
516
517 static void unsignedLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
518 {
519     v8::Handle<v8::Object> holder = info.Holder();
520     TestObject* impl = V8TestObject::toNative(holder);
521     v8SetReturnValueUnsigned(info, impl->unsignedLongAttribute());
522 }
523
524 static void unsignedLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
525 {
526     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
527     TestObjectV8Internal::unsignedLongAttributeAttributeGetter(info);
528     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
529 }
530
531 static void unsignedLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
532 {
533     v8::Handle<v8::Object> holder = info.Holder();
534     ExceptionState exceptionState(ExceptionState::SetterContext, "unsignedLongAttribute", "TestObject", holder, info.GetIsolate());
535     TestObject* impl = V8TestObject::toNative(holder);
536     TONATIVE_VOID_EXCEPTIONSTATE(unsigned, cppValue, toUInt32(v8Value, exceptionState), exceptionState);
537     impl->setUnsignedLongAttribute(cppValue);
538 }
539
540 static void unsignedLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
541 {
542     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
543     TestObjectV8Internal::unsignedLongAttributeAttributeSetter(v8Value, info);
544     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
545 }
546
547 static void unsignedLongLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
548 {
549     v8::Handle<v8::Object> holder = info.Holder();
550     TestObject* impl = V8TestObject::toNative(holder);
551     v8SetReturnValue(info, static_cast<double>(impl->unsignedLongLongAttribute()));
552 }
553
554 static void unsignedLongLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
555 {
556     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
557     TestObjectV8Internal::unsignedLongLongAttributeAttributeGetter(info);
558     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
559 }
560
561 static void unsignedLongLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
562 {
563     v8::Handle<v8::Object> holder = info.Holder();
564     ExceptionState exceptionState(ExceptionState::SetterContext, "unsignedLongLongAttribute", "TestObject", holder, info.GetIsolate());
565     TestObject* impl = V8TestObject::toNative(holder);
566     TONATIVE_VOID_EXCEPTIONSTATE(unsigned long long, cppValue, toUInt64(v8Value, exceptionState), exceptionState);
567     impl->setUnsignedLongLongAttribute(cppValue);
568 }
569
570 static void unsignedLongLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
571 {
572     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
573     TestObjectV8Internal::unsignedLongLongAttributeAttributeSetter(v8Value, info);
574     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
575 }
576
577 static void unsignedShortAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
578 {
579     v8::Handle<v8::Object> holder = info.Holder();
580     TestObject* impl = V8TestObject::toNative(holder);
581     v8SetReturnValueUnsigned(info, impl->unsignedShortAttribute());
582 }
583
584 static void unsignedShortAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
585 {
586     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
587     TestObjectV8Internal::unsignedShortAttributeAttributeGetter(info);
588     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
589 }
590
591 static void unsignedShortAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
592 {
593     v8::Handle<v8::Object> holder = info.Holder();
594     ExceptionState exceptionState(ExceptionState::SetterContext, "unsignedShortAttribute", "TestObject", holder, info.GetIsolate());
595     TestObject* impl = V8TestObject::toNative(holder);
596     TONATIVE_VOID_EXCEPTIONSTATE(unsigned, cppValue, toUInt16(v8Value, exceptionState), exceptionState);
597     impl->setUnsignedShortAttribute(cppValue);
598 }
599
600 static void unsignedShortAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
601 {
602     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
603     TestObjectV8Internal::unsignedShortAttributeAttributeSetter(v8Value, info);
604     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
605 }
606
607 static void testInterfaceEmptyAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
608 {
609     v8::Handle<v8::Object> holder = info.Holder();
610     TestObject* impl = V8TestObject::toNative(holder);
611     v8SetReturnValueFast(info, WTF::getPtr(impl->testInterfaceEmptyAttribute()), impl);
612 }
613
614 static void testInterfaceEmptyAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
615 {
616     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
617     TestObjectV8Internal::testInterfaceEmptyAttributeAttributeGetter(info);
618     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
619 }
620
621 static void testInterfaceEmptyAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
622 {
623     v8::Handle<v8::Object> holder = info.Holder();
624     TestObject* impl = V8TestObject::toNative(holder);
625     TONATIVE_VOID(TestInterfaceEmpty*, cppValue, V8TestInterfaceEmpty::toNativeWithTypeCheck(info.GetIsolate(), v8Value));
626     impl->setTestInterfaceEmptyAttribute(WTF::getPtr(cppValue));
627 }
628
629 static void testInterfaceEmptyAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
630 {
631     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
632     TestObjectV8Internal::testInterfaceEmptyAttributeAttributeSetter(v8Value, info);
633     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
634 }
635
636 static void testObjectAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
637 {
638     v8::Handle<v8::Object> holder = info.Holder();
639     TestObject* impl = V8TestObject::toNative(holder);
640     v8SetReturnValueFast(info, WTF::getPtr(impl->testObjectAttribute()), impl);
641 }
642
643 static void testObjectAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
644 {
645     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
646     TestObjectV8Internal::testObjectAttributeAttributeGetter(info);
647     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
648 }
649
650 static void testObjectAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
651 {
652     v8::Handle<v8::Object> holder = info.Holder();
653     TestObject* impl = V8TestObject::toNative(holder);
654     TONATIVE_VOID(TestObject*, cppValue, V8TestObject::toNativeWithTypeCheck(info.GetIsolate(), v8Value));
655     impl->setTestObjectAttribute(WTF::getPtr(cppValue));
656 }
657
658 static void testObjectAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
659 {
660     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
661     TestObjectV8Internal::testObjectAttributeAttributeSetter(v8Value, info);
662     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
663 }
664
665 static void voidCallbackFunctionAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
666 {
667     v8::Handle<v8::Object> holder = info.Holder();
668     TestObject* impl = V8TestObject::toNative(holder);
669     v8SetReturnValue(info, impl->voidCallbackFunctionAttribute().v8Value());
670 }
671
672 static void voidCallbackFunctionAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
673 {
674     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
675     TestObjectV8Internal::voidCallbackFunctionAttributeAttributeGetter(info);
676     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
677 }
678
679 static void voidCallbackFunctionAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
680 {
681     v8::Handle<v8::Object> holder = info.Holder();
682     TestObject* impl = V8TestObject::toNative(holder);
683     TONATIVE_VOID(ScriptValue, cppValue, ScriptValue(ScriptState::current(info.GetIsolate()), v8Value));
684     impl->setVoidCallbackFunctionAttribute(cppValue);
685 }
686
687 static void voidCallbackFunctionAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
688 {
689     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
690     TestObjectV8Internal::voidCallbackFunctionAttributeAttributeSetter(v8Value, info);
691     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
692 }
693
694 static void anyCallbackFunctionOptionalAnyArgAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
695 {
696     v8::Handle<v8::Object> holder = info.Holder();
697     TestObject* impl = V8TestObject::toNative(holder);
698     v8SetReturnValue(info, impl->anyCallbackFunctionOptionalAnyArgAttribute().v8Value());
699 }
700
701 static void anyCallbackFunctionOptionalAnyArgAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
702 {
703     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
704     TestObjectV8Internal::anyCallbackFunctionOptionalAnyArgAttributeAttributeGetter(info);
705     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
706 }
707
708 static void anyCallbackFunctionOptionalAnyArgAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
709 {
710     v8::Handle<v8::Object> holder = info.Holder();
711     TestObject* impl = V8TestObject::toNative(holder);
712     TONATIVE_VOID(ScriptValue, cppValue, ScriptValue(ScriptState::current(info.GetIsolate()), v8Value));
713     impl->setAnyCallbackFunctionOptionalAnyArgAttribute(cppValue);
714 }
715
716 static void anyCallbackFunctionOptionalAnyArgAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
717 {
718     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
719     TestObjectV8Internal::anyCallbackFunctionOptionalAnyArgAttributeAttributeSetter(v8Value, info);
720     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
721 }
722
723 static void cssAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
724 {
725     v8::Handle<v8::Object> holder = info.Holder();
726     TestObject* impl = V8TestObject::toNative(holder);
727     v8SetReturnValueInt(info, impl->cssAttribute());
728 }
729
730 static void cssAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
731 {
732     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
733     TestObjectV8Internal::cssAttributeAttributeGetter(info);
734     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
735 }
736
737 static void cssAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
738 {
739     v8::Handle<v8::Object> holder = info.Holder();
740     ExceptionState exceptionState(ExceptionState::SetterContext, "cssAttribute", "TestObject", holder, info.GetIsolate());
741     TestObject* impl = V8TestObject::toNative(holder);
742     TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState), exceptionState);
743     impl->setCSSAttribute(cppValue);
744 }
745
746 static void cssAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
747 {
748     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
749     TestObjectV8Internal::cssAttributeAttributeSetter(v8Value, info);
750     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
751 }
752
753 static void imeAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
754 {
755     v8::Handle<v8::Object> holder = info.Holder();
756     TestObject* impl = V8TestObject::toNative(holder);
757     v8SetReturnValueInt(info, impl->imeAttribute());
758 }
759
760 static void imeAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
761 {
762     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
763     TestObjectV8Internal::imeAttributeAttributeGetter(info);
764     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
765 }
766
767 static void imeAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
768 {
769     v8::Handle<v8::Object> holder = info.Holder();
770     ExceptionState exceptionState(ExceptionState::SetterContext, "imeAttribute", "TestObject", holder, info.GetIsolate());
771     TestObject* impl = V8TestObject::toNative(holder);
772     TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState), exceptionState);
773     impl->setIMEAttribute(cppValue);
774 }
775
776 static void imeAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
777 {
778     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
779     TestObjectV8Internal::imeAttributeAttributeSetter(v8Value, info);
780     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
781 }
782
783 static void svgAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
784 {
785     v8::Handle<v8::Object> holder = info.Holder();
786     TestObject* impl = V8TestObject::toNative(holder);
787     v8SetReturnValueInt(info, impl->svgAttribute());
788 }
789
790 static void svgAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
791 {
792     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
793     TestObjectV8Internal::svgAttributeAttributeGetter(info);
794     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
795 }
796
797 static void svgAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
798 {
799     v8::Handle<v8::Object> holder = info.Holder();
800     ExceptionState exceptionState(ExceptionState::SetterContext, "svgAttribute", "TestObject", holder, info.GetIsolate());
801     TestObject* impl = V8TestObject::toNative(holder);
802     TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState), exceptionState);
803     impl->setSVGAttribute(cppValue);
804 }
805
806 static void svgAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
807 {
808     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
809     TestObjectV8Internal::svgAttributeAttributeSetter(v8Value, info);
810     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
811 }
812
813 static void xmlAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
814 {
815     v8::Handle<v8::Object> holder = info.Holder();
816     TestObject* impl = V8TestObject::toNative(holder);
817     v8SetReturnValueInt(info, impl->xmlAttribute());
818 }
819
820 static void xmlAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
821 {
822     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
823     TestObjectV8Internal::xmlAttributeAttributeGetter(info);
824     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
825 }
826
827 static void xmlAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
828 {
829     v8::Handle<v8::Object> holder = info.Holder();
830     ExceptionState exceptionState(ExceptionState::SetterContext, "xmlAttribute", "TestObject", holder, info.GetIsolate());
831     TestObject* impl = V8TestObject::toNative(holder);
832     TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState), exceptionState);
833     impl->setXMLAttribute(cppValue);
834 }
835
836 static void xmlAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
837 {
838     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
839     TestObjectV8Internal::xmlAttributeAttributeSetter(v8Value, info);
840     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
841 }
842
843 static void nodeFilterAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
844 {
845     v8::Handle<v8::Object> holder = info.Holder();
846     TestObject* impl = V8TestObject::toNative(holder);
847     v8SetReturnValueFast(info, WTF::getPtr(impl->nodeFilterAttribute()), impl);
848 }
849
850 static void nodeFilterAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
851 {
852     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
853     TestObjectV8Internal::nodeFilterAttributeAttributeGetter(info);
854     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
855 }
856
857 static void nodeFilterAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
858 {
859     v8::Handle<v8::Object> holder = info.Holder();
860     TestObject* impl = V8TestObject::toNative(holder);
861     TONATIVE_VOID(RefPtr<NodeFilter>, cppValue, toNodeFilter(v8Value, info.GetIsolate()));
862     impl->setNodeFilterAttribute(WTF::getPtr(cppValue));
863 }
864
865 static void nodeFilterAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
866 {
867     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
868     TestObjectV8Internal::nodeFilterAttributeAttributeSetter(v8Value, info);
869     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
870 }
871
872 static void serializedScriptValueAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
873 {
874     v8::Handle<v8::Object> holder = info.Holder();
875     TestObject* impl = V8TestObject::toNative(holder);
876     v8SetReturnValue(info, impl->serializedScriptValueAttribute() ? impl->serializedScriptValueAttribute()->deserialize() : v8::Handle<v8::Value>(v8::Null(info.GetIsolate())));
877 }
878
879 static void serializedScriptValueAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
880 {
881     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
882     TestObjectV8Internal::serializedScriptValueAttributeAttributeGetter(info);
883     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
884 }
885
886 static void serializedScriptValueAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
887 {
888     v8::Handle<v8::Object> holder = info.Holder();
889     TestObject* impl = V8TestObject::toNative(holder);
890     TONATIVE_VOID(RefPtr<SerializedScriptValue>, cppValue, SerializedScriptValue::create(v8Value, info.GetIsolate()));
891     impl->setSerializedScriptValueAttribute(WTF::getPtr(cppValue));
892 }
893
894 static void serializedScriptValueAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
895 {
896     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
897     TestObjectV8Internal::serializedScriptValueAttributeAttributeSetter(v8Value, info);
898     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
899 }
900
901 static void anyAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
902 {
903     v8::Handle<v8::Object> holder = info.Holder();
904     TestObject* impl = V8TestObject::toNative(holder);
905     v8SetReturnValue(info, impl->anyAttribute().v8Value());
906 }
907
908 static void anyAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
909 {
910     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
911     TestObjectV8Internal::anyAttributeAttributeGetter(info);
912     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
913 }
914
915 static void anyAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
916 {
917     v8::Handle<v8::Object> holder = info.Holder();
918     TestObject* impl = V8TestObject::toNative(holder);
919     TONATIVE_VOID(ScriptValue, cppValue, ScriptValue(ScriptState::current(info.GetIsolate()), v8Value));
920     impl->setAnyAttribute(cppValue);
921 }
922
923 static void anyAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
924 {
925     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
926     TestObjectV8Internal::anyAttributeAttributeSetter(v8Value, info);
927     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
928 }
929
930 static void promiseAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
931 {
932     v8::Handle<v8::Object> holder = info.Holder();
933     TestObject* impl = V8TestObject::toNative(holder);
934     v8SetReturnValue(info, impl->promiseAttribute().v8Value());
935 }
936
937 static void promiseAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
938 {
939     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
940     TestObjectV8Internal::promiseAttributeAttributeGetter(info);
941     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
942 }
943
944 static void promiseAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
945 {
946     v8::Handle<v8::Object> holder = info.Holder();
947     TestObject* impl = V8TestObject::toNative(holder);
948     TONATIVE_VOID(ScriptPromise, cppValue, ScriptPromise(ScriptState::current(info.GetIsolate()), v8Value));
949     impl->setPromiseAttribute(cppValue);
950 }
951
952 static void promiseAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
953 {
954     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
955     TestObjectV8Internal::promiseAttributeAttributeSetter(v8Value, info);
956     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
957 }
958
959 static void windowAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
960 {
961     v8::Handle<v8::Object> holder = info.Holder();
962     TestObject* impl = V8TestObject::toNative(holder);
963     v8SetReturnValueFast(info, WTF::getPtr(impl->windowAttribute()), impl);
964 }
965
966 static void windowAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
967 {
968     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
969     TestObjectV8Internal::windowAttributeAttributeGetter(info);
970     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
971 }
972
973 static void windowAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
974 {
975     v8::Handle<v8::Object> holder = info.Holder();
976     TestObject* impl = V8TestObject::toNative(holder);
977     TONATIVE_VOID(DOMWindow*, cppValue, toDOMWindow(v8Value, info.GetIsolate()));
978     impl->setWindowAttribute(WTF::getPtr(cppValue));
979 }
980
981 static void windowAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
982 {
983     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
984     TestObjectV8Internal::windowAttributeAttributeSetter(v8Value, info);
985     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
986 }
987
988 static void documentAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
989 {
990     v8::Handle<v8::Object> holder = info.Holder();
991     TestObject* impl = V8TestObject::toNative(holder);
992     v8SetReturnValueFast(info, WTF::getPtr(impl->documentAttribute()), impl);
993 }
994
995 static void documentAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
996 {
997     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
998     TestObjectV8Internal::documentAttributeAttributeGetter(info);
999     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1000 }
1001
1002 static void documentAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
1003 {
1004     v8::Handle<v8::Object> holder = info.Holder();
1005     TestObject* impl = V8TestObject::toNative(holder);
1006     TONATIVE_VOID(Document*, cppValue, V8Document::toNativeWithTypeCheck(info.GetIsolate(), v8Value));
1007     impl->setDocumentAttribute(WTF::getPtr(cppValue));
1008 }
1009
1010 static void documentAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
1011 {
1012     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1013     TestObjectV8Internal::documentAttributeAttributeSetter(v8Value, info);
1014     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1015 }
1016
1017 static void documentFragmentAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
1018 {
1019     v8::Handle<v8::Object> holder = info.Holder();
1020     TestObject* impl = V8TestObject::toNative(holder);
1021     v8SetReturnValueFast(info, WTF::getPtr(impl->documentFragmentAttribute()), impl);
1022 }
1023
1024 static void documentFragmentAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1025 {
1026     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1027     TestObjectV8Internal::documentFragmentAttributeAttributeGetter(info);
1028     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1029 }
1030
1031 static void documentFragmentAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
1032 {
1033     v8::Handle<v8::Object> holder = info.Holder();
1034     TestObject* impl = V8TestObject::toNative(holder);
1035     TONATIVE_VOID(DocumentFragment*, cppValue, V8DocumentFragment::toNativeWithTypeCheck(info.GetIsolate(), v8Value));
1036     impl->setDocumentFragmentAttribute(WTF::getPtr(cppValue));
1037 }
1038
1039 static void documentFragmentAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
1040 {
1041     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1042     TestObjectV8Internal::documentFragmentAttributeAttributeSetter(v8Value, info);
1043     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1044 }
1045
1046 static void documentTypeAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
1047 {
1048     v8::Handle<v8::Object> holder = info.Holder();
1049     TestObject* impl = V8TestObject::toNative(holder);
1050     v8SetReturnValueFast(info, WTF::getPtr(impl->documentTypeAttribute()), impl);
1051 }
1052
1053 static void documentTypeAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1054 {
1055     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1056     TestObjectV8Internal::documentTypeAttributeAttributeGetter(info);
1057     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1058 }
1059
1060 static void documentTypeAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
1061 {
1062     v8::Handle<v8::Object> holder = info.Holder();
1063     TestObject* impl = V8TestObject::toNative(holder);
1064     TONATIVE_VOID(DocumentType*, cppValue, V8DocumentType::toNativeWithTypeCheck(info.GetIsolate(), v8Value));
1065     impl->setDocumentTypeAttribute(WTF::getPtr(cppValue));
1066 }
1067
1068 static void documentTypeAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
1069 {
1070     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1071     TestObjectV8Internal::documentTypeAttributeAttributeSetter(v8Value, info);
1072     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1073 }
1074
1075 static void elementAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
1076 {
1077     v8::Handle<v8::Object> holder = info.Holder();
1078     TestObject* impl = V8TestObject::toNative(holder);
1079     v8SetReturnValueFast(info, WTF::getPtr(impl->elementAttribute()), impl);
1080 }
1081
1082 static void elementAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1083 {
1084     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1085     TestObjectV8Internal::elementAttributeAttributeGetter(info);
1086     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1087 }
1088
1089 static void elementAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
1090 {
1091     v8::Handle<v8::Object> holder = info.Holder();
1092     TestObject* impl = V8TestObject::toNative(holder);
1093     TONATIVE_VOID(Element*, cppValue, V8Element::toNativeWithTypeCheck(info.GetIsolate(), v8Value));
1094     impl->setElementAttribute(WTF::getPtr(cppValue));
1095 }
1096
1097 static void elementAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
1098 {
1099     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1100     TestObjectV8Internal::elementAttributeAttributeSetter(v8Value, info);
1101     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1102 }
1103
1104 static void nodeAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
1105 {
1106     v8::Handle<v8::Object> holder = info.Holder();
1107     TestObject* impl = V8TestObject::toNative(holder);
1108     v8SetReturnValueFast(info, WTF::getPtr(impl->nodeAttribute()), impl);
1109 }
1110
1111 static void nodeAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1112 {
1113     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1114     TestObjectV8Internal::nodeAttributeAttributeGetter(info);
1115     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1116 }
1117
1118 static void nodeAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
1119 {
1120     v8::Handle<v8::Object> holder = info.Holder();
1121     TestObject* impl = V8TestObject::toNative(holder);
1122     TONATIVE_VOID(Node*, cppValue, V8Node::toNativeWithTypeCheck(info.GetIsolate(), v8Value));
1123     impl->setNodeAttribute(WTF::getPtr(cppValue));
1124 }
1125
1126 static void nodeAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
1127 {
1128     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1129     TestObjectV8Internal::nodeAttributeAttributeSetter(v8Value, info);
1130     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1131 }
1132
1133 static void shadowRootAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
1134 {
1135     v8::Handle<v8::Object> holder = info.Holder();
1136     TestObject* impl = V8TestObject::toNative(holder);
1137     v8SetReturnValueFast(info, WTF::getPtr(impl->shadowRootAttribute()), impl);
1138 }
1139
1140 static void shadowRootAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1141 {
1142     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1143     TestObjectV8Internal::shadowRootAttributeAttributeGetter(info);
1144     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1145 }
1146
1147 static void shadowRootAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
1148 {
1149     v8::Handle<v8::Object> holder = info.Holder();
1150     TestObject* impl = V8TestObject::toNative(holder);
1151     TONATIVE_VOID(ShadowRoot*, cppValue, V8ShadowRoot::toNativeWithTypeCheck(info.GetIsolate(), v8Value));
1152     impl->setShadowRootAttribute(WTF::getPtr(cppValue));
1153 }
1154
1155 static void shadowRootAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
1156 {
1157     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1158     TestObjectV8Internal::shadowRootAttributeAttributeSetter(v8Value, info);
1159     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1160 }
1161
1162 static void arrayBufferAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
1163 {
1164     v8::Handle<v8::Object> holder = info.Holder();
1165     TestObject* impl = V8TestObject::toNative(holder);
1166     v8SetReturnValueFast(info, WTF::getPtr(impl->arrayBufferAttribute()), impl);
1167 }
1168
1169 static void arrayBufferAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1170 {
1171     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1172     TestObjectV8Internal::arrayBufferAttributeAttributeGetter(info);
1173     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1174 }
1175
1176 static void arrayBufferAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
1177 {
1178     v8::Handle<v8::Object> holder = info.Holder();
1179     TestObject* impl = V8TestObject::toNative(holder);
1180     TONATIVE_VOID(ArrayBuffer*, cppValue, v8Value->IsArrayBuffer() ? V8ArrayBuffer::toNative(v8::Handle<v8::ArrayBuffer>::Cast(v8Value)) : 0);
1181     impl->setArrayBufferAttribute(WTF::getPtr(cppValue));
1182 }
1183
1184 static void arrayBufferAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
1185 {
1186     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1187     TestObjectV8Internal::arrayBufferAttributeAttributeSetter(v8Value, info);
1188     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1189 }
1190
1191 static void float32ArrayAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
1192 {
1193     v8::Handle<v8::Object> holder = info.Holder();
1194     TestObject* impl = V8TestObject::toNative(holder);
1195     v8SetReturnValueFast(info, WTF::getPtr(impl->float32ArrayAttribute()), impl);
1196 }
1197
1198 static void float32ArrayAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1199 {
1200     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1201     TestObjectV8Internal::float32ArrayAttributeAttributeGetter(info);
1202     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1203 }
1204
1205 static void float32ArrayAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
1206 {
1207     v8::Handle<v8::Object> holder = info.Holder();
1208     TestObject* impl = V8TestObject::toNative(holder);
1209     TONATIVE_VOID(Float32Array*, cppValue, v8Value->IsFloat32Array() ? V8Float32Array::toNative(v8::Handle<v8::Float32Array>::Cast(v8Value)) : 0);
1210     impl->setFloat32ArrayAttribute(WTF::getPtr(cppValue));
1211 }
1212
1213 static void float32ArrayAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
1214 {
1215     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1216     TestObjectV8Internal::float32ArrayAttributeAttributeSetter(v8Value, info);
1217     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1218 }
1219
1220 static void uint8ArrayAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
1221 {
1222     v8::Handle<v8::Object> holder = info.Holder();
1223     TestObject* impl = V8TestObject::toNative(holder);
1224     v8SetReturnValueFast(info, WTF::getPtr(impl->uint8ArrayAttribute()), impl);
1225 }
1226
1227 static void uint8ArrayAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1228 {
1229     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1230     TestObjectV8Internal::uint8ArrayAttributeAttributeGetter(info);
1231     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1232 }
1233
1234 static void uint8ArrayAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
1235 {
1236     v8::Handle<v8::Object> holder = info.Holder();
1237     TestObject* impl = V8TestObject::toNative(holder);
1238     TONATIVE_VOID(Uint8Array*, cppValue, v8Value->IsUint8Array() ? V8Uint8Array::toNative(v8::Handle<v8::Uint8Array>::Cast(v8Value)) : 0);
1239     impl->setUint8ArrayAttribute(WTF::getPtr(cppValue));
1240 }
1241
1242 static void uint8ArrayAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
1243 {
1244     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1245     TestObjectV8Internal::uint8ArrayAttributeAttributeSetter(v8Value, info);
1246     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1247 }
1248
1249 static void selfAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
1250 {
1251     v8::Handle<v8::Object> holder = info.Holder();
1252     TestObject* impl = V8TestObject::toNative(holder);
1253     v8SetReturnValueFast(info, WTF::getPtr(impl->self()), impl);
1254 }
1255
1256 static void selfAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1257 {
1258     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1259     TestObjectV8Internal::selfAttributeGetter(info);
1260     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1261 }
1262
1263 static void readonlyEventTargetAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
1264 {
1265     v8::Handle<v8::Object> holder = info.Holder();
1266     TestObject* impl = V8TestObject::toNative(holder);
1267     v8SetReturnValueFast(info, WTF::getPtr(impl->readonlyEventTargetAttribute()), impl);
1268 }
1269
1270 static void readonlyEventTargetAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1271 {
1272     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1273     TestObjectV8Internal::readonlyEventTargetAttributeAttributeGetter(info);
1274     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1275 }
1276
1277 static void readonlyEventTargetOrNullAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
1278 {
1279     v8::Handle<v8::Object> holder = info.Holder();
1280     TestObject* impl = V8TestObject::toNative(holder);
1281     bool isNull = false;
1282     RefPtr<EventTarget> v8Value = impl->readonlyEventTargetOrNullAttribute(isNull);
1283     if (isNull) {
1284         v8SetReturnValueNull(info);
1285         return;
1286     }
1287     v8SetReturnValueFast(info, WTF::getPtr(v8Value.release()), impl);
1288 }
1289
1290 static void readonlyEventTargetOrNullAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1291 {
1292     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1293     TestObjectV8Internal::readonlyEventTargetOrNullAttributeAttributeGetter(info);
1294     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1295 }
1296
1297 static void readonlyWindowAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
1298 {
1299     v8::Handle<v8::Object> holder = info.Holder();
1300     TestObject* impl = V8TestObject::toNative(holder);
1301     v8SetReturnValueFast(info, WTF::getPtr(impl->readonlyWindowAttribute()), impl);
1302 }
1303
1304 static void readonlyWindowAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1305 {
1306     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1307     TestObjectV8Internal::readonlyWindowAttributeAttributeGetter(info);
1308     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1309 }
1310
1311 static void htmlCollectionAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
1312 {
1313     v8::Handle<v8::Object> holder = info.Holder();
1314     TestObject* impl = V8TestObject::toNative(holder);
1315     v8SetReturnValueFast(info, WTF::getPtr(impl->htmlCollectionAttribute()), impl);
1316 }
1317
1318 static void htmlCollectionAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1319 {
1320     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1321     TestObjectV8Internal::htmlCollectionAttributeAttributeGetter(info);
1322     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1323 }
1324
1325 static void htmlElementAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
1326 {
1327     v8::Handle<v8::Object> holder = info.Holder();
1328     TestObject* impl = V8TestObject::toNative(holder);
1329     v8SetReturnValueFast(info, WTF::getPtr(impl->htmlElementAttribute()), impl);
1330 }
1331
1332 static void htmlElementAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1333 {
1334     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1335     TestObjectV8Internal::htmlElementAttributeAttributeGetter(info);
1336     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1337 }
1338
1339 static void stringArrayAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
1340 {
1341     v8::Handle<v8::Object> holder = info.Holder();
1342     TestObject* impl = V8TestObject::toNative(holder);
1343     v8SetReturnValue(info, v8Array(impl->stringArrayAttribute(), info.GetIsolate()));
1344 }
1345
1346 static void stringArrayAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1347 {
1348     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1349     TestObjectV8Internal::stringArrayAttributeAttributeGetter(info);
1350     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1351 }
1352
1353 static void stringArrayAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
1354 {
1355     v8::Handle<v8::Object> holder = info.Holder();
1356     TestObject* impl = V8TestObject::toNative(holder);
1357     TONATIVE_VOID(Vector<String>, cppValue, toNativeArray<String>(v8Value, 0, info.GetIsolate()));
1358     impl->setStringArrayAttribute(cppValue);
1359 }
1360
1361 static void stringArrayAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
1362 {
1363     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1364     TestObjectV8Internal::stringArrayAttributeAttributeSetter(v8Value, info);
1365     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1366 }
1367
1368 static void testInterfaceEmptyArrayAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
1369 {
1370     v8::Handle<v8::Object> holder = info.Holder();
1371     TestObject* impl = V8TestObject::toNative(holder);
1372     v8SetReturnValue(info, v8Array(impl->testInterfaceEmptyArrayAttribute(), info.GetIsolate()));
1373 }
1374
1375 static void testInterfaceEmptyArrayAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1376 {
1377     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1378     TestObjectV8Internal::testInterfaceEmptyArrayAttributeAttributeGetter(info);
1379     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1380 }
1381
1382 static void testInterfaceEmptyArrayAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
1383 {
1384     v8::Handle<v8::Object> holder = info.Holder();
1385     TestObject* impl = V8TestObject::toNative(holder);
1386     TONATIVE_VOID(Vector<RefPtr<TestInterfaceEmpty> >, cppValue, (toRefPtrNativeArray<TestInterfaceEmpty, V8TestInterfaceEmpty>(v8Value, 0, info.GetIsolate())));
1387     impl->setTestInterfaceEmptyArrayAttribute(cppValue);
1388 }
1389
1390 static void testInterfaceEmptyArrayAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
1391 {
1392     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1393     TestObjectV8Internal::testInterfaceEmptyArrayAttributeAttributeSetter(v8Value, info);
1394     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1395 }
1396
1397 static void floatArrayAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
1398 {
1399     v8::Handle<v8::Object> holder = info.Holder();
1400     TestObject* impl = V8TestObject::toNative(holder);
1401     v8SetReturnValue(info, v8Array(impl->floatArrayAttribute(), info.GetIsolate()));
1402 }
1403
1404 static void floatArrayAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1405 {
1406     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1407     TestObjectV8Internal::floatArrayAttributeAttributeGetter(info);
1408     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1409 }
1410
1411 static void floatArrayAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
1412 {
1413     v8::Handle<v8::Object> holder = info.Holder();
1414     TestObject* impl = V8TestObject::toNative(holder);
1415     TONATIVE_VOID(Vector<float>, cppValue, toNativeArray<float>(v8Value, 0, info.GetIsolate()));
1416     impl->setFloatArrayAttribute(cppValue);
1417 }
1418
1419 static void floatArrayAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
1420 {
1421     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1422     TestObjectV8Internal::floatArrayAttributeAttributeSetter(v8Value, info);
1423     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1424 }
1425
1426 static void stringOrNullAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
1427 {
1428     v8::Handle<v8::Object> holder = info.Holder();
1429     TestObject* impl = V8TestObject::toNative(holder);
1430     bool isNull = false;
1431     String v8Value = impl->stringOrNullAttribute(isNull);
1432     if (isNull) {
1433         v8SetReturnValueNull(info);
1434         return;
1435     }
1436     v8SetReturnValueString(info, v8Value, info.GetIsolate());
1437 }
1438
1439 static void stringOrNullAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1440 {
1441     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1442     TestObjectV8Internal::stringOrNullAttributeAttributeGetter(info);
1443     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1444 }
1445
1446 static void stringOrNullAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
1447 {
1448     v8::Handle<v8::Object> holder = info.Holder();
1449     TestObject* impl = V8TestObject::toNative(holder);
1450     TOSTRING_VOID(V8StringResource<>, cppValue, v8Value);
1451     impl->setStringOrNullAttribute(cppValue);
1452 }
1453
1454 static void stringOrNullAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
1455 {
1456     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1457     TestObjectV8Internal::stringOrNullAttributeAttributeSetter(v8Value, info);
1458     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1459 }
1460
1461 static void longOrNullAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
1462 {
1463     v8::Handle<v8::Object> holder = info.Holder();
1464     TestObject* impl = V8TestObject::toNative(holder);
1465     bool isNull = false;
1466     int v8Value = impl->longOrNullAttribute(isNull);
1467     if (isNull) {
1468         v8SetReturnValueNull(info);
1469         return;
1470     }
1471     v8SetReturnValueInt(info, v8Value);
1472 }
1473
1474 static void longOrNullAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1475 {
1476     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1477     TestObjectV8Internal::longOrNullAttributeAttributeGetter(info);
1478     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1479 }
1480
1481 static void longOrNullAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
1482 {
1483     v8::Handle<v8::Object> holder = info.Holder();
1484     ExceptionState exceptionState(ExceptionState::SetterContext, "longOrNullAttribute", "TestObject", holder, info.GetIsolate());
1485     TestObject* impl = V8TestObject::toNative(holder);
1486     TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState), exceptionState);
1487     impl->setLongOrNullAttribute(cppValue);
1488 }
1489
1490 static void longOrNullAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
1491 {
1492     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1493     TestObjectV8Internal::longOrNullAttributeAttributeSetter(v8Value, info);
1494     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1495 }
1496
1497 static void testInterfaceOrNullAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
1498 {
1499     v8::Handle<v8::Object> holder = info.Holder();
1500     TestObject* impl = V8TestObject::toNative(holder);
1501     bool isNull = false;
1502     RefPtr<TestInterfaceImplementation> v8Value = impl->testInterfaceOrNullAttribute(isNull);
1503     if (isNull) {
1504         v8SetReturnValueNull(info);
1505         return;
1506     }
1507     v8SetReturnValueFast(info, WTF::getPtr(v8Value.release()), impl);
1508 }
1509
1510 static void testInterfaceOrNullAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1511 {
1512     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1513     TestObjectV8Internal::testInterfaceOrNullAttributeAttributeGetter(info);
1514     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1515 }
1516
1517 static void testInterfaceOrNullAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
1518 {
1519     v8::Handle<v8::Object> holder = info.Holder();
1520     TestObject* impl = V8TestObject::toNative(holder);
1521     TONATIVE_VOID(TestInterfaceImplementation*, cppValue, V8TestInterface::toNativeWithTypeCheck(info.GetIsolate(), v8Value));
1522     impl->setTestInterfaceOrNullAttribute(WTF::getPtr(cppValue));
1523 }
1524
1525 static void testInterfaceOrNullAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
1526 {
1527     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1528     TestObjectV8Internal::testInterfaceOrNullAttributeAttributeSetter(v8Value, info);
1529     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1530 }
1531
1532 static void testEnumAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
1533 {
1534     v8::Handle<v8::Object> holder = info.Holder();
1535     TestObject* impl = V8TestObject::toNative(holder);
1536     v8SetReturnValueString(info, impl->testEnumAttribute(), info.GetIsolate());
1537 }
1538
1539 static void testEnumAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1540 {
1541     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1542     TestObjectV8Internal::testEnumAttributeAttributeGetter(info);
1543     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1544 }
1545
1546 static void testEnumAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
1547 {
1548     v8::Handle<v8::Object> holder = info.Holder();
1549     TestObject* impl = V8TestObject::toNative(holder);
1550     TOSTRING_VOID(V8StringResource<>, cppValue, v8Value);
1551     String string = cppValue;
1552     if (!(string == "" || string == "EnumValue1" || string == "EnumValue2" || string == "EnumValue3"))
1553         return;
1554     impl->setTestEnumAttribute(cppValue);
1555 }
1556
1557 static void testEnumAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
1558 {
1559     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1560     TestObjectV8Internal::testEnumAttributeAttributeSetter(v8Value, info);
1561     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1562 }
1563
1564 static void staticStringAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
1565 {
1566     v8SetReturnValueString(info, TestObject::staticStringAttribute(), info.GetIsolate());
1567 }
1568
1569 static void staticStringAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1570 {
1571     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1572     TestObjectV8Internal::staticStringAttributeAttributeGetter(info);
1573     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1574 }
1575
1576 static void staticStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
1577 {
1578     TOSTRING_VOID(V8StringResource<>, cppValue, v8Value);
1579     TestObject::setStaticStringAttribute(cppValue);
1580 }
1581
1582 static void staticStringAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
1583 {
1584     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1585     TestObjectV8Internal::staticStringAttributeAttributeSetter(v8Value, info);
1586     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1587 }
1588
1589 static void staticLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
1590 {
1591     v8SetReturnValueInt(info, TestObject::staticLongAttribute());
1592 }
1593
1594 static void staticLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1595 {
1596     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1597     TestObjectV8Internal::staticLongAttributeAttributeGetter(info);
1598     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1599 }
1600
1601 static void staticLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
1602 {
1603     ExceptionState exceptionState(ExceptionState::SetterContext, "staticLongAttribute", "TestObject", holder, info.GetIsolate());
1604     TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState), exceptionState);
1605     TestObject::setStaticLongAttribute(cppValue);
1606 }
1607
1608 static void staticLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
1609 {
1610     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1611     TestObjectV8Internal::staticLongAttributeAttributeSetter(v8Value, info);
1612     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1613 }
1614
1615 static void eventHandlerAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
1616 {
1617     v8::Handle<v8::Object> holder = info.Holder();
1618     TestObject* impl = V8TestObject::toNative(holder);
1619     EventListener* v8Value = impl->eventHandlerAttribute();
1620     v8SetReturnValue(info, v8Value ? v8::Handle<v8::Value>(V8AbstractEventListener::cast(v8Value)->getListenerObject(impl->executionContext())) : v8::Handle<v8::Value>(v8::Null(info.GetIsolate())));
1621 }
1622
1623 static void eventHandlerAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1624 {
1625     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1626     TestObjectV8Internal::eventHandlerAttributeAttributeGetter(info);
1627     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1628 }
1629
1630 static void eventHandlerAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
1631 {
1632     v8::Handle<v8::Object> holder = info.Holder();
1633     TestObject* impl = V8TestObject::toNative(holder);
1634     moveEventListenerToNewWrapper(holder, impl->eventHandlerAttribute(), v8Value, V8TestObject::eventListenerCacheIndex, info.GetIsolate());
1635     impl->setEventHandlerAttribute(V8EventListenerList::getEventListener(v8Value, true, ListenerFindOrCreate));
1636 }
1637
1638 static void eventHandlerAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
1639 {
1640     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1641     TestObjectV8Internal::eventHandlerAttributeAttributeSetter(v8Value, info);
1642     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1643 }
1644
1645 static void activityLoggingAccessForAllWorldsLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
1646 {
1647     v8::Handle<v8::Object> holder = info.Holder();
1648     TestObject* impl = V8TestObject::toNative(holder);
1649     v8SetReturnValueInt(info, impl->activityLoggingAccessForAllWorldsLongAttribute());
1650 }
1651
1652 static void activityLoggingAccessForAllWorldsLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1653 {
1654     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1655     DOMWrapperWorld& world = DOMWrapperWorld::current(info.GetIsolate());
1656     if (world.activityLogger())
1657         world.activityLogger()->logGetter("TestObject.activityLoggingAccessForAllWorldsLongAttribute");
1658     TestObjectV8Internal::activityLoggingAccessForAllWorldsLongAttributeAttributeGetter(info);
1659     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1660 }
1661
1662 static void activityLoggingAccessForAllWorldsLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
1663 {
1664     v8::Handle<v8::Object> holder = info.Holder();
1665     ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggingAccessForAllWorldsLongAttribute", "TestObject", holder, info.GetIsolate());
1666     TestObject* impl = V8TestObject::toNative(holder);
1667     TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState), exceptionState);
1668     impl->setActivityLoggingAccessForAllWorldsLongAttribute(cppValue);
1669 }
1670
1671 static void activityLoggingAccessForAllWorldsLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
1672 {
1673     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1674     DOMWrapperWorld& world = DOMWrapperWorld::current(info.GetIsolate());
1675     if (world.activityLogger()) {
1676         world.activityLogger()->logSetter("TestObject.activityLoggingAccessForAllWorldsLongAttribute", v8Value);
1677     }
1678     TestObjectV8Internal::activityLoggingAccessForAllWorldsLongAttributeAttributeSetter(v8Value, info);
1679     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1680 }
1681
1682 static void activityLoggingGetterForAllWorldsLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
1683 {
1684     v8::Handle<v8::Object> holder = info.Holder();
1685     TestObject* impl = V8TestObject::toNative(holder);
1686     v8SetReturnValueInt(info, impl->activityLoggingGetterForAllWorldsLongAttribute());
1687 }
1688
1689 static void activityLoggingGetterForAllWorldsLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1690 {
1691     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1692     DOMWrapperWorld& world = DOMWrapperWorld::current(info.GetIsolate());
1693     if (world.activityLogger())
1694         world.activityLogger()->logGetter("TestObject.activityLoggingGetterForAllWorldsLongAttribute");
1695     TestObjectV8Internal::activityLoggingGetterForAllWorldsLongAttributeAttributeGetter(info);
1696     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1697 }
1698
1699 static void activityLoggingGetterForAllWorldsLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
1700 {
1701     v8::Handle<v8::Object> holder = info.Holder();
1702     ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggingGetterForAllWorldsLongAttribute", "TestObject", holder, info.GetIsolate());
1703     TestObject* impl = V8TestObject::toNative(holder);
1704     TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState), exceptionState);
1705     impl->setActivityLoggingGetterForAllWorldsLongAttribute(cppValue);
1706 }
1707
1708 static void activityLoggingGetterForAllWorldsLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
1709 {
1710     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1711     TestObjectV8Internal::activityLoggingGetterForAllWorldsLongAttributeAttributeSetter(v8Value, info);
1712     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1713 }
1714
1715 static void activityLoggingSetterForAllWorldsLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
1716 {
1717     v8::Handle<v8::Object> holder = info.Holder();
1718     TestObject* impl = V8TestObject::toNative(holder);
1719     v8SetReturnValueInt(info, impl->activityLoggingSetterForAllWorldsLongAttribute());
1720 }
1721
1722 static void activityLoggingSetterForAllWorldsLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1723 {
1724     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1725     TestObjectV8Internal::activityLoggingSetterForAllWorldsLongAttributeAttributeGetter(info);
1726     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1727 }
1728
1729 static void activityLoggingSetterForAllWorldsLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
1730 {
1731     v8::Handle<v8::Object> holder = info.Holder();
1732     ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggingSetterForAllWorldsLongAttribute", "TestObject", holder, info.GetIsolate());
1733     TestObject* impl = V8TestObject::toNative(holder);
1734     TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState), exceptionState);
1735     impl->setActivityLoggingSetterForAllWorldsLongAttribute(cppValue);
1736 }
1737
1738 static void activityLoggingSetterForAllWorldsLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
1739 {
1740     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1741     DOMWrapperWorld& world = DOMWrapperWorld::current(info.GetIsolate());
1742     if (world.activityLogger()) {
1743         world.activityLogger()->logSetter("TestObject.activityLoggingSetterForAllWorldsLongAttribute", v8Value);
1744     }
1745     TestObjectV8Internal::activityLoggingSetterForAllWorldsLongAttributeAttributeSetter(v8Value, info);
1746     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1747 }
1748
1749 static void cachedAttributeAnyAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
1750 {
1751     v8::Handle<v8::Object> holder = info.Holder();
1752     v8::Handle<v8::String> propertyName = v8AtomicString(info.GetIsolate(), "cachedAttributeAnyAttribute");
1753     TestObject* impl = V8TestObject::toNative(holder);
1754     if (!impl->isValueDirty()) {
1755         v8::Handle<v8::Value> v8Value = V8HiddenValue::getHiddenValue(info.GetIsolate(), holder, propertyName);
1756         if (!v8Value.IsEmpty()) {
1757             v8SetReturnValue(info, v8Value);
1758             return;
1759         }
1760     }
1761     ScriptValue v8Value = impl->cachedAttributeAnyAttribute();
1762     V8HiddenValue::setHiddenValue(info.GetIsolate(), holder, propertyName, v8Value.v8Value());
1763     v8SetReturnValue(info, v8Value.v8Value());
1764 }
1765
1766 static void cachedAttributeAnyAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1767 {
1768     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1769     TestObjectV8Internal::cachedAttributeAnyAttributeAttributeGetter(info);
1770     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1771 }
1772
1773 static void cachedAttributeAnyAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
1774 {
1775     v8::Handle<v8::Object> holder = info.Holder();
1776     TestObject* impl = V8TestObject::toNative(holder);
1777     TONATIVE_VOID(ScriptValue, cppValue, ScriptValue(ScriptState::current(info.GetIsolate()), v8Value));
1778     impl->setCachedAttributeAnyAttribute(cppValue);
1779     V8HiddenValue::deleteHiddenValue(info.GetIsolate(), holder, v8AtomicString(info.GetIsolate(), "cachedAttributeAnyAttribute")); // Invalidate the cached value.
1780 }
1781
1782 static void cachedAttributeAnyAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
1783 {
1784     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1785     TestObjectV8Internal::cachedAttributeAnyAttributeAttributeSetter(v8Value, info);
1786     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1787 }
1788
1789 static void callWithExecutionContextAnyAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
1790 {
1791     v8::Handle<v8::Object> holder = info.Holder();
1792     TestObject* impl = V8TestObject::toNative(holder);
1793     ExecutionContext* scriptContext = currentExecutionContext(info.GetIsolate());
1794     v8SetReturnValue(info, impl->callWithExecutionContextAnyAttribute(scriptContext).v8Value());
1795 }
1796
1797 static void callWithExecutionContextAnyAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1798 {
1799     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1800     TestObjectV8Internal::callWithExecutionContextAnyAttributeAttributeGetter(info);
1801     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1802 }
1803
1804 static void callWithExecutionContextAnyAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
1805 {
1806     v8::Handle<v8::Object> holder = info.Holder();
1807     TestObject* impl = V8TestObject::toNative(holder);
1808     TONATIVE_VOID(ScriptValue, cppValue, ScriptValue(ScriptState::current(info.GetIsolate()), v8Value));
1809     ExecutionContext* scriptContext = currentExecutionContext(info.GetIsolate());
1810     impl->setCallWithExecutionContextAnyAttribute(scriptContext, cppValue);
1811 }
1812
1813 static void callWithExecutionContextAnyAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
1814 {
1815     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1816     TestObjectV8Internal::callWithExecutionContextAnyAttributeAttributeSetter(v8Value, info);
1817     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1818 }
1819
1820 static void callWithScriptStateAnyAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
1821 {
1822     v8::Handle<v8::Object> holder = info.Holder();
1823     TestObject* impl = V8TestObject::toNative(holder);
1824     ScriptState* state = ScriptState::current(info.GetIsolate());
1825     v8SetReturnValue(info, impl->callWithScriptStateAnyAttribute(state).v8Value());
1826 }
1827
1828 static void callWithScriptStateAnyAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1829 {
1830     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1831     TestObjectV8Internal::callWithScriptStateAnyAttributeAttributeGetter(info);
1832     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1833 }
1834
1835 static void callWithScriptStateAnyAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
1836 {
1837     v8::Handle<v8::Object> holder = info.Holder();
1838     TestObject* impl = V8TestObject::toNative(holder);
1839     TONATIVE_VOID(ScriptValue, cppValue, ScriptValue(ScriptState::current(info.GetIsolate()), v8Value));
1840     impl->setCallWithScriptStateAnyAttribute(state, cppValue);
1841 }
1842
1843 static void callWithScriptStateAnyAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
1844 {
1845     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1846     TestObjectV8Internal::callWithScriptStateAnyAttributeAttributeSetter(v8Value, info);
1847     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1848 }
1849
1850 static void callWithExecutionContextAndScriptStateAnyAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
1851 {
1852     v8::Handle<v8::Object> holder = info.Holder();
1853     TestObject* impl = V8TestObject::toNative(holder);
1854     ExecutionContext* scriptContext = currentExecutionContext(info.GetIsolate());
1855     ScriptState* state = ScriptState::current(info.GetIsolate());
1856     v8SetReturnValue(info, impl->callWithExecutionContextAndScriptStateAnyAttribute(state, scriptContext).v8Value());
1857 }
1858
1859 static void callWithExecutionContextAndScriptStateAnyAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1860 {
1861     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1862     TestObjectV8Internal::callWithExecutionContextAndScriptStateAnyAttributeAttributeGetter(info);
1863     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1864 }
1865
1866 static void callWithExecutionContextAndScriptStateAnyAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
1867 {
1868     v8::Handle<v8::Object> holder = info.Holder();
1869     TestObject* impl = V8TestObject::toNative(holder);
1870     TONATIVE_VOID(ScriptValue, cppValue, ScriptValue(ScriptState::current(info.GetIsolate()), v8Value));
1871     ExecutionContext* scriptContext = currentExecutionContext(info.GetIsolate());
1872     impl->setCallWithExecutionContextAndScriptStateAnyAttribute(state, scriptContext, cppValue);
1873 }
1874
1875 static void callWithExecutionContextAndScriptStateAnyAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
1876 {
1877     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1878     TestObjectV8Internal::callWithExecutionContextAndScriptStateAnyAttributeAttributeSetter(v8Value, info);
1879     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1880 }
1881
1882 static void checkSecurityForNodeReadonlyDocumentAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
1883 {
1884     v8::Handle<v8::Object> holder = info.Holder();
1885     TestObject* impl = V8TestObject::toNative(holder);
1886     ExceptionState exceptionState(ExceptionState::GetterContext, "checkSecurityForNodeReadonlyDocumentAttribute", "TestObject", holder, info.GetIsolate());
1887     if (!BindingSecurity::shouldAllowAccessToNode(info.GetIsolate(), impl->checkSecurityForNodeReadonlyDocumentAttribute(), exceptionState)) {
1888         v8SetReturnValueNull(info);
1889         exceptionState.throwIfNeeded();
1890         return;
1891     }
1892     v8SetReturnValueFast(info, WTF::getPtr(impl->checkSecurityForNodeReadonlyDocumentAttribute()), impl);
1893 }
1894
1895 static void checkSecurityForNodeReadonlyDocumentAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1896 {
1897     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1898     TestObjectV8Internal::checkSecurityForNodeReadonlyDocumentAttributeAttributeGetter(info);
1899     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1900 }
1901
1902 #if ENABLE(CONDITION)
1903 static void conditionalLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
1904 {
1905     v8::Handle<v8::Object> holder = info.Holder();
1906     TestObject* impl = V8TestObject::toNative(holder);
1907     v8SetReturnValueInt(info, impl->conditionalLongAttribute());
1908 }
1909 #endif // ENABLE(CONDITION)
1910
1911 #if ENABLE(CONDITION)
1912 static void conditionalLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1913 {
1914     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1915     TestObjectV8Internal::conditionalLongAttributeAttributeGetter(info);
1916     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1917 }
1918 #endif // ENABLE(CONDITION)
1919
1920 #if ENABLE(CONDITION)
1921 static void conditionalLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
1922 {
1923     v8::Handle<v8::Object> holder = info.Holder();
1924     ExceptionState exceptionState(ExceptionState::SetterContext, "conditionalLongAttribute", "TestObject", holder, info.GetIsolate());
1925     TestObject* impl = V8TestObject::toNative(holder);
1926     TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState), exceptionState);
1927     impl->setConditionalLongAttribute(cppValue);
1928 }
1929 #endif // ENABLE(CONDITION)
1930
1931 #if ENABLE(CONDITION)
1932 static void conditionalLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
1933 {
1934     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1935     TestObjectV8Internal::conditionalLongAttributeAttributeSetter(v8Value, info);
1936     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1937 }
1938 #endif // ENABLE(CONDITION)
1939
1940 #if ENABLE(CONDITION_1) && ENABLE(CONDITION_2)
1941 static void conditionalAndLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
1942 {
1943     v8::Handle<v8::Object> holder = info.Holder();
1944     TestObject* impl = V8TestObject::toNative(holder);
1945     v8SetReturnValueInt(info, impl->conditionalAndLongAttribute());
1946 }
1947 #endif // ENABLE(CONDITION_1) && ENABLE(CONDITION_2)
1948
1949 #if ENABLE(CONDITION_1) && ENABLE(CONDITION_2)
1950 static void conditionalAndLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1951 {
1952     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1953     TestObjectV8Internal::conditionalAndLongAttributeAttributeGetter(info);
1954     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1955 }
1956 #endif // ENABLE(CONDITION_1) && ENABLE(CONDITION_2)
1957
1958 #if ENABLE(CONDITION_1) && ENABLE(CONDITION_2)
1959 static void conditionalAndLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
1960 {
1961     v8::Handle<v8::Object> holder = info.Holder();
1962     ExceptionState exceptionState(ExceptionState::SetterContext, "conditionalAndLongAttribute", "TestObject", holder, info.GetIsolate());
1963     TestObject* impl = V8TestObject::toNative(holder);
1964     TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState), exceptionState);
1965     impl->setConditionalAndLongAttribute(cppValue);
1966 }
1967 #endif // ENABLE(CONDITION_1) && ENABLE(CONDITION_2)
1968
1969 #if ENABLE(CONDITION_1) && ENABLE(CONDITION_2)
1970 static void conditionalAndLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
1971 {
1972     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1973     TestObjectV8Internal::conditionalAndLongAttributeAttributeSetter(v8Value, info);
1974     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1975 }
1976 #endif // ENABLE(CONDITION_1) && ENABLE(CONDITION_2)
1977
1978 #if ENABLE(CONDITION_1) || ENABLE(CONDITION_2)
1979 static void conditionalOrLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
1980 {
1981     v8::Handle<v8::Object> holder = info.Holder();
1982     TestObject* impl = V8TestObject::toNative(holder);
1983     v8SetReturnValueInt(info, impl->conditionalOrLongAttribute());
1984 }
1985 #endif // ENABLE(CONDITION_1) || ENABLE(CONDITION_2)
1986
1987 #if ENABLE(CONDITION_1) || ENABLE(CONDITION_2)
1988 static void conditionalOrLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1989 {
1990     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1991     TestObjectV8Internal::conditionalOrLongAttributeAttributeGetter(info);
1992     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1993 }
1994 #endif // ENABLE(CONDITION_1) || ENABLE(CONDITION_2)
1995
1996 #if ENABLE(CONDITION_1) || ENABLE(CONDITION_2)
1997 static void conditionalOrLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
1998 {
1999     v8::Handle<v8::Object> holder = info.Holder();
2000     ExceptionState exceptionState(ExceptionState::SetterContext, "conditionalOrLongAttribute", "TestObject", holder, info.GetIsolate());
2001     TestObject* impl = V8TestObject::toNative(holder);
2002     TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState), exceptionState);
2003     impl->setConditionalOrLongAttribute(cppValue);
2004 }
2005 #endif // ENABLE(CONDITION_1) || ENABLE(CONDITION_2)
2006
2007 #if ENABLE(CONDITION_1) || ENABLE(CONDITION_2)
2008 static void conditionalOrLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
2009 {
2010     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2011     TestObjectV8Internal::conditionalOrLongAttributeAttributeSetter(v8Value, info);
2012     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2013 }
2014 #endif // ENABLE(CONDITION_1) || ENABLE(CONDITION_2)
2015
2016 static void customObjectAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2017 {
2018     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2019     V8TestObject::customObjectAttributeAttributeGetterCustom(info);
2020     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2021 }
2022
2023 static void customObjectAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
2024 {
2025     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2026     V8TestObject::customObjectAttributeAttributeSetterCustom(v8Value, info);
2027     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2028 }
2029
2030 static void customGetterLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2031 {
2032     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2033     V8TestObject::customGetterLongAttributeAttributeGetterCustom(info);
2034     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2035 }
2036
2037 static void customGetterLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
2038 {
2039     v8::Handle<v8::Object> holder = info.Holder();
2040     ExceptionState exceptionState(ExceptionState::SetterContext, "customGetterLongAttribute", "TestObject", holder, info.GetIsolate());
2041     TestObject* impl = V8TestObject::toNative(holder);
2042     TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState), exceptionState);
2043     impl->setCustomGetterLongAttribute(cppValue);
2044 }
2045
2046 static void customGetterLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
2047 {
2048     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2049     TestObjectV8Internal::customGetterLongAttributeAttributeSetter(v8Value, info);
2050     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2051 }
2052
2053 static void customGetterReadonlyObjectAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2054 {
2055     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2056     V8TestObject::customGetterReadonlyObjectAttributeAttributeGetterCustom(info);
2057     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2058 }
2059
2060 static void customSetterLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
2061 {
2062     v8::Handle<v8::Object> holder = info.Holder();
2063     TestObject* impl = V8TestObject::toNative(holder);
2064     v8SetReturnValueInt(info, impl->customSetterLongAttribute());
2065 }
2066
2067 static void customSetterLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2068 {
2069     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2070     TestObjectV8Internal::customSetterLongAttributeAttributeGetter(info);
2071     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2072 }
2073
2074 static void customSetterLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
2075 {
2076     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2077     V8TestObject::customSetterLongAttributeAttributeSetterCustom(v8Value, info);
2078     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2079 }
2080
2081 #if ENABLE(CONDITION)
2082 static void customLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2083 {
2084     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2085     V8TestObject::customLongAttributeAttributeGetterCustom(info);
2086     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2087 }
2088 #endif // ENABLE(CONDITION)
2089
2090 #if ENABLE(CONDITION)
2091 static void customLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
2092 {
2093     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2094     V8TestObject::customLongAttributeAttributeSetterCustom(v8Value, info);
2095     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2096 }
2097 #endif // ENABLE(CONDITION)
2098
2099 static void customElementsCallbacksReadonlyLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
2100 {
2101     v8::Handle<v8::Object> holder = info.Holder();
2102     TestObject* impl = V8TestObject::toNative(holder);
2103     v8SetReturnValueInt(info, impl->customElementsCallbacksReadonlyLongAttribute());
2104 }
2105
2106 static void customElementsCallbacksReadonlyLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2107 {
2108     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2109     TestObjectV8Internal::customElementsCallbacksReadonlyLongAttributeAttributeGetter(info);
2110     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2111 }
2112
2113 static void deprecatedLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
2114 {
2115     v8::Handle<v8::Object> holder = info.Holder();
2116     TestObject* impl = V8TestObject::toNative(holder);
2117     v8SetReturnValueInt(info, impl->deprecatedLongAttribute());
2118 }
2119
2120 static void deprecatedLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2121 {
2122     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2123     UseCounter::countDeprecation(callingExecutionContext(info.GetIsolate()), UseCounter::LongAttribute);
2124     TestObjectV8Internal::deprecatedLongAttributeAttributeGetter(info);
2125     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2126 }
2127
2128 static void deprecatedLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
2129 {
2130     v8::Handle<v8::Object> holder = info.Holder();
2131     ExceptionState exceptionState(ExceptionState::SetterContext, "deprecatedLongAttribute", "TestObject", holder, info.GetIsolate());
2132     TestObject* impl = V8TestObject::toNative(holder);
2133     TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState), exceptionState);
2134     impl->setDeprecatedLongAttribute(cppValue);
2135 }
2136
2137 static void deprecatedLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
2138 {
2139     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2140     UseCounter::countDeprecation(callingExecutionContext(info.GetIsolate()), UseCounter::LongAttribute);
2141     TestObjectV8Internal::deprecatedLongAttributeAttributeSetter(v8Value, info);
2142     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2143 }
2144
2145 static void enforceRangeLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
2146 {
2147     v8::Handle<v8::Object> holder = info.Holder();
2148     TestObject* impl = V8TestObject::toNative(holder);
2149     v8SetReturnValueInt(info, impl->enforceRangeLongAttribute());
2150 }
2151
2152 static void enforceRangeLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2153 {
2154     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2155     TestObjectV8Internal::enforceRangeLongAttributeAttributeGetter(info);
2156     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2157 }
2158
2159 static void enforceRangeLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
2160 {
2161     v8::Handle<v8::Object> holder = info.Holder();
2162     ExceptionState exceptionState(ExceptionState::SetterContext, "enforceRangeLongAttribute", "TestObject", holder, info.GetIsolate());
2163     TestObject* impl = V8TestObject::toNative(holder);
2164     TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, EnforceRange, exceptionState), exceptionState);
2165     impl->setEnforceRangeLongAttribute(cppValue);
2166 }
2167
2168 static void enforceRangeLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
2169 {
2170     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2171     TestObjectV8Internal::enforceRangeLongAttributeAttributeSetter(v8Value, info);
2172     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2173 }
2174
2175 static void exposeJSAccessorsLongAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
2176 {
2177     v8::Handle<v8::Object> holder = info.Holder();
2178     TestObject* impl = V8TestObject::toNative(holder);
2179     v8SetReturnValueInt(info, impl->exposeJSAccessorsLongAttribute());
2180 }
2181
2182 static void exposeJSAccessorsLongAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
2183 {
2184     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2185     TestObjectV8Internal::exposeJSAccessorsLongAttributeAttributeGetter(info);
2186     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2187 }
2188
2189 static void exposeJSAccessorsLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
2190 {
2191     v8::Handle<v8::Object> holder = info.Holder();
2192     ExceptionState exceptionState(ExceptionState::SetterContext, "exposeJSAccessorsLongAttribute", "TestObject", holder, info.GetIsolate());
2193     TestObject* impl = V8TestObject::toNative(holder);
2194     TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState), exceptionState);
2195     impl->setExposeJSAccessorsLongAttribute(cppValue);
2196 }
2197
2198 static void exposeJSAccessorsLongAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
2199 {
2200     v8::Local<v8::Value> v8Value = info[0];
2201     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2202     TestObjectV8Internal::exposeJSAccessorsLongAttributeAttributeSetter(v8Value, info);
2203     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2204 }
2205
2206 static void implementedAsLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
2207 {
2208     v8::Handle<v8::Object> holder = info.Holder();
2209     TestObject* impl = V8TestObject::toNative(holder);
2210     v8SetReturnValueInt(info, impl->implementedAsName());
2211 }
2212
2213 static void implementedAsLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2214 {
2215     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2216     TestObjectV8Internal::implementedAsLongAttributeAttributeGetter(info);
2217     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2218 }
2219
2220 static void implementedAsLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
2221 {
2222     v8::Handle<v8::Object> holder = info.Holder();
2223     ExceptionState exceptionState(ExceptionState::SetterContext, "implementedAsLongAttribute", "TestObject", holder, info.GetIsolate());
2224     TestObject* impl = V8TestObject::toNative(holder);
2225     TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState), exceptionState);
2226     impl->setImplementedAsName(cppValue);
2227 }
2228
2229 static void implementedAsLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
2230 {
2231     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2232     TestObjectV8Internal::implementedAsLongAttributeAttributeSetter(v8Value, info);
2233     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2234 }
2235
2236 static void customImplementedAsLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2237 {
2238     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2239     V8TestObject::customImplementedAsLongAttributeAttributeGetterCustom(info);
2240     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2241 }
2242
2243 static void customImplementedAsLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
2244 {
2245     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2246     V8TestObject::customImplementedAsLongAttributeAttributeSetterCustom(v8Value, info);
2247     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2248 }
2249
2250 static void customGetterImplementedAsLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2251 {
2252     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2253     V8TestObject::customGetterImplementedAsLongAttributeAttributeGetterCustom(info);
2254     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2255 }
2256
2257 static void customGetterImplementedAsLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
2258 {
2259     v8::Handle<v8::Object> holder = info.Holder();
2260     ExceptionState exceptionState(ExceptionState::SetterContext, "customGetterImplementedAsLongAttribute", "TestObject", holder, info.GetIsolate());
2261     TestObject* impl = V8TestObject::toNative(holder);
2262     TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState), exceptionState);
2263     impl->setImplementedAsNameWithCustomGetter(cppValue);
2264 }
2265
2266 static void customGetterImplementedAsLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
2267 {
2268     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2269     TestObjectV8Internal::customGetterImplementedAsLongAttributeAttributeSetter(v8Value, info);
2270     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2271 }
2272
2273 static void customSetterImplementedAsLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
2274 {
2275     v8::Handle<v8::Object> holder = info.Holder();
2276     TestObject* impl = V8TestObject::toNative(holder);
2277     v8SetReturnValueInt(info, impl->implementedAsNameWithCustomGetter());
2278 }
2279
2280 static void customSetterImplementedAsLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2281 {
2282     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2283     TestObjectV8Internal::customSetterImplementedAsLongAttributeAttributeGetter(info);
2284     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2285 }
2286
2287 static void customSetterImplementedAsLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
2288 {
2289     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2290     V8TestObject::customSetterImplementedAsLongAttributeAttributeSetterCustom(v8Value, info);
2291     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2292 }
2293
2294 static void measureAsLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
2295 {
2296     v8::Handle<v8::Object> holder = info.Holder();
2297     TestObject* impl = V8TestObject::toNative(holder);
2298     v8SetReturnValueInt(info, impl->measureAsLongAttribute());
2299 }
2300
2301 static void measureAsLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2302 {
2303     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2304     UseCounter::count(callingExecutionContext(info.GetIsolate()), UseCounter::TestFeature);
2305     TestObjectV8Internal::measureAsLongAttributeAttributeGetter(info);
2306     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2307 }
2308
2309 static void measureAsLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
2310 {
2311     v8::Handle<v8::Object> holder = info.Holder();
2312     ExceptionState exceptionState(ExceptionState::SetterContext, "measureAsLongAttribute", "TestObject", holder, info.GetIsolate());
2313     TestObject* impl = V8TestObject::toNative(holder);
2314     TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState), exceptionState);
2315     impl->setMeasureAsLongAttribute(cppValue);
2316 }
2317
2318 static void measureAsLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
2319 {
2320     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2321     UseCounter::count(callingExecutionContext(info.GetIsolate()), UseCounter::TestFeature);
2322     TestObjectV8Internal::measureAsLongAttributeAttributeSetter(v8Value, info);
2323     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2324 }
2325
2326 static void notEnumerableLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
2327 {
2328     v8::Handle<v8::Object> holder = info.Holder();
2329     TestObject* impl = V8TestObject::toNative(holder);
2330     v8SetReturnValueInt(info, impl->notEnumerableLongAttribute());
2331 }
2332
2333 static void notEnumerableLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2334 {
2335     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2336     TestObjectV8Internal::notEnumerableLongAttributeAttributeGetter(info);
2337     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2338 }
2339
2340 static void notEnumerableLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
2341 {
2342     v8::Handle<v8::Object> holder = info.Holder();
2343     ExceptionState exceptionState(ExceptionState::SetterContext, "notEnumerableLongAttribute", "TestObject", holder, info.GetIsolate());
2344     TestObject* impl = V8TestObject::toNative(holder);
2345     TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState), exceptionState);
2346     impl->setNotEnumerableLongAttribute(cppValue);
2347 }
2348
2349 static void notEnumerableLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
2350 {
2351     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2352     TestObjectV8Internal::notEnumerableLongAttributeAttributeSetter(v8Value, info);
2353     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2354 }
2355
2356 static void perContextEnabledLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
2357 {
2358     v8::Handle<v8::Object> holder = info.Holder();
2359     TestObject* impl = V8TestObject::toNative(holder);
2360     v8SetReturnValueInt(info, impl->perContextEnabledLongAttribute());
2361 }
2362
2363 static void perContextEnabledLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2364 {
2365     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2366     TestObjectV8Internal::perContextEnabledLongAttributeAttributeGetter(info);
2367     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2368 }
2369
2370 static void perContextEnabledLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
2371 {
2372     v8::Handle<v8::Object> holder = info.Holder();
2373     ExceptionState exceptionState(ExceptionState::SetterContext, "perContextEnabledLongAttribute", "TestObject", holder, info.GetIsolate());
2374     TestObject* impl = V8TestObject::toNative(holder);
2375     TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState), exceptionState);
2376     impl->setPerContextEnabledLongAttribute(cppValue);
2377 }
2378
2379 static void perContextEnabledLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
2380 {
2381     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2382     TestObjectV8Internal::perContextEnabledLongAttributeAttributeSetter(v8Value, info);
2383     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2384 }
2385
2386 static void perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
2387 {
2388     v8::Handle<v8::Object> holder = info.Holder();
2389     TestObject* impl = V8TestObject::toNative(holder);
2390     RefPtr<TestInterfaceEmpty> result(impl->perWorldBindingsReadonlyTestInterfaceEmptyAttribute());
2391     if (result && DOMDataStore::setReturnValueFromWrapper<V8TestInterfaceEmpty>(info.GetReturnValue(), result.get()))
2392         return;
2393     v8::Handle<v8::Value> wrapper = toV8(result.get(), holder, info.GetIsolate());
2394     if (!wrapper.IsEmpty()) {
2395         V8HiddenValue::setHiddenValue(info.GetIsolate(), holder, v8AtomicString(info.GetIsolate(), "perWorldBindingsReadonlyTestInterfaceEmptyAttribute"), wrapper);
2396         v8SetReturnValue(info, wrapper);
2397     }
2398 }
2399
2400 static void perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2401 {
2402     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2403     TestObjectV8Internal::perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetter(info);
2404     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2405 }
2406
2407 static void perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetterForMainWorld(const v8::PropertyCallbackInfo<v8::Value>& info)
2408 {
2409     v8::Handle<v8::Object> holder = info.Holder();
2410     TestObject* impl = V8TestObject::toNative(holder);
2411     RefPtr<TestInterfaceEmpty> result(impl->perWorldBindingsReadonlyTestInterfaceEmptyAttribute());
2412     if (result && DOMDataStore::setReturnValueFromWrapperForMainWorld<V8TestInterfaceEmpty>(info.GetReturnValue(), result.get()))
2413         return;
2414     v8::Handle<v8::Value> wrapper = toV8(result.get(), holder, info.GetIsolate());
2415     if (!wrapper.IsEmpty()) {
2416         V8HiddenValue::setHiddenValue(info.GetIsolate(), holder, v8AtomicString(info.GetIsolate(), "perWorldBindingsReadonlyTestInterfaceEmptyAttribute"), wrapper);
2417         v8SetReturnValue(info, wrapper);
2418     }
2419 }
2420
2421 static void perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetterCallbackForMainWorld(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2422 {
2423     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2424     TestObjectV8Internal::perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetterForMainWorld(info);
2425     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2426 }
2427
2428 static void activityLoggingAccessPerWorldBindingsLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
2429 {
2430     v8::Handle<v8::Object> holder = info.Holder();
2431     TestObject* impl = V8TestObject::toNative(holder);
2432     v8SetReturnValueInt(info, impl->activityLoggingAccessPerWorldBindingsLongAttribute());
2433 }
2434
2435 static void activityLoggingAccessPerWorldBindingsLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2436 {
2437     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2438     DOMWrapperWorld& world = DOMWrapperWorld::current(info.GetIsolate());
2439     if (world.activityLogger())
2440         world.activityLogger()->logGetter("TestObject.activityLoggingAccessPerWorldBindingsLongAttribute");
2441     TestObjectV8Internal::activityLoggingAccessPerWorldBindingsLongAttributeAttributeGetter(info);
2442     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2443 }
2444
2445 static void activityLoggingAccessPerWorldBindingsLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
2446 {
2447     v8::Handle<v8::Object> holder = info.Holder();
2448     ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggingAccessPerWorldBindingsLongAttribute", "TestObject", holder, info.GetIsolate());
2449     TestObject* impl = V8TestObject::toNative(holder);
2450     TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState), exceptionState);
2451     impl->setActivityLoggingAccessPerWorldBindingsLongAttribute(cppValue);
2452 }
2453
2454 static void activityLoggingAccessPerWorldBindingsLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
2455 {
2456     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2457     DOMWrapperWorld& world = DOMWrapperWorld::current(info.GetIsolate());
2458     if (world.activityLogger()) {
2459         world.activityLogger()->logSetter("TestObject.activityLoggingAccessPerWorldBindingsLongAttribute", v8Value);
2460     }
2461     TestObjectV8Internal::activityLoggingAccessPerWorldBindingsLongAttributeAttributeSetter(v8Value, info);
2462     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2463 }
2464
2465 static void activityLoggingAccessPerWorldBindingsLongAttributeAttributeGetterForMainWorld(const v8::PropertyCallbackInfo<v8::Value>& info)
2466 {
2467     v8::Handle<v8::Object> holder = info.Holder();
2468     TestObject* impl = V8TestObject::toNative(holder);
2469     v8SetReturnValueInt(info, impl->activityLoggingAccessPerWorldBindingsLongAttribute());
2470 }
2471
2472 static void activityLoggingAccessPerWorldBindingsLongAttributeAttributeGetterCallbackForMainWorld(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2473 {
2474     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2475     DOMWrapperWorld& world = DOMWrapperWorld::current(info.GetIsolate());
2476     if (world.activityLogger())
2477         world.activityLogger()->logGetter("TestObject.activityLoggingAccessPerWorldBindingsLongAttribute");
2478     TestObjectV8Internal::activityLoggingAccessPerWorldBindingsLongAttributeAttributeGetterForMainWorld(info);
2479     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2480 }
2481
2482 static void activityLoggingAccessPerWorldBindingsLongAttributeAttributeSetterForMainWorld(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
2483 {
2484     v8::Handle<v8::Object> holder = info.Holder();
2485     ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggingAccessPerWorldBindingsLongAttribute", "TestObject", holder, info.GetIsolate());
2486     TestObject* impl = V8TestObject::toNative(holder);
2487     TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState), exceptionState);
2488     impl->setActivityLoggingAccessPerWorldBindingsLongAttribute(cppValue);
2489 }
2490
2491 static void activityLoggingAccessPerWorldBindingsLongAttributeAttributeSetterCallbackForMainWorld(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
2492 {
2493     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2494     DOMWrapperWorld& world = DOMWrapperWorld::current(info.GetIsolate());
2495     if (world.activityLogger()) {
2496         world.activityLogger()->logSetter("TestObject.activityLoggingAccessPerWorldBindingsLongAttribute", v8Value);
2497     }
2498     TestObjectV8Internal::activityLoggingAccessPerWorldBindingsLongAttributeAttributeSetterForMainWorld(v8Value, info);
2499     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2500 }
2501
2502 static void activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
2503 {
2504     v8::Handle<v8::Object> holder = info.Holder();
2505     TestObject* impl = V8TestObject::toNative(holder);
2506     v8SetReturnValueInt(info, impl->activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttribute());
2507 }
2508
2509 static void activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2510 {
2511     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2512     DOMWrapperWorld& world = DOMWrapperWorld::current(info.GetIsolate());
2513     if (world.activityLogger())
2514         world.activityLogger()->logGetter("TestObject.activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttribute");
2515     TestObjectV8Internal::activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeAttributeGetter(info);
2516     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2517 }
2518
2519 static void activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
2520 {
2521     v8::Handle<v8::Object> holder = info.Holder();
2522     ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttribute", "TestObject", holder, info.GetIsolate());
2523     TestObject* impl = V8TestObject::toNative(holder);
2524     TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState), exceptionState);
2525     impl->setActivityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttribute(cppValue);
2526 }
2527
2528 static void activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
2529 {
2530     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2531     DOMWrapperWorld& world = DOMWrapperWorld::current(info.GetIsolate());
2532     if (world.activityLogger()) {
2533         world.activityLogger()->logSetter("TestObject.activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttribute", v8Value);
2534     }
2535     TestObjectV8Internal::activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeAttributeSetter(v8Value, info);
2536     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2537 }
2538
2539 static void activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeAttributeGetterForMainWorld(const v8::PropertyCallbackInfo<v8::Value>& info)
2540 {
2541     v8::Handle<v8::Object> holder = info.Holder();
2542     TestObject* impl = V8TestObject::toNative(holder);
2543     v8SetReturnValueInt(info, impl->activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttribute());
2544 }
2545
2546 static void activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeAttributeGetterCallbackForMainWorld(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2547 {
2548     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2549     TestObjectV8Internal::activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeAttributeGetterForMainWorld(info);
2550     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2551 }
2552
2553 static void activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeAttributeSetterForMainWorld(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
2554 {
2555     v8::Handle<v8::Object> holder = info.Holder();
2556     ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttribute", "TestObject", holder, info.GetIsolate());
2557     TestObject* impl = V8TestObject::toNative(holder);
2558     TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState), exceptionState);
2559     impl->setActivityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttribute(cppValue);
2560 }
2561
2562 static void activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeAttributeSetterCallbackForMainWorld(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
2563 {
2564     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2565     TestObjectV8Internal::activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeAttributeSetterForMainWorld(v8Value, info);
2566     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2567 }
2568
2569 static void activityLoggingGetterPerWorldBindingsLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
2570 {
2571     v8::Handle<v8::Object> holder = info.Holder();
2572     TestObject* impl = V8TestObject::toNative(holder);
2573     v8SetReturnValueInt(info, impl->activityLoggingGetterPerWorldBindingsLongAttribute());
2574 }
2575
2576 static void activityLoggingGetterPerWorldBindingsLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2577 {
2578     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2579     DOMWrapperWorld& world = DOMWrapperWorld::current(info.GetIsolate());
2580     if (world.activityLogger())
2581         world.activityLogger()->logGetter("TestObject.activityLoggingGetterPerWorldBindingsLongAttribute");
2582     TestObjectV8Internal::activityLoggingGetterPerWorldBindingsLongAttributeAttributeGetter(info);
2583     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2584 }
2585
2586 static void activityLoggingGetterPerWorldBindingsLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
2587 {
2588     v8::Handle<v8::Object> holder = info.Holder();
2589     ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggingGetterPerWorldBindingsLongAttribute", "TestObject", holder, info.GetIsolate());
2590     TestObject* impl = V8TestObject::toNative(holder);
2591     TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState), exceptionState);
2592     impl->setActivityLoggingGetterPerWorldBindingsLongAttribute(cppValue);
2593 }
2594
2595 static void activityLoggingGetterPerWorldBindingsLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
2596 {
2597     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2598     TestObjectV8Internal::activityLoggingGetterPerWorldBindingsLongAttributeAttributeSetter(v8Value, info);
2599     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2600 }
2601
2602 static void activityLoggingGetterPerWorldBindingsLongAttributeAttributeGetterForMainWorld(const v8::PropertyCallbackInfo<v8::Value>& info)
2603 {
2604     v8::Handle<v8::Object> holder = info.Holder();
2605     TestObject* impl = V8TestObject::toNative(holder);
2606     v8SetReturnValueInt(info, impl->activityLoggingGetterPerWorldBindingsLongAttribute());
2607 }
2608
2609 static void activityLoggingGetterPerWorldBindingsLongAttributeAttributeGetterCallbackForMainWorld(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2610 {
2611     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2612     DOMWrapperWorld& world = DOMWrapperWorld::current(info.GetIsolate());
2613     if (world.activityLogger())
2614         world.activityLogger()->logGetter("TestObject.activityLoggingGetterPerWorldBindingsLongAttribute");
2615     TestObjectV8Internal::activityLoggingGetterPerWorldBindingsLongAttributeAttributeGetterForMainWorld(info);
2616     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2617 }
2618
2619 static void activityLoggingGetterPerWorldBindingsLongAttributeAttributeSetterForMainWorld(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
2620 {
2621     v8::Handle<v8::Object> holder = info.Holder();
2622     ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggingGetterPerWorldBindingsLongAttribute", "TestObject", holder, info.GetIsolate());
2623     TestObject* impl = V8TestObject::toNative(holder);
2624     TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState), exceptionState);
2625     impl->setActivityLoggingGetterPerWorldBindingsLongAttribute(cppValue);
2626 }
2627
2628 static void activityLoggingGetterPerWorldBindingsLongAttributeAttributeSetterCallbackForMainWorld(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
2629 {
2630     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2631     TestObjectV8Internal::activityLoggingGetterPerWorldBindingsLongAttributeAttributeSetterForMainWorld(v8Value, info);
2632     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2633 }
2634
2635 static void activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
2636 {
2637     v8::Handle<v8::Object> holder = info.Holder();
2638     TestObject* impl = V8TestObject::toNative(holder);
2639     v8SetReturnValueInt(info, impl->activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttribute());
2640 }
2641
2642 static void activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2643 {
2644     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2645     DOMWrapperWorld& world = DOMWrapperWorld::current(info.GetIsolate());
2646     if (world.activityLogger())
2647         world.activityLogger()->logGetter("TestObject.activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttribute");
2648     TestObjectV8Internal::activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeAttributeGetter(info);
2649     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2650 }
2651
2652 static void activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
2653 {
2654     v8::Handle<v8::Object> holder = info.Holder();
2655     ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttribute", "TestObject", holder, info.GetIsolate());
2656     TestObject* impl = V8TestObject::toNative(holder);
2657     TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState), exceptionState);
2658     impl->setActivityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttribute(cppValue);
2659 }
2660
2661 static void activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
2662 {
2663     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2664     TestObjectV8Internal::activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeAttributeSetter(v8Value, info);
2665     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2666 }
2667
2668 static void activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeAttributeGetterForMainWorld(const v8::PropertyCallbackInfo<v8::Value>& info)
2669 {
2670     v8::Handle<v8::Object> holder = info.Holder();
2671     TestObject* impl = V8TestObject::toNative(holder);
2672     v8SetReturnValueInt(info, impl->activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttribute());
2673 }
2674
2675 static void activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeAttributeGetterCallbackForMainWorld(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2676 {
2677     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2678     TestObjectV8Internal::activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeAttributeGetterForMainWorld(info);
2679     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2680 }
2681
2682 static void activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeAttributeSetterForMainWorld(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
2683 {
2684     v8::Handle<v8::Object> holder = info.Holder();
2685     ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttribute", "TestObject", holder, info.GetIsolate());
2686     TestObject* impl = V8TestObject::toNative(holder);
2687     TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState), exceptionState);
2688     impl->setActivityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttribute(cppValue);
2689 }
2690
2691 static void activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeAttributeSetterCallbackForMainWorld(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
2692 {
2693     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2694     TestObjectV8Internal::activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeAttributeSetterForMainWorld(v8Value, info);
2695     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2696 }
2697
2698 static void locationAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
2699 {
2700     v8::Handle<v8::Object> holder = info.Holder();
2701     TestObject* impl = V8TestObject::toNative(holder);
2702     v8SetReturnValueFast(info, WTF::getPtr(impl->location()), impl);
2703 }
2704
2705 static void locationAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2706 {
2707     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2708     TestObjectV8Internal::locationAttributeGetter(info);
2709     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2710 }
2711
2712 static void locationAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
2713 {
2714     v8::Handle<v8::Object> holder = info.Holder();
2715     TestObject* proxyImpl = V8TestObject::toNative(holder);
2716     RefPtr<TestNode> impl = WTF::getPtr(proxyImpl->location());
2717     if (!impl)
2718         return;
2719     TOSTRING_VOID(V8StringResource<>, cppValue, v8Value);
2720     impl->setHref(cppValue);
2721 }
2722
2723 static void locationAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
2724 {
2725     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2726     TestObjectV8Internal::locationAttributeSetter(v8Value, info);
2727     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2728 }
2729
2730 static void locationWithExceptionAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
2731 {
2732     v8::Handle<v8::Object> holder = info.Holder();
2733     TestObject* impl = V8TestObject::toNative(holder);
2734     v8SetReturnValueFast(info, WTF::getPtr(impl->locationWithException()), impl);
2735 }
2736
2737 static void locationWithExceptionAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2738 {
2739     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2740     TestObjectV8Internal::locationWithExceptionAttributeGetter(info);
2741     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2742 }
2743
2744 static void locationWithExceptionAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
2745 {
2746     v8::Handle<v8::Object> holder = info.Holder();
2747     TestObject* proxyImpl = V8TestObject::toNative(holder);
2748     RefPtr<TestNode> impl = WTF::getPtr(proxyImpl->locationWithException());
2749     if (!impl)
2750         return;
2751     TOSTRING_VOID(V8StringResource<>, cppValue, v8Value);
2752     impl->setHrefThrows(cppValue);
2753 }
2754
2755 static void locationWithExceptionAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
2756 {
2757     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2758     TestObjectV8Internal::locationWithExceptionAttributeSetter(v8Value, info);
2759     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2760 }
2761
2762 static void locationWithCallWithAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
2763 {
2764     v8::Handle<v8::Object> holder = info.Holder();
2765     TestObject* impl = V8TestObject::toNative(holder);
2766     v8SetReturnValueFast(info, WTF::getPtr(impl->locationWithCallWith()), impl);
2767 }
2768
2769 static void locationWithCallWithAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2770 {
2771     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2772     TestObjectV8Internal::locationWithCallWithAttributeGetter(info);
2773     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2774 }
2775
2776 static void locationWithCallWithAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
2777 {
2778     v8::Handle<v8::Object> holder = info.Holder();
2779     TestObject* proxyImpl = V8TestObject::toNative(holder);
2780     RefPtr<TestNode> impl = WTF::getPtr(proxyImpl->locationWithCallWith());
2781     if (!impl)
2782         return;
2783     TOSTRING_VOID(V8StringResource<>, cppValue, v8Value);
2784     impl->setHrefCallWith(callingDOMWindow(info.GetIsolate()), enteredDOMWindow(info.GetIsolate()), cppValue);
2785 }
2786
2787 static void locationWithCallWithAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
2788 {
2789     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2790     TestObjectV8Internal::locationWithCallWithAttributeSetter(v8Value, info);
2791     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2792 }
2793
2794 static void locationWithPerWorldBindingsAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
2795 {
2796     v8::Handle<v8::Object> holder = info.Holder();
2797     TestObject* impl = V8TestObject::toNative(holder);
2798     v8SetReturnValueFast(info, WTF::getPtr(impl->locationWithPerWorldBindings()), impl);
2799 }
2800
2801 static void locationWithPerWorldBindingsAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2802 {
2803     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2804     TestObjectV8Internal::locationWithPerWorldBindingsAttributeGetter(info);
2805     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2806 }
2807
2808 static void locationWithPerWorldBindingsAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
2809 {
2810     v8::Handle<v8::Object> holder = info.Holder();
2811     TestObject* proxyImpl = V8TestObject::toNative(holder);
2812     RefPtr<TestNode> impl = WTF::getPtr(proxyImpl->locationWithPerWorldBindings());
2813     if (!impl)
2814         return;
2815     TOSTRING_VOID(V8StringResource<>, cppValue, v8Value);
2816     impl->setHref(cppValue);
2817 }
2818
2819 static void locationWithPerWorldBindingsAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
2820 {
2821     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2822     TestObjectV8Internal::locationWithPerWorldBindingsAttributeSetter(v8Value, info);
2823     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2824 }
2825
2826 static void locationWithPerWorldBindingsAttributeGetterForMainWorld(const v8::PropertyCallbackInfo<v8::Value>& info)
2827 {
2828     v8::Handle<v8::Object> holder = info.Holder();
2829     TestObject* impl = V8TestObject::toNative(holder);
2830     v8SetReturnValueForMainWorld(info, WTF::getPtr(impl->locationWithPerWorldBindings()));
2831 }
2832
2833 static void locationWithPerWorldBindingsAttributeGetterCallbackForMainWorld(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2834 {
2835     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2836     TestObjectV8Internal::locationWithPerWorldBindingsAttributeGetterForMainWorld(info);
2837     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2838 }
2839
2840 static void locationWithPerWorldBindingsAttributeSetterForMainWorld(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
2841 {
2842     v8::Handle<v8::Object> holder = info.Holder();
2843     TestObject* proxyImpl = V8TestObject::toNative(holder);
2844     RefPtr<TestNode> impl = WTF::getPtr(proxyImpl->locationWithPerWorldBindings());
2845     if (!impl)
2846         return;
2847     TOSTRING_VOID(V8StringResource<>, cppValue, v8Value);
2848     impl->setHref(cppValue);
2849 }
2850
2851 static void locationWithPerWorldBindingsAttributeSetterCallbackForMainWorld(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
2852 {
2853     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2854     TestObjectV8Internal::locationWithPerWorldBindingsAttributeSetterForMainWorld(v8Value, info);
2855     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2856 }
2857
2858 static void locationGarbageCollectedAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
2859 {
2860     v8::Handle<v8::Object> holder = info.Holder();
2861     TestObject* impl = V8TestObject::toNative(holder);
2862     RawPtr<TestInterfaceGarbageCollected> result(impl->locationGarbageCollected());
2863     if (result && DOMDataStore::setReturnValueFromWrapper<V8TestInterfaceGarbageCollected>(info.GetReturnValue(), result.get()))
2864         return;
2865     v8::Handle<v8::Value> wrapper = toV8(result.get(), holder, info.GetIsolate());
2866     if (!wrapper.IsEmpty()) {
2867         V8HiddenValue::setHiddenValue(info.GetIsolate(), holder, v8AtomicString(info.GetIsolate(), "locationGarbageCollected"), wrapper);
2868         v8SetReturnValue(info, wrapper);
2869     }
2870 }
2871
2872 static void locationGarbageCollectedAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2873 {
2874     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2875     TestObjectV8Internal::locationGarbageCollectedAttributeGetter(info);
2876     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2877 }
2878
2879 static void locationGarbageCollectedAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
2880 {
2881     v8::Handle<v8::Object> holder = info.Holder();
2882     TestObject* proxyImpl = V8TestObject::toNative(holder);
2883     RawPtr<TestInterfaceGarbageCollected> impl = WTF::getPtr(proxyImpl->locationGarbageCollected());
2884     if (!impl)
2885         return;
2886     TONATIVE_VOID(TestInterfaceGarbageCollected*, cppValue, V8TestInterfaceGarbageCollected::toNativeWithTypeCheck(info.GetIsolate(), v8Value));
2887     impl->setAttr1(WTF::getPtr(cppValue));
2888 }
2889
2890 static void locationGarbageCollectedAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
2891 {
2892     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2893     TestObjectV8Internal::locationGarbageCollectedAttributeSetter(v8Value, info);
2894     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2895 }
2896
2897 static void locationWillBeGarbageCollectedAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
2898 {
2899     v8::Handle<v8::Object> holder = info.Holder();
2900     TestObject* impl = V8TestObject::toNative(holder);
2901     RefPtrWillBeRawPtr<TestInterfaceWillBeGarbageCollected> result(impl->locationWillBeGarbageCollected());
2902     if (result && DOMDataStore::setReturnValueFromWrapper<V8TestInterfaceWillBeGarbageCollected>(info.GetReturnValue(), result.get()))
2903         return;
2904     v8::Handle<v8::Value> wrapper = toV8(result.get(), holder, info.GetIsolate());
2905     if (!wrapper.IsEmpty()) {
2906         V8HiddenValue::setHiddenValue(info.GetIsolate(), holder, v8AtomicString(info.GetIsolate(), "locationWillBeGarbageCollected"), wrapper);
2907         v8SetReturnValue(info, wrapper);
2908     }
2909 }
2910
2911 static void locationWillBeGarbageCollectedAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2912 {
2913     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2914     TestObjectV8Internal::locationWillBeGarbageCollectedAttributeGetter(info);
2915     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2916 }
2917
2918 static void locationWillBeGarbageCollectedAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
2919 {
2920     v8::Handle<v8::Object> holder = info.Holder();
2921     TestObject* proxyImpl = V8TestObject::toNative(holder);
2922     RefPtrWillBeRawPtr<TestInterfaceWillBeGarbageCollected> impl = WTF::getPtr(proxyImpl->locationWillBeGarbageCollected());
2923     if (!impl)
2924         return;
2925     TONATIVE_VOID(TestInterfaceWillBeGarbageCollected*, cppValue, V8TestInterfaceWillBeGarbageCollected::toNativeWithTypeCheck(info.GetIsolate(), v8Value));
2926     impl->setAttr1(WTF::getPtr(cppValue));
2927 }
2928
2929 static void locationWillBeGarbageCollectedAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
2930 {
2931     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2932     TestObjectV8Internal::locationWillBeGarbageCollectedAttributeSetter(v8Value, info);
2933     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2934 }
2935
2936 static void raisesExceptionLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
2937 {
2938     v8::Handle<v8::Object> holder = info.Holder();
2939     TestObject* impl = V8TestObject::toNative(holder);
2940     ExceptionState exceptionState(ExceptionState::GetterContext, "raisesExceptionLongAttribute", "TestObject", holder, info.GetIsolate());
2941     int v8Value = impl->raisesExceptionLongAttribute(exceptionState);
2942     if (UNLIKELY(exceptionState.throwIfNeeded()))
2943         return;
2944     v8SetReturnValueInt(info, v8Value);
2945 }
2946
2947 static void raisesExceptionLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2948 {
2949     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2950     TestObjectV8Internal::raisesExceptionLongAttributeAttributeGetter(info);
2951     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2952 }
2953
2954 static void raisesExceptionLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
2955 {
2956     v8::Handle<v8::Object> holder = info.Holder();
2957     ExceptionState exceptionState(ExceptionState::SetterContext, "raisesExceptionLongAttribute", "TestObject", holder, info.GetIsolate());
2958     TestObject* impl = V8TestObject::toNative(holder);
2959     TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState), exceptionState);
2960     impl->setRaisesExceptionLongAttribute(cppValue, exceptionState);
2961     exceptionState.throwIfNeeded();
2962 }
2963
2964 static void raisesExceptionLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
2965 {
2966     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2967     TestObjectV8Internal::raisesExceptionLongAttributeAttributeSetter(v8Value, info);
2968     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2969 }
2970
2971 static void raisesExceptionGetterLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
2972 {
2973     v8::Handle<v8::Object> holder = info.Holder();
2974     TestObject* impl = V8TestObject::toNative(holder);
2975     ExceptionState exceptionState(ExceptionState::GetterContext, "raisesExceptionGetterLongAttribute", "TestObject", holder, info.GetIsolate());
2976     int v8Value = impl->raisesExceptionGetterLongAttribute(exceptionState);
2977     if (UNLIKELY(exceptionState.throwIfNeeded()))
2978         return;
2979     v8SetReturnValueInt(info, v8Value);
2980 }
2981
2982 static void raisesExceptionGetterLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2983 {
2984     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2985     TestObjectV8Internal::raisesExceptionGetterLongAttributeAttributeGetter(info);
2986     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2987 }
2988
2989 static void raisesExceptionGetterLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
2990 {
2991     v8::Handle<v8::Object> holder = info.Holder();
2992     ExceptionState exceptionState(ExceptionState::SetterContext, "raisesExceptionGetterLongAttribute", "TestObject", holder, info.GetIsolate());
2993     TestObject* impl = V8TestObject::toNative(holder);
2994     TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState), exceptionState);
2995     impl->setRaisesExceptionGetterLongAttribute(cppValue);
2996 }
2997
2998 static void raisesExceptionGetterLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
2999 {
3000     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
3001     TestObjectV8Internal::raisesExceptionGetterLongAttributeAttributeSetter(v8Value, info);
3002     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3003 }
3004
3005 static void setterRaisesExceptionLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
3006 {
3007     v8::Handle<v8::Object> holder = info.Holder();
3008     TestObject* impl = V8TestObject::toNative(holder);
3009     v8SetReturnValueInt(info, impl->setterRaisesExceptionLongAttribute());
3010 }
3011
3012 static void setterRaisesExceptionLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3013 {
3014     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3015     TestObjectV8Internal::setterRaisesExceptionLongAttributeAttributeGetter(info);
3016     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3017 }
3018
3019 static void setterRaisesExceptionLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
3020 {
3021     v8::Handle<v8::Object> holder = info.Holder();
3022     ExceptionState exceptionState(ExceptionState::SetterContext, "setterRaisesExceptionLongAttribute", "TestObject", holder, info.GetIsolate());
3023     TestObject* impl = V8TestObject::toNative(holder);
3024     TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState), exceptionState);
3025     impl->setSetterRaisesExceptionLongAttribute(cppValue, exceptionState);
3026     exceptionState.throwIfNeeded();
3027 }
3028
3029 static void setterRaisesExceptionLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
3030 {
3031     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
3032     TestObjectV8Internal::setterRaisesExceptionLongAttributeAttributeSetter(v8Value, info);
3033     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3034 }
3035
3036 static void raisesExceptionTestInterfaceEmptyAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
3037 {
3038     v8::Handle<v8::Object> holder = info.Holder();
3039     TestObject* impl = V8TestObject::toNative(holder);
3040     ExceptionState exceptionState(ExceptionState::GetterContext, "raisesExceptionTestInterfaceEmptyAttribute", "TestObject", holder, info.GetIsolate());
3041     RefPtr<TestInterfaceEmpty> v8Value = impl->raisesExceptionTestInterfaceEmptyAttribute(exceptionState);
3042     if (UNLIKELY(exceptionState.throwIfNeeded()))
3043         return;
3044     v8SetReturnValueFast(info, WTF::getPtr(v8Value.release()), impl);
3045 }
3046
3047 static void raisesExceptionTestInterfaceEmptyAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3048 {
3049     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3050     TestObjectV8Internal::raisesExceptionTestInterfaceEmptyAttributeAttributeGetter(info);
3051     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3052 }
3053
3054 static void raisesExceptionTestInterfaceEmptyAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
3055 {
3056     v8::Handle<v8::Object> holder = info.Holder();
3057     ExceptionState exceptionState(ExceptionState::SetterContext, "raisesExceptionTestInterfaceEmptyAttribute", "TestObject", holder, info.GetIsolate());
3058     TestObject* impl = V8TestObject::toNative(holder);
3059     TONATIVE_VOID(TestInterfaceEmpty*, cppValue, V8TestInterfaceEmpty::toNativeWithTypeCheck(info.GetIsolate(), v8Value));
3060     impl->setRaisesExceptionTestInterfaceEmptyAttribute(WTF::getPtr(cppValue), exceptionState);
3061     exceptionState.throwIfNeeded();
3062 }
3063
3064 static void raisesExceptionTestInterfaceEmptyAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
3065 {
3066     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
3067     TestObjectV8Internal::raisesExceptionTestInterfaceEmptyAttributeAttributeSetter(v8Value, info);
3068     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3069 }
3070
3071 static void cachedAttributeRaisesExceptionGetterAnyAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
3072 {
3073     v8::Handle<v8::Object> holder = info.Holder();
3074     v8::Handle<v8::String> propertyName = v8AtomicString(info.GetIsolate(), "cachedAttributeRaisesExceptionGetterAnyAttribute");
3075     TestObject* impl = V8TestObject::toNative(holder);
3076     if (!impl->isValueDirty()) {
3077         v8::Handle<v8::Value> v8Value = V8HiddenValue::getHiddenValue(info.GetIsolate(), holder, propertyName);
3078         if (!v8Value.IsEmpty()) {
3079             v8SetReturnValue(info, v8Value);
3080             return;
3081         }
3082     }
3083     ExceptionState exceptionState(ExceptionState::GetterContext, "cachedAttributeRaisesExceptionGetterAnyAttribute", "TestObject", holder, info.GetIsolate());
3084     ScriptValue v8Value = impl->cachedAttributeRaisesExceptionGetterAnyAttribute(exceptionState);
3085     if (UNLIKELY(exceptionState.throwIfNeeded()))
3086         return;
3087     V8HiddenValue::setHiddenValue(info.GetIsolate(), holder, propertyName, v8Value.v8Value());
3088     v8SetReturnValue(info, v8Value.v8Value());
3089 }
3090
3091 static void cachedAttributeRaisesExceptionGetterAnyAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3092 {
3093     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3094     TestObjectV8Internal::cachedAttributeRaisesExceptionGetterAnyAttributeAttributeGetter(info);
3095     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3096 }
3097
3098 static void cachedAttributeRaisesExceptionGetterAnyAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
3099 {
3100     v8::Handle<v8::Object> holder = info.Holder();
3101     ExceptionState exceptionState(ExceptionState::SetterContext, "cachedAttributeRaisesExceptionGetterAnyAttribute", "TestObject", holder, info.GetIsolate());
3102     TestObject* impl = V8TestObject::toNative(holder);
3103     TONATIVE_VOID(ScriptValue, cppValue, ScriptValue(ScriptState::current(info.GetIsolate()), v8Value));
3104     impl->setCachedAttributeRaisesExceptionGetterAnyAttribute(cppValue, exceptionState);
3105     exceptionState.throwIfNeeded();
3106     V8HiddenValue::deleteHiddenValue(info.GetIsolate(), holder, v8AtomicString(info.GetIsolate(), "cachedAttributeRaisesExceptionGetterAnyAttribute")); // Invalidate the cached value.
3107 }
3108
3109 static void cachedAttributeRaisesExceptionGetterAnyAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
3110 {
3111     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
3112     TestObjectV8Internal::cachedAttributeRaisesExceptionGetterAnyAttributeAttributeSetter(v8Value, info);
3113     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3114 }
3115
3116 static void reflectTestInterfaceAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
3117 {
3118     v8::Handle<v8::Object> holder = info.Holder();
3119     TestObject* impl = V8TestObject::toNative(holder);
3120     v8SetReturnValueFast(info, WTF::getPtr(impl->fastGetAttribute(HTMLNames::reflecttestinterfaceattributeAttr)), impl);
3121 }
3122
3123 static void reflectTestInterfaceAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3124 {
3125     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3126     TestObjectV8Internal::reflectTestInterfaceAttributeAttributeGetter(info);
3127     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3128 }
3129
3130 static void reflectTestInterfaceAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
3131 {
3132     v8::Handle<v8::Object> holder = info.Holder();
3133     TestObject* impl = V8TestObject::toNative(holder);
3134     TONATIVE_VOID(TestInterfaceImplementation*, cppValue, V8TestInterface::toNativeWithTypeCheck(info.GetIsolate(), v8Value));
3135     CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
3136     impl->setAttribute(HTMLNames::reflecttestinterfaceattributeAttr, WTF::getPtr(cppValue));
3137 }
3138
3139 static void reflectTestInterfaceAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
3140 {
3141     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
3142     CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
3143     TestObjectV8Internal::reflectTestInterfaceAttributeAttributeSetter(v8Value, info);
3144     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3145 }
3146
3147 static void reflectReflectedNameAttributeTestAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
3148 {
3149     v8::Handle<v8::Object> holder = info.Holder();
3150     TestObject* impl = V8TestObject::toNative(holder);
3151     v8SetReturnValueFast(info, WTF::getPtr(impl->fastGetAttribute(HTMLNames::reflectedNameAttributeAttr)), impl);
3152 }
3153
3154 static void reflectReflectedNameAttributeTestAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3155 {
3156     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3157     TestObjectV8Internal::reflectReflectedNameAttributeTestAttributeAttributeGetter(info);
3158     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3159 }
3160
3161 static void reflectReflectedNameAttributeTestAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
3162 {
3163     v8::Handle<v8::Object> holder = info.Holder();
3164     TestObject* impl = V8TestObject::toNative(holder);
3165     TONATIVE_VOID(TestInterfaceImplementation*, cppValue, V8TestInterface::toNativeWithTypeCheck(info.GetIsolate(), v8Value));
3166     CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
3167     impl->setAttribute(HTMLNames::reflectedNameAttributeAttr, WTF::getPtr(cppValue));
3168 }
3169
3170 static void reflectReflectedNameAttributeTestAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
3171 {
3172     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
3173     CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
3174     TestObjectV8Internal::reflectReflectedNameAttributeTestAttributeAttributeSetter(v8Value, info);
3175     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3176 }
3177
3178 static void reflectBooleanAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
3179 {
3180     v8::Handle<v8::Object> holder = info.Holder();
3181     TestObject* impl = V8TestObject::toNative(holder);
3182     v8SetReturnValueBool(info, impl->fastHasAttribute(HTMLNames::reflectbooleanattributeAttr));
3183 }
3184
3185 static void reflectBooleanAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3186 {
3187     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3188     TestObjectV8Internal::reflectBooleanAttributeAttributeGetter(info);
3189     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3190 }
3191
3192 static void reflectBooleanAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
3193 {
3194     v8::Handle<v8::Object> holder = info.Holder();
3195     TestObject* impl = V8TestObject::toNative(holder);
3196     TONATIVE_VOID(bool, cppValue, v8Value->BooleanValue());
3197     CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
3198     impl->setBooleanAttribute(HTMLNames::reflectbooleanattributeAttr, cppValue);
3199 }
3200
3201 static void reflectBooleanAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
3202 {
3203     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
3204     CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
3205     TestObjectV8Internal::reflectBooleanAttributeAttributeSetter(v8Value, info);
3206     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3207 }
3208
3209 static void reflectLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
3210 {
3211     v8::Handle<v8::Object> holder = info.Holder();
3212     TestObject* impl = V8TestObject::toNative(holder);
3213     v8SetReturnValueInt(info, impl->getIntegralAttribute(HTMLNames::reflectlongattributeAttr));
3214 }
3215
3216 static void reflectLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3217 {
3218     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3219     TestObjectV8Internal::reflectLongAttributeAttributeGetter(info);
3220     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3221 }
3222
3223 static void reflectLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
3224 {
3225     v8::Handle<v8::Object> holder = info.Holder();
3226     ExceptionState exceptionState(ExceptionState::SetterContext, "reflectLongAttribute", "TestObject", holder, info.GetIsolate());
3227     TestObject* impl = V8TestObject::toNative(holder);
3228     TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState), exceptionState);
3229     CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
3230     impl->setIntegralAttribute(HTMLNames::reflectlongattributeAttr, cppValue);
3231 }
3232
3233 static void reflectLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
3234 {
3235     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
3236     CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
3237     TestObjectV8Internal::reflectLongAttributeAttributeSetter(v8Value, info);
3238     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3239 }
3240
3241 static void reflectUnsignedShortAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
3242 {
3243     v8::Handle<v8::Object> holder = info.Holder();
3244     TestObject* impl = V8TestObject::toNative(holder);
3245     v8SetReturnValueUnsigned(info, std::max(0, impl->fastGetAttribute(HTMLNames::reflectunsignedshortattributeAttr)));
3246 }
3247
3248 static void reflectUnsignedShortAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3249 {
3250     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3251     TestObjectV8Internal::reflectUnsignedShortAttributeAttributeGetter(info);
3252     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3253 }
3254
3255 static void reflectUnsignedShortAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
3256 {
3257     v8::Handle<v8::Object> holder = info.Holder();
3258     ExceptionState exceptionState(ExceptionState::SetterContext, "reflectUnsignedShortAttribute", "TestObject", holder, info.GetIsolate());
3259     TestObject* impl = V8TestObject::toNative(holder);
3260     TONATIVE_VOID_EXCEPTIONSTATE(unsigned, cppValue, toUInt16(v8Value, exceptionState), exceptionState);
3261     CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
3262     impl->setAttribute(HTMLNames::reflectunsignedshortattributeAttr, cppValue);
3263 }
3264
3265 static void reflectUnsignedShortAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
3266 {
3267     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
3268     CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
3269     TestObjectV8Internal::reflectUnsignedShortAttributeAttributeSetter(v8Value, info);
3270     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3271 }
3272
3273 static void reflectUnsignedLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
3274 {
3275     v8::Handle<v8::Object> holder = info.Holder();
3276     TestObject* impl = V8TestObject::toNative(holder);
3277     v8SetReturnValueUnsigned(info, std::max(0, impl->getIntegralAttribute(HTMLNames::reflectunsignedlongattributeAttr)));
3278 }
3279
3280 static void reflectUnsignedLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3281 {
3282     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3283     TestObjectV8Internal::reflectUnsignedLongAttributeAttributeGetter(info);
3284     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3285 }
3286
3287 static void reflectUnsignedLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
3288 {
3289     v8::Handle<v8::Object> holder = info.Holder();
3290     ExceptionState exceptionState(ExceptionState::SetterContext, "reflectUnsignedLongAttribute", "TestObject", holder, info.GetIsolate());
3291     TestObject* impl = V8TestObject::toNative(holder);
3292     TONATIVE_VOID_EXCEPTIONSTATE(unsigned, cppValue, toUInt32(v8Value, exceptionState), exceptionState);
3293     CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
3294     impl->setUnsignedIntegralAttribute(HTMLNames::reflectunsignedlongattributeAttr, cppValue);
3295 }
3296
3297 static void reflectUnsignedLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
3298 {
3299     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
3300     CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
3301     TestObjectV8Internal::reflectUnsignedLongAttributeAttributeSetter(v8Value, info);
3302     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3303 }
3304
3305 static void idAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
3306 {
3307     v8::Handle<v8::Object> holder = info.Holder();
3308     TestObject* impl = V8TestObject::toNative(holder);
3309     v8SetReturnValueString(info, impl->getIdAttribute(), info.GetIsolate());
3310 }
3311
3312 static void idAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3313 {
3314     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3315     TestObjectV8Internal::idAttributeGetter(info);
3316     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3317 }
3318
3319 static void idAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
3320 {
3321     v8::Handle<v8::Object> holder = info.Holder();
3322     TestObject* impl = V8TestObject::toNative(holder);
3323     TOSTRING_VOID(V8StringResource<>, cppValue, v8Value);
3324     CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
3325     impl->setAttribute(HTMLNames::idAttr, cppValue);
3326 }
3327
3328 static void idAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
3329 {
3330     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
3331     CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
3332     TestObjectV8Internal::idAttributeSetter(v8Value, info);
3333     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3334 }
3335
3336 static void nameAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
3337 {
3338     v8::Handle<v8::Object> holder = info.Holder();
3339     TestObject* impl = V8TestObject::toNative(holder);
3340     v8SetReturnValueString(info, impl->getNameAttribute(), info.GetIsolate());
3341 }
3342
3343 static void nameAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3344 {
3345     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3346     TestObjectV8Internal::nameAttributeGetter(info);
3347     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3348 }
3349
3350 static void nameAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
3351 {
3352     v8::Handle<v8::Object> holder = info.Holder();
3353     TestObject* impl = V8TestObject::toNative(holder);
3354     TOSTRING_VOID(V8StringResource<>, cppValue, v8Value);
3355     CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
3356     impl->setAttribute(HTMLNames::nameAttr, cppValue);
3357 }
3358
3359 static void nameAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
3360 {
3361     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
3362     CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
3363     TestObjectV8Internal::nameAttributeSetter(v8Value, info);
3364     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3365 }
3366
3367 static void classAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
3368 {
3369     v8::Handle<v8::Object> holder = info.Holder();
3370     TestObject* impl = V8TestObject::toNative(holder);
3371     v8SetReturnValueString(info, impl->getClassAttribute(), info.GetIsolate());
3372 }
3373
3374 static void classAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3375 {
3376     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3377     TestObjectV8Internal::classAttributeGetter(info);
3378     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3379 }
3380
3381 static void classAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
3382 {
3383     v8::Handle<v8::Object> holder = info.Holder();
3384     TestObject* impl = V8TestObject::toNative(holder);
3385     TOSTRING_VOID(V8StringResource<>, cppValue, v8Value);
3386     CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
3387     impl->setAttribute(HTMLNames::classAttr, cppValue);
3388 }
3389
3390 static void classAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
3391 {
3392     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
3393     CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
3394     TestObjectV8Internal::classAttributeSetter(v8Value, info);
3395     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3396 }
3397
3398 static void reflectedIdAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
3399 {
3400     v8::Handle<v8::Object> holder = info.Holder();
3401     TestObject* impl = V8TestObject::toNative(holder);
3402     v8SetReturnValueString(info, impl->getIdAttribute(), info.GetIsolate());
3403 }
3404
3405 static void reflectedIdAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3406 {
3407     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3408     TestObjectV8Internal::reflectedIdAttributeGetter(info);
3409     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3410 }
3411
3412 static void reflectedIdAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
3413 {
3414     v8::Handle<v8::Object> holder = info.Holder();
3415     TestObject* impl = V8TestObject::toNative(holder);
3416     TOSTRING_VOID(V8StringResource<>, cppValue, v8Value);
3417     CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
3418     impl->setAttribute(HTMLNames::idAttr, cppValue);
3419 }
3420
3421 static void reflectedIdAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
3422 {
3423     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
3424     CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
3425     TestObjectV8Internal::reflectedIdAttributeSetter(v8Value, info);
3426     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3427 }
3428
3429 static void reflectedNameAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
3430 {
3431     v8::Handle<v8::Object> holder = info.Holder();
3432     TestObject* impl = V8TestObject::toNative(holder);
3433     v8SetReturnValueString(info, impl->getNameAttribute(), info.GetIsolate());
3434 }
3435
3436 static void reflectedNameAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3437 {
3438     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3439     TestObjectV8Internal::reflectedNameAttributeGetter(info);
3440     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3441 }
3442
3443 static void reflectedNameAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
3444 {
3445     v8::Handle<v8::Object> holder = info.Holder();
3446     TestObject* impl = V8TestObject::toNative(holder);
3447     TOSTRING_VOID(V8StringResource<>, cppValue, v8Value);
3448     CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
3449     impl->setAttribute(HTMLNames::nameAttr, cppValue);
3450 }
3451
3452 static void reflectedNameAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
3453 {
3454     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
3455     CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
3456     TestObjectV8Internal::reflectedNameAttributeSetter(v8Value, info);
3457     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3458 }
3459
3460 static void reflectedClassAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
3461 {
3462     v8::Handle<v8::Object> holder = info.Holder();
3463     TestObject* impl = V8TestObject::toNative(holder);
3464     v8SetReturnValueString(info, impl->getClassAttribute(), info.GetIsolate());
3465 }
3466
3467 static void reflectedClassAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3468 {
3469     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3470     TestObjectV8Internal::reflectedClassAttributeGetter(info);
3471     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3472 }
3473
3474 static void reflectedClassAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
3475 {
3476     v8::Handle<v8::Object> holder = info.Holder();
3477     TestObject* impl = V8TestObject::toNative(holder);
3478     TOSTRING_VOID(V8StringResource<>, cppValue, v8Value);
3479     CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
3480     impl->setAttribute(HTMLNames::classAttr, cppValue);
3481 }
3482
3483 static void reflectedClassAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
3484 {
3485     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
3486     CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
3487     TestObjectV8Internal::reflectedClassAttributeSetter(v8Value, info);
3488     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3489 }
3490
3491 static void limitedToOnlyOneAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
3492 {
3493     v8::Handle<v8::Object> holder = info.Holder();
3494     TestObject* impl = V8TestObject::toNative(holder);
3495     String v8Value = impl->fastGetAttribute(HTMLNames::limitedtoonlyoneattributeAttr);
3496     if (v8Value.isEmpty()) {
3497         ;
3498     } else if (equalIgnoringCase(v8Value, "unique")) {
3499         v8Value = "unique";
3500     } else {
3501         v8Value = "";
3502     }
3503     v8SetReturnValueString(info, v8Value, info.GetIsolate());
3504 }
3505
3506 static void limitedToOnlyOneAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3507 {
3508     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3509     TestObjectV8Internal::limitedToOnlyOneAttributeAttributeGetter(info);
3510     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3511 }
3512
3513 static void limitedToOnlyOneAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
3514 {
3515     v8::Handle<v8::Object> holder = info.Holder();
3516     TestObject* impl = V8TestObject::toNative(holder);
3517     TOSTRING_VOID(V8StringResource<>, cppValue, v8Value);
3518     CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
3519     impl->setAttribute(HTMLNames::limitedtoonlyoneattributeAttr, cppValue);
3520 }
3521
3522 static void limitedToOnlyOneAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
3523 {
3524     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
3525     CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
3526     TestObjectV8Internal::limitedToOnlyOneAttributeAttributeSetter(v8Value, info);
3527     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3528 }
3529
3530 static void limitedToOnlyAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
3531 {
3532     v8::Handle<v8::Object> holder = info.Holder();
3533     TestObject* impl = V8TestObject::toNative(holder);
3534     String v8Value = impl->fastGetAttribute(HTMLNames::limitedtoonlyattributeAttr);
3535     if (v8Value.isEmpty()) {
3536         ;
3537     } else if (equalIgnoringCase(v8Value, "Per")) {
3538         v8Value = "Per";
3539     } else if (equalIgnoringCase(v8Value, "Paal")) {
3540         v8Value = "Paal";
3541     } else if (equalIgnoringCase(v8Value, "Espen")) {
3542         v8Value = "Espen";
3543     } else {
3544         v8Value = "";
3545     }
3546     v8SetReturnValueString(info, v8Value, info.GetIsolate());
3547 }
3548
3549 static void limitedToOnlyAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3550 {
3551     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3552     TestObjectV8Internal::limitedToOnlyAttributeAttributeGetter(info);
3553     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3554 }
3555
3556 static void limitedToOnlyAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
3557 {
3558     v8::Handle<v8::Object> holder = info.Holder();
3559     TestObject* impl = V8TestObject::toNative(holder);
3560     TOSTRING_VOID(V8StringResource<>, cppValue, v8Value);
3561     CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
3562     impl->setAttribute(HTMLNames::limitedtoonlyattributeAttr, cppValue);
3563 }
3564
3565 static void limitedToOnlyAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
3566 {
3567     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
3568     CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
3569     TestObjectV8Internal::limitedToOnlyAttributeAttributeSetter(v8Value, info);
3570     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3571 }
3572
3573 static void limitedToOnlyOtherAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
3574 {
3575     v8::Handle<v8::Object> holder = info.Holder();
3576     TestObject* impl = V8TestObject::toNative(holder);
3577     String v8Value = impl->fastGetAttribute(HTMLNames::otherAttr);
3578     if (v8Value.isEmpty()) {
3579         ;
3580     } else if (equalIgnoringCase(v8Value, "Value1")) {
3581         v8Value = "Value1";
3582     } else if (equalIgnoringCase(v8Value, "Value2")) {
3583         v8Value = "Value2";
3584     } else {
3585         v8Value = "";
3586     }
3587     v8SetReturnValueString(info, v8Value, info.GetIsolate());
3588 }
3589
3590 static void limitedToOnlyOtherAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3591 {
3592     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3593     TestObjectV8Internal::limitedToOnlyOtherAttributeAttributeGetter(info);
3594     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3595 }
3596
3597 static void limitedToOnlyOtherAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
3598 {
3599     v8::Handle<v8::Object> holder = info.Holder();
3600     TestObject* impl = V8TestObject::toNative(holder);
3601     TOSTRING_VOID(V8StringResource<>, cppValue, v8Value);
3602     CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
3603     impl->setAttribute(HTMLNames::otherAttr, cppValue);
3604 }
3605
3606 static void limitedToOnlyOtherAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
3607 {
3608     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
3609     CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
3610     TestObjectV8Internal::limitedToOnlyOtherAttributeAttributeSetter(v8Value, info);
3611     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3612 }
3613
3614 static void limitedWithMissingDefaultAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
3615 {
3616     v8::Handle<v8::Object> holder = info.Holder();
3617     TestObject* impl = V8TestObject::toNative(holder);
3618     String v8Value = impl->fastGetAttribute(HTMLNames::limitedwithmissingdefaultattributeAttr);
3619     if (v8Value.isEmpty()) {
3620         v8Value = "rsa";
3621     } else if (equalIgnoringCase(v8Value, "rsa")) {
3622         v8Value = "rsa";
3623     } else if (equalIgnoringCase(v8Value, "dsa")) {
3624         v8Value = "dsa";
3625     } else {
3626         v8Value = "";
3627     }
3628     v8SetReturnValueString(info, v8Value, info.GetIsolate());
3629 }
3630
3631 static void limitedWithMissingDefaultAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3632 {
3633     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3634     TestObjectV8Internal::limitedWithMissingDefaultAttributeAttributeGetter(info);
3635     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3636 }
3637
3638 static void limitedWithMissingDefaultAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
3639 {
3640     v8::Handle<v8::Object> holder = info.Holder();
3641     TestObject* impl = V8TestObject::toNative(holder);
3642     TOSTRING_VOID(V8StringResource<>, cppValue, v8Value);
3643     CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
3644     impl->setAttribute(HTMLNames::limitedwithmissingdefaultattributeAttr, cppValue);
3645 }
3646
3647 static void limitedWithMissingDefaultAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
3648 {
3649     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
3650     CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
3651     TestObjectV8Internal::limitedWithMissingDefaultAttributeAttributeSetter(v8Value, info);
3652     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3653 }
3654
3655 static void limitedWithInvalidMissingDefaultAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
3656 {
3657     v8::Handle<v8::Object> holder = info.Holder();
3658     TestObject* impl = V8TestObject::toNative(holder);
3659     String v8Value = impl->fastGetAttribute(HTMLNames::limitedwithinvalidmissingdefaultattributeAttr);
3660     if (v8Value.isEmpty()) {
3661         v8Value = "auto";
3662     } else if (equalIgnoringCase(v8Value, "ltr")) {
3663         v8Value = "ltr";
3664     } else if (equalIgnoringCase(v8Value, "rtl")) {
3665         v8Value = "rtl";
3666     } else if (equalIgnoringCase(v8Value, "auto")) {
3667         v8Value = "auto";
3668     } else {
3669         v8Value = "ltr";
3670     }
3671     v8SetReturnValueString(info, v8Value, info.GetIsolate());
3672 }
3673
3674 static void limitedWithInvalidMissingDefaultAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3675 {
3676     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3677     TestObjectV8Internal::limitedWithInvalidMissingDefaultAttributeAttributeGetter(info);
3678     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3679 }
3680
3681 static void limitedWithInvalidMissingDefaultAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
3682 {
3683     v8::Handle<v8::Object> holder = info.Holder();
3684     TestObject* impl = V8TestObject::toNative(holder);
3685     TOSTRING_VOID(V8StringResource<>, cppValue, v8Value);
3686     CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
3687     impl->setAttribute(HTMLNames::limitedwithinvalidmissingdefaultattributeAttr, cppValue);
3688 }
3689
3690 static void limitedWithInvalidMissingDefaultAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
3691 {
3692     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
3693     CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
3694     TestObjectV8Internal::limitedWithInvalidMissingDefaultAttributeAttributeSetter(v8Value, info);
3695     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3696 }
3697
3698 static void corsSettingAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
3699 {
3700     v8::Handle<v8::Object> holder = info.Holder();
3701     TestObject* impl = V8TestObject::toNative(holder);
3702     String v8Value = impl->fastGetAttribute(HTMLNames::corssettingattributeAttr);
3703     if (v8Value.isNull()) {
3704         ;
3705     } else if (v8Value.isEmpty()) {
3706         v8Value = "anonymous";
3707     } else if (equalIgnoringCase(v8Value, "anonymous")) {
3708         v8Value = "anonymous";
3709     } else if (equalIgnoringCase(v8Value, "use-credentials")) {
3710         v8Value = "use-credentials";
3711     } else {
3712         v8Value = "anonymous";
3713     }
3714     v8SetReturnValueString(info, v8Value, info.GetIsolate());
3715 }
3716
3717 static void corsSettingAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3718 {
3719     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3720     TestObjectV8Internal::corsSettingAttributeAttributeGetter(info);
3721     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3722 }
3723
3724 static void limitedWithEmptyMissingInvalidAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
3725 {
3726     v8::Handle<v8::Object> holder = info.Holder();
3727     TestObject* impl = V8TestObject::toNative(holder);
3728     String v8Value = impl->fastGetAttribute(HTMLNames::limitedwithemptymissinginvalidattributeAttr);
3729     if (v8Value.isNull()) {
3730         v8Value = "missing";
3731     } else if (v8Value.isEmpty()) {
3732         v8Value = "empty";
3733     } else if (equalIgnoringCase(v8Value, "empty")) {
3734         v8Value = "empty";
3735     } else if (equalIgnoringCase(v8Value, "missing")) {
3736         v8Value = "missing";
3737     } else if (equalIgnoringCase(v8Value, "invalid")) {
3738         v8Value = "invalid";
3739     } else if (equalIgnoringCase(v8Value, "a-normal")) {
3740         v8Value = "a-normal";
3741     } else {
3742         v8Value = "invalid";
3743     }
3744     v8SetReturnValueString(info, v8Value, info.GetIsolate());
3745 }
3746
3747 static void limitedWithEmptyMissingInvalidAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3748 {
3749     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3750     TestObjectV8Internal::limitedWithEmptyMissingInvalidAttributeAttributeGetter(info);
3751     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3752 }
3753
3754 static void replaceableReadonlyLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
3755 {
3756     v8::Handle<v8::Object> holder = info.Holder();
3757     TestObject* impl = V8TestObject::toNative(holder);
3758     v8SetReturnValueInt(info, impl->replaceableReadonlyLongAttribute());
3759 }
3760
3761 static void replaceableReadonlyLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3762 {
3763     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3764     TestObjectV8Internal::replaceableReadonlyLongAttributeAttributeGetter(info);
3765     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3766 }
3767
3768 static void locationReplaceableAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
3769 {
3770     v8::Handle<v8::Object> holder = info.Holder();
3771     TestObject* impl = V8TestObject::toNative(holder);
3772     v8SetReturnValueFast(info, WTF::getPtr(impl->locationReplaceable()), impl);
3773 }
3774
3775 static void locationReplaceableAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3776 {
3777     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3778     TestObjectV8Internal::locationReplaceableAttributeGetter(info);
3779     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3780 }
3781
3782 static void locationReplaceableAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
3783 {
3784     v8::Handle<v8::Object> holder = info.Holder();
3785     TestObject* proxyImpl = V8TestObject::toNative(holder);
3786     RefPtr<TestNode> impl = WTF::getPtr(proxyImpl->locationReplaceable());
3787     if (!impl)
3788         return;
3789     TOSTRING_VOID(V8StringResource<>, cppValue, v8Value);
3790     impl->setHref(cppValue);
3791 }
3792
3793 static void locationReplaceableAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
3794 {
3795     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
3796     TestObjectV8Internal::locationReplaceableAttributeSetter(v8Value, info);
3797     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3798 }
3799
3800 static void runtimeEnabledLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
3801 {
3802     v8::Handle<v8::Object> holder = info.Holder();
3803     TestObject* impl = V8TestObject::toNative(holder);
3804     v8SetReturnValueInt(info, impl->runtimeEnabledLongAttribute());
3805 }
3806
3807 static void runtimeEnabledLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3808 {
3809     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3810     TestObjectV8Internal::runtimeEnabledLongAttributeAttributeGetter(info);
3811     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3812 }
3813
3814 static void runtimeEnabledLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
3815 {
3816     v8::Handle<v8::Object> holder = info.Holder();
3817     ExceptionState exceptionState(ExceptionState::SetterContext, "runtimeEnabledLongAttribute", "TestObject", holder, info.GetIsolate());
3818     TestObject* impl = V8TestObject::toNative(holder);
3819     TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState), exceptionState);
3820     impl->setRuntimeEnabledLongAttribute(cppValue);
3821 }
3822
3823 static void runtimeEnabledLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
3824 {
3825     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
3826     TestObjectV8Internal::runtimeEnabledLongAttributeAttributeSetter(v8Value, info);
3827     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3828 }
3829
3830 static void perContextEnabledRuntimeEnabledLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
3831 {
3832     v8::Handle<v8::Object> holder = info.Holder();
3833     TestObject* impl = V8TestObject::toNative(holder);
3834     v8SetReturnValueInt(info, impl->perContextEnabledRuntimeEnabledLongAttribute());
3835 }
3836
3837 static void perContextEnabledRuntimeEnabledLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3838 {
3839     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3840     TestObjectV8Internal::perContextEnabledRuntimeEnabledLongAttributeAttributeGetter(info);
3841     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3842 }
3843
3844 static void perContextEnabledRuntimeEnabledLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
3845 {
3846     v8::Handle<v8::Object> holder = info.Holder();
3847     ExceptionState exceptionState(ExceptionState::SetterContext, "perContextEnabledRuntimeEnabledLongAttribute", "TestObject", holder, info.GetIsolate());
3848     TestObject* impl = V8TestObject::toNative(holder);
3849     TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState), exceptionState);
3850     impl->setPerContextEnabledRuntimeEnabledLongAttribute(cppValue);
3851 }
3852
3853 static void perContextEnabledRuntimeEnabledLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
3854 {
3855     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
3856     TestObjectV8Internal::perContextEnabledRuntimeEnabledLongAttributeAttributeSetter(v8Value, info);
3857     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3858 }
3859
3860 #if ENABLE(CONDITION)
3861 static void conditionalRuntimeEnabledLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
3862 {
3863     v8::Handle<v8::Object> holder = info.Holder();
3864     TestObject* impl = V8TestObject::toNative(holder);
3865     v8SetReturnValueInt(info, impl->conditionalRuntimeEnabledLongAttribute());
3866 }
3867 #endif // ENABLE(CONDITION)
3868
3869 #if ENABLE(CONDITION)
3870 static void conditionalRuntimeEnabledLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3871 {
3872     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3873     TestObjectV8Internal::conditionalRuntimeEnabledLongAttributeAttributeGetter(info);
3874     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3875 }
3876 #endif // ENABLE(CONDITION)
3877
3878 #if ENABLE(CONDITION)
3879 static void conditionalRuntimeEnabledLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
3880 {
3881     v8::Handle<v8::Object> holder = info.Holder();
3882     ExceptionState exceptionState(ExceptionState::SetterContext, "conditionalRuntimeEnabledLongAttribute", "TestObject", holder, info.GetIsolate());
3883     TestObject* impl = V8TestObject::toNative(holder);
3884     TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState), exceptionState);
3885     impl->setConditionalRuntimeEnabledLongAttribute(cppValue);
3886 }
3887 #endif // ENABLE(CONDITION)
3888
3889 #if ENABLE(CONDITION)
3890 static void conditionalRuntimeEnabledLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
3891 {
3892     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
3893     TestObjectV8Internal::conditionalRuntimeEnabledLongAttributeAttributeSetter(v8Value, info);
3894     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3895 }
3896 #endif // ENABLE(CONDITION)
3897
3898 static void setterCallWithActiveWindowAndFirstWindowStringAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
3899 {
3900     v8::Handle<v8::Object> holder = info.Holder();
3901     TestObject* impl = V8TestObject::toNative(holder);
3902     v8SetReturnValueString(info, impl->setterCallWithActiveWindowAndFirstWindowStringAttribute(), info.GetIsolate());
3903 }
3904
3905 static void setterCallWithActiveWindowAndFirstWindowStringAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3906 {
3907     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3908     TestObjectV8Internal::setterCallWithActiveWindowAndFirstWindowStringAttributeAttributeGetter(info);
3909     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3910 }
3911
3912 static void setterCallWithActiveWindowAndFirstWindowStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
3913 {
3914     v8::Handle<v8::Object> holder = info.Holder();
3915     TestObject* impl = V8TestObject::toNative(holder);
3916     TOSTRING_VOID(V8StringResource<>, cppValue, v8Value);
3917     impl->setSetterCallWithActiveWindowAndFirstWindowStringAttribute(callingDOMWindow(info.GetIsolate()), enteredDOMWindow(info.GetIsolate()), cppValue);
3918 }
3919
3920 static void setterCallWithActiveWindowAndFirstWindowStringAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
3921 {
3922     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
3923     TestObjectV8Internal::setterCallWithActiveWindowAndFirstWindowStringAttributeAttributeSetter(v8Value, info);
3924     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3925 }
3926
3927 static void setterCallWithExecutionContextStringAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
3928 {
3929     v8::Handle<v8::Object> holder = info.Holder();
3930     TestObject* impl = V8TestObject::toNative(holder);
3931     v8SetReturnValueString(info, impl->setterCallWithExecutionContextStringAttribute(), info.GetIsolate());
3932 }
3933
3934 static void setterCallWithExecutionContextStringAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3935 {
3936     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3937     TestObjectV8Internal::setterCallWithExecutionContextStringAttributeAttributeGetter(info);
3938     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3939 }
3940
3941 static void setterCallWithExecutionContextStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
3942 {
3943     v8::Handle<v8::Object> holder = info.Holder();
3944     TestObject* impl = V8TestObject::toNative(holder);
3945     TOSTRING_VOID(V8StringResource<>, cppValue, v8Value);
3946     ExecutionContext* scriptContext = currentExecutionContext(info.GetIsolate());
3947     impl->setSetterCallWithExecutionContextStringAttribute(scriptContext, cppValue);
3948 }
3949
3950 static void setterCallWithExecutionContextStringAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
3951 {
3952     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
3953     TestObjectV8Internal::setterCallWithExecutionContextStringAttributeAttributeSetter(v8Value, info);
3954     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3955 }
3956
3957 static void treatNullAsNullStringStringAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
3958 {
3959     v8::Handle<v8::Object> holder = info.Holder();
3960     TestObject* impl = V8TestObject::toNative(holder);
3961     v8SetReturnValueString(info, impl->treatNullAsNullStringStringAttribute(), info.GetIsolate());
3962 }
3963
3964 static void treatNullAsNullStringStringAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3965 {
3966     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3967     TestObjectV8Internal::treatNullAsNullStringStringAttributeAttributeGetter(info);
3968     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3969 }
3970
3971 static void treatNullAsNullStringStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
3972 {
3973     v8::Handle<v8::Object> holder = info.Holder();
3974     TestObject* impl = V8TestObject::toNative(holder);
3975     TOSTRING_VOID(V8StringResource<WithNullCheck>, cppValue, v8Value);
3976     impl->setTreatNullAsNullStringStringAttribute(cppValue);
3977 }
3978
3979 static void treatNullAsNullStringStringAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
3980 {
3981     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
3982     TestObjectV8Internal::treatNullAsNullStringStringAttributeAttributeSetter(v8Value, info);
3983     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3984 }
3985
3986 static void treatReturnedNullStringAsNullStringAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
3987 {
3988     v8::Handle<v8::Object> holder = info.Holder();
3989     TestObject* impl = V8TestObject::toNative(holder);
3990     v8SetReturnValueStringOrNull(info, impl->treatReturnedNullStringAsNullStringAttribute(), info.GetIsolate());
3991 }
3992
3993 static void treatReturnedNullStringAsNullStringAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3994 {
3995     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3996     TestObjectV8Internal::treatReturnedNullStringAsNullStringAttributeAttributeGetter(info);
3997     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3998 }
3999
4000 static void treatReturnedNullStringAsNullStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
4001 {
4002     v8::Handle<v8::Object> holder = info.Holder();
4003     TestObject* impl = V8TestObject::toNative(holder);
4004     TOSTRING_VOID(V8StringResource<>, cppValue, v8Value);
4005     impl->setTreatReturnedNullStringAsNullStringAttribute(cppValue);
4006 }
4007
4008 static void treatReturnedNullStringAsNullStringAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
4009 {
4010     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
4011     TestObjectV8Internal::treatReturnedNullStringAsNullStringAttributeAttributeSetter(v8Value, info);
4012     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4013 }
4014
4015 static void treatReturnedNullStringAsUndefinedStringAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
4016 {
4017     v8::Handle<v8::Object> holder = info.Holder();
4018     TestObject* impl = V8TestObject::toNative(holder);
4019     v8SetReturnValueStringOrUndefined(info, impl->treatReturnedNullStringAsUndefinedStringAttribute(), info.GetIsolate());
4020 }
4021
4022 static void treatReturnedNullStringAsUndefinedStringAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
4023 {
4024     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
4025     TestObjectV8Internal::treatReturnedNullStringAsUndefinedStringAttributeAttributeGetter(info);
4026     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4027 }
4028
4029 static void treatReturnedNullStringAsUndefinedStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
4030 {
4031     v8::Handle<v8::Object> holder = info.Holder();
4032     TestObject* impl = V8TestObject::toNative(holder);
4033     TOSTRING_VOID(V8StringResource<>, cppValue, v8Value);
4034     impl->setTreatReturnedNullStringAsUndefinedStringAttribute(cppValue);
4035 }
4036
4037 static void treatReturnedNullStringAsUndefinedStringAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
4038 {
4039     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
4040     TestObjectV8Internal::treatReturnedNullStringAsUndefinedStringAttributeAttributeSetter(v8Value, info);
4041     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4042 }
4043
4044 static void typeCheckingInterfaceNullableStringFloatAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
4045 {
4046     v8::Handle<v8::Object> holder = info.Holder();
4047     TestObject* impl = V8TestObject::toNative(holder);
4048     v8SetReturnValue(info, impl->typeCheckingInterfaceNullableStringFloatAttribute());
4049 }
4050
4051 static void typeCheckingInterfaceNullableStringFloatAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
4052 {
4053     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
4054     TestObjectV8Internal::typeCheckingInterfaceNullableStringFloatAttributeAttributeGetter(info);
4055     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4056 }
4057
4058 static void typeCheckingInterfaceNullableStringFloatAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
4059 {
4060     v8::Handle<v8::Object> holder = info.Holder();
4061     TestObject* impl = V8TestObject::toNative(holder);
4062     TONATIVE_VOID(float, cppValue, static_cast<float>(v8Value->NumberValue()));
4063     impl->setTypeCheckingInterfaceNullableStringFloatAttribute(cppValue);
4064 }
4065
4066 static void typeCheckingInterfaceNullableStringFloatAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
4067 {
4068     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
4069     TestObjectV8Internal::typeCheckingInterfaceNullableStringFloatAttributeAttributeSetter(v8Value, info);
4070     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4071 }
4072
4073 static void typeCheckingInterfaceTestInterfaceAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
4074 {
4075     v8::Handle<v8::Object> holder = info.Holder();
4076     TestObject* impl = V8TestObject::toNative(holder);
4077     v8SetReturnValueFast(info, WTF::getPtr(impl->typeCheckingInterfaceTestInterfaceAttribute()), impl);
4078 }
4079
4080 static void typeCheckingInterfaceTestInterfaceAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
4081 {
4082     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
4083     TestObjectV8Internal::typeCheckingInterfaceTestInterfaceAttributeAttributeGetter(info);
4084     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4085 }
4086
4087 static void typeCheckingInterfaceTestInterfaceAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
4088 {
4089     v8::Handle<v8::Object> holder = info.Holder();
4090     ExceptionState exceptionState(ExceptionState::SetterContext, "typeCheckingInterfaceTestInterfaceAttribute", "TestObject", holder, info.GetIsolate());
4091     if (!V8TestInterface::hasInstance(v8Value, info.GetIsolate())) {
4092         exceptionState.throwTypeError("The provided value is not of type 'TestInterface'.");
4093         exceptionState.throwIfNeeded();
4094         return;
4095     }
4096     TestObject* impl = V8TestObject::toNative(holder);
4097     TONATIVE_VOID(TestInterfaceImplementation*, cppValue, V8TestInterface::toNativeWithTypeCheck(info.GetIsolate(), v8Value));
4098     impl->setTypeCheckingInterfaceTestInterfaceAttribute(WTF::getPtr(cppValue));
4099 }
4100
4101 static void typeCheckingInterfaceTestInterfaceAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
4102 {
4103     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
4104     TestObjectV8Internal::typeCheckingInterfaceTestInterfaceAttributeAttributeSetter(v8Value, info);
4105     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4106 }
4107
4108 static void typeCheckingNullableTestInterfaceOrNullAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
4109 {
4110     v8::Handle<v8::Object> holder = info.Holder();
4111     TestObject* impl = V8TestObject::toNative(holder);
4112     RefPtr<TestInterfaceImplementation> v8Value = impl->typeCheckingNullableTestInterfaceOrNullAttribute();
4113     if (!v8Value) {
4114         v8SetReturnValueNull(info);
4115         return;
4116     }
4117     v8SetReturnValueFast(info, WTF::getPtr(v8Value.release()), impl);
4118 }
4119
4120 static void typeCheckingNullableTestInterfaceOrNullAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
4121 {
4122     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
4123     TestObjectV8Internal::typeCheckingNullableTestInterfaceOrNullAttributeAttributeGetter(info);
4124     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4125 }
4126
4127 static void typeCheckingNullableTestInterfaceOrNullAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
4128 {
4129     v8::Handle<v8::Object> holder = info.Holder();
4130     ExceptionState exceptionState(ExceptionState::SetterContext, "typeCheckingNullableTestInterfaceOrNullAttribute", "TestObject", holder, info.GetIsolate());
4131     TestObject* impl = V8TestObject::toNative(holder);
4132     TONATIVE_VOID(TestInterfaceImplementation*, cppValue, V8TestInterface::toNativeWithTypeCheck(info.GetIsolate(), v8Value));
4133     impl->setTypeCheckingNullableTestInterfaceOrNullAttribute(WTF::getPtr(cppValue));
4134 }
4135
4136 static void typeCheckingNullableTestInterfaceOrNullAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
4137 {
4138     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
4139     TestObjectV8Internal::typeCheckingNullableTestInterfaceOrNullAttributeAttributeSetter(v8Value, info);
4140     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4141 }
4142
4143 static void typeCheckingInterfaceNullableTestInterfaceOrNullAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
4144 {
4145     v8::Handle<v8::Object> holder = info.Holder();
4146     TestObject* impl = V8TestObject::toNative(holder);
4147     RefPtr<TestInterfaceImplementation> v8Value = impl->typeCheckingInterfaceNullableTestInterfaceOrNullAttribute();
4148     if (!v8Value) {
4149         v8SetReturnValueNull(info);
4150         return;
4151     }
4152     v8SetReturnValueFast(info, WTF::getPtr(v8Value.release()), impl);
4153 }
4154
4155 static void typeCheckingInterfaceNullableTestInterfaceOrNullAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
4156 {
4157     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
4158     TestObjectV8Internal::typeCheckingInterfaceNullableTestInterfaceOrNullAttributeAttributeGetter(info);
4159     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4160 }
4161
4162 static void typeCheckingInterfaceNullableTestInterfaceOrNullAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
4163 {
4164     v8::Handle<v8::Object> holder = info.Holder();
4165     ExceptionState exceptionState(ExceptionState::SetterContext, "typeCheckingInterfaceNullableTestInterfaceOrNullAttribute", "TestObject", holder, info.GetIsolate());
4166     if (!isUndefinedOrNull(v8Value) && !V8TestInterface::hasInstance(v8Value, info.GetIsolate())) {
4167         exceptionState.throwTypeError("The provided value is not of type 'TestInterface'.");
4168         exceptionState.throwIfNeeded();
4169         return;
4170     }
4171     TestObject* impl = V8TestObject::toNative(holder);
4172     TONATIVE_VOID(TestInterfaceImplementation*, cppValue, V8TestInterface::toNativeWithTypeCheck(info.GetIsolate(), v8Value));
4173     impl->setTypeCheckingInterfaceNullableTestInterfaceOrNullAttribute(WTF::getPtr(cppValue));
4174 }
4175
4176 static void typeCheckingInterfaceNullableTestInterfaceOrNullAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
4177 {
4178     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
4179     TestObjectV8Internal::typeCheckingInterfaceNullableTestInterfaceOrNullAttributeAttributeSetter(v8Value, info);
4180     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4181 }
4182
4183 static void urlStringAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
4184 {
4185     v8::Handle<v8::Object> holder = info.Holder();
4186     TestObject* impl = V8TestObject::toNative(holder);
4187     v8SetReturnValueString(info, impl->getURLAttribute(HTMLNames::urlstringattributeAttr), info.GetIsolate());
4188 }
4189
4190 static void urlStringAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
4191 {
4192     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
4193     TestObjectV8Internal::urlStringAttributeAttributeGetter(info);
4194     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4195 }
4196
4197 static void urlStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
4198 {
4199     v8::Handle<v8::Object> holder = info.Holder();
4200     TestObject* impl = V8TestObject::toNative(holder);
4201     TOSTRING_VOID(V8StringResource<>, cppValue, v8Value);
4202     CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
4203     impl->setAttribute(HTMLNames::urlstringattributeAttr, cppValue);
4204 }
4205
4206 static void urlStringAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
4207 {
4208     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
4209     CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
4210     TestObjectV8Internal::urlStringAttributeAttributeSetter(v8Value, info);
4211     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4212 }
4213
4214 static void urlStringAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
4215 {
4216     v8::Handle<v8::Object> holder = info.Holder();
4217     TestObject* impl = V8TestObject::toNative(holder);
4218     v8SetReturnValueString(info, impl->getURLAttribute(HTMLNames::reflectUrlAttributeAttr), info.GetIsolate());
4219 }
4220
4221 static void urlStringAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
4222 {
4223     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
4224     TestObjectV8Internal::urlStringAttributeAttributeGetter(info);
4225     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4226 }
4227
4228 static void urlStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
4229 {
4230     v8::Handle<v8::Object> holder = info.Holder();
4231     TestObject* impl = V8TestObject::toNative(holder);
4232     TOSTRING_VOID(V8StringResource<>, cppValue, v8Value);
4233     CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
4234     impl->setAttribute(HTMLNames::reflectUrlAttributeAttr, cppValue);
4235 }
4236
4237 static void urlStringAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
4238 {
4239     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
4240     CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
4241     TestObjectV8Internal::urlStringAttributeAttributeSetter(v8Value, info);
4242     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4243 }
4244
4245 static void unforgeableLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
4246 {
4247     v8::Handle<v8::Object> holder = V8TestObject::findInstanceInPrototypeChain(info.This(), info.GetIsolate());
4248     if (holder.IsEmpty())
4249         return;
4250     TestObject* impl = V8TestObject::toNative(holder);
4251     v8SetReturnValueInt(info, impl->unforgeableLongAttribute());
4252 }
4253
4254 static void unforgeableLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
4255 {
4256     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
4257     TestObjectV8Internal::unforgeableLongAttributeAttributeGetter(info);
4258     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4259 }
4260
4261 static void unforgeableLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
4262 {
4263     v8::Handle<v8::Object> holder = info.Holder();
4264     ExceptionState exceptionState(ExceptionState::SetterContext, "unforgeableLongAttribute", "TestObject", holder, info.GetIsolate());
4265     TestObject* impl = V8TestObject::toNative(holder);
4266     TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState), exceptionState);
4267     impl->setUnforgeableLongAttribute(cppValue);
4268 }
4269
4270 static void unforgeableLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
4271 {
4272     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
4273     TestObjectV8Internal::unforgeableLongAttributeAttributeSetter(v8Value, info);
4274     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4275 }
4276
4277 static void activityLoggingSetterOnlyLogPreviousValueAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
4278 {
4279     v8::Handle<v8::Object> holder = info.Holder();
4280     TestObject* impl = V8TestObject::toNative(holder);
4281     v8SetReturnValueInt(info, impl->activityLoggingSetterOnlyLogPreviousValueAttribute());
4282 }
4283
4284 static void activityLoggingSetterOnlyLogPreviousValueAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
4285 {
4286     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
4287     TestObjectV8Internal::activityLoggingSetterOnlyLogPreviousValueAttributeAttributeGetter(info);
4288     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4289 }
4290
4291 static void activityLoggingSetterOnlyLogPreviousValueAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
4292 {
4293     v8::Handle<v8::Object> holder = info.Holder();
4294     ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggingSetterOnlyLogPreviousValueAttribute", "TestObject", holder, info.GetIsolate());
4295     TestObject* impl = V8TestObject::toNative(holder);
4296     TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState), exceptionState);
4297     impl->setActivityLoggingSetterOnlyLogPreviousValueAttribute(cppValue);
4298 }
4299
4300 static void activityLoggingSetterOnlyLogPreviousValueAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
4301 {
4302     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
4303     DOMWrapperWorld& world = DOMWrapperWorld::current(info.GetIsolate());
4304     if (world.activityLogger()) {
4305         TestObject* impl = V8TestObject::toNative(info.Holder());
4306         int original = impl->activityLoggingSetterOnlyLogPreviousValueAttribute();
4307         v8::Handle<v8::Value> originalValue = v8::Integer::New(info.GetIsolate(), original);
4308         world.activityLogger()->logSetter("TestObject.activityLoggingSetterOnlyLogPreviousValueAttribute", v8Value, originalValue);
4309     }
4310     TestObjectV8Internal::activityLoggingSetterOnlyLogPreviousValueAttributeAttributeSetter(v8Value, info);
4311     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4312 }
4313
4314 static void activityLoggingLogPreviousValueInterfaceAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
4315 {
4316     v8::Handle<v8::Object> holder = info.Holder();
4317     TestObject* impl = V8TestObject::toNative(holder);
4318     v8SetReturnValueFast(info, WTF::getPtr(impl->activityLoggingLogPreviousValueInterfaceAttribute()), impl);
4319 }
4320
4321 static void activityLoggingLogPreviousValueInterfaceAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
4322 {
4323     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
4324     DOMWrapperWorld& world = DOMWrapperWorld::current(info.GetIsolate());
4325     if (world.activityLogger())
4326         world.activityLogger()->logGetter("TestObject.activityLoggingLogPreviousValueInterfaceAttribute");
4327     TestObjectV8Internal::activityLoggingLogPreviousValueInterfaceAttributeAttributeGetter(info);
4328     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4329 }
4330
4331 static void activityLoggingLogPreviousValueInterfaceAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
4332 {
4333     v8::Handle<v8::Object> holder = info.Holder();
4334     TestObject* impl = V8TestObject::toNative(holder);
4335     TONATIVE_VOID(TestInterfaceEmpty*, cppValue, V8TestInterfaceEmpty::toNativeWithTypeCheck(info.GetIsolate(), v8Value));
4336     impl->setActivityLoggingLogPreviousValueInterfaceAttribute(WTF::getPtr(cppValue));
4337 }
4338
4339 static void activityLoggingLogPreviousValueInterfaceAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
4340 {
4341     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
4342     DOMWrapperWorld& world = DOMWrapperWorld::current(info.GetIsolate());
4343     if (world.activityLogger()) {
4344         TestObject* impl = V8TestObject::toNative(info.Holder());
4345         RefPtr<TestInterfaceEmpty> original = impl->activityLoggingLogPreviousValueInterfaceAttribute();
4346         v8::Handle<v8::Value> originalValue = toV8(original, info.Holder(), info.GetIsolate());
4347         world.activityLogger()->logSetter("TestObject.activityLoggingLogPreviousValueInterfaceAttribute", v8Value, originalValue);
4348     }
4349     TestObjectV8Internal::activityLoggingLogPreviousValueInterfaceAttributeAttributeSetter(v8Value, info);
4350     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4351 }
4352
4353 static void testInterfaceAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
4354 {
4355     v8::Handle<v8::Object> holder = info.Holder();
4356     TestObject* impl = V8TestObject::toNative(holder);
4357     v8SetReturnValueFast(info, WTF::getPtr(impl->testInterfaceAttribute()), impl);
4358 }
4359
4360 static void testInterfaceAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
4361 {
4362     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
4363     TestObjectV8Internal::testInterfaceAttributeAttributeGetter(info);
4364     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4365 }
4366
4367 static void testInterfaceAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
4368 {
4369     v8::Handle<v8::Object> holder = info.Holder();
4370     TestObject* impl = V8TestObject::toNative(holder);
4371     TONATIVE_VOID(TestInterfaceImplementation*, cppValue, V8TestInterface::toNativeWithTypeCheck(info.GetIsolate(), v8Value));
4372     impl->setTestInterfaceAttribute(WTF::getPtr(cppValue));
4373 }
4374
4375 static void testInterfaceAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
4376 {
4377     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
4378     TestObjectV8Internal::testInterfaceAttributeAttributeSetter(v8Value, info);
4379     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4380 }
4381
4382 static void testInterfaceGarbageCollectedAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
4383 {
4384     v8::Handle<v8::Object> holder = info.Holder();
4385     TestObject* impl = V8TestObject::toNative(holder);
4386     v8SetReturnValueFast(info, WTF::getPtr(impl->testInterfaceGarbageCollectedAttribute()), impl);
4387 }
4388
4389 static void testInterfaceGarbageCollectedAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
4390 {
4391     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
4392     TestObjectV8Internal::testInterfaceGarbageCollectedAttributeAttributeGetter(info);
4393     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4394 }
4395
4396 static void testInterfaceGarbageCollectedAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
4397 {
4398     v8::Handle<v8::Object> holder = info.Holder();
4399     TestObject* impl = V8TestObject::toNative(holder);
4400     TONATIVE_VOID(TestInterfaceGarbageCollected*, cppValue, V8TestInterfaceGarbageCollected::toNativeWithTypeCheck(info.GetIsolate(), v8Value));
4401     impl->setTestInterfaceGarbageCollectedAttribute(WTF::getPtr(cppValue));
4402 }
4403
4404 static void testInterfaceGarbageCollectedAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
4405 {
4406     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
4407     TestObjectV8Internal::testInterfaceGarbageCollectedAttributeAttributeSetter(v8Value, info);
4408     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4409 }
4410
4411 static void testInterfaceGarbageCollectedOrNullAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
4412 {
4413     v8::Handle<v8::Object> holder = info.Holder();
4414     TestObject* impl = V8TestObject::toNative(holder);
4415     bool isNull = false;
4416     RawPtr<TestInterfaceGarbageCollected> v8Value = impl->testInterfaceGarbageCollectedOrNullAttribute(isNull);
4417     if (isNull) {
4418         v8SetReturnValueNull(info);
4419         return;
4420     }
4421     v8SetReturnValueFast(info, WTF::getPtr(v8Value.release()), impl);
4422 }
4423
4424 static void testInterfaceGarbageCollectedOrNullAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
4425 {
4426     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
4427     TestObjectV8Internal::testInterfaceGarbageCollectedOrNullAttributeAttributeGetter(info);
4428     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4429 }
4430
4431 static void testInterfaceGarbageCollectedOrNullAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
4432 {
4433     v8::Handle<v8::Object> holder = info.Holder();
4434     TestObject* impl = V8TestObject::toNative(holder);
4435     TONATIVE_VOID(TestInterfaceGarbageCollected*, cppValue, V8TestInterfaceGarbageCollected::toNativeWithTypeCheck(info.GetIsolate(), v8Value));
4436     impl->setTestInterfaceGarbageCollectedOrNullAttribute(WTF::getPtr(cppValue));
4437 }
4438
4439 static void testInterfaceGarbageCollectedOrNullAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
4440 {
4441     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
4442     TestObjectV8Internal::testInterfaceGarbageCollectedOrNullAttributeAttributeSetter(v8Value, info);
4443     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4444 }
4445
4446 static void testInterfaceWillBeGarbageCollectedAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
4447 {
4448     v8::Handle<v8::Object> holder = info.Holder();
4449     TestObject* impl = V8TestObject::toNative(holder);
4450     v8SetReturnValueFast(info, WTF::getPtr(impl->testInterfaceWillBeGarbageCollectedAttribute()), impl);
4451 }
4452
4453 static void testInterfaceWillBeGarbageCollectedAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
4454 {
4455     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
4456     TestObjectV8Internal::testInterfaceWillBeGarbageCollectedAttributeAttributeGetter(info);
4457     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4458 }
4459
4460 static void testInterfaceWillBeGarbageCollectedAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
4461 {
4462     v8::Handle<v8::Object> holder = info.Holder();
4463     TestObject* impl = V8TestObject::toNative(holder);
4464     TONATIVE_VOID(TestInterfaceWillBeGarbageCollected*, cppValue, V8TestInterfaceWillBeGarbageCollected::toNativeWithTypeCheck(info.GetIsolate(), v8Value));
4465     impl->setTestInterfaceWillBeGarbageCollectedAttribute(WTF::getPtr(cppValue));
4466 }
4467
4468 static void testInterfaceWillBeGarbageCollectedAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
4469 {
4470     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
4471     TestObjectV8Internal::testInterfaceWillBeGarbageCollectedAttributeAttributeSetter(v8Value, info);
4472     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4473 }
4474
4475 static void testInterfaceWillBeGarbageCollectedOrNullAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
4476 {
4477     v8::Handle<v8::Object> holder = info.Holder();
4478     TestObject* impl = V8TestObject::toNative(holder);
4479     bool isNull = false;
4480     RefPtrWillBeRawPtr<TestInterfaceWillBeGarbageCollected> v8Value = impl->testInterfaceWillBeGarbageCollectedOrNullAttribute(isNull);
4481     if (isNull) {
4482         v8SetReturnValueNull(info);
4483         return;
4484     }
4485     v8SetReturnValueFast(info, WTF::getPtr(v8Value.release()), impl);
4486 }
4487
4488 static void testInterfaceWillBeGarbageCollectedOrNullAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
4489 {
4490     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
4491     TestObjectV8Internal::testInterfaceWillBeGarbageCollectedOrNullAttributeAttributeGetter(info);
4492     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4493 }
4494
4495 static void testInterfaceWillBeGarbageCollectedOrNullAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
4496 {
4497     v8::Handle<v8::Object> holder = info.Holder();
4498     TestObject* impl = V8TestObject::toNative(holder);
4499     TONATIVE_VOID(TestInterfaceWillBeGarbageCollected*, cppValue, V8TestInterfaceWillBeGarbageCollected::toNativeWithTypeCheck(info.GetIsolate(), v8Value));
4500     impl->setTestInterfaceWillBeGarbageCollectedOrNullAttribute(WTF::getPtr(cppValue));
4501 }
4502
4503 static void testInterfaceWillBeGarbageCollectedOrNullAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
4504 {
4505     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
4506     TestObjectV8Internal::testInterfaceWillBeGarbageCollectedOrNullAttributeAttributeSetter(v8Value, info);
4507     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4508 }
4509
4510 static void TestObjectConstructorGetter(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
4511 {
4512     v8::Handle<v8::Value> data = info.Data();
4513     ASSERT(data->IsExternal());
4514     V8PerContextData* perContextData = V8PerContextData::from(info.Holder()->CreationContext());
4515     if (!perContextData)
4516         return;
4517     v8SetReturnValue(info, perContextData->constructorForType(WrapperTypeInfo::unwrap(data)));
4518 }
4519
4520 static void testInterfaceEmptyConstructorAttributeConstructorGetterCallback(v8::Local<v8::String> property, const v8::PropertyCallbackInfo<v8::Value>& info)
4521 {
4522     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
4523     UseCounter::countDeprecation(callingExecutionContext(info.GetIsolate()), UseCounter::deprecatedTestInterfaceEmptyConstructorAttribute);
4524     TestObjectV8Internal::TestObjectConstructorGetter(property, info);
4525     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4526 }
4527
4528 static void measureAsFeatureNameTestInterfaceEmptyConstructorAttributeConstructorGetterCallback(v8::Local<v8::String> property, const v8::PropertyCallbackInfo<v8::Value>& info)
4529 {
4530     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
4531     UseCounter::count(callingExecutionContext(info.GetIsolate()), UseCounter::FeatureName);
4532     TestObjectV8Internal::TestObjectConstructorGetter(property, info);
4533     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4534 }
4535
4536 static void TestObjectReplaceableAttributeSetter(v8::Local<v8::String> name, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
4537 {
4538     if (info.This()->IsObject())
4539         v8::Handle<v8::Object>::Cast(info.This())->ForceSet(name, v8Value);
4540 }
4541
4542 static void TestObjectReplaceableAttributeSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
4543 {
4544     TestObjectV8Internal::TestObjectReplaceableAttributeSetter(name, v8Value, info);
4545 }
4546
4547 static void voidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4548 {
4549     TestObject* impl = V8TestObject::toNative(info.Holder());
4550     impl->voidMethod();
4551 }
4552
4553 static void voidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4554 {
4555     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4556     TestObjectV8Internal::voidMethodMethod(info);
4557     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4558 }
4559
4560 static void staticVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4561 {
4562     TestObject::staticVoidMethod();
4563 }
4564
4565 static void staticVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4566 {
4567     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4568     TestObjectV8Internal::staticVoidMethodMethod(info);
4569     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4570 }
4571
4572 static void dateMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4573 {
4574     TestObject* impl = V8TestObject::toNative(info.Holder());
4575     v8SetReturnValue(info, v8DateOrNaN(impl->dateMethod(), info.GetIsolate()));
4576 }
4577
4578 static void dateMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4579 {
4580     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4581     TestObjectV8Internal::dateMethodMethod(info);
4582     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4583 }
4584
4585 static void stringMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4586 {
4587     TestObject* impl = V8TestObject::toNative(info.Holder());
4588     v8SetReturnValueString(info, impl->stringMethod(), info.GetIsolate());
4589 }
4590
4591 static void stringMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4592 {
4593     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4594     TestObjectV8Internal::stringMethodMethod(info);
4595     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4596 }
4597
4598 static void readonlyDOMTimeStampMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4599 {
4600     TestObject* impl = V8TestObject::toNative(info.Holder());
4601     v8SetReturnValue(info, static_cast<double>(impl->readonlyDOMTimeStampMethod()));
4602 }
4603
4604 static void readonlyDOMTimeStampMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4605 {
4606     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4607     TestObjectV8Internal::readonlyDOMTimeStampMethodMethod(info);
4608     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4609 }
4610
4611 static void booleanMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4612 {
4613     TestObject* impl = V8TestObject::toNative(info.Holder());
4614     v8SetReturnValueBool(info, impl->booleanMethod());
4615 }
4616
4617 static void booleanMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4618 {
4619     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4620     TestObjectV8Internal::booleanMethodMethod(info);
4621     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4622 }
4623
4624 static void byteMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4625 {
4626     TestObject* impl = V8TestObject::toNative(info.Holder());
4627     v8SetReturnValueInt(info, impl->byteMethod());
4628 }
4629
4630 static void byteMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4631 {
4632     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4633     TestObjectV8Internal::byteMethodMethod(info);
4634     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4635 }
4636
4637 static void doubleMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4638 {
4639     TestObject* impl = V8TestObject::toNative(info.Holder());
4640     v8SetReturnValue(info, impl->doubleMethod());
4641 }
4642
4643 static void doubleMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4644 {
4645     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4646     TestObjectV8Internal::doubleMethodMethod(info);
4647     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4648 }
4649
4650 static void floatMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4651 {
4652     TestObject* impl = V8TestObject::toNative(info.Holder());
4653     v8SetReturnValue(info, impl->floatMethod());
4654 }
4655
4656 static void floatMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4657 {
4658     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4659     TestObjectV8Internal::floatMethodMethod(info);
4660     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4661 }
4662
4663 static void longMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4664 {
4665     TestObject* impl = V8TestObject::toNative(info.Holder());
4666     v8SetReturnValueInt(info, impl->longMethod());
4667 }
4668
4669 static void longMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4670 {
4671     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4672     TestObjectV8Internal::longMethodMethod(info);
4673     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4674 }
4675
4676 static void longLongMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4677 {
4678     TestObject* impl = V8TestObject::toNative(info.Holder());
4679     v8SetReturnValue(info, static_cast<double>(impl->longLongMethod()));
4680 }
4681
4682 static void longLongMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4683 {
4684     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4685     TestObjectV8Internal::longLongMethodMethod(info);
4686     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4687 }
4688
4689 static void octetMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4690 {
4691     TestObject* impl = V8TestObject::toNative(info.Holder());
4692     v8SetReturnValueUnsigned(info, impl->octetMethod());
4693 }
4694
4695 static void octetMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4696 {
4697     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4698     TestObjectV8Internal::octetMethodMethod(info);
4699     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4700 }
4701
4702 static void shortMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4703 {
4704     TestObject* impl = V8TestObject::toNative(info.Holder());
4705     v8SetReturnValueInt(info, impl->shortMethod());
4706 }
4707
4708 static void shortMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4709 {
4710     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4711     TestObjectV8Internal::shortMethodMethod(info);
4712     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4713 }
4714
4715 static void unsignedLongMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4716 {
4717     TestObject* impl = V8TestObject::toNative(info.Holder());
4718     v8SetReturnValueUnsigned(info, impl->unsignedLongMethod());
4719 }
4720
4721 static void unsignedLongMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4722 {
4723     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4724     TestObjectV8Internal::unsignedLongMethodMethod(info);
4725     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4726 }
4727
4728 static void unsignedLongLongMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4729 {
4730     TestObject* impl = V8TestObject::toNative(info.Holder());
4731     v8SetReturnValue(info, static_cast<double>(impl->unsignedLongLongMethod()));
4732 }
4733
4734 static void unsignedLongLongMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4735 {
4736     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4737     TestObjectV8Internal::unsignedLongLongMethodMethod(info);
4738     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4739 }
4740
4741 static void unsignedShortMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4742 {
4743     TestObject* impl = V8TestObject::toNative(info.Holder());
4744     v8SetReturnValueUnsigned(info, impl->unsignedShortMethod());
4745 }
4746
4747 static void unsignedShortMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4748 {
4749     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4750     TestObjectV8Internal::unsignedShortMethodMethod(info);
4751     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4752 }
4753
4754 static void voidMethodDateArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4755 {
4756     if (UNLIKELY(info.Length() < 1)) {
4757         throwArityTypeErrorForMethod("voidMethodDateArg", "TestObject", 1, info.Length(), info.GetIsolate());
4758         return;
4759     }
4760     TestObject* impl = V8TestObject::toNative(info.Holder());
4761     TONATIVE_VOID(double, dateArg, toCoreDate(info[0]));
4762     impl->voidMethodDateArg(dateArg);
4763 }
4764
4765 static void voidMethodDateArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4766 {
4767     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4768     TestObjectV8Internal::voidMethodDateArgMethod(info);
4769     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4770 }
4771
4772 static void voidMethodStringArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4773 {
4774     if (UNLIKELY(info.Length() < 1)) {
4775         throwArityTypeErrorForMethod("voidMethodStringArg", "TestObject", 1, info.Length(), info.GetIsolate());
4776         return;
4777     }
4778     TestObject* impl = V8TestObject::toNative(info.Holder());
4779     TOSTRING_VOID(V8StringResource<>, stringArg, info[0]);
4780     impl->voidMethodStringArg(stringArg);
4781 }
4782
4783 static void voidMethodStringArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4784 {
4785     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4786     TestObjectV8Internal::voidMethodStringArgMethod(info);
4787     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4788 }
4789
4790 static void voidMethodDOMTimeStampArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4791 {
4792     ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodDOMTimeStampArg", "TestObject", info.Holder(), info.GetIsolate());
4793     if (UNLIKELY(info.Length() < 1)) {
4794         throwArityTypeError(exceptionState, 1, info.Length());
4795         return;
4796     }
4797     TestObject* impl = V8TestObject::toNative(info.Holder());
4798     TONATIVE_VOID_EXCEPTIONSTATE(unsigned long long, domTimeStampArg, toUInt64(info[0], exceptionState), exceptionState);
4799     impl->voidMethodDOMTimeStampArg(domTimeStampArg);
4800 }
4801
4802 static void voidMethodDOMTimeStampArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4803 {
4804     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4805     TestObjectV8Internal::voidMethodDOMTimeStampArgMethod(info);
4806     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4807 }
4808
4809 static void voidMethodBooleanArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4810 {
4811     if (UNLIKELY(info.Length() < 1)) {
4812         throwArityTypeErrorForMethod("voidMethodBooleanArg", "TestObject", 1, info.Length(), info.GetIsolate());
4813         return;
4814     }
4815     TestObject* impl = V8TestObject::toNative(info.Holder());
4816     TONATIVE_VOID(bool, booleanArg, info[0]->BooleanValue());
4817     impl->voidMethodBooleanArg(booleanArg);
4818 }
4819
4820 static void voidMethodBooleanArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4821 {
4822     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4823     TestObjectV8Internal::voidMethodBooleanArgMethod(info);
4824     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4825 }
4826
4827 static void voidMethodByteArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4828 {
4829     ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodByteArg", "TestObject", info.Holder(), info.GetIsolate());
4830     if (UNLIKELY(info.Length() < 1)) {
4831         throwArityTypeError(exceptionState, 1, info.Length());
4832         return;
4833     }
4834     TestObject* impl = V8TestObject::toNative(info.Holder());
4835     TONATIVE_VOID_EXCEPTIONSTATE(int, byteArg, toInt8(info[0], exceptionState), exceptionState);
4836     impl->voidMethodByteArg(byteArg);
4837 }
4838
4839 static void voidMethodByteArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4840 {
4841     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4842     TestObjectV8Internal::voidMethodByteArgMethod(info);
4843     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4844 }
4845
4846 static void voidMethodDoubleArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4847 {
4848     if (UNLIKELY(info.Length() < 1)) {
4849         throwArityTypeErrorForMethod("voidMethodDoubleArg", "TestObject", 1, info.Length(), info.GetIsolate());
4850         return;
4851     }
4852     TestObject* impl = V8TestObject::toNative(info.Holder());
4853     TONATIVE_VOID(double, doubleArg, static_cast<double>(info[0]->NumberValue()));
4854     impl->voidMethodDoubleArg(doubleArg);
4855 }
4856
4857 static void voidMethodDoubleArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4858 {
4859     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4860     TestObjectV8Internal::voidMethodDoubleArgMethod(info);
4861     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4862 }
4863
4864 static void voidMethodFloatArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4865 {
4866     if (UNLIKELY(info.Length() < 1)) {
4867         throwArityTypeErrorForMethod("voidMethodFloatArg", "TestObject", 1, info.Length(), info.GetIsolate());
4868         return;
4869     }
4870     TestObject* impl = V8TestObject::toNative(info.Holder());
4871     TONATIVE_VOID(float, floatArg, static_cast<float>(info[0]->NumberValue()));
4872     impl->voidMethodFloatArg(floatArg);
4873 }
4874
4875 static void voidMethodFloatArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4876 {
4877     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4878     TestObjectV8Internal::voidMethodFloatArgMethod(info);
4879     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4880 }
4881
4882 static void voidMethodLongArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4883 {
4884     ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodLongArg", "TestObject", info.Holder(), info.GetIsolate());
4885     if (UNLIKELY(info.Length() < 1)) {
4886         throwArityTypeError(exceptionState, 1, info.Length());
4887         return;
4888     }
4889     TestObject* impl = V8TestObject::toNative(info.Holder());
4890     TONATIVE_VOID_EXCEPTIONSTATE(int, longArg, toInt32(info[0], exceptionState), exceptionState);
4891     impl->voidMethodLongArg(longArg);
4892 }
4893
4894 static void voidMethodLongArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4895 {
4896     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4897     TestObjectV8Internal::voidMethodLongArgMethod(info);
4898     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4899 }
4900
4901 static void voidMethodLongLongArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4902 {
4903     ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodLongLongArg", "TestObject", info.Holder(), info.GetIsolate());
4904     if (UNLIKELY(info.Length() < 1)) {
4905         throwArityTypeError(exceptionState, 1, info.Length());
4906         return;
4907     }
4908     TestObject* impl = V8TestObject::toNative(info.Holder());
4909     TONATIVE_VOID_EXCEPTIONSTATE(long long, longLongArg, toInt64(info[0], exceptionState), exceptionState);
4910     impl->voidMethodLongLongArg(longLongArg);
4911 }
4912
4913 static void voidMethodLongLongArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4914 {
4915     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4916     TestObjectV8Internal::voidMethodLongLongArgMethod(info);
4917     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4918 }
4919
4920 static void voidMethodOctetArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4921 {
4922     ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodOctetArg", "TestObject", info.Holder(), info.GetIsolate());
4923     if (UNLIKELY(info.Length() < 1)) {
4924         throwArityTypeError(exceptionState, 1, info.Length());
4925         return;
4926     }
4927     TestObject* impl = V8TestObject::toNative(info.Holder());
4928     TONATIVE_VOID_EXCEPTIONSTATE(unsigned, octetArg, toUInt8(info[0], exceptionState), exceptionState);
4929     impl->voidMethodOctetArg(octetArg);
4930 }
4931
4932 static void voidMethodOctetArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4933 {
4934     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4935     TestObjectV8Internal::voidMethodOctetArgMethod(info);
4936     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4937 }
4938
4939 static void voidMethodShortArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4940 {
4941     ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodShortArg", "TestObject", info.Holder(), info.GetIsolate());
4942     if (UNLIKELY(info.Length() < 1)) {
4943         throwArityTypeError(exceptionState, 1, info.Length());
4944         return;
4945     }
4946     TestObject* impl = V8TestObject::toNative(info.Holder());
4947     TONATIVE_VOID_EXCEPTIONSTATE(int, shortArg, toInt16(info[0], exceptionState), exceptionState);
4948     impl->voidMethodShortArg(shortArg);
4949 }
4950
4951 static void voidMethodShortArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4952 {
4953     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4954     TestObjectV8Internal::voidMethodShortArgMethod(info);
4955     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4956 }
4957
4958 static void voidMethodUnsignedLongArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4959 {
4960     ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodUnsignedLongArg", "TestObject", info.Holder(), info.GetIsolate());
4961     if (UNLIKELY(info.Length() < 1)) {
4962         throwArityTypeError(exceptionState, 1, info.Length());
4963         return;
4964     }
4965     TestObject* impl = V8TestObject::toNative(info.Holder());
4966     TONATIVE_VOID_EXCEPTIONSTATE(unsigned, unsignedLongArg, toUInt32(info[0], exceptionState), exceptionState);
4967     impl->voidMethodUnsignedLongArg(unsignedLongArg);
4968 }
4969
4970 static void voidMethodUnsignedLongArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4971 {
4972     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4973     TestObjectV8Internal::voidMethodUnsignedLongArgMethod(info);
4974     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4975 }
4976
4977 static void voidMethodUnsignedLongLongArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4978 {
4979     ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodUnsignedLongLongArg", "TestObject", info.Holder(), info.GetIsolate());
4980     if (UNLIKELY(info.Length() < 1)) {
4981         throwArityTypeError(exceptionState, 1, info.Length());
4982         return;
4983     }
4984     TestObject* impl = V8TestObject::toNative(info.Holder());
4985     TONATIVE_VOID_EXCEPTIONSTATE(unsigned long long, unsignedLongLongArg, toUInt64(info[0], exceptionState), exceptionState);
4986     impl->voidMethodUnsignedLongLongArg(unsignedLongLongArg);
4987 }
4988
4989 static void voidMethodUnsignedLongLongArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4990 {
4991     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4992     TestObjectV8Internal::voidMethodUnsignedLongLongArgMethod(info);
4993     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4994 }
4995
4996 static void voidMethodUnsignedShortArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4997 {
4998     ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodUnsignedShortArg", "TestObject", info.Holder(), info.GetIsolate());
4999     if (UNLIKELY(info.Length() < 1)) {
5000         throwArityTypeError(exceptionState, 1, info.Length());
5001         return;
5002     }
5003     TestObject* impl = V8TestObject::toNative(info.Holder());
5004     TONATIVE_VOID_EXCEPTIONSTATE(unsigned, unsignedShortArg, toUInt16(info[0], exceptionState), exceptionState);
5005     impl->voidMethodUnsignedShortArg(unsignedShortArg);
5006 }
5007
5008 static void voidMethodUnsignedShortArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5009 {
5010     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5011     TestObjectV8Internal::voidMethodUnsignedShortArgMethod(info);
5012     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5013 }
5014
5015 static void testInterfaceEmptyMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5016 {
5017     TestObject* impl = V8TestObject::toNative(info.Holder());
5018     v8SetReturnValue(info, impl->testInterfaceEmptyMethod());
5019 }
5020
5021 static void testInterfaceEmptyMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5022 {
5023     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5024     TestObjectV8Internal::testInterfaceEmptyMethodMethod(info);
5025     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5026 }
5027
5028 static void voidMethodTestInterfaceEmptyArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5029 {
5030     if (UNLIKELY(info.Length() < 1)) {
5031         throwArityTypeErrorForMethod("voidMethodTestInterfaceEmptyArg", "TestObject", 1, info.Length(), info.GetIsolate());
5032         return;
5033     }
5034     TestObject* impl = V8TestObject::toNative(info.Holder());
5035     TONATIVE_VOID(TestInterfaceEmpty*, testInterfaceEmptyArg, V8TestInterfaceEmpty::toNativeWithTypeCheck(info.GetIsolate(), info[0]));
5036     impl->voidMethodTestInterfaceEmptyArg(testInterfaceEmptyArg);
5037 }
5038
5039 static void voidMethodTestInterfaceEmptyArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5040 {
5041     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5042     TestObjectV8Internal::voidMethodTestInterfaceEmptyArgMethod(info);
5043     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5044 }
5045
5046 static void voidMethodLongArgTestInterfaceEmptyArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5047 {
5048     ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodLongArgTestInterfaceEmptyArg", "TestObject", info.Holder(), info.GetIsolate());
5049     if (UNLIKELY(info.Length() < 2)) {
5050         throwArityTypeError(exceptionState, 2, info.Length());
5051         return;
5052     }
5053     TestObject* impl = V8TestObject::toNative(info.Holder());
5054     TONATIVE_VOID_EXCEPTIONSTATE(int, longArg, toInt32(info[0], exceptionState), exceptionState);
5055     TONATIVE_VOID(TestInterfaceEmpty*, testInterfaceEmptyArg, V8TestInterfaceEmpty::toNativeWithTypeCheck(info.GetIsolate(), info[1]));
5056     impl->voidMethodLongArgTestInterfaceEmptyArg(longArg, testInterfaceEmptyArg);
5057 }
5058
5059 static void voidMethodLongArgTestInterfaceEmptyArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5060 {
5061     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5062     TestObjectV8Internal::voidMethodLongArgTestInterfaceEmptyArgMethod(info);
5063     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5064 }
5065
5066 static void voidCallbackFunctionMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5067 {
5068     TestObject* impl = V8TestObject::toNative(info.Holder());
5069     v8SetReturnValue(info, impl->voidCallbackFunctionMethod().v8Value());
5070 }
5071
5072 static void voidCallbackFunctionMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5073 {
5074     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5075     TestObjectV8Internal::voidCallbackFunctionMethodMethod(info);
5076     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5077 }
5078
5079 static void anyCallbackFunctionOptionalAnyArgMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5080 {
5081     TestObject* impl = V8TestObject::toNative(info.Holder());
5082     v8SetReturnValue(info, impl->anyCallbackFunctionOptionalAnyArgMethod().v8Value());
5083 }
5084
5085 static void anyCallbackFunctionOptionalAnyArgMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5086 {
5087     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5088     TestObjectV8Internal::anyCallbackFunctionOptionalAnyArgMethodMethod(info);
5089     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5090 }
5091
5092 static void voidMethodVoidCallbackFunctionArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5093 {
5094     if (UNLIKELY(info.Length() < 1)) {
5095         throwArityTypeErrorForMethod("voidMethodVoidCallbackFunctionArg", "TestObject", 1, info.Length(), info.GetIsolate());
5096         return;
5097     }
5098     TestObject* impl = V8TestObject::toNative(info.Holder());
5099     TONATIVE_VOID(ScriptValue, voidCallbackFunctionArg, ScriptValue(ScriptState::current(info.GetIsolate()), info[0]));
5100     impl->voidMethodVoidCallbackFunctionArg(voidCallbackFunctionArg);
5101 }
5102
5103 static void voidMethodVoidCallbackFunctionArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5104 {
5105     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5106     TestObjectV8Internal::voidMethodVoidCallbackFunctionArgMethod(info);
5107     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5108 }
5109
5110 static void voidMethodAnyCallbackFunctionOptionalAnyArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5111 {
5112     if (UNLIKELY(info.Length() < 1)) {
5113         throwArityTypeErrorForMethod("voidMethodAnyCallbackFunctionOptionalAnyArg", "TestObject", 1, info.Length(), info.GetIsolate());
5114         return;
5115     }
5116     TestObject* impl = V8TestObject::toNative(info.Holder());
5117     TONATIVE_VOID(ScriptValue, anyCallbackFunctionOptionalAnyArgArg, ScriptValue(ScriptState::current(info.GetIsolate()), info[0]));
5118     impl->voidMethodAnyCallbackFunctionOptionalAnyArg(anyCallbackFunctionOptionalAnyArgArg);
5119 }
5120
5121 static void voidMethodAnyCallbackFunctionOptionalAnyArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5122 {
5123     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5124     TestObjectV8Internal::voidMethodAnyCallbackFunctionOptionalAnyArgMethod(info);
5125     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5126 }
5127
5128 static void compareHowMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5129 {
5130     TestObject* impl = V8TestObject::toNative(info.Holder());
5131     v8SetReturnValue(info, impl->compareHowMethod());
5132 }
5133
5134 static void compareHowMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5135 {
5136     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5137     TestObjectV8Internal::compareHowMethodMethod(info);
5138     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5139 }
5140
5141 static void anyMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5142 {
5143     TestObject* impl = V8TestObject::toNative(info.Holder());
5144     v8SetReturnValue(info, impl->anyMethod().v8Value());
5145 }
5146
5147 static void anyMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5148 {
5149     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5150     TestObjectV8Internal::anyMethodMethod(info);
5151     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5152 }
5153
5154 static void voidMethodCompareHowArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5155 {
5156     if (UNLIKELY(info.Length() < 1)) {
5157         throwArityTypeErrorForMethod("voidMethodCompareHowArg", "TestObject", 1, info.Length(), info.GetIsolate());
5158         return;
5159     }
5160     TestObject* impl = V8TestObject::toNative(info.Holder());
5161     TONATIVE_VOID(Range::CompareHow, compareHowArg, static_cast<Range::CompareHow>(info[0]->Int32Value()));
5162     impl->voidMethodCompareHowArg(compareHowArg);
5163 }
5164
5165 static void voidMethodCompareHowArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5166 {
5167     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5168     TestObjectV8Internal::voidMethodCompareHowArgMethod(info);
5169     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5170 }
5171
5172 static void voidMethodEventTargetArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5173 {
5174     if (UNLIKELY(info.Length() < 1)) {
5175         throwArityTypeErrorForMethod("voidMethodEventTargetArg", "TestObject", 1, info.Length(), info.GetIsolate());
5176         return;
5177     }
5178     TestObject* impl = V8TestObject::toNative(info.Holder());
5179     TONATIVE_VOID(EventTarget*, eventTargetArg, V8DOMWrapper::isDOMWrapper(info[0]) ? toWrapperTypeInfo(v8::Handle<v8::Object>::Cast(info[0]))->toEventTarget(v8::Handle<v8::Object>::Cast(info[0])) : 0);
5180     impl->voidMethodEventTargetArg(eventTargetArg);
5181 }
5182
5183 static void voidMethodEventTargetArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5184 {
5185     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5186     TestObjectV8Internal::voidMethodEventTargetArgMethod(info);
5187     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5188 }
5189
5190 static void voidMethodMediaQueryListListenerArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5191 {
5192     if (UNLIKELY(info.Length() < 1)) {
5193         throwArityTypeErrorForMethod("voidMethodMediaQueryListListenerArg", "TestObject", 1, info.Length(), info.GetIsolate());
5194         return;
5195     }
5196     TestObject* impl = V8TestObject::toNative(info.Holder());
5197     TONATIVE_VOID(RefPtrWillBeRawPtr<MediaQueryListListener>, mediaQueryListListenerArg, MediaQueryListListener::create(ScriptValue(ScriptState::current(info.GetIsolate()), info[0])));
5198     impl->voidMethodMediaQueryListListenerArg(mediaQueryListListenerArg);
5199 }
5200
5201 static void voidMethodMediaQueryListListenerArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5202 {
5203     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5204     TestObjectV8Internal::voidMethodMediaQueryListListenerArgMethod(info);
5205     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5206 }
5207
5208 static void voidMethodAnyArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5209 {
5210     if (UNLIKELY(info.Length() < 1)) {
5211         throwArityTypeErrorForMethod("voidMethodAnyArg", "TestObject", 1, info.Length(), info.GetIsolate());
5212         return;
5213     }
5214     TestObject* impl = V8TestObject::toNative(info.Holder());
5215     TONATIVE_VOID(ScriptValue, anyArg, ScriptValue(ScriptState::current(info.GetIsolate()), info[0]));
5216     impl->voidMethodAnyArg(anyArg);
5217 }
5218
5219 static void voidMethodAnyArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5220 {
5221     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5222     TestObjectV8Internal::voidMethodAnyArgMethod(info);
5223     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5224 }
5225
5226 static void voidMethodAttrArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5227 {
5228     if (UNLIKELY(info.Length() < 1)) {
5229         throwArityTypeErrorForMethod("voidMethodAttrArg", "TestObject", 1, info.Length(), info.GetIsolate());
5230         return;
5231     }
5232     TestObject* impl = V8TestObject::toNative(info.Holder());
5233     TONATIVE_VOID(Attr*, attrArg, V8Attr::toNativeWithTypeCheck(info.GetIsolate(), info[0]));
5234     impl->voidMethodAttrArg(attrArg);
5235 }
5236
5237 static void voidMethodAttrArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5238 {
5239     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5240     TestObjectV8Internal::voidMethodAttrArgMethod(info);
5241     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5242 }
5243
5244 static void voidMethodDocumentArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5245 {
5246     if (UNLIKELY(info.Length() < 1)) {
5247         throwArityTypeErrorForMethod("voidMethodDocumentArg", "TestObject", 1, info.Length(), info.GetIsolate());
5248         return;
5249     }
5250     TestObject* impl = V8TestObject::toNative(info.Holder());
5251     TONATIVE_VOID(Document*, documentArg, V8Document::toNativeWithTypeCheck(info.GetIsolate(), info[0]));
5252     impl->voidMethodDocumentArg(documentArg);
5253 }
5254
5255 static void voidMethodDocumentArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5256 {
5257     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5258     TestObjectV8Internal::voidMethodDocumentArgMethod(info);
5259     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5260 }
5261
5262 static void voidMethodDocumentTypeArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5263 {
5264     if (UNLIKELY(info.Length() < 1)) {
5265         throwArityTypeErrorForMethod("voidMethodDocumentTypeArg", "TestObject", 1, info.Length(), info.GetIsolate());
5266         return;
5267     }
5268     TestObject* impl = V8TestObject::toNative(info.Holder());
5269     TONATIVE_VOID(DocumentType*, documentTypeArg, V8DocumentType::toNativeWithTypeCheck(info.GetIsolate(), info[0]));
5270     impl->voidMethodDocumentTypeArg(documentTypeArg);
5271 }
5272
5273 static void voidMethodDocumentTypeArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5274 {
5275     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5276     TestObjectV8Internal::voidMethodDocumentTypeArgMethod(info);
5277     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5278 }
5279
5280 static void voidMethodElementArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5281 {
5282     if (UNLIKELY(info.Length() < 1)) {
5283         throwArityTypeErrorForMethod("voidMethodElementArg", "TestObject", 1, info.Length(), info.GetIsolate());
5284         return;
5285     }
5286     TestObject* impl = V8TestObject::toNative(info.Holder());
5287     TONATIVE_VOID(Element*, elementArg, V8Element::toNativeWithTypeCheck(info.GetIsolate(), info[0]));
5288     impl->voidMethodElementArg(elementArg);
5289 }
5290
5291 static void voidMethodElementArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5292 {
5293     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5294     TestObjectV8Internal::voidMethodElementArgMethod(info);
5295     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5296 }
5297
5298 static void voidMethodNodeArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5299 {
5300     if (UNLIKELY(info.Length() < 1)) {
5301         throwArityTypeErrorForMethod("voidMethodNodeArg", "TestObject", 1, info.Length(), info.GetIsolate());
5302         return;
5303     }
5304     TestObject* impl = V8TestObject::toNative(info.Holder());
5305     TONATIVE_VOID(Node*, nodeArg, V8Node::toNativeWithTypeCheck(info.GetIsolate(), info[0]));
5306     impl->voidMethodNodeArg(nodeArg);
5307 }
5308
5309 static void voidMethodNodeArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5310 {
5311     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5312     TestObjectV8Internal::voidMethodNodeArgMethod(info);
5313     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5314 }
5315
5316 static void arrayBufferMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5317 {
5318     TestObject* impl = V8TestObject::toNative(info.Holder());
5319     v8SetReturnValue(info, impl->arrayBufferMethod());
5320 }
5321
5322 static void arrayBufferMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5323 {
5324     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5325     TestObjectV8Internal::arrayBufferMethodMethod(info);
5326     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5327 }
5328
5329 static void arrayBufferViewMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5330 {
5331     TestObject* impl = V8TestObject::toNative(info.Holder());
5332     v8SetReturnValue(info, impl->arrayBufferViewMethod());
5333 }
5334
5335 static void arrayBufferViewMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5336 {
5337     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5338     TestObjectV8Internal::arrayBufferViewMethodMethod(info);
5339     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5340 }
5341
5342 static void float32ArrayMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5343 {
5344     TestObject* impl = V8TestObject::toNative(info.Holder());
5345     v8SetReturnValue(info, impl->float32ArrayMethod());
5346 }
5347
5348 static void float32ArrayMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5349 {
5350     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5351     TestObjectV8Internal::float32ArrayMethodMethod(info);
5352     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5353 }
5354
5355 static void int32ArrayMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5356 {
5357     TestObject* impl = V8TestObject::toNative(info.Holder());
5358     v8SetReturnValue(info, impl->int32ArrayMethod());
5359 }
5360
5361 static void int32ArrayMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5362 {
5363     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5364     TestObjectV8Internal::int32ArrayMethodMethod(info);
5365     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5366 }
5367
5368 static void uint8ArrayMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5369 {
5370     TestObject* impl = V8TestObject::toNative(info.Holder());
5371     v8SetReturnValue(info, impl->uint8ArrayMethod());
5372 }
5373
5374 static void uint8ArrayMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5375 {
5376     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5377     TestObjectV8Internal::uint8ArrayMethodMethod(info);
5378     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5379 }
5380
5381 static void voidMethodArrayBufferArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5382 {
5383     if (UNLIKELY(info.Length() < 1)) {
5384         throwArityTypeErrorForMethod("voidMethodArrayBufferArg", "TestObject", 1, info.Length(), info.GetIsolate());
5385         return;
5386     }
5387     TestObject* impl = V8TestObject::toNative(info.Holder());
5388     TONATIVE_VOID(ArrayBuffer*, arrayBufferArg, info[0]->IsArrayBuffer() ? V8ArrayBuffer::toNative(v8::Handle<v8::ArrayBuffer>::Cast(info[0])) : 0);
5389     impl->voidMethodArrayBufferArg(arrayBufferArg);
5390 }
5391
5392 static void voidMethodArrayBufferArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5393 {
5394     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5395     TestObjectV8Internal::voidMethodArrayBufferArgMethod(info);
5396     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5397 }
5398
5399 static void voidMethodArrayBufferOrNullArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5400 {
5401     if (UNLIKELY(info.Length() < 1)) {
5402         throwArityTypeErrorForMethod("voidMethodArrayBufferOrNullArg", "TestObject", 1, info.Length(), info.GetIsolate());
5403         return;
5404     }
5405     TestObject* impl = V8TestObject::toNative(info.Holder());
5406     TONATIVE_VOID(ArrayBuffer*, arrayBufferArg, info[0]->IsArrayBuffer() ? V8ArrayBuffer::toNative(v8::Handle<v8::ArrayBuffer>::Cast(info[0])) : 0);
5407     impl->voidMethodArrayBufferOrNullArg(arrayBufferArg);
5408 }
5409
5410 static void voidMethodArrayBufferOrNullArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5411 {
5412     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5413     TestObjectV8Internal::voidMethodArrayBufferOrNullArgMethod(info);
5414     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5415 }
5416
5417 static void voidMethodArrayBufferViewArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5418 {
5419     if (UNLIKELY(info.Length() < 1)) {
5420         throwArityTypeErrorForMethod("voidMethodArrayBufferViewArg", "TestObject", 1, info.Length(), info.GetIsolate());
5421         return;
5422     }
5423     TestObject* impl = V8TestObject::toNative(info.Holder());
5424     TONATIVE_VOID(ArrayBufferView*, arrayBufferViewArg, info[0]->IsArrayBufferView() ? V8ArrayBufferView::toNative(v8::Handle<v8::ArrayBufferView>::Cast(info[0])) : 0);
5425     impl->voidMethodArrayBufferViewArg(arrayBufferViewArg);
5426 }
5427
5428 static void voidMethodArrayBufferViewArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5429 {
5430     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5431     TestObjectV8Internal::voidMethodArrayBufferViewArgMethod(info);
5432     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5433 }
5434
5435 static void voidMethodFloat32ArrayArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5436 {
5437     if (UNLIKELY(info.Length() < 1)) {
5438         throwArityTypeErrorForMethod("voidMethodFloat32ArrayArg", "TestObject", 1, info.Length(), info.GetIsolate());
5439         return;
5440     }
5441     TestObject* impl = V8TestObject::toNative(info.Holder());
5442     TONATIVE_VOID(Float32Array*, float32ArrayArg, info[0]->IsFloat32Array() ? V8Float32Array::toNative(v8::Handle<v8::Float32Array>::Cast(info[0])) : 0);
5443     impl->voidMethodFloat32ArrayArg(float32ArrayArg);
5444 }
5445
5446 static void voidMethodFloat32ArrayArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5447 {
5448     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5449     TestObjectV8Internal::voidMethodFloat32ArrayArgMethod(info);
5450     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5451 }
5452
5453 static void voidMethodInt32ArrayArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5454 {
5455     if (UNLIKELY(info.Length() < 1)) {
5456         throwArityTypeErrorForMethod("voidMethodInt32ArrayArg", "TestObject", 1, info.Length(), info.GetIsolate());
5457         return;
5458     }
5459     TestObject* impl = V8TestObject::toNative(info.Holder());
5460     TONATIVE_VOID(Int32Array*, int32ArrayArg, info[0]->IsInt32Array() ? V8Int32Array::toNative(v8::Handle<v8::Int32Array>::Cast(info[0])) : 0);
5461     impl->voidMethodInt32ArrayArg(int32ArrayArg);
5462 }
5463
5464 static void voidMethodInt32ArrayArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5465 {
5466     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5467     TestObjectV8Internal::voidMethodInt32ArrayArgMethod(info);
5468     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5469 }
5470
5471 static void voidMethodUint8ArrayArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5472 {
5473     if (UNLIKELY(info.Length() < 1)) {
5474         throwArityTypeErrorForMethod("voidMethodUint8ArrayArg", "TestObject", 1, info.Length(), info.GetIsolate());
5475         return;
5476     }
5477     TestObject* impl = V8TestObject::toNative(info.Holder());
5478     TONATIVE_VOID(Uint8Array*, uint8ArrayArg, info[0]->IsUint8Array() ? V8Uint8Array::toNative(v8::Handle<v8::Uint8Array>::Cast(info[0])) : 0);
5479     impl->voidMethodUint8ArrayArg(uint8ArrayArg);
5480 }
5481
5482 static void voidMethodUint8ArrayArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5483 {
5484     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5485     TestObjectV8Internal::voidMethodUint8ArrayArgMethod(info);
5486     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5487 }
5488
5489 static void longArrayMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5490 {
5491     TestObject* impl = V8TestObject::toNative(info.Holder());
5492     v8SetReturnValue(info, v8Array(impl->longArrayMethod(), info.GetIsolate()));
5493 }
5494
5495 static void longArrayMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5496 {
5497     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5498     TestObjectV8Internal::longArrayMethodMethod(info);
5499     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5500 }
5501
5502 static void stringArrayMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5503 {
5504     TestObject* impl = V8TestObject::toNative(info.Holder());
5505     v8SetReturnValue(info, v8Array(impl->stringArrayMethod(), info.GetIsolate()));
5506 }
5507
5508 static void stringArrayMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5509 {
5510     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5511     TestObjectV8Internal::stringArrayMethodMethod(info);
5512     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5513 }
5514
5515 static void testInterfaceEmptyArrayMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5516 {
5517     TestObject* impl = V8TestObject::toNative(info.Holder());
5518     v8SetReturnValue(info, v8Array(impl->testInterfaceEmptyArrayMethod(), info.GetIsolate()));
5519 }
5520
5521 static void testInterfaceEmptyArrayMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5522 {
5523     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5524     TestObjectV8Internal::testInterfaceEmptyArrayMethodMethod(info);
5525     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5526 }
5527
5528 static void voidMethodArrayLongArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5529 {
5530     if (UNLIKELY(info.Length() < 1)) {
5531         throwArityTypeErrorForMethod("voidMethodArrayLongArg", "TestObject", 1, info.Length(), info.GetIsolate());
5532         return;
5533     }
5534     TestObject* impl = V8TestObject::toNative(info.Holder());
5535     TONATIVE_VOID(Vector<int>, arrayLongArg, toNativeArray<int>(info[0], 1, info.GetIsolate()));
5536     impl->voidMethodArrayLongArg(arrayLongArg);
5537 }
5538
5539 static void voidMethodArrayLongArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5540 {
5541     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5542     TestObjectV8Internal::voidMethodArrayLongArgMethod(info);
5543     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5544 }
5545
5546 static void voidMethodArrayStringArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5547 {
5548     if (UNLIKELY(info.Length() < 1)) {
5549         throwArityTypeErrorForMethod("voidMethodArrayStringArg", "TestObject", 1, info.Length(), info.GetIsolate());
5550         return;
5551     }
5552     TestObject* impl = V8TestObject::toNative(info.Holder());
5553     TONATIVE_VOID(Vector<String>, arrayStringArg, toNativeArray<String>(info[0], 1, info.GetIsolate()));
5554     impl->voidMethodArrayStringArg(arrayStringArg);
5555 }
5556
5557 static void voidMethodArrayStringArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5558 {
5559     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5560     TestObjectV8Internal::voidMethodArrayStringArgMethod(info);
5561     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5562 }
5563
5564 static void voidMethodArrayTestInterfaceEmptyArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5565 {
5566     if (UNLIKELY(info.Length() < 1)) {
5567         throwArityTypeErrorForMethod("voidMethodArrayTestInterfaceEmptyArg", "TestObject", 1, info.Length(), info.GetIsolate());
5568         return;
5569     }
5570     TestObject* impl = V8TestObject::toNative(info.Holder());
5571     TONATIVE_VOID(Vector<RefPtr<TestInterfaceEmpty> >, arrayTestInterfaceEmptyArg, (toRefPtrNativeArray<TestInterfaceEmpty, V8TestInterfaceEmpty>(info[0], 1, info.GetIsolate())));
5572     impl->voidMethodArrayTestInterfaceEmptyArg(arrayTestInterfaceEmptyArg);
5573 }
5574
5575 static void voidMethodArrayTestInterfaceEmptyArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5576 {
5577     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5578     TestObjectV8Internal::voidMethodArrayTestInterfaceEmptyArgMethod(info);
5579     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5580 }
5581
5582 static void longSequenceMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5583 {
5584     TestObject* impl = V8TestObject::toNative(info.Holder());
5585     v8SetReturnValue(info, v8Array(impl->longSequenceMethod(), info.GetIsolate()));
5586 }
5587
5588 static void longSequenceMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5589 {
5590     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5591     TestObjectV8Internal::longSequenceMethodMethod(info);
5592     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5593 }
5594
5595 static void stringSequenceMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5596 {
5597     TestObject* impl = V8TestObject::toNative(info.Holder());
5598     v8SetReturnValue(info, v8Array(impl->stringSequenceMethod(), info.GetIsolate()));
5599 }
5600
5601 static void stringSequenceMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5602 {
5603     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5604     TestObjectV8Internal::stringSequenceMethodMethod(info);
5605     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5606 }
5607
5608 static void testInterfaceEmptySequenceMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5609 {
5610     TestObject* impl = V8TestObject::toNative(info.Holder());
5611     v8SetReturnValue(info, v8Array(impl->testInterfaceEmptySequenceMethod(), info.GetIsolate()));
5612 }
5613
5614 static void testInterfaceEmptySequenceMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5615 {
5616     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5617     TestObjectV8Internal::testInterfaceEmptySequenceMethodMethod(info);
5618     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5619 }
5620
5621 static void voidMethodSequenceLongArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5622 {
5623     if (UNLIKELY(info.Length() < 1)) {
5624         throwArityTypeErrorForMethod("voidMethodSequenceLongArg", "TestObject", 1, info.Length(), info.GetIsolate());
5625         return;
5626     }
5627     TestObject* impl = V8TestObject::toNative(info.Holder());
5628     TONATIVE_VOID(Vector<int>, longSequenceArg, toNativeArray<int>(info[0], 1, info.GetIsolate()));
5629     impl->voidMethodSequenceLongArg(longSequenceArg);
5630 }
5631
5632 static void voidMethodSequenceLongArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5633 {
5634     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5635     TestObjectV8Internal::voidMethodSequenceLongArgMethod(info);
5636     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5637 }
5638
5639 static void voidMethodSequenceStringArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5640 {
5641     if (UNLIKELY(info.Length() < 1)) {
5642         throwArityTypeErrorForMethod("voidMethodSequenceStringArg", "TestObject", 1, info.Length(), info.GetIsolate());
5643         return;
5644     }
5645     TestObject* impl = V8TestObject::toNative(info.Holder());
5646     TONATIVE_VOID(Vector<String>, stringSequenceArg, toNativeArray<String>(info[0], 1, info.GetIsolate()));
5647     impl->voidMethodSequenceStringArg(stringSequenceArg);
5648 }
5649
5650 static void voidMethodSequenceStringArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5651 {
5652     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5653     TestObjectV8Internal::voidMethodSequenceStringArgMethod(info);
5654     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5655 }
5656
5657 static void voidMethodSequenceTestInterfaceEmptyArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5658 {
5659     if (UNLIKELY(info.Length() < 1)) {
5660         throwArityTypeErrorForMethod("voidMethodSequenceTestInterfaceEmptyArg", "TestObject", 1, info.Length(), info.GetIsolate());
5661         return;
5662     }
5663     TestObject* impl = V8TestObject::toNative(info.Holder());
5664     TONATIVE_VOID(Vector<RefPtr<TestInterfaceEmpty> >, testInterfaceEmptySequenceArg, (toRefPtrNativeArray<TestInterfaceEmpty, V8TestInterfaceEmpty>(info[0], 1, info.GetIsolate())));
5665     impl->voidMethodSequenceTestInterfaceEmptyArg(testInterfaceEmptySequenceArg);
5666 }
5667
5668 static void voidMethodSequenceTestInterfaceEmptyArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5669 {
5670     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5671     TestObjectV8Internal::voidMethodSequenceTestInterfaceEmptyArgMethod(info);
5672     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5673 }
5674
5675 static void voidMethodTestInterfaceEmptyOrNullArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5676 {
5677     if (UNLIKELY(info.Length() < 1)) {
5678         throwArityTypeErrorForMethod("voidMethodTestInterfaceEmptyOrNullArg", "TestObject", 1, info.Length(), info.GetIsolate());
5679         return;
5680     }
5681     TestObject* impl = V8TestObject::toNative(info.Holder());
5682     TONATIVE_VOID(TestInterfaceEmpty*, nullableTestInterfaceEmptyArg, V8TestInterfaceEmpty::toNativeWithTypeCheck(info.GetIsolate(), info[0]));
5683     impl->voidMethodTestInterfaceEmptyOrNullArg(nullableTestInterfaceEmptyArg);
5684 }
5685
5686 static void voidMethodTestInterfaceEmptyOrNullArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5687 {
5688     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5689     TestObjectV8Internal::voidMethodTestInterfaceEmptyOrNullArgMethod(info);
5690     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5691 }
5692
5693 static void voidMethodTestCallbackInterfaceArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5694 {
5695     if (UNLIKELY(info.Length() < 1)) {
5696         throwArityTypeErrorForMethod("voidMethodTestCallbackInterfaceArg", "TestObject", 1, info.Length(), info.GetIsolate());
5697         return;
5698     }
5699     TestObject* impl = V8TestObject::toNative(info.Holder());
5700     if (info.Length() <= 0 || !info[0]->IsFunction()) {
5701         throwTypeError(ExceptionMessages::failedToExecute("voidMethodTestCallbackInterfaceArg", "TestObject", "The callback provided as parameter 1 is not a function."), info.GetIsolate());
5702         return;
5703     }
5704     OwnPtr<TestCallbackInterface> testCallbackInterfaceArg = V8TestCallbackInterface::create(v8::Handle<v8::Function>::Cast(info[0]), currentExecutionContext(info.GetIsolate()));
5705     impl->voidMethodTestCallbackInterfaceArg(testCallbackInterfaceArg.release());
5706 }
5707
5708 static void voidMethodTestCallbackInterfaceArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5709 {
5710     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5711     TestObjectV8Internal::voidMethodTestCallbackInterfaceArgMethod(info);
5712     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5713 }
5714
5715 static void voidMethodOptionalTestCallbackInterfaceArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5716 {
5717     TestObject* impl = V8TestObject::toNative(info.Holder());
5718     OwnPtr<TestCallbackInterface> optionalTestCallbackInterfaceArg;
5719     if (info.Length() > 0 && !isUndefinedOrNull(info[0])) {
5720         if (!info[0]->IsFunction()) {
5721             throwTypeError(ExceptionMessages::failedToExecute("voidMethodOptionalTestCallbackInterfaceArg", "TestObject", "The callback provided as parameter 1 is not a function."), info.GetIsolate());
5722             return;
5723         }
5724         optionalTestCallbackInterfaceArg = V8TestCallbackInterface::create(v8::Handle<v8::Function>::Cast(info[0]), currentExecutionContext(info.GetIsolate()));
5725     }
5726     impl->voidMethodOptionalTestCallbackInterfaceArg(optionalTestCallbackInterfaceArg.release());
5727 }
5728
5729 static void voidMethodOptionalTestCallbackInterfaceArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5730 {
5731     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5732     TestObjectV8Internal::voidMethodOptionalTestCallbackInterfaceArgMethod(info);
5733     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5734 }
5735
5736 static void voidMethodTestCallbackInterfaceOrNullArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5737 {
5738     if (UNLIKELY(info.Length() < 1)) {
5739         throwArityTypeErrorForMethod("voidMethodTestCallbackInterfaceOrNullArg", "TestObject", 1, info.Length(), info.GetIsolate());
5740         return;
5741     }
5742     TestObject* impl = V8TestObject::toNative(info.Holder());
5743     if (info.Length() <= 0 || !(info[0]->IsFunction() || info[0]->IsNull())) {
5744         throwTypeError(ExceptionMessages::failedToExecute("voidMethodTestCallbackInterfaceOrNullArg", "TestObject", "The callback provided as parameter 1 is not a function."), info.GetIsolate());
5745         return;
5746     }
5747     OwnPtr<TestCallbackInterface> testCallbackInterfaceArg = info[0]->IsNull() ? nullptr : V8TestCallbackInterface::create(v8::Handle<v8::Function>::Cast(info[0]), currentExecutionContext(info.GetIsolate()));
5748     impl->voidMethodTestCallbackInterfaceOrNullArg(testCallbackInterfaceArg.release());
5749 }
5750
5751 static void voidMethodTestCallbackInterfaceOrNullArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5752 {
5753     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5754     TestObjectV8Internal::voidMethodTestCallbackInterfaceOrNullArgMethod(info);
5755     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5756 }
5757
5758 static void testEnumMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5759 {
5760     TestObject* impl = V8TestObject::toNative(info.Holder());
5761     v8SetReturnValueString(info, impl->testEnumMethod(), info.GetIsolate());
5762 }
5763
5764 static void testEnumMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5765 {
5766     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5767     TestObjectV8Internal::testEnumMethodMethod(info);
5768     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5769 }
5770
5771 static void voidMethodTestEnumArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5772 {
5773     if (UNLIKELY(info.Length() < 1)) {
5774         throwArityTypeErrorForMethod("voidMethodTestEnumArg", "TestObject", 1, info.Length(), info.GetIsolate());
5775         return;
5776     }
5777     TestObject* impl = V8TestObject::toNative(info.Holder());
5778     TOSTRING_VOID(V8StringResource<>, testEnumTypeArg, info[0]);
5779     String string = testEnumTypeArg;
5780     if (!(string == "" || string == "EnumValue1" || string == "EnumValue2" || string == "EnumValue3")) {
5781         throwTypeError(ExceptionMessages::failedToExecute("voidMethodTestEnumArg", "TestObject", "parameter 1 ('" + string + "') is not a valid enum value."), info.GetIsolate());
5782         return;
5783     }
5784     impl->voidMethodTestEnumArg(testEnumTypeArg);
5785 }
5786
5787 static void voidMethodTestEnumArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5788 {
5789     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5790     TestObjectV8Internal::voidMethodTestEnumArgMethod(info);
5791     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5792 }
5793
5794 static void dictionaryMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5795 {
5796     TestObject* impl = V8TestObject::toNative(info.Holder());
5797     v8SetReturnValue(info, impl->dictionaryMethod());
5798 }
5799
5800 static void dictionaryMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5801 {
5802     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5803     TestObjectV8Internal::dictionaryMethodMethod(info);
5804     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5805 }
5806
5807 static void nodeFilterMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5808 {
5809     TestObject* impl = V8TestObject::toNative(info.Holder());
5810     v8SetReturnValue(info, impl->nodeFilterMethod());
5811 }
5812
5813 static void nodeFilterMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5814 {
5815     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5816     TestObjectV8Internal::nodeFilterMethodMethod(info);
5817     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5818 }
5819
5820 static void promiseMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5821 {
5822     TestObject* impl = V8TestObject::toNative(info.Holder());
5823     v8SetReturnValue(info, impl->promiseMethod().v8Value());
5824 }
5825
5826 static void promiseMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5827 {
5828     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5829     TestObjectV8Internal::promiseMethodMethod(info);
5830     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5831 }
5832
5833 static void serializedScriptValueMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5834 {
5835     TestObject* impl = V8TestObject::toNative(info.Holder());
5836     v8SetReturnValue(info, impl->serializedScriptValueMethod() ? impl->serializedScriptValueMethod()->deserialize() : v8::Handle<v8::Value>(v8::Null(info.GetIsolate())));
5837 }
5838
5839 static void serializedScriptValueMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5840 {
5841     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5842     TestObjectV8Internal::serializedScriptValueMethodMethod(info);
5843     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5844 }
5845
5846 static void xPathNSResolverMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5847 {
5848     TestObject* impl = V8TestObject::toNative(info.Holder());
5849     v8SetReturnValue(info, impl->xPathNSResolverMethod());
5850 }
5851
5852 static void xPathNSResolverMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5853 {
5854     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5855     TestObjectV8Internal::xPathNSResolverMethodMethod(info);
5856     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5857 }
5858
5859 static void voidMethodDictionaryArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5860 {
5861     if (UNLIKELY(info.Length() < 1)) {
5862         throwArityTypeErrorForMethod("voidMethodDictionaryArg", "TestObject", 1, info.Length(), info.GetIsolate());
5863         return;
5864     }
5865     TestObject* impl = V8TestObject::toNative(info.Holder());
5866     TONATIVE_VOID(Dictionary, dictionaryArg, Dictionary(info[0], info.GetIsolate()));
5867     if (!dictionaryArg.isUndefinedOrNull() && !dictionaryArg.isObject()) {
5868         throwTypeError(ExceptionMessages::failedToExecute("voidMethodDictionaryArg", "TestObject", "parameter 1 ('dictionaryArg') is not an object."), info.GetIsolate());
5869         return;
5870     }
5871     impl->voidMethodDictionaryArg(dictionaryArg);
5872 }
5873
5874 static void voidMethodDictionaryArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5875 {
5876     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5877     TestObjectV8Internal::voidMethodDictionaryArgMethod(info);
5878     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5879 }
5880
5881 static void voidMethodEventListenerArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5882 {
5883     ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodEventListenerArg", "TestObject", info.Holder(), info.GetIsolate());
5884     if (UNLIKELY(info.Length() < 1)) {
5885         throwArityTypeError(exceptionState, 1, info.Length());
5886         return;
5887     }
5888     TestObject* impl = V8TestObject::toNative(info.Holder());
5889     RefPtr<EventListener> eventListenerArg = V8EventListenerList::getEventListener(info[1], false, ListenerFindOrCreate);
5890     impl->voidMethodEventListenerArg(eventListenerArg);
5891     if (listener && !impl->toNode())
5892         removeHiddenValueFromArray(info.Holder(), info[1], V8TestObject::eventListenerCacheIndex, info.GetIsolate());
5893 }
5894
5895 static void voidMethodEventListenerArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5896 {
5897     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5898     TestObjectV8Internal::voidMethodEventListenerArgMethod(info);
5899     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5900 }
5901
5902 static void voidMethodNodeFilterArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5903 {
5904     if (UNLIKELY(info.Length() < 1)) {
5905         throwArityTypeErrorForMethod("voidMethodNodeFilterArg", "TestObject", 1, info.Length(), info.GetIsolate());
5906         return;
5907     }
5908     TestObject* impl = V8TestObject::toNative(info.Holder());
5909     TONATIVE_VOID(RefPtr<NodeFilter>, nodeFilterArg, toNodeFilter(info[0], info.GetIsolate()));
5910     impl->voidMethodNodeFilterArg(nodeFilterArg.release());
5911 }
5912
5913 static void voidMethodNodeFilterArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5914 {
5915     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5916     TestObjectV8Internal::voidMethodNodeFilterArgMethod(info);
5917     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5918 }
5919
5920 static void voidMethodPromiseArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5921 {
5922     if (UNLIKELY(info.Length() < 1)) {
5923         throwArityTypeErrorForMethod("voidMethodPromiseArg", "TestObject", 1, info.Length(), info.GetIsolate());
5924         return;
5925     }
5926     TestObject* impl = V8TestObject::toNative(info.Holder());
5927     TONATIVE_VOID(ScriptPromise, promiseArg, ScriptPromise(ScriptState::current(info.GetIsolate()), info[0]));
5928     if (!promiseArg.isUndefinedOrNull() && !promiseArg.isObject()) {
5929         throwTypeError(ExceptionMessages::failedToExecute("voidMethodPromiseArg", "TestObject", "parameter 1 ('promiseArg') is not an object."), info.GetIsolate());
5930         return;
5931     }
5932     impl->voidMethodPromiseArg(promiseArg);
5933 }
5934
5935 static void voidMethodPromiseArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5936 {
5937     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5938     TestObjectV8Internal::voidMethodPromiseArgMethod(info);
5939     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5940 }
5941
5942 static void voidMethodSerializedScriptValueArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5943 {
5944     ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodSerializedScriptValueArg", "TestObject", info.Holder(), info.GetIsolate());
5945     if (UNLIKELY(info.Length() < 1)) {
5946         throwArityTypeError(exceptionState, 1, info.Length());
5947         return;
5948     }
5949     TestObject* impl = V8TestObject::toNative(info.Holder());
5950     RefPtr<SerializedScriptValue> serializedScriptValueArg = SerializedScriptValue::create(info[0], 0, 0, exceptionState, info.GetIsolate());
5951     if (exceptionState.throwIfNeeded())
5952         return;
5953     impl->voidMethodSerializedScriptValueArg(serializedScriptValueArg);
5954 }
5955
5956 static void voidMethodSerializedScriptValueArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5957 {
5958     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5959     TestObjectV8Internal::voidMethodSerializedScriptValueArgMethod(info);
5960     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5961 }
5962
5963 static void voidMethodXPathNSResolverArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5964 {
5965     if (UNLIKELY(info.Length() < 1)) {
5966         throwArityTypeErrorForMethod("voidMethodXPathNSResolverArg", "TestObject", 1, info.Length(), info.GetIsolate());
5967         return;
5968     }
5969     TestObject* impl = V8TestObject::toNative(info.Holder());
5970     TONATIVE_VOID(RefPtrWillBeRawPtr<XPathNSResolver>, xPathNSResolverArg, toXPathNSResolver(info[0], info.GetIsolate()));
5971     impl->voidMethodXPathNSResolverArg(xPathNSResolverArg.release());
5972 }
5973
5974 static void voidMethodXPathNSResolverArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5975 {
5976     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5977     TestObjectV8Internal::voidMethodXPathNSResolverArgMethod(info);
5978     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5979 }
5980
5981 static void voidMethodDictionarySequenceArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5982 {
5983     if (UNLIKELY(info.Length() < 1)) {
5984         throwArityTypeErrorForMethod("voidMethodDictionarySequenceArg", "TestObject", 1, info.Length(), info.GetIsolate());
5985         return;
5986     }
5987     TestObject* impl = V8TestObject::toNative(info.Holder());
5988     TONATIVE_VOID(Vector<Dictionary>, dictionarySequenceArg, toNativeArray<Dictionary>(info[0], 1, info.GetIsolate()));
5989     impl->voidMethodDictionarySequenceArg(dictionarySequenceArg);
5990 }
5991
5992 static void voidMethodDictionarySequenceArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5993 {
5994     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5995     TestObjectV8Internal::voidMethodDictionarySequenceArgMethod(info);
5996     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5997 }
5998
5999 static void voidMethodStringArgLongArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6000 {
6001     ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodStringArgLongArg", "TestObject", info.Holder(), info.GetIsolate());
6002     if (UNLIKELY(info.Length() < 2)) {
6003         throwArityTypeError(exceptionState, 2, info.Length());
6004         return;
6005     }
6006     TestObject* impl = V8TestObject::toNative(info.Holder());
6007     TOSTRING_VOID(V8StringResource<>, stringArg, info[0]);
6008     TONATIVE_VOID_EXCEPTIONSTATE(int, longArg, toInt32(info[1], exceptionState), exceptionState);
6009     impl->voidMethodStringArgLongArg(stringArg, longArg);
6010 }
6011
6012 static void voidMethodStringArgLongArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6013 {
6014     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6015     TestObjectV8Internal::voidMethodStringArgLongArgMethod(info);
6016     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6017 }
6018
6019 static void voidMethodOptionalStringArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6020 {
6021     TestObject* impl = V8TestObject::toNative(info.Holder());
6022     if (UNLIKELY(info.Length() <= 0)) {
6023         impl->voidMethodOptionalStringArg();
6024         return;
6025     }
6026     TOSTRING_VOID(V8StringResource<>, optionalStringArg, info[0]);
6027     impl->voidMethodOptionalStringArg(optionalStringArg);
6028 }
6029
6030 static void voidMethodOptionalStringArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6031 {
6032     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6033     TestObjectV8Internal::voidMethodOptionalStringArgMethod(info);
6034     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6035 }
6036
6037 static void voidMethodOptionalTestInterfaceEmptyArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6038 {
6039     TestObject* impl = V8TestObject::toNative(info.Holder());
6040     if (UNLIKELY(info.Length() <= 0)) {
6041         impl->voidMethodOptionalTestInterfaceEmptyArg();
6042         return;
6043     }
6044     TONATIVE_VOID(TestInterfaceEmpty*, optionalTestInterfaceEmptyArg, V8TestInterfaceEmpty::toNativeWithTypeCheck(info.GetIsolate(), info[0]));
6045     impl->voidMethodOptionalTestInterfaceEmptyArg(optionalTestInterfaceEmptyArg);
6046 }
6047
6048 static void voidMethodOptionalTestInterfaceEmptyArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6049 {
6050     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6051     TestObjectV8Internal::voidMethodOptionalTestInterfaceEmptyArgMethod(info);
6052     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6053 }
6054
6055 static void voidMethodOptionalLongArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6056 {
6057     ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodOptionalLongArg", "TestObject", info.Holder(), info.GetIsolate());
6058     TestObject* impl = V8TestObject::toNative(info.Holder());
6059     if (UNLIKELY(info.Length() <= 0)) {
6060         impl->voidMethodOptionalLongArg();
6061         return;
6062     }
6063     TONATIVE_VOID_EXCEPTIONSTATE(int, optionalLongArg, toInt32(info[0], exceptionState), exceptionState);
6064     impl->voidMethodOptionalLongArg(optionalLongArg);
6065 }
6066
6067 static void voidMethodOptionalLongArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6068 {
6069     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6070     TestObjectV8Internal::voidMethodOptionalLongArgMethod(info);
6071     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6072 }
6073
6074 static void stringMethodOptionalLongArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6075 {
6076     ExceptionState exceptionState(ExceptionState::ExecutionContext, "stringMethodOptionalLongArg", "TestObject", info.Holder(), info.GetIsolate());
6077     TestObject* impl = V8TestObject::toNative(info.Holder());
6078     if (UNLIKELY(info.Length() <= 0)) {
6079         v8SetReturnValueString(info, impl->stringMethodOptionalLongArg(), info.GetIsolate());
6080         return;
6081     }
6082     TONATIVE_VOID_EXCEPTIONSTATE(int, optionalLongArg, toInt32(info[0], exceptionState), exceptionState);
6083     v8SetReturnValueString(info, impl->stringMethodOptionalLongArg(optionalLongArg), info.GetIsolate());
6084 }
6085
6086 static void stringMethodOptionalLongArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6087 {
6088     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6089     TestObjectV8Internal::stringMethodOptionalLongArgMethod(info);
6090     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6091 }
6092
6093 static void testInterfaceEmptyMethodOptionalLongArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6094 {
6095     ExceptionState exceptionState(ExceptionState::ExecutionContext, "testInterfaceEmptyMethodOptionalLongArg", "TestObject", info.Holder(), info.GetIsolate());
6096     TestObject* impl = V8TestObject::toNative(info.Holder());
6097     if (UNLIKELY(info.Length() <= 0)) {
6098         v8SetReturnValue(info, impl->testInterfaceEmptyMethodOptionalLongArg());
6099         return;
6100     }
6101     TONATIVE_VOID_EXCEPTIONSTATE(int, optionalLongArg, toInt32(info[0], exceptionState), exceptionState);
6102     v8SetReturnValue(info, impl->testInterfaceEmptyMethodOptionalLongArg(optionalLongArg));
6103 }
6104
6105 static void testInterfaceEmptyMethodOptionalLongArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6106 {
6107     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6108     TestObjectV8Internal::testInterfaceEmptyMethodOptionalLongArgMethod(info);
6109     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6110 }
6111
6112 static void longMethodOptionalLongArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6113 {
6114     ExceptionState exceptionState(ExceptionState::ExecutionContext, "longMethodOptionalLongArg", "TestObject", info.Holder(), info.GetIsolate());
6115     TestObject* impl = V8TestObject::toNative(info.Holder());
6116     if (UNLIKELY(info.Length() <= 0)) {
6117         v8SetReturnValueInt(info, impl->longMethodOptionalLongArg());
6118         return;
6119     }
6120     TONATIVE_VOID_EXCEPTIONSTATE(int, optionalLongArg, toInt32(info[0], exceptionState), exceptionState);
6121     v8SetReturnValueInt(info, impl->longMethodOptionalLongArg(optionalLongArg));
6122 }
6123
6124 static void longMethodOptionalLongArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6125 {
6126     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6127     TestObjectV8Internal::longMethodOptionalLongArgMethod(info);
6128     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6129 }
6130
6131 static void voidMethodLongArgOptionalLongArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6132 {
6133     ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodLongArgOptionalLongArg", "TestObject", info.Holder(), info.GetIsolate());
6134     if (UNLIKELY(info.Length() < 1)) {
6135         throwArityTypeError(exceptionState, 1, info.Length());
6136         return;
6137     }
6138     TestObject* impl = V8TestObject::toNative(info.Holder());
6139     TONATIVE_VOID_EXCEPTIONSTATE(int, longArg, toInt32(info[0], exceptionState), exceptionState);
6140     if (UNLIKELY(info.Length() <= 1)) {
6141         impl->voidMethodLongArgOptionalLongArg(longArg);
6142         return;
6143     }
6144     TONATIVE_VOID_EXCEPTIONSTATE(int, optionalLongArg, toInt32(info[1], exceptionState), exceptionState);
6145     impl->voidMethodLongArgOptionalLongArg(longArg, optionalLongArg);
6146 }
6147
6148 static void voidMethodLongArgOptionalLongArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6149 {
6150     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6151     TestObjectV8Internal::voidMethodLongArgOptionalLongArgMethod(info);
6152     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6153 }
6154
6155 static void voidMethodLongArgOptionalLongArgOptionalLongArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6156 {
6157     ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodLongArgOptionalLongArgOptionalLongArg", "TestObject", info.Holder(), info.GetIsolate());
6158     if (UNLIKELY(info.Length() < 1)) {
6159         throwArityTypeError(exceptionState, 1, info.Length());
6160         return;
6161     }
6162     TestObject* impl = V8TestObject::toNative(info.Holder());
6163     TONATIVE_VOID_EXCEPTIONSTATE(int, longArg, toInt32(info[0], exceptionState), exceptionState);
6164     if (UNLIKELY(info.Length() <= 1)) {
6165         impl->voidMethodLongArgOptionalLongArgOptionalLongArg(longArg);
6166         return;
6167     }
6168     TONATIVE_VOID_EXCEPTIONSTATE(int, optionalLongArg1, toInt32(info[1], exceptionState), exceptionState);
6169     if (UNLIKELY(info.Length() <= 2)) {
6170         impl->voidMethodLongArgOptionalLongArgOptionalLongArg(longArg, optionalLongArg1);
6171         return;
6172     }
6173     TONATIVE_VOID_EXCEPTIONSTATE(int, optionalLongArg2, toInt32(info[2], exceptionState), exceptionState);
6174     impl->voidMethodLongArgOptionalLongArgOptionalLongArg(longArg, optionalLongArg1, optionalLongArg2);
6175 }
6176
6177 static void voidMethodLongArgOptionalLongArgOptionalLongArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6178 {
6179     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6180     TestObjectV8Internal::voidMethodLongArgOptionalLongArgOptionalLongArgMethod(info);
6181     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6182 }
6183
6184 static void voidMethodLongArgOptionalTestInterfaceEmptyArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6185 {
6186     ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodLongArgOptionalTestInterfaceEmptyArg", "TestObject", info.Holder(), info.GetIsolate());
6187     if (UNLIKELY(info.Length() < 1)) {
6188         throwArityTypeError(exceptionState, 1, info.Length());
6189         return;
6190     }
6191     TestObject* impl = V8TestObject::toNative(info.Holder());
6192     TONATIVE_VOID_EXCEPTIONSTATE(int, longArg, toInt32(info[0], exceptionState), exceptionState);
6193     if (UNLIKELY(info.Length() <= 1)) {
6194         impl->voidMethodLongArgOptionalTestInterfaceEmptyArg(longArg);
6195         return;
6196     }
6197     TONATIVE_VOID(TestInterfaceEmpty*, optionalTestInterfaceEmpty, V8TestInterfaceEmpty::toNativeWithTypeCheck(info.GetIsolate(), info[1]));
6198     impl->voidMethodLongArgOptionalTestInterfaceEmptyArg(longArg, optionalTestInterfaceEmpty);
6199 }
6200
6201 static void voidMethodLongArgOptionalTestInterfaceEmptyArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6202 {
6203     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6204     TestObjectV8Internal::voidMethodLongArgOptionalTestInterfaceEmptyArgMethod(info);
6205     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6206 }
6207
6208 static void voidMethodTestInterfaceEmptyArgOptionalLongArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6209 {
6210     ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodTestInterfaceEmptyArgOptionalLongArg", "TestObject", info.Holder(), info.GetIsolate());
6211     if (UNLIKELY(info.Length() < 1)) {
6212         throwArityTypeError(exceptionState, 1, info.Length());
6213         return;
6214     }
6215     TestObject* impl = V8TestObject::toNative(info.Holder());
6216     TONATIVE_VOID(TestInterfaceEmpty*, optionalTestInterfaceEmpty, V8TestInterfaceEmpty::toNativeWithTypeCheck(info.GetIsolate(), info[0]));
6217     if (UNLIKELY(info.Length() <= 1)) {
6218         impl->voidMethodTestInterfaceEmptyArgOptionalLongArg(optionalTestInterfaceEmpty);
6219         return;
6220     }
6221     TONATIVE_VOID_EXCEPTIONSTATE(int, longArg, toInt32(info[1], exceptionState), exceptionState);
6222     impl->voidMethodTestInterfaceEmptyArgOptionalLongArg(optionalTestInterfaceEmpty, longArg);
6223 }
6224
6225 static void voidMethodTestInterfaceEmptyArgOptionalLongArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6226 {
6227     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6228     TestObjectV8Internal::voidMethodTestInterfaceEmptyArgOptionalLongArgMethod(info);
6229     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6230 }
6231
6232 static void voidMethodOptionalDictionaryArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6233 {
6234     TestObject* impl = V8TestObject::toNative(info.Holder());
6235     TONATIVE_VOID(Dictionary, optionalDictionaryArg, Dictionary(info[0], info.GetIsolate()));
6236     if (!optionalDictionaryArg.isUndefinedOrNull() && !optionalDictionaryArg.isObject()) {
6237         throwTypeError(ExceptionMessages::failedToExecute("voidMethodOptionalDictionaryArg", "TestObject", "parameter 1 ('optionalDictionaryArg') is not an object."), info.GetIsolate());
6238         return;
6239     }
6240     impl->voidMethodOptionalDictionaryArg(optionalDictionaryArg);
6241 }
6242
6243 static void voidMethodOptionalDictionaryArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6244 {
6245     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6246     TestObjectV8Internal::voidMethodOptionalDictionaryArgMethod(info);
6247     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6248 }
6249
6250 static void voidMethodVariadicStringArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6251 {
6252     TestObject* impl = V8TestObject::toNative(info.Holder());
6253     TONATIVE_VOID(Vector<String>, variadicStringArgs, toNativeArguments<String>(info, 0));
6254     impl->voidMethodVariadicStringArg(variadicStringArgs);
6255 }
6256
6257 static void voidMethodVariadicStringArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6258 {
6259     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6260     TestObjectV8Internal::voidMethodVariadicStringArgMethod(info);
6261     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6262 }
6263
6264 static void voidMethodStringArgVariadicStringArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6265 {
6266     if (UNLIKELY(info.Length() < 1)) {
6267         throwArityTypeErrorForMethod("voidMethodStringArgVariadicStringArg", "TestObject", 1, info.Length(), info.GetIsolate());
6268         return;
6269     }
6270     TestObject* impl = V8TestObject::toNative(info.Holder());
6271     TOSTRING_VOID(V8StringResource<>, stringArg, info[0]);
6272     TONATIVE_VOID(Vector<String>, variadicStringArgs, toNativeArguments<String>(info, 1));
6273     impl->voidMethodStringArgVariadicStringArg(stringArg, variadicStringArgs);
6274 }
6275
6276 static void voidMethodStringArgVariadicStringArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6277 {
6278     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6279     TestObjectV8Internal::voidMethodStringArgVariadicStringArgMethod(info);
6280     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6281 }
6282
6283 static void voidMethodVariadicTestInterfaceEmptyArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6284 {
6285     TestObject* impl = V8TestObject::toNative(info.Holder());
6286     Vector<RefPtr<TestInterfaceEmpty> > variadicTestInterfaceEmptyArgs;
6287     for (int i = 0; i < info.Length(); ++i) {
6288         if (!V8TestInterfaceEmpty::hasInstance(info[i], info.GetIsolate())) {
6289             throwTypeError(ExceptionMessages::failedToExecute("voidMethodVariadicTestInterfaceEmptyArg", "TestObject", "parameter 1 is not of type 'TestInterfaceEmpty'."), info.GetIsolate());
6290             return;
6291         }
6292         variadicTestInterfaceEmptyArgs.append(V8TestInterfaceEmpty::toNative(v8::Handle<v8::Object>::Cast(info[i])));
6293     }
6294     impl->voidMethodVariadicTestInterfaceEmptyArg(variadicTestInterfaceEmptyArgs);
6295 }
6296
6297 static void voidMethodVariadicTestInterfaceEmptyArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6298 {
6299     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6300     TestObjectV8Internal::voidMethodVariadicTestInterfaceEmptyArgMethod(info);
6301     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6302 }
6303
6304 static void voidMethodTestInterfaceEmptyArgVariadicTestInterfaceEmptyArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6305 {
6306     if (UNLIKELY(info.Length() < 1)) {
6307         throwArityTypeErrorForMethod("voidMethodTestInterfaceEmptyArgVariadicTestInterfaceEmptyArg", "TestObject", 1, info.Length(), info.GetIsolate());
6308         return;
6309     }
6310     TestObject* impl = V8TestObject::toNative(info.Holder());
6311     TONATIVE_VOID(TestInterfaceEmpty*, testInterfaceEmptyArg, V8TestInterfaceEmpty::toNativeWithTypeCheck(info.GetIsolate(), info[0]));
6312     Vector<RefPtr<TestInterfaceEmpty> > variadicTestInterfaceEmptyArgs;
6313     for (int i = 1; i < info.Length(); ++i) {
6314         if (!V8TestInterfaceEmpty::hasInstance(info[i], info.GetIsolate())) {
6315             throwTypeError(ExceptionMessages::failedToExecute("voidMethodTestInterfaceEmptyArgVariadicTestInterfaceEmptyArg", "TestObject", "parameter 2 is not of type 'TestInterfaceEmpty'."), info.GetIsolate());
6316             return;
6317         }
6318         variadicTestInterfaceEmptyArgs.append(V8TestInterfaceEmpty::toNative(v8::Handle<v8::Object>::Cast(info[i])));
6319     }
6320     impl->voidMethodTestInterfaceEmptyArgVariadicTestInterfaceEmptyArg(testInterfaceEmptyArg, variadicTestInterfaceEmptyArgs);
6321 }
6322
6323 static void voidMethodTestInterfaceEmptyArgVariadicTestInterfaceEmptyArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6324 {
6325     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6326     TestObjectV8Internal::voidMethodTestInterfaceEmptyArgVariadicTestInterfaceEmptyArgMethod(info);
6327     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6328 }
6329
6330 static void voidMethodVariadicTestInterfaceGarbageCollectedArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6331 {
6332     TestObject* impl = V8TestObject::toNative(info.Holder());
6333     HeapVector<Member<TestInterfaceGarbageCollected> > variadicTestInterfaceGarbageCollectedArg;
6334     for (int i = 0; i < info.Length(); ++i) {
6335         if (!V8TestInterfaceGarbageCollected::hasInstance(info[i], info.GetIsolate())) {
6336             throwTypeError(ExceptionMessages::failedToExecute("voidMethodVariadicTestInterfaceGarbageCollectedArg", "TestObject", "parameter 1 is not of type 'TestInterfaceGarbageCollected'."), info.GetIsolate());
6337             return;
6338         }
6339         variadicTestInterfaceGarbageCollectedArg.append(V8TestInterfaceGarbageCollected::toNative(v8::Handle<v8::Object>::Cast(info[i])));
6340     }
6341     impl->voidMethodVariadicTestInterfaceGarbageCollectedArg(variadicTestInterfaceGarbageCollectedArg);
6342 }
6343
6344 static void voidMethodVariadicTestInterfaceGarbageCollectedArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6345 {
6346     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6347     TestObjectV8Internal::voidMethodVariadicTestInterfaceGarbageCollectedArgMethod(info);
6348     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6349 }
6350
6351 static void voidMethodVariadicTestInterfaceWillBeGarbageCollectedArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6352 {
6353     TestObject* impl = V8TestObject::toNative(info.Holder());
6354     WillBeHeapVector<RefPtrWillBeMember<TestInterfaceWillBeGarbageCollected> > variadicTestInterfaceWillBeGarbageCollectedArg;
6355     for (int i = 0; i < info.Length(); ++i) {
6356         if (!V8TestInterfaceWillBeGarbageCollected::hasInstance(info[i], info.GetIsolate())) {
6357             throwTypeError(ExceptionMessages::failedToExecute("voidMethodVariadicTestInterfaceWillBeGarbageCollectedArg", "TestObject", "parameter 1 is not of type 'TestInterfaceWillBeGarbageCollected'."), info.GetIsolate());
6358             return;
6359         }
6360         variadicTestInterfaceWillBeGarbageCollectedArg.append(V8TestInterfaceWillBeGarbageCollected::toNative(v8::Handle<v8::Object>::Cast(info[i])));
6361     }
6362     impl->voidMethodVariadicTestInterfaceWillBeGarbageCollectedArg(variadicTestInterfaceWillBeGarbageCollectedArg);
6363 }
6364
6365 static void voidMethodVariadicTestInterfaceWillBeGarbageCollectedArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6366 {
6367     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6368     TestObjectV8Internal::voidMethodVariadicTestInterfaceWillBeGarbageCollectedArgMethod(info);
6369     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6370 }
6371
6372 static void overloadedMethodA1Method(const v8::FunctionCallbackInfo<v8::Value>& info)
6373 {
6374     ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedMethodA", "TestObject", info.Holder(), info.GetIsolate());
6375     if (UNLIKELY(info.Length() < 1)) {
6376         throwArityTypeError(exceptionState, 1, info.Length());
6377         return;
6378     }
6379     TestObject* impl = V8TestObject::toNative(info.Holder());
6380     TONATIVE_VOID_EXCEPTIONSTATE(int, longArg, toInt32(info[0], exceptionState), exceptionState);
6381     impl->overloadedMethodA(longArg);
6382 }
6383
6384 static void overloadedMethodA2Method(const v8::FunctionCallbackInfo<v8::Value>& info)
6385 {
6386     ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedMethodA", "TestObject", info.Holder(), info.GetIsolate());
6387     if (UNLIKELY(info.Length() < 2)) {
6388         throwArityTypeError(exceptionState, 2, info.Length());
6389         return;
6390     }
6391     TestObject* impl = V8TestObject::toNative(info.Holder());
6392     TONATIVE_VOID_EXCEPTIONSTATE(int, longArg1, toInt32(info[0], exceptionState), exceptionState);
6393     TONATIVE_VOID_EXCEPTIONSTATE(int, longArg2, toInt32(info[1], exceptionState), exceptionState);
6394     impl->overloadedMethodA(longArg1, longArg2);
6395 }
6396
6397 static void overloadedMethodAMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6398 {
6399     if (((info.Length() == 1))) {
6400         overloadedMethodA1Method(info);
6401         return;
6402     }
6403     if (((info.Length() == 2))) {
6404         overloadedMethodA2Method(info);
6405         return;
6406     }
6407     ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedMethodA", "TestObject", info.Holder(), info.GetIsolate());
6408     if (UNLIKELY(info.Length() < 1)) {
6409         throwArityTypeError(exceptionState, 1, info.Length());
6410         return;
6411     }
6412     exceptionState.throwTypeError("No function was found that matched the signature provided.");
6413     exceptionState.throwIfNeeded();
6414 }
6415
6416 static void overloadedMethodAMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6417 {
6418     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6419     TestObjectV8Internal::overloadedMethodAMethod(info);
6420     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6421 }
6422
6423 static void overloadedMethodB1Method(const v8::FunctionCallbackInfo<v8::Value>& info)
6424 {
6425     ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedMethodB", "TestObject", info.Holder(), info.GetIsolate());
6426     if (UNLIKELY(info.Length() < 1)) {
6427         throwArityTypeError(exceptionState, 1, info.Length());
6428         return;
6429     }
6430     TestObject* impl = V8TestObject::toNative(info.Holder());
6431     TONATIVE_VOID_EXCEPTIONSTATE(int, longArg, toInt32(info[0], exceptionState), exceptionState);
6432     impl->overloadedMethodB(longArg);
6433 }
6434
6435 static void overloadedMethodB2Method(const v8::FunctionCallbackInfo<v8::Value>& info)
6436 {
6437     ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedMethodB", "TestObject", info.Holder(), info.GetIsolate());
6438     if (UNLIKELY(info.Length() < 1)) {
6439         throwArityTypeError(exceptionState, 1, info.Length());
6440         return;
6441     }
6442     TestObject* impl = V8TestObject::toNative(info.Holder());
6443     TONATIVE_VOID(bool, booleanArg, info[0]->BooleanValue());
6444     if (UNLIKELY(info.Length() <= 1)) {
6445         impl->overloadedMethodB(booleanArg);
6446         return;
6447     }
6448     TONATIVE_VOID_EXCEPTIONSTATE(int, longArg, toInt32(info[1], exceptionState), exceptionState);
6449     impl->overloadedMethodB(booleanArg, longArg);
6450 }
6451
6452 static void overloadedMethodBMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6453 {
6454     if (((info.Length() == 1))) {
6455         overloadedMethodB1Method(info);
6456         return;
6457     }
6458     if (((info.Length() == 1)) || ((info.Length() == 2))) {
6459         overloadedMethodB2Method(info);
6460         return;
6461     }
6462     ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedMethodB", "TestObject", info.Holder(), info.GetIsolate());
6463     if (UNLIKELY(info.Length() < 1)) {
6464         throwArityTypeError(exceptionState, 1, info.Length());
6465         return;
6466     }
6467     exceptionState.throwTypeError("No function was found that matched the signature provided.");
6468     exceptionState.throwIfNeeded();
6469 }
6470
6471 static void overloadedMethodBMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6472 {
6473     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6474     TestObjectV8Internal::overloadedMethodBMethod(info);
6475     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6476 }
6477
6478 static void overloadedMethodC1Method(const v8::FunctionCallbackInfo<v8::Value>& info)
6479 {
6480     ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedMethodC", "TestObject", info.Holder(), info.GetIsolate());
6481     if (UNLIKELY(info.Length() < 1)) {
6482         throwArityTypeError(exceptionState, 1, info.Length());
6483         return;
6484     }
6485     TestObject* impl = V8TestObject::toNative(info.Holder());
6486     TONATIVE_VOID_EXCEPTIONSTATE(int, longArg, toInt32(info[0], exceptionState), exceptionState);
6487     impl->overloadedMethodC(longArg);
6488 }
6489
6490 static void overloadedMethodC2Method(const v8::FunctionCallbackInfo<v8::Value>& info)
6491 {
6492     ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedMethodC", "TestObject", info.Holder(), info.GetIsolate());
6493     if (UNLIKELY(info.Length() < 1)) {
6494         throwArityTypeError(exceptionState, 1, info.Length());
6495         return;
6496     }
6497     TestObject* impl = V8TestObject::toNative(info.Holder());
6498     TONATIVE_VOID(bool, booleanArg, info[0]->BooleanValue());
6499     TONATIVE_VOID(Vector<int>, longArgs, toNativeArguments<int>(info, 1));
6500     impl->overloadedMethodC(booleanArg, longArgs);
6501 }
6502
6503 static void overloadedMethodCMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6504 {
6505     if (((info.Length() == 1))) {
6506         overloadedMethodC1Method(info);
6507         return;
6508     }
6509     if () {
6510         overloadedMethodC2Method(info);
6511         return;
6512     }
6513     ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedMethodC", "TestObject", info.Holder(), info.GetIsolate());
6514     if (UNLIKELY(info.Length() < 1)) {
6515         throwArityTypeError(exceptionState, 1, info.Length());
6516         return;
6517     }
6518     exceptionState.throwTypeError("No function was found that matched the signature provided.");
6519     exceptionState.throwIfNeeded();
6520 }
6521
6522 static void overloadedMethodCMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6523 {
6524     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6525     TestObjectV8Internal::overloadedMethodCMethod(info);
6526     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6527 }
6528
6529 static void overloadedMethodD1Method(const v8::FunctionCallbackInfo<v8::Value>& info)
6530 {
6531     ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedMethodD", "TestObject", info.Holder(), info.GetIsolate());
6532     if (UNLIKELY(info.Length() < 1)) {
6533         throwArityTypeError(exceptionState, 1, info.Length());
6534         return;
6535     }
6536     TestObject* impl = V8TestObject::toNative(info.Holder());
6537     TONATIVE_VOID_EXCEPTIONSTATE(int, longArg, toInt32(info[0], exceptionState), exceptionState);
6538     impl->overloadedMethodD(longArg);
6539 }
6540
6541 static void overloadedMethodD2Method(const v8::FunctionCallbackInfo<v8::Value>& info)
6542 {
6543     if (UNLIKELY(info.Length() < 1)) {
6544         throwArityTypeErrorForMethod("overloadedMethodD", "TestObject", 1, info.Length(), info.GetIsolate());
6545         return;
6546     }
6547     TestObject* impl = V8TestObject::toNative(info.Holder());
6548     TONATIVE_VOID(TestInterfaceEmpty*, testInterfaceEmptyArg, V8TestInterfaceEmpty::toNativeWithTypeCheck(info.GetIsolate(), info[0]));
6549     impl->overloadedMethodD(testInterfaceEmptyArg);
6550 }
6551
6552 static void overloadedMethodDMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6553 {
6554     if (((info.Length() == 1))) {
6555         overloadedMethodD1Method(info);
6556         return;
6557     }
6558     if (((info.Length() == 1) && (V8TestInterfaceEmpty::hasInstance(info[0], info.GetIsolate())))) {
6559         overloadedMethodD2Method(info);
6560         return;
6561     }
6562     ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedMethodD", "TestObject", info.Holder(), info.GetIsolate());
6563     if (UNLIKELY(info.Length() < 1)) {
6564         throwArityTypeError(exceptionState, 1, info.Length());
6565         return;
6566     }
6567     exceptionState.throwTypeError("No function was found that matched the signature provided.");
6568     exceptionState.throwIfNeeded();
6569 }
6570
6571 static void overloadedMethodDMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6572 {
6573     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6574     TestObjectV8Internal::overloadedMethodDMethod(info);
6575     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6576 }
6577
6578 static void overloadedMethodE1Method(const v8::FunctionCallbackInfo<v8::Value>& info)
6579 {
6580     ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedMethodE", "TestObject", info.Holder(), info.GetIsolate());
6581     if (UNLIKELY(info.Length() < 1)) {
6582         throwArityTypeError(exceptionState, 1, info.Length());
6583         return;
6584     }
6585     TestObject* impl = V8TestObject::toNative(info.Holder());
6586     TONATIVE_VOID_EXCEPTIONSTATE(int, longArg, toInt32(info[0], exceptionState), exceptionState);
6587     impl->overloadedMethodE(longArg);
6588 }
6589
6590 static void overloadedMethodE2Method(const v8::FunctionCallbackInfo<v8::Value>& info)
6591 {
6592     if (UNLIKELY(info.Length() < 1)) {
6593         throwArityTypeErrorForMethod("overloadedMethodE", "TestObject", 1, info.Length(), info.GetIsolate());
6594         return;
6595     }
6596     TestObject* impl = V8TestObject::toNative(info.Holder());
6597     TONATIVE_VOID(Vector<int>, longArrayArg, toNativeArray<int>(info[0], 1, info.GetIsolate()));
6598     impl->overloadedMethodE(longArrayArg);
6599 }
6600
6601 static void overloadedMethodEMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6602 {
6603     if (((info.Length() == 1))) {
6604         overloadedMethodE1Method(info);
6605         return;
6606     }
6607     if (((info.Length() == 1) && (info[0]->IsArray()))) {
6608         overloadedMethodE2Method(info);
6609         return;
6610     }
6611     ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedMethodE", "TestObject", info.Holder(), info.GetIsolate());
6612     if (UNLIKELY(info.Length() < 1)) {
6613         throwArityTypeError(exceptionState, 1, info.Length());
6614         return;
6615     }
6616     exceptionState.throwTypeError("No function was found that matched the signature provided.");
6617     exceptionState.throwIfNeeded();
6618 }
6619
6620 static void overloadedMethodEMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6621 {
6622     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6623     TestObjectV8Internal::overloadedMethodEMethod(info);
6624     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6625 }
6626
6627 static void overloadedMethodF1Method(const v8::FunctionCallbackInfo<v8::Value>& info)
6628 {
6629     ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedMethodF", "TestObject", info.Holder(), info.GetIsolate());
6630     if (UNLIKELY(info.Length() < 1)) {
6631         throwArityTypeError(exceptionState, 1, info.Length());
6632         return;
6633     }
6634     TestObject* impl = V8TestObject::toNative(info.Holder());
6635     TONATIVE_VOID_EXCEPTIONSTATE(int, longArg, toInt32(info[0], exceptionState), exceptionState);
6636     impl->overloadedMethodF(longArg);
6637 }
6638
6639 static void overloadedMethodF2Method(const v8::FunctionCallbackInfo<v8::Value>& info)
6640 {
6641     if (UNLIKELY(info.Length() < 1)) {
6642         throwArityTypeErrorForMethod("overloadedMethodF", "TestObject", 1, info.Length(), info.GetIsolate());
6643         return;
6644     }
6645     TestObject* impl = V8TestObject::toNative(info.Holder());
6646     TONATIVE_VOID(TestInterfaceEmpty*, testInterfaceEmptyOrNullArg, V8TestInterfaceEmpty::toNativeWithTypeCheck(info.GetIsolate(), info[0]));
6647     impl->overloadedMethodF(testInterfaceEmptyOrNullArg);
6648 }
6649
6650 static void overloadedMethodFMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6651 {
6652     if (((info.Length() == 1))) {
6653         overloadedMethodF1Method(info);
6654         return;
6655     }
6656     if (((info.Length() == 1) && (info[0]->IsNull() || V8TestInterfaceEmpty::hasInstance(info[0], info.GetIsolate())))) {
6657         overloadedMethodF2Method(info);
6658         return;
6659     }
6660     ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedMethodF", "TestObject", info.Holder(), info.GetIsolate());
6661     if (UNLIKELY(info.Length() < 1)) {
6662         throwArityTypeError(exceptionState, 1, info.Length());
6663         return;
6664     }
6665     exceptionState.throwTypeError("No function was found that matched the signature provided.");
6666     exceptionState.throwIfNeeded();
6667 }
6668
6669 static void overloadedMethodFMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6670 {
6671     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6672     TestObjectV8Internal::overloadedMethodFMethod(info);
6673     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6674 }
6675
6676 static void overloadedMethodG1Method(const v8::FunctionCallbackInfo<v8::Value>& info)
6677 {
6678     TestObject* impl = V8TestObject::toNative(info.Holder());
6679     impl->overloadedMethodG();
6680 }
6681
6682 static void overloadedMethodG2Method(const v8::FunctionCallbackInfo<v8::Value>& info)
6683 {
6684     if (UNLIKELY(info.Length() < 1)) {
6685         throwArityTypeErrorForMethod("overloadedMethodG", "TestObject", 1, info.Length(), info.GetIsolate());
6686         return;
6687     }
6688     TestObject* impl = V8TestObject::toNative(info.Holder());
6689     TOSTRING_VOID(V8StringResource<>, legacyOverloadStringStringArg, info[0]);
6690     impl->overloadedMethodG(legacyOverloadStringStringArg);
6691 }
6692
6693 static void overloadedMethodGMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6694 {
6695     if (((info.Length() == 0))) {
6696         overloadedMethodG1Method(info);
6697         return;
6698     }
6699     if (((info.Length() == 1) && (isUndefinedOrNull(info[0]) || info[0]->IsString() || info[0]->IsObject()))) {
6700         overloadedMethodG2Method(info);
6701         return;
6702     }
6703     throwTypeError(ExceptionMessages::failedToExecute("overloadedMethodG", "TestObject", "No function was found that matched the signature provided."), info.GetIsolate());
6704 }
6705
6706 static void overloadedMethodGMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6707 {
6708     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6709     TestObjectV8Internal::overloadedMethodGMethod(info);
6710     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6711 }
6712
6713 static void overloadedMethodH1Method(const v8::FunctionCallbackInfo<v8::Value>& info)
6714 {
6715     TestObject* impl = V8TestObject::toNative(info.Holder());
6716     impl->overloadedMethodH();
6717 }
6718
6719 static void overloadedMethodH2Method(const v8::FunctionCallbackInfo<v8::Value>& info)
6720 {
6721     if (UNLIKELY(info.Length() < 1)) {
6722         throwArityTypeErrorForMethod("overloadedMethodH", "TestObject", 1, info.Length(), info.GetIsolate());
6723         return;
6724     }
6725     TestObject* impl = V8TestObject::toNative(info.Holder());
6726     if (info.Length() <= 0 || !info[0]->IsFunction()) {
6727         throwTypeError(ExceptionMessages::failedToExecute("overloadedMethodH", "TestObject", "The callback provided as parameter 1 is not a function."), info.GetIsolate());
6728         return;
6729     }
6730     OwnPtr<TestCallbackInterface> testCallbackInterfaceArg = V8TestCallbackInterface::create(v8::Handle<v8::Function>::Cast(info[0]), currentExecutionContext(info.GetIsolate()));
6731     impl->overloadedMethodH(testCallbackInterfaceArg.release());
6732 }
6733
6734 static void overloadedMethodHMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6735 {
6736     if (((info.Length() == 0))) {
6737         overloadedMethodH1Method(info);
6738         return;
6739     }
6740     if (((info.Length() == 1) && (info[0]->IsNull() || info[0]->IsFunction()))) {
6741         overloadedMethodH2Method(info);
6742         return;
6743     }
6744     throwTypeError(ExceptionMessages::failedToExecute("overloadedMethodH", "TestObject", "No function was found that matched the signature provided."), info.GetIsolate());
6745 }
6746
6747 static void overloadedMethodHMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6748 {
6749     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6750     TestObjectV8Internal::overloadedMethodHMethod(info);
6751     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6752 }
6753
6754 static void overloadedMethodI1Method(const v8::FunctionCallbackInfo<v8::Value>& info)
6755 {
6756     if (UNLIKELY(info.Length() < 1)) {
6757         throwArityTypeErrorForMethod("overloadedMethodI", "TestObject", 1, info.Length(), info.GetIsolate());
6758         return;
6759     }
6760     TestObject* impl = V8TestObject::toNative(info.Holder());
6761     TONATIVE_VOID(Dictionary, dictionaryArg, Dictionary(info[0], info.GetIsolate()));
6762     if (!dictionaryArg.isUndefinedOrNull() && !dictionaryArg.isObject()) {
6763         throwTypeError(ExceptionMessages::failedToExecute("overloadedMethodI", "TestObject", "parameter 1 ('dictionaryArg') is not an object."), info.GetIsolate());
6764         return;
6765     }
6766     impl->overloadedMethodI(dictionaryArg);
6767 }
6768
6769 static void overloadedMethodI2Method(const v8::FunctionCallbackInfo<v8::Value>& info)
6770 {
6771     if (UNLIKELY(info.Length() < 1)) {
6772         throwArityTypeErrorForMethod("overloadedMethodI", "TestObject", 1, info.Length(), info.GetIsolate());
6773         return;
6774     }
6775     TestObject* impl = V8TestObject::toNative(info.Holder());
6776     TONATIVE_VOID(double, doubleArg, static_cast<double>(info[0]->NumberValue()));
6777     impl->overloadedMethodI(doubleArg);
6778 }
6779
6780 static void overloadedMethodIMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6781 {
6782     if (((info.Length() == 1) && (info[0]->IsObject()))) {
6783         overloadedMethodI1Method(info);
6784         return;
6785     }
6786     if (((info.Length() == 1))) {
6787         overloadedMethodI2Method(info);
6788         return;
6789     }
6790     ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedMethodI", "TestObject", info.Holder(), info.GetIsolate());
6791     if (UNLIKELY(info.Length() < 1)) {
6792         throwArityTypeError(exceptionState, 1, info.Length());
6793         return;
6794     }
6795     exceptionState.throwTypeError("No function was found that matched the signature provided.");
6796     exceptionState.throwIfNeeded();
6797 }
6798
6799 static void overloadedMethodIMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6800 {
6801     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6802     TestObjectV8Internal::overloadedMethodIMethod(info);
6803     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6804 }
6805
6806 static void overloadedMethodJ1Method(const v8::FunctionCallbackInfo<v8::Value>& info)
6807 {
6808     ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedMethodJ", "TestObject", info.Holder(), info.GetIsolate());
6809     if (UNLIKELY(info.Length() < 1)) {
6810         throwArityTypeError(exceptionState, 1, info.Length());
6811         return;
6812     }
6813     TestObject* impl = V8TestObject::toNative(info.Holder());
6814     TONATIVE_VOID_EXCEPTIONSTATE(int, longArg, toInt32(info[0], exceptionState), exceptionState);
6815     impl->overloadedMethodJ(longArg);
6816 }
6817
6818 static void overloadedMethodJ2Method(const v8::FunctionCallbackInfo<v8::Value>& info)
6819 {
6820     if (UNLIKELY(info.Length() < 1)) {
6821         throwArityTypeErrorForMethod("overloadedMethodJ", "TestObject", 1, info.Length(), info.GetIsolate());
6822         return;
6823     }
6824     TestObject* impl = V8TestObject::toNative(info.Holder());
6825     TONATIVE_VOID(TestInterfaceEmpty*, testInterfaceEmptyOrNullArg, V8TestInterfaceEmpty::toNativeWithTypeCheck(info.GetIsolate(), info[0]));
6826     impl->overloadedMethodJ(testInterfaceEmptyOrNullArg);
6827 }
6828
6829 static void overloadedMethodJMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6830 {
6831     if (((info.Length() == 1))) {
6832         overloadedMethodJ1Method(info);
6833         return;
6834     }
6835     if (((info.Length() == 1) && (isUndefinedOrNull(info[0]) || V8TestInterfaceEmpty::hasInstance(info[0], info.GetIsolate())))) {
6836         overloadedMethodJ2Method(info);
6837         return;
6838     }
6839     ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedMethodJ", "TestObject", info.Holder(), info.GetIsolate());
6840     if (UNLIKELY(info.Length() < 1)) {
6841         throwArityTypeError(exceptionState, 1, info.Length());
6842         return;
6843     }
6844     exceptionState.throwTypeError("No function was found that matched the signature provided.");
6845     exceptionState.throwIfNeeded();
6846 }
6847
6848 static void overloadedMethodJMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6849 {
6850     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6851     TestObjectV8Internal::overloadedMethodJMethod(info);
6852     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6853 }
6854
6855 static void overloadedPerWorldBindingsMethod1Method(const v8::FunctionCallbackInfo<v8::Value>& info)
6856 {
6857     TestObject* impl = V8TestObject::toNative(info.Holder());
6858     impl->overloadedPerWorldBindingsMethod();
6859 }
6860
6861 static void overloadedPerWorldBindingsMethod1MethodForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info)
6862 {
6863     TestObject* impl = V8TestObject::toNative(info.Holder());
6864     impl->overloadedPerWorldBindingsMethod();
6865 }
6866
6867 static void overloadedPerWorldBindingsMethod2Method(const v8::FunctionCallbackInfo<v8::Value>& info)
6868 {
6869     ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedPerWorldBindingsMethod", "TestObject", info.Holder(), info.GetIsolate());
6870     if (UNLIKELY(info.Length() < 1)) {
6871         throwArityTypeError(exceptionState, 1, info.Length());
6872         return;
6873     }
6874     TestObject* impl = V8TestObject::toNative(info.Holder());
6875     TONATIVE_VOID_EXCEPTIONSTATE(int, longArg, toInt32(info[0], exceptionState), exceptionState);
6876     impl->overloadedPerWorldBindingsMethod(longArg);
6877 }
6878
6879 static void overloadedPerWorldBindingsMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6880 {
6881     if (((info.Length() == 0))) {
6882         overloadedPerWorldBindingsMethod1Method(info);
6883         return;
6884     }
6885     if (((info.Length() == 1))) {
6886         overloadedPerWorldBindingsMethod2Method(info);
6887         return;
6888     }
6889     throwTypeError(ExceptionMessages::failedToExecute("overloadedPerWorldBindingsMethod", "TestObject", "No function was found that matched the signature provided."), info.GetIsolate());
6890 }
6891
6892 static void overloadedPerWorldBindingsMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6893 {
6894     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6895     TestObjectV8Internal::overloadedPerWorldBindingsMethodMethod(info);
6896     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6897 }
6898
6899 static void overloadedPerWorldBindingsMethod2MethodForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info)
6900 {
6901     ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedPerWorldBindingsMethod", "TestObject", info.Holder(), info.GetIsolate());
6902     if (UNLIKELY(info.Length() < 1)) {
6903         throwArityTypeError(exceptionState, 1, info.Length());
6904         return;
6905     }
6906     TestObject* impl = V8TestObject::toNative(info.Holder());
6907     TONATIVE_VOID_EXCEPTIONSTATE(int, longArg, toInt32(info[0], exceptionState), exceptionState);
6908     impl->overloadedPerWorldBindingsMethod(longArg);
6909 }
6910
6911 static void overloadedPerWorldBindingsMethodMethodForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info)
6912 {
6913     if (((info.Length() == 0))) {
6914         overloadedPerWorldBindingsMethod1MethodForMainWorld(info);
6915         return;
6916     }
6917     if (((info.Length() == 1))) {
6918         overloadedPerWorldBindingsMethod2MethodForMainWorld(info);
6919         return;
6920     }
6921     throwTypeError(ExceptionMessages::failedToExecute("overloadedPerWorldBindingsMethod", "TestObject", "No function was found that matched the signature provided."), info.GetIsolate());
6922 }
6923
6924 static void overloadedPerWorldBindingsMethodMethodCallbackForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info)
6925 {
6926     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6927     TestObjectV8Internal::overloadedPerWorldBindingsMethodMethodForMainWorld(info);
6928     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6929 }
6930
6931 static void overloadedStaticMethod1Method(const v8::FunctionCallbackInfo<v8::Value>& info)
6932 {
6933     ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedStaticMethod", "TestObject", info.Holder(), info.GetIsolate());
6934     if (UNLIKELY(info.Length() < 1)) {
6935         throwArityTypeError(exceptionState, 1, info.Length());
6936         return;
6937     }
6938     TONATIVE_VOID_EXCEPTIONSTATE(int, longArg, toInt32(info[0], exceptionState), exceptionState);
6939     TestObject::overloadedStaticMethod(longArg);
6940 }
6941
6942 static void overloadedStaticMethod2Method(const v8::FunctionCallbackInfo<v8::Value>& info)
6943 {
6944     ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedStaticMethod", "TestObject", info.Holder(), info.GetIsolate());
6945     if (UNLIKELY(info.Length() < 2)) {
6946         throwArityTypeError(exceptionState, 2, info.Length());
6947         return;
6948     }
6949     TONATIVE_VOID_EXCEPTIONSTATE(int, longArg1, toInt32(info[0], exceptionState), exceptionState);
6950     TONATIVE_VOID_EXCEPTIONSTATE(int, longArg2, toInt32(info[1], exceptionState), exceptionState);
6951     TestObject::overloadedStaticMethod(longArg1, longArg2);
6952 }
6953
6954 static void overloadedStaticMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6955 {
6956     if (((info.Length() == 1))) {
6957         overloadedStaticMethod1Method(info);
6958         return;
6959     }
6960     if (((info.Length() == 2))) {
6961         overloadedStaticMethod2Method(info);
6962         return;
6963     }
6964     ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedStaticMethod", "TestObject", info.Holder(), info.GetIsolate());
6965     if (UNLIKELY(info.Length() < 1)) {
6966         throwArityTypeError(exceptionState, 1, info.Length());
6967         return;
6968     }
6969     exceptionState.throwTypeError("No function was found that matched the signature provided.");
6970     exceptionState.throwIfNeeded();
6971 }
6972
6973 static void overloadedStaticMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6974 {
6975     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6976     TestObjectV8Internal::overloadedStaticMethodMethod(info);
6977     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6978 }
6979
6980 static void voidMethodClampUnsignedShortArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6981 {
6982     ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodClampUnsignedShortArg", "TestObject", info.Holder(), info.GetIsolate());
6983     if (UNLIKELY(info.Length() < 1)) {
6984         throwArityTypeError(exceptionState, 1, info.Length());
6985         return;
6986     }
6987     TestObject* impl = V8TestObject::toNative(info.Holder());
6988     unsigned clampUnsignedShortArg = 0;
6989     TONATIVE_VOID(double, clampUnsignedShortArgNativeValue, info[0]->NumberValue());
6990     if (!std::isnan(clampUnsignedShortArgNativeValue))
6991         clampUnsignedShortArg = clampTo<unsigned short>(clampUnsignedShortArgNativeValue);
6992     impl->voidMethodClampUnsignedShortArg(clampUnsignedShortArg);
6993 }
6994
6995 static void voidMethodClampUnsignedShortArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6996 {
6997     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6998     TestObjectV8Internal::voidMethodClampUnsignedShortArgMethod(info);
6999     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7000 }
7001
7002 static void voidMethodClampUnsignedLongArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
7003 {
7004     ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodClampUnsignedLongArg", "TestObject", info.Holder(), info.GetIsolate());
7005     if (UNLIKELY(info.Length() < 1)) {
7006         throwArityTypeError(exceptionState, 1, info.Length());
7007         return;
7008     }
7009     TestObject* impl = V8TestObject::toNative(info.Holder());
7010     unsigned clampUnsignedLongArg = 0;
7011     TONATIVE_VOID(double, clampUnsignedLongArgNativeValue, info[0]->NumberValue());
7012     if (!std::isnan(clampUnsignedLongArgNativeValue))
7013         clampUnsignedLongArg = clampTo<unsigned long>(clampUnsignedLongArgNativeValue);
7014     impl->voidMethodClampUnsignedLongArg(clampUnsignedLongArg);
7015 }
7016
7017 static void voidMethodClampUnsignedLongArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
7018 {
7019     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7020     TestObjectV8Internal::voidMethodClampUnsignedLongArgMethod(info);
7021     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7022 }
7023
7024 static void voidMethodDefaultUndefinedTestInterfaceEmptyArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
7025 {
7026     TestObject* impl = V8TestObject::toNative(info.Holder());
7027     TONATIVE_VOID(TestInterfaceEmpty*, defaultUndefinedTestInterfaceEmptyArg, V8TestInterfaceEmpty::toNativeWithTypeCheck(info.GetIsolate(), info[0]));
7028     impl->voidMethodDefaultUndefinedTestInterfaceEmptyArg(defaultUndefinedTestInterfaceEmptyArg);
7029 }
7030
7031 static void voidMethodDefaultUndefinedTestInterfaceEmptyArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
7032 {
7033     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7034     TestObjectV8Internal::voidMethodDefaultUndefinedTestInterfaceEmptyArgMethod(info);
7035     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7036 }
7037
7038 static void voidMethodDefaultUndefinedLongArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
7039 {
7040     ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodDefaultUndefinedLongArg", "TestObject", info.Holder(), info.GetIsolate());
7041     TestObject* impl = V8TestObject::toNative(info.Holder());
7042     TONATIVE_VOID_EXCEPTIONSTATE(int, defaultUndefinedLongArg, toInt32(info[0], exceptionState), exceptionState);
7043     impl->voidMethodDefaultUndefinedLongArg(defaultUndefinedLongArg);
7044 }
7045
7046 static void voidMethodDefaultUndefinedLongArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
7047 {
7048     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7049     TestObjectV8Internal::voidMethodDefaultUndefinedLongArgMethod(info);
7050     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7051 }
7052
7053 static void voidMethodDefaultUndefinedStringArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
7054 {
7055     TestObject* impl = V8TestObject::toNative(info.Holder());
7056     TOSTRING_VOID(V8StringResource<>, defaultUndefinedStringArg, info[0]);
7057     impl->voidMethodDefaultUndefinedStringArg(defaultUndefinedStringArg);
7058 }
7059
7060 static void voidMethodDefaultUndefinedStringArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
7061 {
7062     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7063     TestObjectV8Internal::voidMethodDefaultUndefinedStringArgMethod(info);
7064     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7065 }
7066
7067 static void voidMethodDefaultNullStringStringArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
7068 {
7069     TestObject* impl = V8TestObject::toNative(info.Holder());
7070     TOSTRING_VOID(V8StringResource<>, defaultNullStringStringArg, argumentOrNull(info, 0));
7071     impl->voidMethodDefaultNullStringStringArg(defaultNullStringStringArg);
7072 }
7073
7074 static void voidMethodDefaultNullStringStringArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
7075 {
7076     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7077     TestObjectV8Internal::voidMethodDefaultNullStringStringArgMethod(info);
7078     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7079 }
7080
7081 static void voidMethodEnforceRangeLongArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
7082 {
7083     ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodEnforceRangeLongArg", "TestObject", info.Holder(), info.GetIsolate());
7084     if (UNLIKELY(info.Length() < 1)) {
7085         throwArityTypeError(exceptionState, 1, info.Length());
7086         return;
7087     }
7088     TestObject* impl = V8TestObject::toNative(info.Holder());
7089     TONATIVE_VOID_EXCEPTIONSTATE(int, enforceRangeLongArg, toInt32(info[0], EnforceRange, exceptionState), exceptionState);
7090     impl->voidMethodEnforceRangeLongArg(enforceRangeLongArg);
7091 }
7092
7093 static void voidMethodEnforceRangeLongArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
7094 {
7095     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7096     TestObjectV8Internal::voidMethodEnforceRangeLongArgMethod(info);
7097     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7098 }
7099
7100 static void voidMethodTreatNullAsNullStringStringArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
7101 {
7102     if (UNLIKELY(info.Length() < 1)) {
7103         throwArityTypeErrorForMethod("voidMethodTreatNullAsNullStringStringArg", "TestObject", 1, info.Length(), info.GetIsolate());
7104         return;
7105     }
7106     TestObject* impl = V8TestObject::toNative(info.Holder());
7107     TOSTRING_VOID(V8StringResource<WithNullCheck>, treatNullAsNullStringStringArg, info[0]);
7108     impl->voidMethodTreatNullAsNullStringStringArg(treatNullAsNullStringStringArg);
7109 }
7110
7111 static void voidMethodTreatNullAsNullStringStringArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
7112 {
7113     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7114     TestObjectV8Internal::voidMethodTreatNullAsNullStringStringArgMethod(info);
7115     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7116 }
7117
7118 static void voidMethodTreatNullAsNullStringTreatUndefinedAsNullStringStringArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
7119 {
7120     if (UNLIKELY(info.Length() < 1)) {
7121         throwArityTypeErrorForMethod("voidMethodTreatNullAsNullStringTreatUndefinedAsNullStringStringArg", "TestObject", 1, info.Length(), info.GetIsolate());
7122         return;
7123     }
7124     TestObject* impl = V8TestObject::toNative(info.Holder());
7125     TOSTRING_VOID(V8StringResource<WithUndefinedOrNullCheck>, treatNullAsNullStringStringArg, info[0]);
7126     impl->voidMethodTreatNullAsNullStringTreatUndefinedAsNullStringStringArg(treatNullAsNullStringStringArg);
7127 }
7128
7129 static void voidMethodTreatNullAsNullStringTreatUndefinedAsNullStringStringArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
7130 {
7131     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7132     TestObjectV8Internal::voidMethodTreatNullAsNullStringTreatUndefinedAsNullStringStringArgMethod(info);
7133     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7134 }
7135
7136 static void activityLoggingAccessForAllWorldsMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
7137 {
7138     TestObject* impl = V8TestObject::toNative(info.Holder());
7139     impl->activityLoggingAccessForAllWorldsMethod();
7140 }
7141
7142 static void activityLoggingAccessForAllWorldsMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
7143 {
7144     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7145     DOMWrapperWorld& world = DOMWrapperWorld::current(info.GetIsolate());
7146     if (world.activityLogger()) {
7147         Vector<v8::Handle<v8::Value> > loggerArgs = toNativeArguments<v8::Handle<v8::Value> >(info, 0);
7148         world.activityLogger()->logMethod("TestObject.activityLoggingAccessForAllWorldsMethod", info.Length(), loggerArgs.data());
7149     }
7150     TestObjectV8Internal::activityLoggingAccessForAllWorldsMethodMethod(info);
7151     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7152 }
7153
7154 static void callWithExecutionContextVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
7155 {
7156     TestObject* impl = V8TestObject::toNative(info.Holder());
7157     ExecutionContext* scriptContext = currentExecutionContext(info.GetIsolate());
7158     impl->callWithExecutionContextVoidMethod(scriptContext);
7159 }
7160
7161 static void callWithExecutionContextVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
7162 {
7163     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7164     TestObjectV8Internal::callWithExecutionContextVoidMethodMethod(info);
7165     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7166 }
7167
7168 static void callWithScriptStateVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
7169 {
7170     TestObject* impl = V8TestObject::toNative(info.Holder());
7171     ScriptState* state = ScriptState::current(info.GetIsolate());
7172     impl->callWithScriptStateVoidMethod(state);
7173 }
7174
7175 static void callWithScriptStateVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
7176 {
7177     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7178     TestObjectV8Internal::callWithScriptStateVoidMethodMethod(info);
7179     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7180 }
7181
7182 static void callWithScriptStateLongMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
7183 {
7184     TestObject* impl = V8TestObject::toNative(info.Holder());
7185     ScriptState* state = ScriptState::current(info.GetIsolate());
7186     int result = impl->callWithScriptStateLongMethod(state);
7187     v8SetReturnValueInt(info, result);
7188 }
7189
7190 static void callWithScriptStateLongMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
7191 {
7192     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7193     TestObjectV8Internal::callWithScriptStateLongMethodMethod(info);
7194     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7195 }
7196
7197 static void callWithScriptStateExecutionContextVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
7198 {
7199     TestObject* impl = V8TestObject::toNative(info.Holder());
7200     ScriptState* state = ScriptState::current(info.GetIsolate());
7201     ExecutionContext* scriptContext = currentExecutionContext(info.GetIsolate());
7202     impl->callWithScriptStateExecutionContextVoidMethod(state, scriptContext);
7203 }
7204
7205 static void callWithScriptStateExecutionContextVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
7206 {
7207     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7208     TestObjectV8Internal::callWithScriptStateExecutionContextVoidMethodMethod(info);
7209     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7210 }
7211
7212 static void callWithScriptStateScriptArgumentsVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
7213 {
7214     TestObject* impl = V8TestObject::toNative(info.Holder());
7215     ScriptState* state = ScriptState::current(info.GetIsolate());
7216     RefPtr<ScriptArguments> scriptArguments(createScriptArguments(info, 0));
7217     impl->callWithScriptStateScriptArgumentsVoidMethod(state, scriptArguments.release());
7218 }
7219
7220 static void callWithScriptStateScriptArgumentsVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
7221 {
7222     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7223     TestObjectV8Internal::callWithScriptStateScriptArgumentsVoidMethodMethod(info);
7224     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7225 }
7226
7227 static void callWithScriptStateScriptArgumentsVoidMethodOptionalBooleanArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
7228 {
7229     TestObject* impl = V8TestObject::toNative(info.Holder());
7230     if (UNLIKELY(info.Length() <= 0)) {
7231         ScriptState* state = ScriptState::current(info.GetIsolate());
7232         RefPtr<ScriptArguments> scriptArguments(createScriptArguments(info, 1));
7233         impl->callWithScriptStateScriptArgumentsVoidMethodOptionalBooleanArg(state, scriptArguments.release());
7234         return;
7235     }
7236     TONATIVE_VOID(bool, optionalBooleanArg, info[0]->BooleanValue());
7237     ScriptState* state = ScriptState::current(info.GetIsolate());
7238     RefPtr<ScriptArguments> scriptArguments(createScriptArguments(info, 1));
7239     impl->callWithScriptStateScriptArgumentsVoidMethodOptionalBooleanArg(state, scriptArguments.release(), optionalBooleanArg);
7240 }
7241
7242 static void callWithScriptStateScriptArgumentsVoidMethodOptionalBooleanArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
7243 {
7244     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7245     TestObjectV8Internal::callWithScriptStateScriptArgumentsVoidMethodOptionalBooleanArgMethod(info);
7246     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7247 }
7248
7249 static void callWithActiveWindowMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
7250 {
7251     TestObject* impl = V8TestObject::toNative(info.Holder());
7252     impl->callWithActiveWindow(callingDOMWindow(info.GetIsolate()));
7253 }
7254
7255 static void callWithActiveWindowMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
7256 {
7257     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7258     TestObjectV8Internal::callWithActiveWindowMethod(info);
7259     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7260 }
7261
7262 static void callWithActiveWindowScriptWindowMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
7263 {
7264     TestObject* impl = V8TestObject::toNative(info.Holder());
7265     impl->callWithActiveWindowScriptWindow(callingDOMWindow(info.GetIsolate()), enteredDOMWindow(info.GetIsolate()));
7266 }
7267
7268 static void callWithActiveWindowScriptWindowMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
7269 {
7270     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7271     TestObjectV8Internal::callWithActiveWindowScriptWindowMethod(info);
7272     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7273 }
7274
7275 static void checkSecurityForNodeVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
7276 {
7277     TestObject* impl = V8TestObject::toNative(info.Holder());
7278     if (!BindingSecurity::shouldAllowAccessToNode(info.GetIsolate(), impl->checkSecurityForNodeVoidMethod(exceptionState), exceptionState)) {
7279         v8SetReturnValueNull(info);
7280         exceptionState.throwIfNeeded();
7281         return;
7282     }
7283     impl->checkSecurityForNodeVoidMethod();
7284 }
7285
7286 static void checkSecurityForNodeVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
7287 {
7288     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7289     TestObjectV8Internal::checkSecurityForNodeVoidMethodMethod(info);
7290     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7291 }
7292
7293 #if ENABLE(CONDITION)
7294 static void conditionalConditionVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
7295 {
7296     TestObject* impl = V8TestObject::toNative(info.Holder());
7297     impl->conditionalConditionVoidMethod();
7298 }
7299 #endif // ENABLE(CONDITION)
7300
7301 #if ENABLE(CONDITION)
7302 static void conditionalConditionVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
7303 {
7304     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7305     TestObjectV8Internal::conditionalConditionVoidMethodMethod(info);
7306     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7307 }
7308 #endif // ENABLE(CONDITION)
7309
7310 #if ENABLE(CONDITION_1) && ENABLE(CONDITION_2)
7311 static void conditionalCondition1AndCondition2VoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
7312 {
7313     TestObject* impl = V8TestObject::toNative(info.Holder());
7314     impl->conditionalCondition1AndCondition2VoidMethod();
7315 }
7316 #endif // ENABLE(CONDITION_1) && ENABLE(CONDITION_2)
7317
7318 #if ENABLE(CONDITION_1) && ENABLE(CONDITION_2)
7319 static void conditionalCondition1AndCondition2VoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
7320 {
7321     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7322     TestObjectV8Internal::conditionalCondition1AndCondition2VoidMethodMethod(info);
7323     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7324 }
7325 #endif // ENABLE(CONDITION_1) && ENABLE(CONDITION_2)
7326
7327 #if ENABLE(CONDITION)
7328 static void conditionalConditionStaticVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
7329 {
7330     TestObject::conditionalConditionStaticVoidMethod();
7331 }
7332 #endif // ENABLE(CONDITION)
7333
7334 #if ENABLE(CONDITION)
7335 static void conditionalConditionStaticVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
7336 {
7337     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7338     TestObjectV8Internal::conditionalConditionStaticVoidMethodMethod(info);
7339     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7340 }
7341 #endif // ENABLE(CONDITION)
7342
7343 static void customVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
7344 {
7345     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7346     V8TestObject::customVoidMethodMethodCustom(info);
7347     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7348 }
7349
7350 #if ENABLE(CONDITION)
7351 static void conditionalConditionCustomVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
7352 {
7353     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7354     V8TestObject::conditionalConditionCustomVoidMethodMethodCustom(info);
7355     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7356 }
7357 #endif // ENABLE(CONDITION)
7358
7359 static void customElementCallbacksVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
7360 {
7361     TestObject* impl = V8TestObject::toNative(info.Holder());
7362     CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
7363     impl->customElementCallbacksVoidMethod();
7364 }
7365
7366 static void customElementCallbacksVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
7367 {
7368     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7369     TestObjectV8Internal::customElementCallbacksVoidMethodMethod(info);
7370     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7371 }
7372
7373 static void deprecatedVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
7374 {
7375     TestObject* impl = V8TestObject::toNative(info.Holder());
7376     impl->deprecatedVoidMethod();
7377 }
7378
7379 static void deprecatedVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
7380 {
7381     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7382     UseCounter::countDeprecation(callingExecutionContext(info.GetIsolate()), UseCounter::voidMethod);
7383     TestObjectV8Internal::deprecatedVoidMethodMethod(info);
7384     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7385 }
7386
7387 static void doNotCheckSignatureVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
7388 {
7389     TestObject* impl = V8TestObject::toNative(info.Holder());
7390     impl->doNotCheckSignatureVoidMethod();
7391 }
7392
7393 static void doNotCheckSignatureVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
7394 {
7395     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7396     TestObjectV8Internal::doNotCheckSignatureVoidMethodMethod(info);
7397     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7398 }
7399
7400 static void implementedAsVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
7401 {
7402     TestObject* impl = V8TestObject::toNative(info.Holder());
7403     impl->implementedAsMethodName();
7404 }
7405
7406 static void implementedAsVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
7407 {
7408     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7409     TestObjectV8Internal::implementedAsVoidMethodMethod(info);
7410     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7411 }
7412
7413 static void measureAsVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
7414 {
7415     TestObject* impl = V8TestObject::toNative(info.Holder());
7416     impl->measureAsVoidMethod();
7417 }
7418
7419 static void measureAsVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
7420 {
7421     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7422     UseCounter::count(callingExecutionContext(info.GetIsolate()), UseCounter::TestFeature);
7423     TestObjectV8Internal::measureAsVoidMethodMethod(info);
7424     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7425 }
7426
7427 static void DeprecateAsOverloadedMethod1Method(const v8::FunctionCallbackInfo<v8::Value>& info)
7428 {
7429     TestObject* impl = V8TestObject::toNative(info.Holder());
7430     impl->DeprecateAsOverloadedMethod();
7431 }
7432
7433 static void DeprecateAsOverloadedMethod2Method(const v8::FunctionCallbackInfo<v8::Value>& info)
7434 {
7435     ExceptionState exceptionState(ExceptionState::ExecutionContext, "DeprecateAsOverloadedMethod", "TestObject", info.Holder(), info.GetIsolate());
7436     if (UNLIKELY(info.Length() < 1)) {
7437         throwArityTypeError(exceptionState, 1, info.Length());
7438         return;
7439     }
7440     TestObject* impl = V8TestObject::toNative(info.Holder());
7441     TONATIVE_VOID_EXCEPTIONSTATE(int, arg, toInt32(info[0], exceptionState), exceptionState);
7442     impl->DeprecateAsOverloadedMethod(arg);
7443 }
7444
7445 static void DeprecateAsOverloadedMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
7446 {
7447     if (((info.Length() == 0))) {
7448         UseCounter::countDeprecation(callingExecutionContext(info.GetIsolate()), UseCounter::TestFeatureA);
7449         DeprecateAsOverloadedMethod1Method(info);
7450         return;
7451     }
7452     if (((info.Length() == 1))) {
7453         UseCounter::countDeprecation(callingExecutionContext(info.GetIsolate()), UseCounter::TestFeatureB);
7454         DeprecateAsOverloadedMethod2Method(info);
7455         return;
7456     }
7457     throwTypeError(ExceptionMessages::failedToExecute("DeprecateAsOverloadedMethod", "TestObject", "No function was found that matched the signature provided."), info.GetIsolate());
7458 }
7459
7460 static void DeprecateAsOverloadedMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
7461 {
7462     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7463     TestObjectV8Internal::DeprecateAsOverloadedMethodMethod(info);
7464     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7465 }
7466
7467 static void DeprecateAsSameValueOverloadedMethod1Method(const v8::FunctionCallbackInfo<v8::Value>& info)
7468 {
7469     TestObject* impl = V8TestObject::toNative(info.Holder());
7470     impl->DeprecateAsSameValueOverloadedMethod();
7471 }
7472
7473 static void DeprecateAsSameValueOverloadedMethod2Method(const v8::FunctionCallbackInfo<v8::Value>& info)
7474 {
7475     ExceptionState exceptionState(ExceptionState::ExecutionContext, "DeprecateAsSameValueOverloadedMethod", "TestObject", info.Holder(), info.GetIsolate());
7476     if (UNLIKELY(info.Length() < 1)) {
7477         throwArityTypeError(exceptionState, 1, info.Length());
7478         return;
7479     }
7480     TestObject* impl = V8TestObject::toNative(info.Holder());
7481     TONATIVE_VOID_EXCEPTIONSTATE(int, arg, toInt32(info[0], exceptionState), exceptionState);
7482     impl->DeprecateAsSameValueOverloadedMethod(arg);
7483 }
7484
7485 static void DeprecateAsSameValueOverloadedMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
7486 {
7487     UseCounter::countDeprecation(callingExecutionContext(info.GetIsolate()), UseCounter::TestFeature);
7488     if (((info.Length() == 0))) {
7489         DeprecateAsSameValueOverloadedMethod1Method(info);
7490         return;
7491     }
7492     if (((info.Length() == 1))) {
7493         DeprecateAsSameValueOverloadedMethod2Method(info);
7494         return;
7495     }
7496     throwTypeError(ExceptionMessages::failedToExecute("DeprecateAsSameValueOverloadedMethod", "TestObject", "No function was found that matched the signature provided."), info.GetIsolate());
7497 }
7498
7499 static void DeprecateAsSameValueOverloadedMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
7500 {
7501     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7502     TestObjectV8Internal::DeprecateAsSameValueOverloadedMethodMethod(info);
7503     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7504 }
7505
7506 static void measureAsOverloadedMethod1Method(const v8::FunctionCallbackInfo<v8::Value>& info)
7507 {
7508     TestObject* impl = V8TestObject::toNative(info.Holder());
7509     impl->measureAsOverloadedMethod();
7510 }
7511
7512 static void measureAsOverloadedMethod2Method(const v8::FunctionCallbackInfo<v8::Value>& info)
7513 {
7514     ExceptionState exceptionState(ExceptionState::ExecutionContext, "measureAsOverloadedMethod", "TestObject", info.Holder(), info.GetIsolate());
7515     if (UNLIKELY(info.Length() < 1)) {
7516         throwArityTypeError(exceptionState, 1, info.Length());
7517         return;
7518     }
7519     TestObject* impl = V8TestObject::toNative(info.Holder());
7520     TONATIVE_VOID_EXCEPTIONSTATE(int, arg, toInt32(info[0], exceptionState), exceptionState);
7521     impl->measureAsOverloadedMethod(arg);
7522 }
7523
7524 static void measureAsOverloadedMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
7525 {
7526     if (((info.Length() == 0))) {
7527         UseCounter::count(callingExecutionContext(info.GetIsolate()), UseCounter::TestFeatureA);
7528         measureAsOverloadedMethod1Method(info);
7529         return;
7530     }
7531     if (((info.Length() == 1))) {
7532         UseCounter::count(callingExecutionContext(info.GetIsolate()), UseCounter::TestFeatureB);
7533         measureAsOverloadedMethod2Method(info);
7534         return;
7535     }
7536     throwTypeError(ExceptionMessages::failedToExecute("measureAsOverloadedMethod", "TestObject", "No function was found that matched the signature provided."), info.GetIsolate());
7537 }
7538
7539 static void measureAsOverloadedMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
7540 {
7541     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7542     TestObjectV8Internal::measureAsOverloadedMethodMethod(info);
7543     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7544 }
7545
7546 static void measureAsSameValueOverloadedMethod1Method(const v8::FunctionCallbackInfo<v8::Value>& info)
7547 {
7548     TestObject* impl = V8TestObject::toNative(info.Holder());
7549     impl->measureAsSameValueOverloadedMethod();
7550 }
7551
7552 static void measureAsSameValueOverloadedMethod2Method(const v8::FunctionCallbackInfo<v8::Value>& info)
7553 {
7554     ExceptionState exceptionState(ExceptionState::ExecutionContext, "measureAsSameValueOverloadedMethod", "TestObject", info.Holder(), info.GetIsolate());
7555     if (UNLIKELY(info.Length() < 1)) {
7556         throwArityTypeError(exceptionState, 1, info.Length());
7557         return;
7558     }
7559     TestObject* impl = V8TestObject::toNative(info.Holder());
7560     TONATIVE_VOID_EXCEPTIONSTATE(int, arg, toInt32(info[0], exceptionState), exceptionState);
7561     impl->measureAsSameValueOverloadedMethod(arg);
7562 }
7563
7564 static void measureAsSameValueOverloadedMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
7565 {
7566     UseCounter::count(callingExecutionContext(info.GetIsolate()), UseCounter::TestFeature);
7567     if (((info.Length() == 0))) {
7568         measureAsSameValueOverloadedMethod1Method(info);
7569         return;
7570     }
7571     if (((info.Length() == 1))) {
7572         measureAsSameValueOverloadedMethod2Method(info);
7573         return;
7574     }
7575     throwTypeError(ExceptionMessages::failedToExecute("measureAsSameValueOverloadedMethod", "TestObject", "No function was found that matched the signature provided."), info.GetIsolate());
7576 }
7577
7578 static void measureAsSameValueOverloadedMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
7579 {
7580     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7581     TestObjectV8Internal::measureAsSameValueOverloadedMethodMethod(info);
7582     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7583 }
7584
7585 static void deprecateAsMeasureAsSameValueOverloadedMethod1Method(const v8::FunctionCallbackInfo<v8::Value>& info)
7586 {
7587     TestObject* impl = V8TestObject::toNative(info.Holder());
7588     impl->deprecateAsMeasureAsSameValueOverloadedMethod();
7589 }
7590
7591 static void deprecateAsMeasureAsSameValueOverloadedMethod2Method(const v8::FunctionCallbackInfo<v8::Value>& info)
7592 {
7593     ExceptionState exceptionState(ExceptionState::ExecutionContext, "deprecateAsMeasureAsSameValueOverloadedMethod", "TestObject", info.Holder(), info.GetIsolate());
7594     if (UNLIKELY(info.Length() < 1)) {
7595         throwArityTypeError(exceptionState, 1, info.Length());
7596         return;
7597     }
7598     TestObject* impl = V8TestObject::toNative(info.Holder());
7599     TONATIVE_VOID_EXCEPTIONSTATE(int, arg, toInt32(info[0], exceptionState), exceptionState);
7600     impl->deprecateAsMeasureAsSameValueOverloadedMethod(arg);
7601 }
7602
7603 static void deprecateAsMeasureAsSameValueOverloadedMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
7604 {
7605     UseCounter::count(callingExecutionContext(info.GetIsolate()), UseCounter::TestFeature);
7606     if (((info.Length() == 0))) {
7607         UseCounter::countDeprecation(callingExecutionContext(info.GetIsolate()), UseCounter::TestFeatureA);
7608         deprecateAsMeasureAsSameValueOverloadedMethod1Method(info);
7609         return;
7610     }
7611     if (((info.Length() == 1))) {
7612         UseCounter::countDeprecation(callingExecutionContext(info.GetIsolate()), UseCounter::TestFeatureB);
7613         deprecateAsMeasureAsSameValueOverloadedMethod2Method(info);
7614         return;
7615     }
7616     throwTypeError(ExceptionMessages::failedToExecute("deprecateAsMeasureAsSameValueOverloadedMethod", "TestObject", "No function was found that matched the signature provided."), info.GetIsolate());
7617 }
7618
7619 static void deprecateAsMeasureAsSameValueOverloadedMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
7620 {
7621     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7622     TestObjectV8Internal::deprecateAsMeasureAsSameValueOverloadedMethodMethod(info);
7623     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7624 }
7625
7626 static void deprecateAsSameValueMeasureAsOverloadedMethod1Method(const v8::FunctionCallbackInfo<v8::Value>& info)
7627 {
7628     TestObject* impl = V8TestObject::toNative(info.Holder());
7629     impl->deprecateAsSameValueMeasureAsOverloadedMethod();
7630 }
7631
7632 static void deprecateAsSameValueMeasureAsOverloadedMethod2Method(const v8::FunctionCallbackInfo<v8::Value>& info)
7633 {
7634     ExceptionState exceptionState(ExceptionState::ExecutionContext, "deprecateAsSameValueMeasureAsOverloadedMethod", "TestObject", info.Holder(), info.GetIsolate());
7635     if (UNLIKELY(info.Length() < 1)) {
7636         throwArityTypeError(exceptionState, 1, info.Length());
7637         return;
7638     }
7639     TestObject* impl = V8TestObject::toNative(info.Holder());
7640     TONATIVE_VOID_EXCEPTIONSTATE(int, arg, toInt32(info[0], exceptionState), exceptionState);
7641     impl->deprecateAsSameValueMeasureAsOverloadedMethod(arg);
7642 }
7643
7644 static void deprecateAsSameValueMeasureAsOverloadedMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
7645 {
7646     UseCounter::countDeprecation(callingExecutionContext(info.GetIsolate()), UseCounter::TestFeature);
7647     if (((info.Length() == 0))) {
7648         UseCounter::count(callingExecutionContext(info.GetIsolate()), UseCounter::TestFeatureA);
7649         deprecateAsSameValueMeasureAsOverloadedMethod1Method(info);
7650         return;
7651     }
7652     if (((info.Length() == 1))) {
7653         UseCounter::count(callingExecutionContext(info.GetIsolate()), UseCounter::TestFeatureB);
7654         deprecateAsSameValueMeasureAsOverloadedMethod2Method(info);
7655         return;
7656     }
7657     throwTypeError(ExceptionMessages::failedToExecute("deprecateAsSameValueMeasureAsOverloadedMethod", "TestObject", "No function was found that matched the signature provided."), info.GetIsolate());
7658 }
7659
7660 static void deprecateAsSameValueMeasureAsOverloadedMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
7661 {
7662     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7663     TestObjectV8Internal::deprecateAsSameValueMeasureAsOverloadedMethodMethod(info);
7664     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7665 }
7666
7667 static void deprecateAsSameValueMeasureAsSameValueOverloadedMethod1Method(const v8::FunctionCallbackInfo<v8::Value>& info)
7668 {
7669     TestObject* impl = V8TestObject::toNative(info.Holder());
7670     impl->deprecateAsSameValueMeasureAsSameValueOverloadedMethod();
7671 }
7672
7673 static void deprecateAsSameValueMeasureAsSameValueOverloadedMethod2Method(const v8::FunctionCallbackInfo<v8::Value>& info)
7674 {
7675     ExceptionState exceptionState(ExceptionState::ExecutionContext, "deprecateAsSameValueMeasureAsSameValueOverloadedMethod", "TestObject", info.Holder(), info.GetIsolate());
7676     if (UNLIKELY(info.Length() < 1)) {
7677         throwArityTypeError(exceptionState, 1, info.Length());
7678         return;
7679     }
7680     TestObject* impl = V8TestObject::toNative(info.Holder());
7681     TONATIVE_VOID_EXCEPTIONSTATE(int, arg, toInt32(info[0], exceptionState), exceptionState);
7682     impl->deprecateAsSameValueMeasureAsSameValueOverloadedMethod(arg);
7683 }
7684
7685 static void deprecateAsSameValueMeasureAsSameValueOverloadedMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
7686 {
7687     UseCounter::count(callingExecutionContext(info.GetIsolate()), UseCounter::TestFeatureB);
7688     UseCounter::countDeprecation(callingExecutionContext(info.GetIsolate()), UseCounter::TestFeatureA);
7689     if (((info.Length() == 0))) {
7690         deprecateAsSameValueMeasureAsSameValueOverloadedMethod1Method(info);
7691         return;
7692     }
7693     if (((info.Length() == 1))) {
7694         deprecateAsSameValueMeasureAsSameValueOverloadedMethod2Method(info);
7695         return;
7696     }
7697     throwTypeError(ExceptionMessages::failedToExecute("deprecateAsSameValueMeasureAsSameValueOverloadedMethod", "TestObject", "No function was found that matched the signature provided."), info.GetIsolate());
7698 }
7699
7700 static void deprecateAsSameValueMeasureAsSameValueOverloadedMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
7701 {
7702     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7703     TestObjectV8Internal::deprecateAsSameValueMeasureAsSameValueOverloadedMethodMethod(info);
7704     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7705 }
7706
7707 static void notEnumerableVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
7708 {
7709     TestObject* impl = V8TestObject::toNative(info.Holder());
7710     impl->notEnumerableVoidMethod();
7711 }
7712
7713 static void notEnumerableVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
7714 {
7715     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7716     TestObjectV8Internal::notEnumerableVoidMethodMethod(info);
7717     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7718 }
7719
7720 static void perContextEnabledVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
7721 {
7722     TestObject* impl = V8TestObject::toNative(info.Holder());
7723     impl->perContextEnabledVoidMethod();
7724 }
7725
7726 static void perContextEnabledVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
7727 {
7728     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7729     TestObjectV8Internal::perContextEnabledVoidMethodMethod(info);
7730     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7731 }
7732
7733 static void perWorldBindingsVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
7734 {
7735     TestObject* impl = V8TestObject::toNative(info.Holder());
7736     impl->perWorldBindingsVoidMethod();
7737 }
7738
7739 static void perWorldBindingsVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
7740 {
7741     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7742     TestObjectV8Internal::perWorldBindingsVoidMethodMethod(info);
7743     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7744 }
7745
7746 static void perWorldBindingsVoidMethodMethodForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info)
7747 {
7748     TestObject* impl = V8TestObject::toNative(info.Holder());
7749     impl->perWorldBindingsVoidMethod();
7750 }
7751
7752 static void perWorldBindingsVoidMethodMethodCallbackForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info)
7753 {
7754     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7755     TestObjectV8Internal::perWorldBindingsVoidMethodMethodForMainWorld(info);
7756     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7757 }
7758
7759 static void perWorldBindingsVoidMethodTestInterfaceEmptyArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
7760 {
7761     if (UNLIKELY(info.Length() < 1)) {
7762         throwArityTypeErrorForMethod("perWorldBindingsVoidMethodTestInterfaceEmptyArg", "TestObject", 1, info.Length(), info.GetIsolate());
7763         return;
7764     }
7765     TestObject* impl = V8TestObject::toNative(info.Holder());
7766     TONATIVE_VOID(TestInterfaceEmpty*, testInterfaceEmptyArg, V8TestInterfaceEmpty::toNativeWithTypeCheck(info.GetIsolate(), info[0]));
7767     impl->perWorldBindingsVoidMethodTestInterfaceEmptyArg(testInterfaceEmptyArg);
7768 }
7769
7770 static void perWorldBindingsVoidMethodTestInterfaceEmptyArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
7771 {
7772     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7773     TestObjectV8Internal::perWorldBindingsVoidMethodTestInterfaceEmptyArgMethod(info);
7774     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7775 }
7776
7777 static void perWorldBindingsVoidMethodTestInterfaceEmptyArgMethodForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info)
7778 {
7779     if (UNLIKELY(info.Length() < 1)) {
7780         throwArityTypeErrorForMethod("perWorldBindingsVoidMethodTestInterfaceEmptyArg", "TestObject", 1, info.Length(), info.GetIsolate());
7781         return;
7782     }
7783     TestObject* impl = V8TestObject::toNative(info.Holder());
7784     TONATIVE_VOID(TestInterfaceEmpty*, testInterfaceEmptyArg, V8TestInterfaceEmpty::toNativeWithTypeCheck(info.GetIsolate(), info[0]));
7785     impl->perWorldBindingsVoidMethodTestInterfaceEmptyArg(testInterfaceEmptyArg);
7786 }
7787
7788 static void perWorldBindingsVoidMethodTestInterfaceEmptyArgMethodCallbackForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info)
7789 {
7790     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7791     TestObjectV8Internal::perWorldBindingsVoidMethodTestInterfaceEmptyArgMethodForMainWorld(info);
7792     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7793 }
7794
7795 static void activityLoggingForAllWorldsPerWorldBindingsVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
7796 {
7797     TestObject* impl = V8TestObject::toNative(info.Holder());
7798     impl->activityLoggingForAllWorldsPerWorldBindingsVoidMethod();
7799 }
7800
7801 static void activityLoggingForAllWorldsPerWorldBindingsVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
7802 {
7803     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7804     DOMWrapperWorld& world = DOMWrapperWorld::current(info.GetIsolate());
7805     if (world.activityLogger()) {
7806         Vector<v8::Handle<v8::Value> > loggerArgs = toNativeArguments<v8::Handle<v8::Value> >(info, 0);
7807         world.activityLogger()->logMethod("TestObject.activityLoggingForAllWorldsPerWorldBindingsVoidMethod", info.Length(), loggerArgs.data());
7808     }
7809     TestObjectV8Internal::activityLoggingForAllWorldsPerWorldBindingsVoidMethodMethod(info);
7810     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7811 }
7812
7813 static void activityLoggingForAllWorldsPerWorldBindingsVoidMethodMethodForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info)
7814 {
7815     TestObject* impl = V8TestObject::toNative(info.Holder());
7816     impl->activityLoggingForAllWorldsPerWorldBindingsVoidMethod();
7817 }
7818
7819 static void activityLoggingForAllWorldsPerWorldBindingsVoidMethodMethodCallbackForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info)
7820 {
7821     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7822     DOMWrapperWorld& world = DOMWrapperWorld::current(info.GetIsolate());
7823     if (world.activityLogger()) {
7824         Vector<v8::Handle<v8::Value> > loggerArgs = toNativeArguments<v8::Handle<v8::Value> >(info, 0);
7825         world.activityLogger()->logMethod("TestObject.activityLoggingForAllWorldsPerWorldBindingsVoidMethod", info.Length(), loggerArgs.data());
7826     }
7827     TestObjectV8Internal::activityLoggingForAllWorldsPerWorldBindingsVoidMethodMethodForMainWorld(info);
7828     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7829 }
7830
7831 static void activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
7832 {
7833     TestObject* impl = V8TestObject::toNative(info.Holder());
7834     impl->activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethod();
7835 }
7836
7837 static void activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
7838 {
7839     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7840     DOMWrapperWorld& world = DOMWrapperWorld::current(info.GetIsolate());
7841     if (world.activityLogger()) {
7842         Vector<v8::Handle<v8::Value> > loggerArgs = toNativeArguments<v8::Handle<v8::Value> >(info, 0);
7843         world.activityLogger()->logMethod("TestObject.activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethod", info.Length(), loggerArgs.data());
7844     }
7845     TestObjectV8Internal::activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethodMethod(info);
7846     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7847 }
7848
7849 static void activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethodMethodForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info)
7850 {
7851     TestObject* impl = V8TestObject::toNative(info.Holder());
7852     impl->activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethod();
7853 }
7854
7855 static void activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethodMethodCallbackForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info)
7856 {
7857     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7858     TestObjectV8Internal::activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethodMethodForMainWorld(info);
7859     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7860 }
7861
7862 static void raisesExceptionVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
7863 {
7864     ExceptionState exceptionState(ExceptionState::ExecutionContext, "raisesExceptionVoidMethod", "TestObject", info.Holder(), info.GetIsolate());
7865     TestObject* impl = V8TestObject::toNative(info.Holder());
7866     impl->raisesExceptionVoidMethod(exceptionState);
7867     if (exceptionState.throwIfNeeded())
7868         return;
7869 }
7870
7871 static void raisesExceptionVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
7872 {
7873     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7874     TestObjectV8Internal::raisesExceptionVoidMethodMethod(info);
7875     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7876 }
7877
7878 static void raisesExceptionStringMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
7879 {
7880     ExceptionState exceptionState(ExceptionState::ExecutionContext, "raisesExceptionStringMethod", "TestObject", info.Holder(), info.GetIsolate());
7881     TestObject* impl = V8TestObject::toNative(info.Holder());
7882     String result = impl->raisesExceptionStringMethod(exceptionState);
7883     if (exceptionState.throwIfNeeded())
7884         return;
7885     v8SetReturnValueString(info, result, info.GetIsolate());
7886 }
7887
7888 static void raisesExceptionStringMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
7889 {
7890     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7891     TestObjectV8Internal::raisesExceptionStringMethodMethod(info);
7892     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7893 }
7894
7895 static void raisesExceptionVoidMethodOptionalLongArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
7896 {
7897     ExceptionState exceptionState(ExceptionState::ExecutionContext, "raisesExceptionVoidMethodOptionalLongArg", "TestObject", info.Holder(), info.GetIsolate());
7898     TestObject* impl = V8TestObject::toNative(info.Holder());
7899     if (UNLIKELY(info.Length() <= 0)) {
7900         impl->raisesExceptionVoidMethodOptionalLongArg(exceptionState);
7901         if (exceptionState.throwIfNeeded())
7902             return;
7903         return;
7904     }
7905     TONATIVE_VOID_EXCEPTIONSTATE(int, optionalLongArg, toInt32(info[0], exceptionState), exceptionState);
7906     impl->raisesExceptionVoidMethodOptionalLongArg(optionalLongArg, exceptionState);
7907     if (exceptionState.throwIfNeeded())
7908         return;
7909 }
7910
7911 static void raisesExceptionVoidMethodOptionalLongArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
7912 {
7913     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7914     TestObjectV8Internal::raisesExceptionVoidMethodOptionalLongArgMethod(info);
7915     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7916 }
7917
7918 static void raisesExceptionVoidMethodTestCallbackInterfaceArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
7919 {
7920     ExceptionState exceptionState(ExceptionState::ExecutionContext, "raisesExceptionVoidMethodTestCallbackInterfaceArg", "TestObject", info.Holder(), info.GetIsolate());
7921     if (UNLIKELY(info.Length() < 1)) {
7922         throwArityTypeError(exceptionState, 1, info.Length());
7923         return;
7924     }
7925     TestObject* impl = V8TestObject::toNative(info.Holder());
7926     if (info.Length() <= 0 || !info[0]->IsFunction()) {
7927         exceptionState.throwTypeError("The callback provided as parameter 1 is not a function.");
7928         exceptionState.throwIfNeeded();
7929         return;
7930     }
7931     OwnPtr<TestCallbackInterface> testCallbackInterfaceArg = V8TestCallbackInterface::create(v8::Handle<v8::Function>::Cast(info[0]), currentExecutionContext(info.GetIsolate()));
7932     impl->raisesExceptionVoidMethodTestCallbackInterfaceArg(testCallbackInterfaceArg.release(), exceptionState);
7933     if (exceptionState.throwIfNeeded())
7934         return;
7935 }
7936
7937 static void raisesExceptionVoidMethodTestCallbackInterfaceArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
7938 {
7939     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7940     TestObjectV8Internal::raisesExceptionVoidMethodTestCallbackInterfaceArgMethod(info);
7941     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7942 }
7943
7944 static void raisesExceptionVoidMethodOptionalTestCallbackInterfaceArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
7945 {
7946     ExceptionState exceptionState(ExceptionState::ExecutionContext, "raisesExceptionVoidMethodOptionalTestCallbackInterfaceArg", "TestObject", info.Holder(), info.GetIsolate());
7947     TestObject* impl = V8TestObject::toNative(info.Holder());
7948     OwnPtr<TestCallbackInterface> optionalTestCallbackInterfaceArg;
7949     if (info.Length() > 0 && !isUndefinedOrNull(info[0])) {
7950         if (!info[0]->IsFunction()) {
7951             exceptionState.throwTypeError("The callback provided as parameter 1 is not a function.");
7952             exceptionState.throwIfNeeded();
7953             return;
7954         }
7955         optionalTestCallbackInterfaceArg = V8TestCallbackInterface::create(v8::Handle<v8::Function>::Cast(info[0]), currentExecutionContext(info.GetIsolate()));
7956     }
7957     impl->raisesExceptionVoidMethodOptionalTestCallbackInterfaceArg(optionalTestCallbackInterfaceArg.release(), exceptionState);
7958     if (exceptionState.throwIfNeeded())
7959         return;
7960 }
7961
7962 static void raisesExceptionVoidMethodOptionalTestCallbackInterfaceArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
7963 {
7964     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7965     TestObjectV8Internal::raisesExceptionVoidMethodOptionalTestCallbackInterfaceArgMethod(info);
7966     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7967 }
7968
7969 static void raisesExceptionTestInterfaceEmptyVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
7970 {
7971     ExceptionState exceptionState(ExceptionState::ExecutionContext, "raisesExceptionTestInterfaceEmptyVoidMethod", "TestObject", info.Holder(), info.GetIsolate());
7972     TestObject* impl = V8TestObject::toNative(info.Holder());
7973     RefPtr<TestInterfaceEmpty> result = impl->raisesExceptionTestInterfaceEmptyVoidMethod(exceptionState);
7974     if (exceptionState.throwIfNeeded())
7975         return;
7976     v8SetReturnValue(info, result.release());
7977 }
7978
7979 static void raisesExceptionTestInterfaceEmptyVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
7980 {
7981     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7982     TestObjectV8Internal::raisesExceptionTestInterfaceEmptyVoidMethodMethod(info);
7983     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7984 }
7985
7986 static void callWithExecutionContextRaisesExceptionVoidMethodLongArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
7987 {
7988     ExceptionState exceptionState(ExceptionState::ExecutionContext, "callWithExecutionContextRaisesExceptionVoidMethodLongArg", "TestObject", info.Holder(), info.GetIsolate());
7989     if (UNLIKELY(info.Length() < 1)) {
7990         throwArityTypeError(exceptionState, 1, info.Length());
7991         return;
7992     }
7993     TestObject* impl = V8TestObject::toNative(info.Holder());
7994     TONATIVE_VOID_EXCEPTIONSTATE(int, longArg, toInt32(info[0], exceptionState), exceptionState);
7995     ExecutionContext* scriptContext = currentExecutionContext(info.GetIsolate());
7996     impl->callWithExecutionContextRaisesExceptionVoidMethodLongArg(scriptContext, longArg, exceptionState);
7997     if (exceptionState.throwIfNeeded())
7998         return;
7999 }
8000
8001 static void callWithExecutionContextRaisesExceptionVoidMethodLongArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
8002 {
8003     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
8004     TestObjectV8Internal::callWithExecutionContextRaisesExceptionVoidMethodLongArgMethod(info);
8005     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
8006 }
8007
8008 static void readOnlyVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
8009 {
8010     TestObject* impl = V8TestObject::toNative(info.Holder());
8011     impl->readOnlyVoidMethod();
8012 }
8013
8014 static void readOnlyVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
8015 {
8016     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
8017     TestObjectV8Internal::readOnlyVoidMethodMethod(info);
8018     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
8019 }
8020
8021 static void notEnumerableReadOnlyVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
8022 {
8023     TestObject* impl = V8TestObject::toNative(info.Holder());
8024     impl->notEnumerableReadOnlyVoidMethod();
8025 }
8026
8027 static void notEnumerableReadOnlyVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
8028 {
8029     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
8030     TestObjectV8Internal::notEnumerableReadOnlyVoidMethodMethod(info);
8031     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
8032 }
8033
8034 static void runtimeEnabledVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
8035 {
8036     TestObject* impl = V8TestObject::toNative(info.Holder());
8037     impl->runtimeEnabledVoidMethod();
8038 }
8039
8040 static void runtimeEnabledVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
8041 {
8042     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
8043     TestObjectV8Internal::runtimeEnabledVoidMethodMethod(info);
8044     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
8045 }
8046
8047 static void perWorldBindingsRuntimeEnabledVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
8048 {
8049     TestObject* impl = V8TestObject::toNative(info.Holder());
8050     impl->perWorldBindingsRuntimeEnabledVoidMethod();
8051 }
8052
8053 static void perWorldBindingsRuntimeEnabledVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
8054 {
8055     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
8056     TestObjectV8Internal::perWorldBindingsRuntimeEnabledVoidMethodMethod(info);
8057     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
8058 }
8059
8060 static void perWorldBindingsRuntimeEnabledVoidMethodMethodForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info)
8061 {
8062     TestObject* impl = V8TestObject::toNative(info.Holder());
8063     impl->perWorldBindingsRuntimeEnabledVoidMethod();
8064 }
8065
8066 static void perWorldBindingsRuntimeEnabledVoidMethodMethodCallbackForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info)
8067 {
8068     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
8069     TestObjectV8Internal::perWorldBindingsRuntimeEnabledVoidMethodMethodForMainWorld(info);
8070     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
8071 }
8072
8073 static void treatReturnedNullStringAsNullStringMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
8074 {
8075     TestObject* impl = V8TestObject::toNative(info.Holder());
8076     v8SetReturnValueStringOrNull(info, impl->treatReturnedNullStringAsNullStringMethod(), info.GetIsolate());
8077 }
8078
8079 static void treatReturnedNullStringAsNullStringMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
8080 {
8081     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
8082     TestObjectV8Internal::treatReturnedNullStringAsNullStringMethodMethod(info);
8083     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
8084 }
8085
8086 static void treatReturnedNullStringAsUndefinedStringMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
8087 {
8088     TestObject* impl = V8TestObject::toNative(info.Holder());
8089     v8SetReturnValueStringOrUndefined(info, impl->treatReturnedNullStringAsUndefinedStringMethod(), info.GetIsolate());
8090 }
8091
8092 static void treatReturnedNullStringAsUndefinedStringMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
8093 {
8094     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
8095     TestObjectV8Internal::treatReturnedNullStringAsUndefinedStringMethodMethod(info);
8096     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
8097 }
8098
8099 static void typeCheckingInterfaceVoidMethodTestInterfaceEmptyArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
8100 {
8101     if (UNLIKELY(info.Length() < 1)) {
8102         throwArityTypeErrorForMethod("typeCheckingInterfaceVoidMethodTestInterfaceEmptyArg", "TestObject", 1, info.Length(), info.GetIsolate());
8103         return;
8104     }
8105     TestObject* impl = V8TestObject::toNative(info.Holder());
8106     if (info.Length() > 0 && !V8TestInterfaceEmpty::hasInstance(info[0], info.GetIsolate())) {
8107         throwTypeError(ExceptionMessages::failedToExecute("typeCheckingInterfaceVoidMethodTestInterfaceEmptyArg", "TestObject", "parameter 1 is not of type 'TestInterfaceEmpty'."), info.GetIsolate());
8108         return;
8109     }
8110     TONATIVE_VOID(TestInterfaceEmpty*, testInterfaceEmptyArg, V8TestInterfaceEmpty::toNativeWithTypeCheck(info.GetIsolate(), info[0]));
8111     impl->typeCheckingInterfaceVoidMethodTestInterfaceEmptyArg(testInterfaceEmptyArg);
8112 }
8113
8114 static void typeCheckingInterfaceVoidMethodTestInterfaceEmptyArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
8115 {
8116     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
8117     TestObjectV8Internal::typeCheckingInterfaceVoidMethodTestInterfaceEmptyArgMethod(info);
8118     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
8119 }
8120
8121 static void typeCheckingNullableVoidMethodTestInterfaceEmptyOrNullArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
8122 {
8123     if (UNLIKELY(info.Length() < 1)) {
8124         throwArityTypeErrorForMethod("typeCheckingNullableVoidMethodTestInterfaceEmptyOrNullArg", "TestObject", 1, info.Length(), info.GetIsolate());
8125         return;
8126     }
8127     TestObject* impl = V8TestObject::toNative(info.Holder());
8128     TONATIVE_VOID(TestInterfaceEmpty*, testInterfaceEmptyOrNullArg, V8TestInterfaceEmpty::toNativeWithTypeCheck(info.GetIsolate(), info[0]));
8129     impl->typeCheckingNullableVoidMethodTestInterfaceEmptyOrNullArg(testInterfaceEmptyOrNullArg);
8130 }
8131
8132 static void typeCheckingNullableVoidMethodTestInterfaceEmptyOrNullArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
8133 {
8134     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
8135     TestObjectV8Internal::typeCheckingNullableVoidMethodTestInterfaceEmptyOrNullArgMethod(info);
8136     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
8137 }
8138
8139 static void typeCheckingInterfaceNullableVoidMethodTestInterfaceEmptyOrNullArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
8140 {
8141     if (UNLIKELY(info.Length() < 1)) {
8142         throwArityTypeErrorForMethod("typeCheckingInterfaceNullableVoidMethodTestInterfaceEmptyOrNullArg", "TestObject", 1, info.Length(), info.GetIsolate());
8143         return;
8144     }
8145     TestObject* impl = V8TestObject::toNative(info.Holder());
8146     if (info.Length() > 0 && !isUndefinedOrNull(info[0]) && !V8TestInterfaceEmpty::hasInstance(info[0], info.GetIsolate())) {
8147         throwTypeError(ExceptionMessages::failedToExecute("typeCheckingInterfaceNullableVoidMethodTestInterfaceEmptyOrNullArg", "TestObject", "parameter 1 is not of type 'TestInterfaceEmpty'."), info.GetIsolate());
8148         return;
8149     }
8150     TONATIVE_VOID(TestInterfaceEmpty*, testInterfaceEmptyOrNullArg, V8TestInterfaceEmpty::toNativeWithTypeCheck(info.GetIsolate(), info[0]));
8151     impl->typeCheckingInterfaceNullableVoidMethodTestInterfaceEmptyOrNullArg(testInterfaceEmptyOrNullArg);
8152 }
8153
8154 static void typeCheckingInterfaceNullableVoidMethodTestInterfaceEmptyOrNullArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
8155 {
8156     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
8157     TestObjectV8Internal::typeCheckingInterfaceNullableVoidMethodTestInterfaceEmptyOrNullArgMethod(info);
8158     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
8159 }
8160
8161 static void typeCheckingUnrestrictedVoidMethodFloatArgDoubleArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
8162 {
8163     if (UNLIKELY(info.Length() < 2)) {
8164         throwArityTypeErrorForMethod("typeCheckingUnrestrictedVoidMethodFloatArgDoubleArg", "TestObject", 2, info.Length(), info.GetIsolate());
8165         return;
8166     }
8167     TestObject* impl = V8TestObject::toNative(info.Holder());
8168     TONATIVE_VOID(float, floatArg, static_cast<float>(info[0]->NumberValue()));
8169     if (!std::isfinite(floatArg)) {
8170         throwTypeError(ExceptionMessages::failedToExecute("typeCheckingUnrestrictedVoidMethodFloatArgDoubleArg", "TestObject", "float parameter 1 is non-finite."), info.GetIsolate());
8171         return;
8172     }
8173     TONATIVE_VOID(double, doubleArg, static_cast<double>(info[1]->NumberValue()));
8174     if (!std::isfinite(doubleArg)) {
8175         throwTypeError(ExceptionMessages::failedToExecute("typeCheckingUnrestrictedVoidMethodFloatArgDoubleArg", "TestObject", "double parameter 2 is non-finite."), info.GetIsolate());
8176         return;
8177     }
8178     impl->typeCheckingUnrestrictedVoidMethodFloatArgDoubleArg(floatArg, doubleArg);
8179 }
8180
8181 static void typeCheckingUnrestrictedVoidMethodFloatArgDoubleArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
8182 {
8183     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
8184     TestObjectV8Internal::typeCheckingUnrestrictedVoidMethodFloatArgDoubleArgMethod(info);
8185     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
8186 }
8187
8188 static void unforgeableVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
8189 {
8190     TestObject* impl = V8TestObject::toNative(info.Holder());
8191     impl->unforgeableVoidMethod();
8192 }
8193
8194 static void unforgeableVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
8195 {
8196     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
8197     TestObjectV8Internal::unforgeableVoidMethodMethod(info);
8198     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
8199 }
8200
8201 static void voidMethodTestInterfaceGarbageCollectedSequenceArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
8202 {
8203     if (UNLIKELY(info.Length() < 1)) {
8204         throwArityTypeErrorForMethod("voidMethodTestInterfaceGarbageCollectedSequenceArg", "TestObject", 1, info.Length(), info.GetIsolate());
8205         return;
8206     }
8207     TestObject* impl = V8TestObject::toNative(info.Holder());
8208     TONATIVE_VOID(HeapVector<Member<TestInterfaceGarbageCollected> >, testInterfaceGarbageCollectedSequenceArg, (toMemberNativeArray<TestInterfaceGarbageCollected, V8TestInterfaceGarbageCollected>(info[0], 1, info.GetIsolate())));
8209     impl->voidMethodTestInterfaceGarbageCollectedSequenceArg(testInterfaceGarbageCollectedSequenceArg);
8210 }
8211
8212 static void voidMethodTestInterfaceGarbageCollectedSequenceArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
8213 {
8214     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
8215     TestObjectV8Internal::voidMethodTestInterfaceGarbageCollectedSequenceArgMethod(info);
8216     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
8217 }
8218
8219 static void voidMethodTestInterfaceGarbageCollectedArrayArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
8220 {
8221     if (UNLIKELY(info.Length() < 1)) {
8222         throwArityTypeErrorForMethod("voidMethodTestInterfaceGarbageCollectedArrayArg", "TestObject", 1, info.Length(), info.GetIsolate());
8223         return;
8224     }
8225     TestObject* impl = V8TestObject::toNative(info.Holder());
8226     TONATIVE_VOID(HeapVector<Member<TestInterfaceGarbageCollected> >, testInterfaceGarbageCollectedArrayArg, (toMemberNativeArray<TestInterfaceGarbageCollected, V8TestInterfaceGarbageCollected>(info[0], 1, info.GetIsolate())));
8227     impl->voidMethodTestInterfaceGarbageCollectedArrayArg(testInterfaceGarbageCollectedArrayArg);
8228 }
8229
8230 static void voidMethodTestInterfaceGarbageCollectedArrayArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
8231 {
8232     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
8233     TestObjectV8Internal::voidMethodTestInterfaceGarbageCollectedArrayArgMethod(info);
8234     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
8235 }
8236
8237 static void voidMethodTestInterfaceWillBeGarbageCollectedSequenceArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
8238 {
8239     if (UNLIKELY(info.Length() < 1)) {
8240         throwArityTypeErrorForMethod("voidMethodTestInterfaceWillBeGarbageCollectedSequenceArg", "TestObject", 1, info.Length(), info.GetIsolate());
8241         return;
8242     }
8243     TestObject* impl = V8TestObject::toNative(info.Holder());
8244     TONATIVE_VOID(WillBeHeapVector<RefPtrWillBeMember<TestInterfaceWillBeGarbageCollected> >, testInterfaceWillBeGarbageCollectedSequenceArg, (toRefPtrWillBeMemberNativeArray<TestInterfaceWillBeGarbageCollected, V8TestInterfaceWillBeGarbageCollected>(info[0], 1, info.GetIsolate())));
8245     impl->voidMethodTestInterfaceWillBeGarbageCollectedSequenceArg(testInterfaceWillBeGarbageCollectedSequenceArg);
8246 }
8247
8248 static void voidMethodTestInterfaceWillBeGarbageCollectedSequenceArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
8249 {
8250     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
8251     TestObjectV8Internal::voidMethodTestInterfaceWillBeGarbageCollectedSequenceArgMethod(info);
8252     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
8253 }
8254
8255 static void voidMethodTestInterfaceWillBeGarbageCollectedArrayArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
8256 {
8257     if (UNLIKELY(info.Length() < 1)) {
8258         throwArityTypeErrorForMethod("voidMethodTestInterfaceWillBeGarbageCollectedArrayArg", "TestObject", 1, info.Length(), info.GetIsolate());
8259         return;
8260     }
8261     TestObject* impl = V8TestObject::toNative(info.Holder());
8262     TONATIVE_VOID(WillBeHeapVector<RefPtrWillBeMember<TestInterfaceWillBeGarbageCollected> >, testInterfaceWillBeGarbageCollectedArrayArg, (toRefPtrWillBeMemberNativeArray<TestInterfaceWillBeGarbageCollected, V8TestInterfaceWillBeGarbageCollected>(info[0], 1, info.GetIsolate())));
8263     impl->voidMethodTestInterfaceWillBeGarbageCollectedArrayArg(testInterfaceWillBeGarbageCollectedArrayArg);
8264 }
8265
8266 static void voidMethodTestInterfaceWillBeGarbageCollectedArrayArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
8267 {
8268     TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
8269     TestObjectV8Internal::voidMethodTestInterfaceWillBeGarbageCollectedArrayArgMethod(info);
8270     TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
8271 }
8272
8273 } // namespace TestObjectV8Internal
8274
8275 static const V8DOMConfiguration::AttributeConfiguration V8TestObjectAttributes[] = {
8276     {"readonlyStringAttribute", TestObjectV8Internal::readonlyStringAttributeAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
8277     {"readonlyTestInterfaceEmptyAttribute", TestObjectV8Internal::readonlyTestInterfaceEmptyAttributeAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
8278     {"readonlyLongAttribute", TestObjectV8Internal::readonlyLongAttributeAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
8279     {"dateAttribute", TestObjectV8Internal::dateAttributeAttributeGetterCallback, TestObjectV8Internal::dateAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
8280     {"stringAttribute", TestObjectV8Internal::stringAttributeAttributeGetterCallback, TestObjectV8Internal::stringAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
8281     {"domTimeStampAttribute", TestObjectV8Internal::domTimeStampAttributeAttributeGetterCallback, TestObjectV8Internal::domTimeStampAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
8282     {"booleanAttribute", TestObjectV8Internal::booleanAttributeAttributeGetterCallback, TestObjectV8Internal::booleanAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
8283     {"byteAttribute", TestObjectV8Internal::byteAttributeAttributeGetterCallback, TestObjectV8Internal::byteAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
8284     {"doubleAttribute", TestObjectV8Internal::doubleAttributeAttributeGetterCallback, TestObjectV8Internal::doubleAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
8285     {"floatAttribute", TestObjectV8Internal::floatAttributeAttributeGetterCallback, TestObjectV8Internal::floatAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
8286     {"longAttribute", TestObjectV8Internal::longAttributeAttributeGetterCallback, TestObjectV8Internal::longAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
8287     {"longLongAttribute", TestObjectV8Internal::longLongAttributeAttributeGetterCallback, TestObjectV8Internal::longLongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
8288     {"octetAttribute", TestObjectV8Internal::octetAttributeAttributeGetterCallback, TestObjectV8Internal::octetAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
8289     {"shortAttribute", TestObjectV8Internal::shortAttributeAttributeGetterCallback, TestObjectV8Internal::shortAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
8290     {"unrestrictedDoubleAttribute", TestObjectV8Internal::unrestrictedDoubleAttributeAttributeGetterCallback, TestObjectV8Internal::unrestrictedDoubleAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
8291     {"unrestrictedFloatAttribute", TestObjectV8Internal::unrestrictedFloatAttributeAttributeGetterCallback, TestObjectV8Internal::unrestrictedFloatAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
8292     {"unsignedLongAttribute", TestObjectV8Internal::unsignedLongAttributeAttributeGetterCallback, TestObjectV8Internal::unsignedLongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
8293     {"unsignedLongLongAttribute", TestObjectV8Internal::unsignedLongLongAttributeAttributeGetterCallback, TestObjectV8Internal::unsignedLongLongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
8294     {"unsignedShortAttribute", TestObjectV8Internal::unsignedShortAttributeAttributeGetterCallback, TestObjectV8Internal::unsignedShortAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
8295     {"testInterfaceEmptyAttribute", TestObjectV8Internal::testInterfaceEmptyAttributeAttributeGetterCallback, TestObjectV8Internal::testInterfaceEmptyAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
8296     {"testObjectAttribute", TestObjectV8Internal::testObjectAttributeAttributeGetterCallback, TestObjectV8Internal::testObjectAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
8297     {"voidCallbackFunctionAttribute", TestObjectV8Internal::voidCallbackFunctionAttributeAttributeGetterCallback, TestObjectV8Internal::voidCallbackFunctionAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
8298     {"anyCallbackFunctionOptionalAnyArgAttribute", TestObjectV8Internal::anyCallbackFunctionOptionalAnyArgAttributeAttributeGetterCallback, TestObjectV8Internal::anyCallbackFunctionOptionalAnyArgAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
8299     {"cssAttribute", TestObjectV8Internal::cssAttributeAttributeGetterCallback, TestObjectV8Internal::cssAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
8300     {"imeAttribute", TestObjectV8Internal::imeAttributeAttributeGetterCallback, TestObjectV8Internal::imeAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
8301     {"svgAttribute", TestObjectV8Internal::svgAttributeAttributeGetterCallback, TestObjectV8Internal::svgAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
8302     {"xmlAttribute", TestObjectV8Internal::xmlAttributeAttributeGetterCallback, TestObjectV8Internal::xmlAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
8303     {"nodeFilterAttribute", TestObjectV8Internal::nodeFilterAttributeAttributeGetterCallback, TestObjectV8Internal::nodeFilterAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
8304     {"serializedScriptValueAttribute", TestObjectV8Internal::serializedScriptValueAttributeAttributeGetterCallback, TestObjectV8Internal::serializedScriptValueAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
8305     {"anyAttribute", TestObjectV8Internal::anyAttributeAttributeGetterCallback, TestObjectV8Internal::anyAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
8306     {"promiseAttribute", TestObjectV8Internal::promiseAttributeAttributeGetterCallback, TestObjectV8Internal::promiseAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
8307     {"windowAttribute", TestObjectV8Internal::windowAttributeAttributeGetterCallback, TestObjectV8Internal::windowAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
8308     {"documentAttribute", TestObjectV8Internal::documentAttributeAttributeGetterCallback, TestObjectV8Internal::documentAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
8309     {"documentFragmentAttribute", TestObjectV8Internal::documentFragmentAttributeAttributeGetterCallback, TestObjectV8Internal::documentFragmentAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
8310     {"documentTypeAttribute", TestObjectV8Internal::documentTypeAttributeAttributeGetterCallback, TestObjectV8Internal::documentTypeAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
8311     {"elementAttribute", TestObjectV8Internal::elementAttributeAttributeGetterCallback, TestObjectV8Internal::elementAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
8312     {"nodeAttribute", TestObjectV8Internal::nodeAttributeAttributeGetterCallback, TestObjectV8Internal::nodeAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
8313     {"shadowRootAttribute", TestObjectV8Internal::shadowRootAttributeAttributeGetterCallback, TestObjectV8Internal::shadowRootAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
8314     {"arrayBufferAttribute", TestObjectV8Internal::arrayBufferAttributeAttributeGetterCallback, TestObjectV8Internal::arrayBufferAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
8315     {"float32ArrayAttribute", TestObjectV8Internal::float32ArrayAttributeAttributeGetterCallback, TestObjectV8Internal::float32ArrayAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
8316     {"uint8ArrayAttribute", TestObjectV8Internal::uint8ArrayAttributeAttributeGetterCallback, TestObjectV8Internal::uint8ArrayAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
8317     {"self", TestObjectV8Internal::selfAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
8318     {"readonlyEventTargetAttribute", TestObjectV8Internal::readonlyEventTargetAttributeAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
8319     {"readonlyEventTargetOrNullAttribute", TestObjectV8Internal::readonlyEventTargetOrNullAttributeAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
8320     {"readonlyWindowAttribute", TestObjectV8Internal::readonlyWindowAttributeAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
8321     {"htmlCollectionAttribute", TestObjectV8Internal::htmlCollectionAttributeAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
8322     {"htmlElementAttribute", TestObjectV8Internal::htmlElementAttributeAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
8323     {"stringArrayAttribute", TestObjectV8Internal::stringArrayAttributeAttributeGetterCallback, TestObjectV8Internal::stringArrayAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
8324     {"testInterfaceEmptyArrayAttribute", TestObjectV8Internal::testInterfaceEmptyArrayAttributeAttributeGetterCallback, TestObjectV8Internal::testInterfaceEmptyArrayAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
8325     {"floatArrayAttribute", TestObjectV8Internal::floatArrayAttributeAttributeGetterCallback, TestObjectV8Internal::floatArrayAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
8326     {"stringOrNullAttribute", TestObjectV8Internal::stringOrNullAttributeAttributeGetterCallback, TestObjectV8Internal::stringOrNullAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
8327     {"longOrNullAttribute", TestObjectV8Internal::longOrNullAttributeAttributeGetterCallback, TestObjectV8Internal::longOrNullAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
8328     {"testInterfaceOrNullAttribute", TestObjectV8Internal::testInterfaceOrNullAttributeAttributeGetterCallback, TestObjectV8Internal::testInterfaceOrNullAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
8329     {"testEnumAttribute", TestObjectV8Internal::testEnumAttributeAttributeGetterCallback, TestObjectV8Internal::testEnumAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
8330     {"eventHandlerAttribute", TestObjectV8Internal::eventHandlerAttributeAttributeGetterCallback, TestObjectV8Internal::eventHandlerAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
8331     {"activityLoggingAccessForAllWorldsLongAttribute", TestObjectV8Internal::activityLoggingAccessForAllWorldsLongAttributeAttributeGetterCallback, TestObjectV8Internal::activityLoggingAccessForAllWorldsLongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
8332     {"activityLoggingGetterForAllWorldsLongAttribute", TestObjectV8Internal::activityLoggingGetterForAllWorldsLongAttributeAttributeGetterCallback, TestObjectV8Internal::activityLoggingGetterForAllWorldsLongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
8333     {"activityLoggingSetterForAllWorldsLongAttribute", TestObjectV8Internal::activityLoggingSetterForAllWorldsLongAttributeAttributeGetterCallback, TestObjectV8Internal::activityLoggingSetterForAllWorldsLongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
8334     {"cachedAttributeAnyAttribute", TestObjectV8Internal::cachedAttributeAnyAttributeAttributeGetterCallback, TestObjectV8Internal::cachedAttributeAnyAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
8335     {"callWithExecutionContextAnyAttribute", TestObjectV8Internal::callWithExecutionContextAnyAttributeAttributeGetterCallback, TestObjectV8Internal::callWithExecutionContextAnyAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
8336     {"callWithScriptStateAnyAttribute", TestObjectV8Internal::callWithScriptStateAnyAttributeAttributeGetterCallback, TestObjectV8Internal::callWithScriptStateAnyAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
8337     {"callWithExecutionContextAndScriptStateAnyAttribute", TestObjectV8Internal::callWithExecutionContextAndScriptStateAnyAttributeAttributeGetterCallback, TestObjectV8Internal::callWithExecutionContextAndScriptStateAnyAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
8338     {"checkSecurityForNodeReadonlyDocumentAttribute", TestObjectV8Internal::checkSecurityForNodeReadonlyDocumentAttributeAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
8339 #if ENABLE(CONDITION)
8340     {"conditionalLongAttribute", TestObjectV8Internal::conditionalLongAttributeAttributeGetterCallback, TestObjectV8Internal::conditionalLongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
8341 #endif // ENABLE(CONDITION)
8342 #if ENABLE(CONDITION_1) && ENABLE(CONDITION_2)
8343     {"conditionalAndLongAttribute", TestObjectV8Internal::conditionalAndLongAttributeAttributeGetterCallback, TestObjectV8Internal::conditionalAndLongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
8344 #endif // ENABLE(CONDITION_1) && ENABLE(CONDITION_2)
8345 #if ENABLE(CONDITION_1) || ENABLE(CONDITION_2)
8346     {"conditionalOrLongAttribute", TestObjectV8Internal::conditionalOrLongAttributeAttributeGetterCallback, TestObjectV8Internal::conditionalOrLongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
8347 #endif // ENABLE(CONDITION_1) || ENABLE(CONDITION_2)
8348     {"testInterfaceEmptyConstructorAttribute", TestObjectV8Internal::TestObjectConstructorGetter, TestObjectV8Internal::TestObjectReplaceableAttributeSetterCallback, 0, 0, const_cast<WrapperTypeInfo*>(&V8TestInterfaceEmpty::wrapperTypeInfo), static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::DontEnum), 0 /* on instance */},
8349     {"testInterfaceEmptyConstructorAttribute", TestObjectV8Internal::testInterfaceEmptyConstructorAttributeConstructorGetterCallback, TestObjectV8Internal::TestObjectReplaceableAttributeSetterCallback, 0, 0, const_cast<WrapperTypeInfo*>(&V8TestInterfaceEmpty::wrapperTypeInfo), static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::DontEnum), 0 /* on instance */},
8350     {"measureAsFeatureNameTestInterfaceEmptyConstructorAttribute", TestObjectV8Internal::measureAsFeatureNameTestInterfaceEmptyConstructorAttributeConstructorGetterCallback, TestObjectV8Internal::TestObjectReplaceableAttributeSetterCallback, 0, 0, const_cast<WrapperTypeInfo*>(&V8TestInterfaceEmpty::wrapperTypeInfo), static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::DontEnum), 0 /* on instance */},
8351     {"customObjectAttribute", TestObjectV8Internal::customObjectAttributeAttributeGetterCallback, TestObjectV8Internal::customObjectAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
8352     {"customGetterLongAttribute", TestObjectV8Internal::customGetterLongAttributeAttributeGetterCallback, TestObjectV8Internal::customGetterLongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
8353     {"customGetterReadonlyObjectAttribute", TestObjectV8Internal::customGetterReadonlyObjectAttributeAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
8354     {"customSetterLongAttribute", TestObjectV8Internal::customSetterLongAttributeAttributeGetterCallback, TestObjectV8Internal::customSetterLongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
8355 #if ENABLE(CONDITION)
8356     {"customLongAttribute", TestObjectV8Internal::customLongAttributeAttributeGetterCallback, TestObjectV8Internal::customLongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
8357 #endif // ENABLE(CONDITION)
8358     {"customElementsCallbacksReadonlyLongAttribute", TestObjectV8Internal::customElementsCallbacksReadonlyLongAttributeAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
8359     {"deprecatedLongAttribute", TestObjectV8Internal::deprecatedLongAttributeAttributeGetterCallback, TestObjectV8Internal::deprecatedLongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
8360     {"enforceRangeLongAttribute", TestObjectV8Internal::enforceRangeLongAttributeAttributeGetterCallback, TestObjectV8Internal::enforceRangeLongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
8361     {"implementedAsLongAttribute", TestObjectV8Internal::implementedAsLongAttributeAttributeGetterCallback, TestObjectV8Internal::implementedAsLongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
8362     {"customImplementedAsLongAttribute", TestObjectV8Internal::customImplementedAsLongAttributeAttributeGetterCallback, TestObjectV8Internal::customImplementedAsLongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
8363     {"customGetterImplementedAsLongAttribute", TestObjectV8Internal::customGetterImplementedAsLongAttributeAttributeGetterCallback, TestObjectV8Internal::customGetterImplementedAsLongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
8364     {"customSetterImplementedAsLongAttribute", TestObjectV8Internal::customSetterImplementedAsLongAttributeAttributeGetterCallback, TestObjectV8Internal::customSetterImplementedAsLongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
8365     {"measureAsLongAttribute", TestObjectV8Internal::measureAsLongAttributeAttributeGetterCallback, TestObjectV8Internal::measureAsLongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
8366     {"notEnumerableLongAttribute", TestObjectV8Internal::notEnumerableLongAttributeAttributeGetterCallback, TestObjectV8Internal::notEnumerableLongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::DontEnum), 0 /* on instance */},
8367     {"perWorldBindingsReadonlyTestInterfaceEmptyAttribute", TestObjectV8Internal::perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetterCallback, 0, TestObjectV8Internal::perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetterCallbackForMainWorld, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
8368     {"activityLoggingAccessPerWorldBindingsLongAttribute", TestObjectV8Internal::activityLoggingAccessPerWorldBindingsLongAttributeAttributeGetterCallback, TestObjectV8Internal::activityLoggingAccessPerWorldBindingsLongAttributeAttributeSetterCallback, TestObjectV8Internal::activityLoggingAccessPerWorldBindingsLongAttributeAttributeGetterCallbackForMainWorld, TestObjectV8Internal::activityLoggingAccessPerWorldBindingsLongAttributeAttributeSetterCallbackForMainWorld, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
8369     {"activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttribute", TestObjectV8Internal::activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeAttributeGetterCallback, TestObjectV8Internal::activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeAttributeSetterCallback, TestObjectV8Internal::activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeAttributeGetterCallbackForMainWorld, TestObjectV8Internal::activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeAttributeSetterCallbackForMainWorld, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
8370     {"activityLoggingGetterPerWorldBindingsLongAttribute", TestObjectV8Internal::activityLoggingGetterPerWorldBindingsLongAttributeAttributeGetterCallback, TestObjectV8Internal::activityLoggingGetterPerWorldBindingsLongAttributeAttributeSetterCallback, TestObjectV8Internal::activityLoggingGetterPerWorldBindingsLongAttributeAttributeGetterCallbackForMainWorld, TestObjectV8Internal::activityLoggingGetterPerWorldBindingsLongAttributeAttributeSetterCallbackForMainWorld, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
8371     {"activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttribute", TestObjectV8Internal::activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeAttributeGetterCallback, TestObjectV8Internal::activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeAttributeSetterCallback, TestObjectV8Internal::activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeAttributeGetterCallbackForMainWorld, TestObjectV8Internal::activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeAttributeSetterCallbackForMainWorld, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
8372     {"location", TestObjectV8Internal::locationAttributeGetterCallback, TestObjectV8Internal::locationAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
8373     {"locationWithException", TestObjectV8Internal::locationWithExceptionAttributeGetterCallback, TestObjectV8Internal::locationWithExceptionAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
8374     {"locationWithCallWith", TestObjectV8Internal::locationWithCallWithAttributeGetterCallback, TestObjectV8Internal::locationWithCallWithAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
8375     {"locationWithPerWorldBindings", TestObjectV8Internal::locationWithPerWorldBindingsAttributeGetterCallback, TestObjectV8Internal::locationWithPerWorldBindingsAttributeSetterCallback, TestObjectV8Internal::locationWithPerWorldBindingsAttributeGetterCallbackForMainWorld, TestObjectV8Internal::locationWithPerWorldBindingsAttributeSetterCallbackForMainWorld, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
8376     {"locationGarbageCollected", TestObjectV8Internal::locationGarbageCollectedAttributeGetterCallback, TestObjectV8Internal::locationGarbageCollectedAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
8377     {"locationWillBeGarbageCollected", TestObjectV8Internal::locationWillBeGarbageCollectedAttributeGetterCallback, TestObjectV8Internal::locationWillBeGarbageCollectedAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
8378     {"raisesExceptionLongAttribute", TestObjectV8Internal::raisesExceptionLongAttributeAttributeGetterCallback, TestObjectV8Internal::raisesExceptionLongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
8379     {"raisesExceptionGetterLongAttribute", TestObjectV8Internal::raisesExceptionGetterLongAttributeAttributeGetterCallback, TestObjectV8Internal::raisesExceptionGetterLongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
8380     {"setterRaisesExceptionLongAttribute", TestObjectV8Internal::setterRaisesExceptionLongAttributeAttributeGetterCallback, TestObjectV8Internal::setterRaisesExceptionLongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
8381     {"raisesExceptionTestInterfaceEmptyAttribute", TestObjectV8Internal::raisesExceptionTestInterfaceEmptyAttributeAttributeGetterCallback, TestObjectV8Internal::raisesExceptionTestInterfaceEmptyAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
8382     {"cachedAttributeRaisesExceptionGetterAnyAttribute", TestObjectV8Internal::cachedAttributeRaisesExceptionGetterAnyAttributeAttributeGetterCallback, TestObjectV8Internal::cachedAttributeRaisesExceptionGetterAnyAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
8383     {"reflectTestInterfaceAttribute", TestObjectV8Internal::reflectTestInterfaceAttributeAttributeGetterCallback, TestObjectV8Internal::reflectTestInterfaceAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
8384     {"reflectReflectedNameAttributeTestAttribute", TestObjectV8Internal::reflectReflectedNameAttributeTestAttributeAttributeGetterCallback, TestObjectV8Internal::reflectReflectedNameAttributeTestAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
8385     {"reflectBooleanAttribute", TestObjectV8Internal::reflectBooleanAttributeAttributeGetterCallback, TestObjectV8Internal::reflectBooleanAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
8386     {"reflectLongAttribute", TestObjectV8Internal::reflectLongAttributeAttributeGetterCallback, TestObjectV8Internal::reflectLongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
8387     {"reflectUnsignedShortAttribute", TestObjectV8Internal::reflectUnsignedShortAttributeAttributeGetterCallback, TestObjectV8Internal::reflectUnsignedShortAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
8388     {"reflectUnsignedLongAttribute", TestObjectV8Internal::reflectUnsignedLongAttributeAttributeGetterCallback, TestObjectV8Internal::reflectUnsignedLongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
8389     {"id", TestObjectV8Internal::idAttributeGetterCallback, TestObjectV8Internal::idAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
8390     {"name", TestObjectV8Internal::nameAttributeGetterCallback, TestObjectV8Internal::nameAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
8391     {"class", TestObjectV8Internal::classAttributeGetterCallback, TestObjectV8Internal::classAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
8392     {"reflectedId", TestObjectV8Internal::reflectedIdAttributeGetterCallback, TestObjectV8Internal::reflectedIdAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
8393     {"reflectedName", TestObjectV8Internal::reflectedNameAttributeGetterCallback, TestObjectV8Internal::reflectedNameAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
8394     {"reflectedClass", TestObjectV8Internal::reflectedClassAttributeGetterCallback, TestObjectV8Internal::reflectedClassAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
8395     {"limitedToOnlyOneAttribute", TestObjectV8Internal::limitedToOnlyOneAttributeAttributeGetterCallback, TestObjectV8Internal::limitedToOnlyOneAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
8396     {"limitedToOnlyAttribute", TestObjectV8Internal::limitedToOnlyAttributeAttributeGetterCallback, TestObjectV8Internal::limitedToOnlyAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
8397     {"limitedToOnlyOtherAttribute", TestObjectV8Internal::limitedToOnlyOtherAttributeAttributeGetterCallback, TestObjectV8Internal::limitedToOnlyOtherAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
8398     {"limitedWithMissingDefaultAttribute", TestObjectV8Internal::limitedWithMissingDefaultAttributeAttributeGetterCallback, TestObjectV8Internal::limitedWithMissingDefaultAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
8399     {"limitedWithInvalidMissingDefaultAttribute", TestObjectV8Internal::limitedWithInvalidMissingDefaultAttributeAttributeGetterCallback, TestObjectV8Internal::limitedWithInvalidMissingDefaultAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
8400     {"corsSettingAttribute", TestObjectV8Internal::corsSettingAttributeAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
8401     {"limitedWithEmptyMissingInvalidAttribute", TestObjectV8Internal::limitedWithEmptyMissingInvalidAttributeAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
8402     {"replaceableReadonlyLongAttribute", TestObjectV8Internal::replaceableReadonlyLongAttributeAttributeGetterCallback, TestObjectV8Internal::TestObjectReplaceableAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
8403     {"locationReplaceable", TestObjectV8Internal::locationReplaceableAttributeGetterCallback, TestObjectV8Internal::locationReplaceableAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
8404     {"setterCallWithActiveWindowAndFirstWindowStringAttribute", TestObjectV8Internal::setterCallWithActiveWindowAndFirstWindowStringAttributeAttributeGetterCallback, TestObjectV8Internal::setterCallWithActiveWindowAndFirstWindowStringAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
8405     {"setterCallWithExecutionContextStringAttribute", TestObjectV8Internal::setterCallWithExecutionContextStringAttributeAttributeGetterCallback, TestObjectV8Internal::setterCallWithExecutionContextStringAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
8406     {"treatNullAsNullStringStringAttribute", TestObjectV8Internal::treatNullAsNullStringStringAttributeAttributeGetterCallback, TestObjectV8Internal::treatNullAsNullStringStringAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
8407     {"treatReturnedNullStringAsNullStringAttribute", TestObjectV8Internal::treatReturnedNullStringAsNullStringAttributeAttributeGetterCallback, TestObjectV8Internal::treatReturnedNullStringAsNullStringAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
8408     {"treatReturnedNullStringAsUndefinedStringAttribute", TestObjectV8Internal::treatReturnedNullStringAsUndefinedStringAttributeAttributeGetterCallback, TestObjectV8Internal::treatReturnedNullStringAsUndefinedStringAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
8409     {"typeCheckingInterfaceNullableStringFloatAttribute", TestObjectV8Internal::typeCheckingInterfaceNullableStringFloatAttributeAttributeGetterCallback, TestObjectV8Internal::typeCheckingInterfaceNullableStringFloatAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
8410     {"typeCheckingInterfaceTestInterfaceAttribute", TestObjectV8Internal::typeCheckingInterfaceTestInterfaceAttributeAttributeGetterCallback, TestObjectV8Internal::typeCheckingInterfaceTestInterfaceAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
8411     {"typeCheckingNullableTestInterfaceOrNullAttribute", TestObjectV8Internal::typeCheckingNullableTestInterfaceOrNullAttributeAttributeGetterCallback, TestObjectV8Internal::typeCheckingNullableTestInterfaceOrNullAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
8412     {"typeCheckingInterfaceNullableTestInterfaceOrNullAttribute", TestObjectV8Internal::typeCheckingInterfaceNullableTestInterfaceOrNullAttributeAttributeGetterCallback, TestObjectV8Internal::typeCheckingInterfaceNullableTestInterfaceOrNullAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
8413     {"urlStringAttribute", TestObjectV8Internal::urlStringAttributeAttributeGetterCallback, TestObjectV8Internal::urlStringAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
8414     {"urlStringAttribute", TestObjectV8Internal::urlStringAttributeAttributeGetterCallback, TestObjectV8Internal::urlStringAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
8415     {"unforgeableLongAttribute", TestObjectV8Internal::unforgeableLongAttributeAttributeGetterCallback, TestObjectV8Internal::unforgeableLongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::PROHIBITS_OVERWRITING), static_cast<v8::PropertyAttribute>(v8::DontDelete), 0 /* on instance */},
8416     {"activityLoggingSetterOnlyLogPreviousValueAttribute", TestObjectV8Internal::activityLoggingSetterOnlyLogPreviousValueAttributeAttributeGetterCallback, TestObjectV8Internal::activityLoggingSetterOnlyLogPreviousValueAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
8417     {"activityLoggingLogPreviousValueInterfaceAttribute", TestObjectV8Internal::activityLoggingLogPreviousValueInterfaceAttributeAttributeGetterCallback, TestObjectV8Internal::activityLoggingLogPreviousValueInterfaceAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
8418     {"testInterfaceAttribute", TestObjectV8Internal::testInterfaceAttributeAttributeGetterCallback, TestObjectV8Internal::testInterfaceAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
8419     {"testInterfaceGarbageCollectedAttribute", TestObjectV8Internal::testInterfaceGarbageCollectedAttributeAttributeGetterCallback, TestObjectV8Internal::testInterfaceGarbageCollectedAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
8420     {"testInterfaceGarbageCollectedOrNullAttribute", TestObjectV8Internal::testInterfaceGarbageCollectedOrNullAttributeAttributeGetterCallback, TestObjectV8Internal::testInterfaceGarbageCollectedOrNullAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
8421     {"testInterfaceWillBeGarbageCollectedAttribute", TestObjectV8Internal::testInterfaceWillBeGarbageCollectedAttributeAttributeGetterCallback, TestObjectV8Internal::testInterfaceWillBeGarbageCollectedAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
8422     {"testInterfaceWillBeGarbageCollectedOrNullAttribute", TestObjectV8Internal::testInterfaceWillBeGarbageCollectedOrNullAttributeAttributeGetterCallback, TestObjectV8Internal::testInterfaceWillBeGarbageCollectedOrNullAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
8423 };
8424
8425 static const V8DOMConfiguration::AccessorConfiguration V8TestObjectAccessors[] = {
8426     {"exposeJSAccessorsLongAttribute", TestObjectV8Internal::exposeJSAccessorsLongAttributeAttributeGetterCallback, TestObjectV8Internal::exposeJSAccessorsLongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None)},
8427 };
8428
8429 static const V8DOMConfiguration::MethodConfiguration V8TestObjectMethods[] = {
8430     {"voidMethod", TestObjectV8Internal::voidMethodMethodCallback, 0, 0},
8431     {"dateMethod", TestObjectV8Internal::dateMethodMethodCallback, 0, 0},
8432     {"stringMethod", TestObjectV8Internal::stringMethodMethodCallback, 0, 0},
8433     {"readonlyDOMTimeStampMethod", TestObjectV8Internal::readonlyDOMTimeStampMethodMethodCallback, 0, 0},
8434     {"booleanMethod", TestObjectV8Internal::booleanMethodMethodCallback, 0, 0},
8435     {"byteMethod", TestObjectV8Internal::byteMethodMethodCallback, 0, 0},
8436     {"doubleMethod", TestObjectV8Internal::doubleMethodMethodCallback, 0, 0},
8437     {"floatMethod", TestObjectV8Internal::floatMethodMethodCallback, 0, 0},
8438     {"longMethod", TestObjectV8Internal::longMethodMethodCallback, 0, 0},
8439     {"longLongMethod", TestObjectV8Internal::longLongMethodMethodCallback, 0, 0},
8440     {"octetMethod", TestObjectV8Internal::octetMethodMethodCallback, 0, 0},
8441     {"shortMethod", TestObjectV8Internal::shortMethodMethodCallback, 0, 0},
8442     {"unsignedLongMethod", TestObjectV8Internal::unsignedLongMethodMethodCallback, 0, 0},
8443     {"unsignedLongLongMethod", TestObjectV8Internal::unsignedLongLongMethodMethodCallback, 0, 0},
8444     {"unsignedShortMethod", TestObjectV8Internal::unsignedShortMethodMethodCallback, 0, 0},
8445     {"voidMethodDateArg", TestObjectV8Internal::voidMethodDateArgMethodCallback, 0, 1},
8446     {"voidMethodStringArg", TestObjectV8Internal::voidMethodStringArgMethodCallback, 0, 1},
8447     {"voidMethodDOMTimeStampArg", TestObjectV8Internal::voidMethodDOMTimeStampArgMethodCallback, 0, 1},
8448     {"voidMethodBooleanArg", TestObjectV8Internal::voidMethodBooleanArgMethodCallback, 0, 1},
8449     {"voidMethodByteArg", TestObjectV8Internal::voidMethodByteArgMethodCallback, 0, 1},
8450     {"voidMethodDoubleArg", TestObjectV8Internal::voidMethodDoubleArgMethodCallback, 0, 1},
8451     {"voidMethodFloatArg", TestObjectV8Internal::voidMethodFloatArgMethodCallback, 0, 1},
8452     {"voidMethodLongArg", TestObjectV8Internal::voidMethodLongArgMethodCallback, 0, 1},
8453     {"voidMethodLongLongArg", TestObjectV8Internal::voidMethodLongLongArgMethodCallback, 0, 1},
8454     {"voidMethodOctetArg", TestObjectV8Internal::voidMethodOctetArgMethodCallback, 0, 1},
8455     {"voidMethodShortArg", TestObjectV8Internal::voidMethodShortArgMethodCallback, 0, 1},
8456     {"voidMethodUnsignedLongArg", TestObjectV8Internal::voidMethodUnsignedLongArgMethodCallback, 0, 1},
8457     {"voidMethodUnsignedLongLongArg", TestObjectV8Internal::voidMethodUnsignedLongLongArgMethodCallback, 0, 1},
8458     {"voidMethodUnsignedShortArg", TestObjectV8Internal::voidMethodUnsignedShortArgMethodCallback, 0, 1},
8459     {"testInterfaceEmptyMethod", TestObjectV8Internal::testInterfaceEmptyMethodMethodCallback, 0, 0},
8460     {"voidMethodTestInterfaceEmptyArg", TestObjectV8Internal::voidMethodTestInterfaceEmptyArgMethodCallback, 0, 1},
8461     {"voidMethodLongArgTestInterfaceEmptyArg", TestObjectV8Internal::voidMethodLongArgTestInterfaceEmptyArgMethodCallback, 0, 2},
8462     {"voidCallbackFunctionMethod", TestObjectV8Internal::voidCallbackFunctionMethodMethodCallback, 0, 0},
8463     {"anyCallbackFunctionOptionalAnyArgMethod", TestObjectV8Internal::anyCallbackFunctionOptionalAnyArgMethodMethodCallback, 0, 0},
8464     {"voidMethodVoidCallbackFunctionArg", TestObjectV8Internal::voidMethodVoidCallbackFunctionArgMethodCallback, 0, 1},
8465     {"voidMethodAnyCallbackFunctionOptionalAnyArg", TestObjectV8Internal::voidMethodAnyCallbackFunctionOptionalAnyArgMethodCallback, 0, 1},
8466     {"compareHowMethod", TestObjectV8Internal::compareHowMethodMethodCallback, 0, 0},
8467     {"anyMethod", TestObjectV8Internal::anyMethodMethodCallback, 0, 0},
8468     {"voidMethodCompareHowArg", TestObjectV8Internal::voidMethodCompareHowArgMethodCallback, 0, 1},
8469     {"voidMethodEventTargetArg", TestObjectV8Internal::voidMethodEventTargetArgMethodCallback, 0, 1},
8470     {"voidMethodMediaQueryListListenerArg", TestObjectV8Internal::voidMethodMediaQueryListListenerArgMethodCallback, 0, 1},
8471     {"voidMethodAnyArg", TestObjectV8Internal::voidMethodAnyArgMethodCallback, 0, 1},
8472     {"voidMethodAttrArg", TestObjectV8Internal::voidMethodAttrArgMethodCallback, 0, 1},
8473     {"voidMethodDocumentArg", TestObjectV8Internal::voidMethodDocumentArgMethodCallback, 0, 1},
8474     {"voidMethodDocumentTypeArg", TestObjectV8Internal::voidMethodDocumentTypeArgMethodCallback, 0, 1},
8475     {"voidMethodElementArg", TestObjectV8Internal::voidMethodElementArgMethodCallback, 0, 1},
8476     {"voidMethodNodeArg", TestObjectV8Internal::voidMethodNodeArgMethodCallback, 0, 1},
8477     {"arrayBufferMethod", TestObjectV8Internal::arrayBufferMethodMethodCallback, 0, 0},
8478     {"arrayBufferViewMethod", TestObjectV8Internal::arrayBufferViewMethodMethodCallback, 0, 0},
8479     {"float32ArrayMethod", TestObjectV8Internal::float32ArrayMethodMethodCallback, 0, 0},
8480     {"int32ArrayMethod", TestObjectV8Internal::int32ArrayMethodMethodCallback, 0, 0},
8481     {"uint8ArrayMethod", TestObjectV8Internal::uint8ArrayMethodMethodCallback, 0, 0},
8482     {"voidMethodArrayBufferArg", TestObjectV8Internal::voidMethodArrayBufferArgMethodCallback, 0, 1},
8483     {"voidMethodArrayBufferOrNullArg", TestObjectV8Internal::voidMethodArrayBufferOrNullArgMethodCallback, 0, 1},
8484     {"voidMethodArrayBufferViewArg", TestObjectV8Internal::voidMethodArrayBufferViewArgMethodCallback, 0, 1},
8485     {"voidMethodFloat32ArrayArg", TestObjectV8Internal::voidMethodFloat32ArrayArgMethodCallback, 0, 1},
8486     {"voidMethodInt32ArrayArg", TestObjectV8Internal::voidMethodInt32ArrayArgMethodCallback, 0, 1},
8487     {"voidMethodUint8ArrayArg", TestObjectV8Internal::voidMethodUint8ArrayArgMethodCallback, 0, 1},
8488     {"longArrayMethod", TestObjectV8Internal::longArrayMethodMethodCallback, 0, 0},
8489     {"stringArrayMethod", TestObjectV8Internal::stringArrayMethodMethodCallback, 0, 0},
8490     {"testInterfaceEmptyArrayMethod", TestObjectV8Internal::testInterfaceEmptyArrayMethodMethodCallback, 0, 0},
8491     {"voidMethodArrayLongArg", TestObjectV8Internal::voidMethodArrayLongArgMethodCallback, 0, 1},
8492     {"voidMethodArrayStringArg", TestObjectV8Internal::voidMethodArrayStringArgMethodCallback, 0, 1},
8493     {"voidMethodArrayTestInterfaceEmptyArg", TestObjectV8Internal::voidMethodArrayTestInterfaceEmptyArgMethodCallback, 0, 1},
8494     {"longSequenceMethod", TestObjectV8Internal::longSequenceMethodMethodCallback, 0, 0},
8495     {"stringSequenceMethod", TestObjectV8Internal::stringSequenceMethodMethodCallback, 0, 0},
8496     {"testInterfaceEmptySequenceMethod", TestObjectV8Internal::testInterfaceEmptySequenceMethodMethodCallback, 0, 0},
8497     {"voidMethodSequenceLongArg", TestObjectV8Internal::voidMethodSequenceLongArgMethodCallback, 0, 1},
8498     {"voidMethodSequenceStringArg", TestObjectV8Internal::voidMethodSequenceStringArgMethodCallback, 0, 1},
8499     {"voidMethodSequenceTestInterfaceEmptyArg", TestObjectV8Internal::voidMethodSequenceTestInterfaceEmptyArgMethodCallback, 0, 1},
8500     {"voidMethodTestInterfaceEmptyOrNullArg", TestObjectV8Internal::voidMethodTestInterfaceEmptyOrNullArgMethodCallback, 0, 1},
8501     {"voidMethodTestCallbackInterfaceArg", TestObjectV8Internal::voidMethodTestCallbackInterfaceArgMethodCallback, 0, 1},
8502     {"voidMethodOptionalTestCallbackInterfaceArg", TestObjectV8Internal::voidMethodOptionalTestCallbackInterfaceArgMethodCallback, 0, 0},
8503     {"voidMethodTestCallbackInterfaceOrNullArg", TestObjectV8Internal::voidMethodTestCallbackInterfaceOrNullArgMethodCallback, 0, 1},
8504     {"testEnumMethod", TestObjectV8Internal::testEnumMethodMethodCallback, 0, 0},
8505     {"voidMethodTestEnumArg", TestObjectV8Internal::voidMethodTestEnumArgMethodCallback, 0, 1},
8506     {"dictionaryMethod", TestObjectV8Internal::dictionaryMethodMethodCallback, 0, 0},
8507     {"nodeFilterMethod", TestObjectV8Internal::nodeFilterMethodMethodCallback, 0, 0},
8508     {"promiseMethod", TestObjectV8Internal::promiseMethodMethodCallback, 0, 0},
8509     {"serializedScriptValueMethod", TestObjectV8Internal::serializedScriptValueMethodMethodCallback, 0, 0},
8510     {"xPathNSResolverMethod", TestObjectV8Internal::xPathNSResolverMethodMethodCallback, 0, 0},
8511     {"voidMethodDictionaryArg", TestObjectV8Internal::voidMethodDictionaryArgMethodCallback, 0, 1},
8512     {"voidMethodEventListenerArg", TestObjectV8Internal::voidMethodEventListenerArgMethodCallback, 0, 1},
8513     {"voidMethodNodeFilterArg", TestObjectV8Internal::voidMethodNodeFilterArgMethodCallback, 0, 1},
8514     {"voidMethodPromiseArg", TestObjectV8Internal::voidMethodPromiseArgMethodCallback, 0, 1},
8515     {"voidMethodSerializedScriptValueArg", TestObjectV8Internal::voidMethodSerializedScriptValueArgMethodCallback, 0, 1},
8516     {"voidMethodXPathNSResolverArg", TestObjectV8Internal::voidMethodXPathNSResolverArgMethodCallback, 0, 1},
8517     {"voidMethodDictionarySequenceArg", TestObjectV8Internal::voidMethodDictionarySequenceArgMethodCallback, 0, 1},
8518     {"voidMethodStringArgLongArg", TestObjectV8Internal::voidMethodStringArgLongArgMethodCallback, 0, 2},
8519     {"voidMethodOptionalStringArg", TestObjectV8Internal::voidMethodOptionalStringArgMethodCallback, 0, 0},
8520     {"voidMethodOptionalTestInterfaceEmptyArg", TestObjectV8Internal::voidMethodOptionalTestInterfaceEmptyArgMethodCallback, 0, 0},
8521     {"voidMethodOptionalLongArg", TestObjectV8Internal::voidMethodOptionalLongArgMethodCallback, 0, 0},
8522     {"stringMethodOptionalLongArg", TestObjectV8Internal::stringMethodOptionalLongArgMethodCallback, 0, 0},
8523     {"testInterfaceEmptyMethodOptionalLongArg", TestObjectV8Internal::testInterfaceEmptyMethodOptionalLongArgMethodCallback, 0, 0},
8524     {"longMethodOptionalLongArg", TestObjectV8Internal::longMethodOptionalLongArgMethodCallback, 0, 0},
8525     {"voidMethodLongArgOptionalLongArg", TestObjectV8Internal::voidMethodLongArgOptionalLongArgMethodCallback, 0, 1},
8526     {"voidMethodLongArgOptionalLongArgOptionalLongArg", TestObjectV8Internal::voidMethodLongArgOptionalLongArgOptionalLongArgMethodCallback, 0, 1},
8527     {"voidMethodLongArgOptionalTestInterfaceEmptyArg", TestObjectV8Internal::voidMethodLongArgOptionalTestInterfaceEmptyArgMethodCallback, 0, 1},
8528     {"voidMethodTestInterfaceEmptyArgOptionalLongArg", TestObjectV8Internal::voidMethodTestInterfaceEmptyArgOptionalLongArgMethodCallback, 0, 1},
8529     {"voidMethodOptionalDictionaryArg", TestObjectV8Internal::voidMethodOptionalDictionaryArgMethodCallback, 0, 0},
8530     {"voidMethodVariadicStringArg", TestObjectV8Internal::voidMethodVariadicStringArgMethodCallback, 0, 1},
8531     {"voidMethodStringArgVariadicStringArg", TestObjectV8Internal::voidMethodStringArgVariadicStringArgMethodCallback, 0, 2},
8532     {"voidMethodVariadicTestInterfaceEmptyArg", TestObjectV8Internal::voidMethodVariadicTestInterfaceEmptyArgMethodCallback, 0, 1},
8533     {"voidMethodTestInterfaceEmptyArgVariadicTestInterfaceEmptyArg", TestObjectV8Internal::voidMethodTestInterfaceEmptyArgVariadicTestInterfaceEmptyArgMethodCallback, 0, 2},
8534     {"voidMethodVariadicTestInterfaceGarbageCollectedArg", TestObjectV8Internal::voidMethodVariadicTestInterfaceGarbageCollectedArgMethodCallback, 0, 1},
8535     {"voidMethodVariadicTestInterfaceWillBeGarbageCollectedArg", TestObjectV8Internal::voidMethodVariadicTestInterfaceWillBeGarbageCollectedArgMethodCallback, 0, 1},
8536     {"overloadedMethodA", TestObjectV8Internal::overloadedMethodAMethodCallback, 0, 1},
8537     {"overloadedMethodB", TestObjectV8Internal::overloadedMethodBMethodCallback, 0, 1},
8538     {"overloadedMethodC", TestObjectV8Internal::overloadedMethodCMethodCallback, 0, 1},
8539     {"overloadedMethodD", TestObjectV8Internal::overloadedMethodDMethodCallback, 0, 1},
8540     {"overloadedMethodE", TestObjectV8Internal::overloadedMethodEMethodCallback, 0, 1},
8541     {"overloadedMethodF", TestObjectV8Internal::overloadedMethodFMethodCallback, 0, 1},
8542     {"overloadedMethodG", TestObjectV8Internal::overloadedMethodGMethodCallback, 0, 0},
8543     {"overloadedMethodH", TestObjectV8Internal::overloadedMethodHMethodCallback, 0, 0},
8544     {"overloadedMethodI", TestObjectV8Internal::overloadedMethodIMethodCallback, 0, 1},
8545     {"overloadedMethodJ", TestObjectV8Internal::overloadedMethodJMethodCallback, 0, 1},
8546     {"overloadedPerWorldBindingsMethod", TestObjectV8Internal::overloadedPerWorldBindingsMethodMethodCallback, TestObjectV8Internal::overloadedPerWorldBindingsMethodMethodCallbackForMainWorld, 0},
8547     {"voidMethodClampUnsignedShortArg", TestObjectV8Internal::voidMethodClampUnsignedShortArgMethodCallback, 0, 1},
8548     {"voidMethodClampUnsignedLongArg", TestObjectV8Internal::voidMethodClampUnsignedLongArgMethodCallback, 0, 1},
8549     {"voidMethodDefaultUndefinedTestInterfaceEmptyArg", TestObjectV8Internal::voidMethodDefaultUndefinedTestInterfaceEmptyArgMethodCallback, 0, 0},
8550     {"voidMethodDefaultUndefinedLongArg", TestObjectV8Internal::voidMethodDefaultUndefinedLongArgMethodCallback, 0, 0},
8551     {"voidMethodDefaultUndefinedStringArg", TestObjectV8Internal::voidMethodDefaultUndefinedStringArgMethodCallback, 0, 0},
8552     {"voidMethodDefaultNullStringStringArg", TestObjectV8Internal::voidMethodDefaultNullStringStringArgMethodCallback, 0, 0},
8553     {"voidMethodEnforceRangeLongArg", TestObjectV8Internal::voidMethodEnforceRangeLongArgMethodCallback, 0, 1},
8554     {"voidMethodTreatNullAsNullStringStringArg", TestObjectV8Internal::voidMethodTreatNullAsNullStringStringArgMethodCallback, 0, 1},
8555     {"voidMethodTreatNullAsNullStringTreatUndefinedAsNullStringStringArg", TestObjectV8Internal::voidMethodTreatNullAsNullStringTreatUndefinedAsNullStringStringArgMethodCallback, 0, 1},
8556     {"activityLoggingAccessForAllWorldsMethod", TestObjectV8Internal::activityLoggingAccessForAllWorldsMethodMethodCallback, 0, 0},
8557     {"callWithExecutionContextVoidMethod", TestObjectV8Internal::callWithExecutionContextVoidMethodMethodCallback, 0, 0},
8558     {"callWithScriptStateVoidMethod", TestObjectV8Internal::callWithScriptStateVoidMethodMethodCallback, 0, 0},
8559     {"callWithScriptStateLongMethod", TestObjectV8Internal::callWithScriptStateLongMethodMethodCallback, 0, 0},
8560     {"callWithScriptStateExecutionContextVoidMethod", TestObjectV8Internal::callWithScriptStateExecutionContextVoidMethodMethodCallback, 0, 0},
8561     {"callWithScriptStateScriptArgumentsVoidMethod", TestObjectV8Internal::callWithScriptStateScriptArgumentsVoidMethodMethodCallback, 0, 0},
8562     {"callWithScriptStateScriptArgumentsVoidMethodOptionalBooleanArg", TestObjectV8Internal::callWithScriptStateScriptArgumentsVoidMethodOptionalBooleanArgMethodCallback, 0, 0},
8563     {"callWithActiveWindow", TestObjectV8Internal::callWithActiveWindowMethodCallback, 0, 0},
8564     {"callWithActiveWindowScriptWindow", TestObjectV8Internal::callWithActiveWindowScriptWindowMethodCallback, 0, 0},
8565     {"checkSecurityForNodeVoidMethod", TestObjectV8Internal::checkSecurityForNodeVoidMethodMethodCallback, 0, 0},
8566 #if ENABLE(CONDITION)
8567     {"conditionalConditionVoidMethod", TestObjectV8Internal::conditionalConditionVoidMethodMethodCallback, 0, 0},
8568 #endif // ENABLE(CONDITION)
8569 #if ENABLE(CONDITION_1) && ENABLE(CONDITION_2)
8570     {"conditionalCondition1AndCondition2VoidMethod", TestObjectV8Internal::conditionalCondition1AndCondition2VoidMethodMethodCallback, 0, 0},
8571 #endif // ENABLE(CONDITION_1) && ENABLE(CONDITION_2)
8572     {"customVoidMethod", TestObjectV8Internal::customVoidMethodMethodCallback, 0, 0},
8573 #if ENABLE(CONDITION)
8574     {"conditionalConditionCustomVoidMethod", TestObjectV8Internal::conditionalConditionCustomVoidMethodMethodCallback, 0, 0},
8575 #endif // ENABLE(CONDITION)
8576     {"customElementCallbacksVoidMethod", TestObjectV8Internal::customElementCallbacksVoidMethodMethodCallback, 0, 0},
8577     {"deprecatedVoidMethod", TestObjectV8Internal::deprecatedVoidMethodMethodCallback, 0, 0},
8578     {"implementedAsVoidMethod", TestObjectV8Internal::implementedAsVoidMethodMethodCallback, 0, 0},
8579     {"measureAsVoidMethod", TestObjectV8Internal::measureAsVoidMethodMethodCallback, 0, 0},
8580     {"DeprecateAsOverloadedMethod", TestObjectV8Internal::DeprecateAsOverloadedMethodMethodCallback, 0, 0},
8581     {"DeprecateAsSameValueOverloadedMethod", TestObjectV8Internal::DeprecateAsSameValueOverloadedMethodMethodCallback, 0, 0},
8582     {"measureAsOverloadedMethod", TestObjectV8Internal::measureAsOverloadedMethodMethodCallback, 0, 0},
8583     {"measureAsSameValueOverloadedMethod", TestObjectV8Internal::measureAsSameValueOverloadedMethodMethodCallback, 0, 0},
8584     {"deprecateAsMeasureAsSameValueOverloadedMethod", TestObjectV8Internal::deprecateAsMeasureAsSameValueOverloadedMethodMethodCallback, 0, 0},
8585     {"deprecateAsSameValueMeasureAsOverloadedMethod", TestObjectV8Internal::deprecateAsSameValueMeasureAsOverloadedMethodMethodCallback, 0, 0},
8586     {"deprecateAsSameValueMeasureAsSameValueOverloadedMethod", TestObjectV8Internal::deprecateAsSameValueMeasureAsSameValueOverloadedMethodMethodCallback, 0, 0},
8587     {"perWorldBindingsVoidMethod", TestObjectV8Internal::perWorldBindingsVoidMethodMethodCallback, TestObjectV8Internal::perWorldBindingsVoidMethodMethodCallbackForMainWorld, 0},
8588     {"perWorldBindingsVoidMethodTestInterfaceEmptyArg", TestObjectV8Internal::perWorldBindingsVoidMethodTestInterfaceEmptyArgMethodCallback, TestObjectV8Internal::perWorldBindingsVoidMethodTestInterfaceEmptyArgMethodCallbackForMainWorld, 1},
8589     {"activityLoggingForAllWorldsPerWorldBindingsVoidMethod", TestObjectV8Internal::activityLoggingForAllWorldsPerWorldBindingsVoidMethodMethodCallback, TestObjectV8Internal::activityLoggingForAllWorldsPerWorldBindingsVoidMethodMethodCallbackForMainWorld, 0},
8590     {"activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethod", TestObjectV8Internal::activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethodMethodCallback, TestObjectV8Internal::activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethodMethodCallbackForMainWorld, 0},
8591     {"raisesExceptionVoidMethod", TestObjectV8Internal::raisesExceptionVoidMethodMethodCallback, 0, 0},
8592     {"raisesExceptionStringMethod", TestObjectV8Internal::raisesExceptionStringMethodMethodCallback, 0, 0},
8593     {"raisesExceptionVoidMethodOptionalLongArg", TestObjectV8Internal::raisesExceptionVoidMethodOptionalLongArgMethodCallback, 0, 0},
8594     {"raisesExceptionVoidMethodTestCallbackInterfaceArg", TestObjectV8Internal::raisesExceptionVoidMethodTestCallbackInterfaceArgMethodCallback, 0, 1},
8595     {"raisesExceptionVoidMethodOptionalTestCallbackInterfaceArg", TestObjectV8Internal::raisesExceptionVoidMethodOptionalTestCallbackInterfaceArgMethodCallback, 0, 0},
8596     {"raisesExceptionTestInterfaceEmptyVoidMethod", TestObjectV8Internal::raisesExceptionTestInterfaceEmptyVoidMethodMethodCallback, 0, 0},
8597     {"callWithExecutionContextRaisesExceptionVoidMethodLongArg", TestObjectV8Internal::callWithExecutionContextRaisesExceptionVoidMethodLongArgMethodCallback, 0, 1},
8598     {"treatReturnedNullStringAsNullStringMethod", TestObjectV8Internal::treatReturnedNullStringAsNullStringMethodMethodCallback, 0, 0},
8599     {"treatReturnedNullStringAsUndefinedStringMethod", TestObjectV8Internal::treatReturnedNullStringAsUndefinedStringMethodMethodCallback, 0, 0},
8600     {"typeCheckingInterfaceVoidMethodTestInterfaceEmptyArg", TestObjectV8Internal::typeCheckingInterfaceVoidMethodTestInterfaceEmptyArgMethodCallback, 0, 1},
8601     {"typeCheckingNullableVoidMethodTestInterfaceEmptyOrNullArg", TestObjectV8Internal::typeCheckingNullableVoidMethodTestInterfaceEmptyOrNullArgMethodCallback, 0, 1},
8602     {"typeCheckingInterfaceNullableVoidMethodTestInterfaceEmptyOrNullArg", TestObjectV8Internal::typeCheckingInterfaceNullableVoidMethodTestInterfaceEmptyOrNullArgMethodCallback, 0, 1},
8603     {"typeCheckingUnrestrictedVoidMethodFloatArgDoubleArg", TestObjectV8Internal::typeCheckingUnrestrictedVoidMethodFloatArgDoubleArgMethodCallback, 0, 2},
8604     {"voidMethodTestInterfaceGarbageCollectedSequenceArg", TestObjectV8Internal::voidMethodTestInterfaceGarbageCollectedSequenceArgMethodCallback, 0, 1},
8605     {"voidMethodTestInterfaceGarbageCollectedArrayArg", TestObjectV8Internal::voidMethodTestInterfaceGarbageCollectedArrayArgMethodCallback, 0, 1},
8606     {"voidMethodTestInterfaceWillBeGarbageCollectedSequenceArg", TestObjectV8Internal::voidMethodTestInterfaceWillBeGarbageCollectedSequenceArgMethodCallback, 0, 1},
8607     {"voidMethodTestInterfaceWillBeGarbageCollectedArrayArg", TestObjectV8Internal::voidMethodTestInterfaceWillBeGarbageCollectedArrayArgMethodCallback, 0, 1},
8608 };
8609
8610 static void configureV8TestObjectTemplate(v8::Handle<v8::FunctionTemplate> functionTemplate, v8::Isolate* isolate)
8611 {
8612     functionTemplate->ReadOnlyPrototype();
8613
8614     v8::Local<v8::Signature> defaultSignature;
8615     defaultSignature = V8DOMConfiguration::installDOMClassTemplate(functionTemplate, "TestObject", v8::Local<v8::FunctionTemplate>(), V8TestObject::internalFieldCount,
8616         V8TestObjectAttributes, WTF_ARRAY_LENGTH(V8TestObjectAttributes),
8617         V8TestObjectAccessors, WTF_ARRAY_LENGTH(V8TestObjectAccessors),
8618         V8TestObjectMethods, WTF_ARRAY_LENGTH(V8TestObjectMethods),
8619         isolate);
8620     v8::Local<v8::ObjectTemplate> instanceTemplate ALLOW_UNUSED = functionTemplate->InstanceTemplate();
8621     v8::Local<v8::ObjectTemplate> prototypeTemplate ALLOW_UNUSED = functionTemplate->PrototypeTemplate();
8622     if (RuntimeEnabledFeatures::featureNameEnabled()) {
8623         static const V8DOMConfiguration::AttributeConfiguration attributeConfiguration =\
8624         {"runtimeEnabledLongAttribute", TestObjectV8Internal::runtimeEnabledLongAttributeAttributeGetterCallback, TestObjectV8Internal::runtimeEnabledLongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */};
8625         V8DOMConfiguration::installAttribute(instanceTemplate, prototypeTemplate, attributeConfiguration, isolate);
8626     }
8627 #if ENABLE(CONDITION)
8628     if (RuntimeEnabledFeatures::featureNameEnabled()) {
8629         static const V8DOMConfiguration::AttributeConfiguration attributeConfiguration =\
8630         {"conditionalRuntimeEnabledLongAttribute", TestObjectV8Internal::conditionalRuntimeEnabledLongAttributeAttributeGetterCallback, TestObjectV8Internal::conditionalRuntimeEnabledLongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */};
8631         V8DOMConfiguration::installAttribute(instanceTemplate, prototypeTemplate, attributeConfiguration, isolate);
8632     }
8633 #endif // ENABLE(CONDITION)
8634     static const V8DOMConfiguration::ConstantConfiguration V8TestObjectConstants[] = {
8635         {"CONST_VALUE_0", 0},
8636         {"CONST_VALUE_1", 1},
8637         {"CONST_VALUE_2", 2},
8638         {"CONST_VALUE_4", 4},
8639         {"CONST_VALUE_8", 8},
8640         {"CONST_VALUE_9", -1},
8641         {"CONST_VALUE_10", "my constant string"},
8642         {"CONST_VALUE_11", 0xffffffff},
8643         {"CONST_VALUE_12", 0x01},
8644         {"CONST_VALUE_13", 0X20},
8645         {"CONST_VALUE_14", 0x1abc},
8646         {"CONST_VALUE_15", 010},
8647         {"CONST_VALUE_16", -010},
8648         {"CONST_VALUE_16", -0x1A},
8649         {"CONST_VALUE_17", -0X1a},
8650         {"DEPRECATED_CONSTANT", 1},
8651         {"CONST_JAVASCRIPT", 1},
8652     };
8653     V8DOMConfiguration::installConstants(functionTemplate, prototypeTemplate, V8TestObjectConstants, WTF_ARRAY_LENGTH(V8TestObjectConstants), isolate);
8654     if (RuntimeEnabledFeatures::featureNameEnabled()) {
8655         static const V8DOMConfiguration::ConstantConfiguration constantConfiguration = {"FEATURE_ENABLED_CONST", static_cast<signed int>(1)};
8656         V8DOMConfiguration::installConstants(functionTemplate, prototypeTemplate, &constantConfiguration, 1, isolate);
8657     }
8658     COMPILE_ASSERT(0 == TestObject::CONST_VALUE_0, TheValueOfTestObject_CONST_VALUE_0DoesntMatchWithImplementation);
8659     COMPILE_ASSERT(1 == TestObject::CONST_VALUE_1, TheValueOfTestObject_CONST_VALUE_1DoesntMatchWithImplementation);
8660     COMPILE_ASSERT(2 == TestObject::CONST_VALUE_2, TheValueOfTestObject_CONST_VALUE_2DoesntMatchWithImplementation);
8661     COMPILE_ASSERT(4 == TestObject::CONST_VALUE_4, TheValueOfTestObject_CONST_VALUE_4DoesntMatchWithImplementation);
8662     COMPILE_ASSERT(8 == TestObject::CONST_VALUE_8, TheValueOfTestObject_CONST_VALUE_8DoesntMatchWithImplementation);
8663     COMPILE_ASSERT(-1 == TestObject::CONST_VALUE_9, TheValueOfTestObject_CONST_VALUE_9DoesntMatchWithImplementation);
8664     COMPILE_ASSERT("my constant string" == TestObject::CONST_VALUE_10, TheValueOfTestObject_CONST_VALUE_10DoesntMatchWithImplementation);
8665     COMPILE_ASSERT(0xffffffff == TestObject::CONST_VALUE_11, TheValueOfTestObject_CONST_VALUE_11DoesntMatchWithImplementation);
8666     COMPILE_ASSERT(0x01 == TestObject::CONST_VALUE_12, TheValueOfTestObject_CONST_VALUE_12DoesntMatchWithImplementation);
8667     COMPILE_ASSERT(0X20 == TestObject::CONST_VALUE_13, TheValueOfTestObject_CONST_VALUE_13DoesntMatchWithImplementation);
8668     COMPILE_ASSERT(0x1abc == TestObject::CONST_VALUE_14, TheValueOfTestObject_CONST_VALUE_14DoesntMatchWithImplementation);
8669     COMPILE_ASSERT(010 == TestObject::CONST_VALUE_15, TheValueOfTestObject_CONST_VALUE_15DoesntMatchWithImplementation);
8670     COMPILE_ASSERT(-010 == TestObject::CONST_VALUE_16, TheValueOfTestObject_CONST_VALUE_16DoesntMatchWithImplementation);
8671     COMPILE_ASSERT(-0x1A == TestObject::CONST_VALUE_16, TheValueOfTestObject_CONST_VALUE_16DoesntMatchWithImplementation);
8672     COMPILE_ASSERT(-0X1a == TestObject::CONST_VALUE_17, TheValueOfTestObject_CONST_VALUE_17DoesntMatchWithImplementation);
8673     COMPILE_ASSERT(1 == TestObject::DEPRECATED_CONSTANT, TheValueOfTestObject_DEPRECATED_CONSTANTDoesntMatchWithImplementation);
8674     COMPILE_ASSERT(1 == TestObject::FEATURE_ENABLED_CONST, TheValueOfTestObject_FEATURE_ENABLED_CONSTDoesntMatchWithImplementation);
8675     COMPILE_ASSERT(1 == TestObject::CONST_IMPL, TheValueOfTestObject_CONST_IMPLDoesntMatchWithImplementation);
8676     functionTemplate->Set(v8AtomicString(isolate, "staticVoidMethod"), v8::FunctionTemplate::New(isolate, TestObjectV8Internal::staticVoidMethodMethodCallback, v8Undefined(), v8::Local<v8::Signature>(), 0));
8677     functionTemplate->Set(v8AtomicString(isolate, "overloadedStaticMethod"), v8::FunctionTemplate::New(isolate, TestObjectV8Internal::overloadedStaticMethodMethodCallback, v8Undefined(), v8::Local<v8::Signature>(), 1));
8678 #if ENABLE(CONDITION)
8679     functionTemplate->Set(v8AtomicString(isolate, "conditionalConditionStaticVoidMethod"), v8::FunctionTemplate::New(isolate, TestObjectV8Internal::conditionalConditionStaticVoidMethodMethodCallback, v8Undefined(), v8::Local<v8::Signature>(), 0));
8680 #endif // ENABLE(CONDITION)
8681     prototypeTemplate->Set(v8AtomicString(isolate, "doNotCheckSignatureVoidMethod"), v8::FunctionTemplate::New(isolate, TestObjectV8Internal::doNotCheckSignatureVoidMethodMethodCallback, v8Undefined(), v8::Local<v8::Signature>(), 0));
8682     prototypeTemplate->Set(v8AtomicString(isolate, "notEnumerableVoidMethod"), v8::FunctionTemplate::New(isolate, TestObjectV8Internal::notEnumerableVoidMethodMethodCallback, v8Undefined(), defaultSignature, 0), static_cast<v8::PropertyAttribute>(v8::DontDelete | v8::DontEnum));
8683     prototypeTemplate->Set(v8AtomicString(isolate, "readOnlyVoidMethod"), v8::FunctionTemplate::New(isolate, TestObjectV8Internal::readOnlyVoidMethodMethodCallback, v8Undefined(), defaultSignature, 0), static_cast<v8::PropertyAttribute>(v8::DontDelete | v8::ReadOnly));
8684     prototypeTemplate->Set(v8AtomicString(isolate, "notEnumerableReadOnlyVoidMethod"), v8::FunctionTemplate::New(isolate, TestObjectV8Internal::notEnumerableReadOnlyVoidMethodMethodCallback, v8Undefined(), defaultSignature, 0), static_cast<v8::PropertyAttribute>(v8::DontDelete | v8::DontEnum | v8::ReadOnly));
8685     if (RuntimeEnabledFeatures::featureNameEnabled())
8686         prototypeTemplate->Set(v8AtomicString(isolate, "runtimeEnabledVoidMethod"), v8::FunctionTemplate::New(isolate, TestObjectV8Internal::runtimeEnabledVoidMethodMethodCallback, v8Undefined(), defaultSignature, 0));
8687     if (DOMWrapperWorld::current(isolate).isMainWorld()) {
8688         if (RuntimeEnabledFeatures::featureNameEnabled())
8689             prototypeTemplate->Set(v8AtomicString(isolate, "perWorldBindingsRuntimeEnabledVoidMethod"), v8::FunctionTemplate::New(isolate, TestObjectV8Internal::perWorldBindingsRuntimeEnabledVoidMethodMethodCallbackForMainWorld, v8Undefined(), defaultSignature, 0));
8690     } else {
8691         if (RuntimeEnabledFeatures::featureNameEnabled())
8692             prototypeTemplate->Set(v8AtomicString(isolate, "perWorldBindingsRuntimeEnabledVoidMethod"), v8::FunctionTemplate::New(isolate, TestObjectV8Internal::perWorldBindingsRuntimeEnabledVoidMethodMethodCallback, v8Undefined(), defaultSignature, 0));
8693     }
8694     instanceTemplate->Set(v8AtomicString(isolate, "unforgeableVoidMethod"), v8::FunctionTemplate::New(isolate, TestObjectV8Internal::unforgeableVoidMethodMethodCallback, v8Undefined(), defaultSignature, 0));
8695     functionTemplate->SetNativeDataProperty(v8AtomicString(isolate, "staticStringAttribute"), TestObjectV8Internal::staticStringAttributeAttributeGetterCallback, TestObjectV8Internal::staticStringAttributeAttributeSetterCallback, v8::External::New(isolate, 0), static_cast<v8::PropertyAttribute>(v8::None), v8::Handle<v8::AccessorSignature>(), static_cast<v8::AccessControl>(v8::DEFAULT));
8696     functionTemplate->SetNativeDataProperty(v8AtomicString(isolate, "staticLongAttribute"), TestObjectV8Internal::staticLongAttributeAttributeGetterCallback, TestObjectV8Internal::staticLongAttributeAttributeSetterCallback, v8::External::New(isolate, 0), static_cast<v8::PropertyAttribute>(v8::None), v8::Handle<v8::AccessorSignature>(), static_cast<v8::AccessControl>(v8::DEFAULT));
8697
8698     // Custom toString template
8699     functionTemplate->Set(v8AtomicString(isolate, "toString"), V8PerIsolateData::from(isolate)->toStringTemplate());
8700 }
8701
8702 v8::Handle<v8::FunctionTemplate> V8TestObject::domTemplate(v8::Isolate* isolate)
8703 {
8704     V8PerIsolateData* data = V8PerIsolateData::from(isolate);
8705     v8::Local<v8::FunctionTemplate> result = data->existingDOMTemplate(const_cast<WrapperTypeInfo*>(&wrapperTypeInfo));
8706     if (!result.IsEmpty())
8707         return result;
8708
8709     TRACE_EVENT_SCOPED_SAMPLING_STATE("Blink", "BuildDOMTemplate");
8710     result = v8::FunctionTemplate::New(isolate, V8ObjectConstructor::isValidConstructorMode);
8711     configureV8TestObjectTemplate(result, isolate);
8712     data->setDOMTemplate(const_cast<WrapperTypeInfo*>(&wrapperTypeInfo), result);
8713     return result;
8714 }
8715
8716 bool V8TestObject::hasInstance(v8::Handle<v8::Value> v8Value, v8::Isolate* isolate)
8717 {
8718     return V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, v8Value);
8719 }
8720
8721 v8::Handle<v8::Object> V8TestObject::findInstanceInPrototypeChain(v8::Handle<v8::Value> v8Value, v8::Isolate* isolate)
8722 {
8723     return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrapperTypeInfo, v8Value);
8724 }
8725
8726 TestObject* V8TestObject::toNativeWithTypeCheck(v8::Isolate* isolate, v8::Handle<v8::Value> value)
8727 {
8728     return hasInstance(value, isolate) ? fromInternalPointer(v8::Handle<v8::Object>::Cast(value)->GetAlignedPointerFromInternalField(v8DOMWrapperObjectIndex)) : 0;
8729 }
8730
8731 void V8TestObject::installPerContextEnabledProperties(v8::Handle<v8::Object> instanceTemplate, TestObject* impl, v8::Isolate* isolate)
8732 {
8733     v8::Local<v8::Object> prototypeTemplate = v8::Local<v8::Object>::Cast(instanceTemplate->GetPrototype());
8734     if (ContextFeatures::featureNameEnabled(impl->document())) {
8735         static const V8DOMConfiguration::AttributeConfiguration attributeConfiguration =\
8736         {"perContextEnabledLongAttribute", TestObjectV8Internal::perContextEnabledLongAttributeAttributeGetterCallback, TestObjectV8Internal::perContextEnabledLongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */};
8737         V8DOMConfiguration::installAttribute(instanceTemplate, prototypeTemplate, attributeConfiguration, isolate);
8738     }
8739     if (ContextFeatures::featureNameEnabled(impl->document())) {
8740         static const V8DOMConfiguration::AttributeConfiguration attributeConfiguration =\
8741         {"perContextEnabledRuntimeEnabledLongAttribute", TestObjectV8Internal::perContextEnabledRuntimeEnabledLongAttributeAttributeGetterCallback, TestObjectV8Internal::perContextEnabledRuntimeEnabledLongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */};
8742         V8DOMConfiguration::installAttribute(instanceTemplate, prototypeTemplate, attributeConfiguration, isolate);
8743     }
8744 }
8745
8746 void V8TestObject::installPerContextEnabledMethods(v8::Handle<v8::Object> prototypeTemplate, v8::Isolate* isolate)
8747 {
8748     v8::Local<v8::Signature> defaultSignature = v8::Signature::New(isolate, domTemplate(isolate));
8749
8750     ExecutionContext* context = toExecutionContext(prototypeTemplate->CreationContext());
8751     if (context && context->isDocument() && ContextFeatures::featureNameEnabled(toDocument(context)))
8752         prototypeTemplate->Set(v8AtomicString(isolate, "perContextEnabledVoidMethod"), v8::FunctionTemplate::New(isolate, TestObjectV8Internal::perContextEnabledVoidMethodMethodCallback, v8Undefined(), defaultSignature, 0)->GetFunction());
8753 }
8754
8755 v8::Handle<v8::Object> V8TestObject::createWrapper(PassRefPtr<TestObject> impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
8756 {
8757     ASSERT(impl);
8758     ASSERT(!DOMDataStore::containsWrapper<V8TestObject>(impl.get(), isolate));
8759     if (ScriptWrappable::wrapperCanBeStoredInObject(impl.get())) {
8760         const WrapperTypeInfo* actualInfo = ScriptWrappable::fromObject(impl.get())->typeInfo();
8761         // Might be a XXXConstructor::wrapperTypeInfo instead of an XXX::wrapperTypeInfo. These will both have
8762         // the same object de-ref functions, though, so use that as the basis of the check.
8763         RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(actualInfo->derefObjectFunction == wrapperTypeInfo.derefObjectFunction);
8764     }
8765
8766     v8::Handle<v8::Object> wrapper = V8DOMWrapper::createWrapper(creationContext, &wrapperTypeInfo, toInternalPointer(impl.get()), isolate);
8767     if (UNLIKELY(wrapper.IsEmpty()))
8768         return wrapper;
8769
8770     installPerContextEnabledProperties(wrapper, impl.get(), isolate);
8771     V8DOMWrapper::associateObjectWithWrapper<V8TestObject>(impl, &wrapperTypeInfo, wrapper, isolate, WrapperConfiguration::Independent);
8772     return wrapper;
8773 }
8774
8775 void V8TestObject::derefObject(void* object)
8776 {
8777     fromInternalPointer(object)->deref();
8778 }
8779
8780 template<>
8781 v8::Handle<v8::Value> toV8NoInline(TestObject* impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
8782 {
8783     return toV8(impl, creationContext, isolate);
8784 }
8785
8786 } // namespace WebCore