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.
5 // This file has been auto-generated by code_generator_v8.py. DO NOT MODIFY!
8 #include "V8TestObject.h"
10 #include "HTMLNames.h"
11 #include "RuntimeEnabledFeatures.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"
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"
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"
63 static void initializeScriptWrappableForInterface(TestObject* object)
65 if (ScriptWrappable::wrapperCanBeStoredInObject(object))
66 ScriptWrappable::fromObject(object)->setTypeInfo(&V8TestObject::wrapperTypeInfo);
71 } // namespace WebCore
73 void webCoreInitializeScriptWrappableForInterface(WebCore::TestObject* object)
75 WebCore::initializeScriptWrappableForInterface(object);
79 const WrapperTypeInfo V8TestObject::wrapperTypeInfo = { gin::kEmbedderBlink, V8TestObject::domTemplate, V8TestObject::derefObject, 0, 0, 0, V8TestObject::installPerContextEnabledMethods, 0, WrapperTypeObjectPrototype, RefCountedObject };
81 namespace TestObjectV8Internal {
83 template <typename T> void V8_USE(T) { }
85 static void readonlyStringAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
87 v8::Handle<v8::Object> holder = info.Holder();
88 TestObject* impl = V8TestObject::toNative(holder);
89 v8SetReturnValueString(info, impl->readonlyStringAttribute(), info.GetIsolate());
92 static void readonlyStringAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
94 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
95 TestObjectV8Internal::readonlyStringAttributeAttributeGetter(info);
96 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
99 static void readonlyTestInterfaceEmptyAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
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()))
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);
113 static void readonlyTestInterfaceEmptyAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
115 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
116 TestObjectV8Internal::readonlyTestInterfaceEmptyAttributeAttributeGetter(info);
117 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
120 static void readonlyLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
122 v8::Handle<v8::Object> holder = info.Holder();
123 TestObject* impl = V8TestObject::toNative(holder);
124 v8SetReturnValueInt(info, impl->readonlyLongAttribute());
127 static void readonlyLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
129 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
130 TestObjectV8Internal::readonlyLongAttributeAttributeGetter(info);
131 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
134 static void dateAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
136 v8::Handle<v8::Object> holder = info.Holder();
137 TestObject* impl = V8TestObject::toNative(holder);
138 v8SetReturnValue(info, v8DateOrNaN(impl->dateAttribute(), info.GetIsolate()));
141 static void dateAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
143 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
144 TestObjectV8Internal::dateAttributeAttributeGetter(info);
145 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
148 static void dateAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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);
156 static void dateAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
158 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
159 TestObjectV8Internal::dateAttributeAttributeSetter(v8Value, info);
160 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
163 static void stringAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
165 v8::Handle<v8::Object> holder = info.Holder();
166 TestObject* impl = V8TestObject::toNative(holder);
167 v8SetReturnValueString(info, impl->stringAttribute(), info.GetIsolate());
170 static void stringAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
172 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
173 TestObjectV8Internal::stringAttributeAttributeGetter(info);
174 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
177 static void stringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
179 v8::Handle<v8::Object> holder = info.Holder();
180 TestObject* impl = V8TestObject::toNative(holder);
181 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value);
182 impl->setStringAttribute(cppValue);
185 static void stringAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
187 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
188 TestObjectV8Internal::stringAttributeAttributeSetter(v8Value, info);
189 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
192 static void domTimeStampAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
194 v8::Handle<v8::Object> holder = info.Holder();
195 TestObject* impl = V8TestObject::toNative(holder);
196 v8SetReturnValue(info, static_cast<double>(impl->domTimeStampAttribute()));
199 static void domTimeStampAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
201 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
202 TestObjectV8Internal::domTimeStampAttributeAttributeGetter(info);
203 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
206 static void domTimeStampAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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);
215 static void domTimeStampAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
217 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
218 TestObjectV8Internal::domTimeStampAttributeAttributeSetter(v8Value, info);
219 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
222 static void booleanAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
224 v8::Handle<v8::Object> holder = info.Holder();
225 TestObject* impl = V8TestObject::toNative(holder);
226 v8SetReturnValueBool(info, impl->booleanAttribute());
229 static void booleanAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
231 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
232 TestObjectV8Internal::booleanAttributeAttributeGetter(info);
233 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
236 static void booleanAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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);
244 static void booleanAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
246 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
247 TestObjectV8Internal::booleanAttributeAttributeSetter(v8Value, info);
248 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
251 static void byteAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
253 v8::Handle<v8::Object> holder = info.Holder();
254 TestObject* impl = V8TestObject::toNative(holder);
255 v8SetReturnValueInt(info, impl->byteAttribute());
258 static void byteAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
260 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
261 TestObjectV8Internal::byteAttributeAttributeGetter(info);
262 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
265 static void byteAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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);
274 static void byteAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
276 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
277 TestObjectV8Internal::byteAttributeAttributeSetter(v8Value, info);
278 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
281 static void doubleAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
283 v8::Handle<v8::Object> holder = info.Holder();
284 TestObject* impl = V8TestObject::toNative(holder);
285 v8SetReturnValue(info, impl->doubleAttribute());
288 static void doubleAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
290 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
291 TestObjectV8Internal::doubleAttributeAttributeGetter(info);
292 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
295 static void doubleAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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);
303 static void doubleAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
305 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
306 TestObjectV8Internal::doubleAttributeAttributeSetter(v8Value, info);
307 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
310 static void floatAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
312 v8::Handle<v8::Object> holder = info.Holder();
313 TestObject* impl = V8TestObject::toNative(holder);
314 v8SetReturnValue(info, impl->floatAttribute());
317 static void floatAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
319 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
320 TestObjectV8Internal::floatAttributeAttributeGetter(info);
321 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
324 static void floatAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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);
332 static void floatAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
334 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
335 TestObjectV8Internal::floatAttributeAttributeSetter(v8Value, info);
336 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
339 static void longAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
341 v8::Handle<v8::Object> holder = info.Holder();
342 TestObject* impl = V8TestObject::toNative(holder);
343 v8SetReturnValueInt(info, impl->longAttribute());
346 static void longAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
348 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
349 TestObjectV8Internal::longAttributeAttributeGetter(info);
350 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
353 static void longAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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);
362 static void longAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
364 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
365 TestObjectV8Internal::longAttributeAttributeSetter(v8Value, info);
366 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
369 static void longLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
371 v8::Handle<v8::Object> holder = info.Holder();
372 TestObject* impl = V8TestObject::toNative(holder);
373 v8SetReturnValue(info, static_cast<double>(impl->longLongAttribute()));
376 static void longLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
378 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
379 TestObjectV8Internal::longLongAttributeAttributeGetter(info);
380 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
383 static void longLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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);
392 static void longLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
394 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
395 TestObjectV8Internal::longLongAttributeAttributeSetter(v8Value, info);
396 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
399 static void octetAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
401 v8::Handle<v8::Object> holder = info.Holder();
402 TestObject* impl = V8TestObject::toNative(holder);
403 v8SetReturnValueUnsigned(info, impl->octetAttribute());
406 static void octetAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
408 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
409 TestObjectV8Internal::octetAttributeAttributeGetter(info);
410 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
413 static void octetAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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);
422 static void octetAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
424 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
425 TestObjectV8Internal::octetAttributeAttributeSetter(v8Value, info);
426 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
429 static void shortAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
431 v8::Handle<v8::Object> holder = info.Holder();
432 TestObject* impl = V8TestObject::toNative(holder);
433 v8SetReturnValueInt(info, impl->shortAttribute());
436 static void shortAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
438 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
439 TestObjectV8Internal::shortAttributeAttributeGetter(info);
440 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
443 static void shortAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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);
452 static void shortAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
454 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
455 TestObjectV8Internal::shortAttributeAttributeSetter(v8Value, info);
456 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
459 static void unrestrictedDoubleAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
461 v8::Handle<v8::Object> holder = info.Holder();
462 TestObject* impl = V8TestObject::toNative(holder);
463 v8SetReturnValue(info, impl->unrestrictedDoubleAttribute());
466 static void unrestrictedDoubleAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
468 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
469 TestObjectV8Internal::unrestrictedDoubleAttributeAttributeGetter(info);
470 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
473 static void unrestrictedDoubleAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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);
481 static void unrestrictedDoubleAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
483 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
484 TestObjectV8Internal::unrestrictedDoubleAttributeAttributeSetter(v8Value, info);
485 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
488 static void unrestrictedFloatAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
490 v8::Handle<v8::Object> holder = info.Holder();
491 TestObject* impl = V8TestObject::toNative(holder);
492 v8SetReturnValue(info, impl->unrestrictedFloatAttribute());
495 static void unrestrictedFloatAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
497 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
498 TestObjectV8Internal::unrestrictedFloatAttributeAttributeGetter(info);
499 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
502 static void unrestrictedFloatAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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);
510 static void unrestrictedFloatAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
512 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
513 TestObjectV8Internal::unrestrictedFloatAttributeAttributeSetter(v8Value, info);
514 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
517 static void unsignedLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
519 v8::Handle<v8::Object> holder = info.Holder();
520 TestObject* impl = V8TestObject::toNative(holder);
521 v8SetReturnValueUnsigned(info, impl->unsignedLongAttribute());
524 static void unsignedLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
526 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
527 TestObjectV8Internal::unsignedLongAttributeAttributeGetter(info);
528 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
531 static void unsignedLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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);
540 static void unsignedLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
542 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
543 TestObjectV8Internal::unsignedLongAttributeAttributeSetter(v8Value, info);
544 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
547 static void unsignedLongLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
549 v8::Handle<v8::Object> holder = info.Holder();
550 TestObject* impl = V8TestObject::toNative(holder);
551 v8SetReturnValue(info, static_cast<double>(impl->unsignedLongLongAttribute()));
554 static void unsignedLongLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
556 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
557 TestObjectV8Internal::unsignedLongLongAttributeAttributeGetter(info);
558 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
561 static void unsignedLongLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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);
570 static void unsignedLongLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
572 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
573 TestObjectV8Internal::unsignedLongLongAttributeAttributeSetter(v8Value, info);
574 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
577 static void unsignedShortAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
579 v8::Handle<v8::Object> holder = info.Holder();
580 TestObject* impl = V8TestObject::toNative(holder);
581 v8SetReturnValueUnsigned(info, impl->unsignedShortAttribute());
584 static void unsignedShortAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
586 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
587 TestObjectV8Internal::unsignedShortAttributeAttributeGetter(info);
588 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
591 static void unsignedShortAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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);
600 static void unsignedShortAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
602 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
603 TestObjectV8Internal::unsignedShortAttributeAttributeSetter(v8Value, info);
604 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
607 static void testInterfaceEmptyAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
609 v8::Handle<v8::Object> holder = info.Holder();
610 TestObject* impl = V8TestObject::toNative(holder);
611 v8SetReturnValueFast(info, WTF::getPtr(impl->testInterfaceEmptyAttribute()), impl);
614 static void testInterfaceEmptyAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
616 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
617 TestObjectV8Internal::testInterfaceEmptyAttributeAttributeGetter(info);
618 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
621 static void testInterfaceEmptyAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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));
629 static void testInterfaceEmptyAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
631 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
632 TestObjectV8Internal::testInterfaceEmptyAttributeAttributeSetter(v8Value, info);
633 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
636 static void testObjectAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
638 v8::Handle<v8::Object> holder = info.Holder();
639 TestObject* impl = V8TestObject::toNative(holder);
640 v8SetReturnValueFast(info, WTF::getPtr(impl->testObjectAttribute()), impl);
643 static void testObjectAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
645 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
646 TestObjectV8Internal::testObjectAttributeAttributeGetter(info);
647 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
650 static void testObjectAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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));
658 static void testObjectAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
660 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
661 TestObjectV8Internal::testObjectAttributeAttributeSetter(v8Value, info);
662 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
665 static void voidCallbackFunctionAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
667 v8::Handle<v8::Object> holder = info.Holder();
668 TestObject* impl = V8TestObject::toNative(holder);
669 v8SetReturnValue(info, impl->voidCallbackFunctionAttribute().v8Value());
672 static void voidCallbackFunctionAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
674 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
675 TestObjectV8Internal::voidCallbackFunctionAttributeAttributeGetter(info);
676 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
679 static void voidCallbackFunctionAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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);
687 static void voidCallbackFunctionAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
689 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
690 TestObjectV8Internal::voidCallbackFunctionAttributeAttributeSetter(v8Value, info);
691 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
694 static void anyCallbackFunctionOptionalAnyArgAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
696 v8::Handle<v8::Object> holder = info.Holder();
697 TestObject* impl = V8TestObject::toNative(holder);
698 v8SetReturnValue(info, impl->anyCallbackFunctionOptionalAnyArgAttribute().v8Value());
701 static void anyCallbackFunctionOptionalAnyArgAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
703 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
704 TestObjectV8Internal::anyCallbackFunctionOptionalAnyArgAttributeAttributeGetter(info);
705 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
708 static void anyCallbackFunctionOptionalAnyArgAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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);
716 static void anyCallbackFunctionOptionalAnyArgAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
718 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
719 TestObjectV8Internal::anyCallbackFunctionOptionalAnyArgAttributeAttributeSetter(v8Value, info);
720 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
723 static void cssAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
725 v8::Handle<v8::Object> holder = info.Holder();
726 TestObject* impl = V8TestObject::toNative(holder);
727 v8SetReturnValueInt(info, impl->cssAttribute());
730 static void cssAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
732 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
733 TestObjectV8Internal::cssAttributeAttributeGetter(info);
734 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
737 static void cssAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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);
746 static void cssAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
748 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
749 TestObjectV8Internal::cssAttributeAttributeSetter(v8Value, info);
750 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
753 static void imeAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
755 v8::Handle<v8::Object> holder = info.Holder();
756 TestObject* impl = V8TestObject::toNative(holder);
757 v8SetReturnValueInt(info, impl->imeAttribute());
760 static void imeAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
762 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
763 TestObjectV8Internal::imeAttributeAttributeGetter(info);
764 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
767 static void imeAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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);
776 static void imeAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
778 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
779 TestObjectV8Internal::imeAttributeAttributeSetter(v8Value, info);
780 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
783 static void svgAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
785 v8::Handle<v8::Object> holder = info.Holder();
786 TestObject* impl = V8TestObject::toNative(holder);
787 v8SetReturnValueInt(info, impl->svgAttribute());
790 static void svgAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
792 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
793 TestObjectV8Internal::svgAttributeAttributeGetter(info);
794 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
797 static void svgAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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);
806 static void svgAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
808 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
809 TestObjectV8Internal::svgAttributeAttributeSetter(v8Value, info);
810 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
813 static void xmlAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
815 v8::Handle<v8::Object> holder = info.Holder();
816 TestObject* impl = V8TestObject::toNative(holder);
817 v8SetReturnValueInt(info, impl->xmlAttribute());
820 static void xmlAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
822 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
823 TestObjectV8Internal::xmlAttributeAttributeGetter(info);
824 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
827 static void xmlAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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);
836 static void xmlAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
838 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
839 TestObjectV8Internal::xmlAttributeAttributeSetter(v8Value, info);
840 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
843 static void nodeFilterAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
845 v8::Handle<v8::Object> holder = info.Holder();
846 TestObject* impl = V8TestObject::toNative(holder);
847 v8SetReturnValueFast(info, WTF::getPtr(impl->nodeFilterAttribute()), impl);
850 static void nodeFilterAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
852 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
853 TestObjectV8Internal::nodeFilterAttributeAttributeGetter(info);
854 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
857 static void nodeFilterAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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));
865 static void nodeFilterAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
867 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
868 TestObjectV8Internal::nodeFilterAttributeAttributeSetter(v8Value, info);
869 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
872 static void serializedScriptValueAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
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())));
879 static void serializedScriptValueAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
881 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
882 TestObjectV8Internal::serializedScriptValueAttributeAttributeGetter(info);
883 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
886 static void serializedScriptValueAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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));
894 static void serializedScriptValueAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
896 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
897 TestObjectV8Internal::serializedScriptValueAttributeAttributeSetter(v8Value, info);
898 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
901 static void anyAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
903 v8::Handle<v8::Object> holder = info.Holder();
904 TestObject* impl = V8TestObject::toNative(holder);
905 v8SetReturnValue(info, impl->anyAttribute().v8Value());
908 static void anyAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
910 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
911 TestObjectV8Internal::anyAttributeAttributeGetter(info);
912 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
915 static void anyAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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);
923 static void anyAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
925 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
926 TestObjectV8Internal::anyAttributeAttributeSetter(v8Value, info);
927 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
930 static void promiseAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
932 v8::Handle<v8::Object> holder = info.Holder();
933 TestObject* impl = V8TestObject::toNative(holder);
934 v8SetReturnValue(info, impl->promiseAttribute().v8Value());
937 static void promiseAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
939 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
940 TestObjectV8Internal::promiseAttributeAttributeGetter(info);
941 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
944 static void promiseAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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);
952 static void promiseAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
954 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
955 TestObjectV8Internal::promiseAttributeAttributeSetter(v8Value, info);
956 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
959 static void windowAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
961 v8::Handle<v8::Object> holder = info.Holder();
962 TestObject* impl = V8TestObject::toNative(holder);
963 v8SetReturnValueFast(info, WTF::getPtr(impl->windowAttribute()), impl);
966 static void windowAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
968 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
969 TestObjectV8Internal::windowAttributeAttributeGetter(info);
970 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
973 static void windowAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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));
981 static void windowAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
983 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
984 TestObjectV8Internal::windowAttributeAttributeSetter(v8Value, info);
985 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
988 static void documentAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
990 v8::Handle<v8::Object> holder = info.Holder();
991 TestObject* impl = V8TestObject::toNative(holder);
992 v8SetReturnValueFast(info, WTF::getPtr(impl->documentAttribute()), impl);
995 static void documentAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
997 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
998 TestObjectV8Internal::documentAttributeAttributeGetter(info);
999 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1002 static void documentAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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));
1010 static void documentAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
1012 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1013 TestObjectV8Internal::documentAttributeAttributeSetter(v8Value, info);
1014 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1017 static void documentFragmentAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
1019 v8::Handle<v8::Object> holder = info.Holder();
1020 TestObject* impl = V8TestObject::toNative(holder);
1021 v8SetReturnValueFast(info, WTF::getPtr(impl->documentFragmentAttribute()), impl);
1024 static void documentFragmentAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1026 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1027 TestObjectV8Internal::documentFragmentAttributeAttributeGetter(info);
1028 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1031 static void documentFragmentAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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));
1039 static void documentFragmentAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
1041 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1042 TestObjectV8Internal::documentFragmentAttributeAttributeSetter(v8Value, info);
1043 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1046 static void documentTypeAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
1048 v8::Handle<v8::Object> holder = info.Holder();
1049 TestObject* impl = V8TestObject::toNative(holder);
1050 v8SetReturnValueFast(info, WTF::getPtr(impl->documentTypeAttribute()), impl);
1053 static void documentTypeAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1055 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1056 TestObjectV8Internal::documentTypeAttributeAttributeGetter(info);
1057 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1060 static void documentTypeAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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));
1068 static void documentTypeAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
1070 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1071 TestObjectV8Internal::documentTypeAttributeAttributeSetter(v8Value, info);
1072 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1075 static void elementAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
1077 v8::Handle<v8::Object> holder = info.Holder();
1078 TestObject* impl = V8TestObject::toNative(holder);
1079 v8SetReturnValueFast(info, WTF::getPtr(impl->elementAttribute()), impl);
1082 static void elementAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1084 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1085 TestObjectV8Internal::elementAttributeAttributeGetter(info);
1086 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1089 static void elementAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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));
1097 static void elementAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
1099 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1100 TestObjectV8Internal::elementAttributeAttributeSetter(v8Value, info);
1101 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1104 static void nodeAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
1106 v8::Handle<v8::Object> holder = info.Holder();
1107 TestObject* impl = V8TestObject::toNative(holder);
1108 v8SetReturnValueFast(info, WTF::getPtr(impl->nodeAttribute()), impl);
1111 static void nodeAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1113 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1114 TestObjectV8Internal::nodeAttributeAttributeGetter(info);
1115 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1118 static void nodeAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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));
1126 static void nodeAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
1128 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1129 TestObjectV8Internal::nodeAttributeAttributeSetter(v8Value, info);
1130 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1133 static void shadowRootAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
1135 v8::Handle<v8::Object> holder = info.Holder();
1136 TestObject* impl = V8TestObject::toNative(holder);
1137 v8SetReturnValueFast(info, WTF::getPtr(impl->shadowRootAttribute()), impl);
1140 static void shadowRootAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1142 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1143 TestObjectV8Internal::shadowRootAttributeAttributeGetter(info);
1144 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1147 static void shadowRootAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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));
1155 static void shadowRootAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
1157 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1158 TestObjectV8Internal::shadowRootAttributeAttributeSetter(v8Value, info);
1159 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1162 static void arrayBufferAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
1164 v8::Handle<v8::Object> holder = info.Holder();
1165 TestObject* impl = V8TestObject::toNative(holder);
1166 v8SetReturnValueFast(info, WTF::getPtr(impl->arrayBufferAttribute()), impl);
1169 static void arrayBufferAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1171 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1172 TestObjectV8Internal::arrayBufferAttributeAttributeGetter(info);
1173 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1176 static void arrayBufferAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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));
1184 static void arrayBufferAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
1186 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1187 TestObjectV8Internal::arrayBufferAttributeAttributeSetter(v8Value, info);
1188 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1191 static void float32ArrayAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
1193 v8::Handle<v8::Object> holder = info.Holder();
1194 TestObject* impl = V8TestObject::toNative(holder);
1195 v8SetReturnValueFast(info, WTF::getPtr(impl->float32ArrayAttribute()), impl);
1198 static void float32ArrayAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1200 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1201 TestObjectV8Internal::float32ArrayAttributeAttributeGetter(info);
1202 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1205 static void float32ArrayAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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));
1213 static void float32ArrayAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
1215 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1216 TestObjectV8Internal::float32ArrayAttributeAttributeSetter(v8Value, info);
1217 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1220 static void uint8ArrayAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
1222 v8::Handle<v8::Object> holder = info.Holder();
1223 TestObject* impl = V8TestObject::toNative(holder);
1224 v8SetReturnValueFast(info, WTF::getPtr(impl->uint8ArrayAttribute()), impl);
1227 static void uint8ArrayAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1229 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1230 TestObjectV8Internal::uint8ArrayAttributeAttributeGetter(info);
1231 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1234 static void uint8ArrayAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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));
1242 static void uint8ArrayAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
1244 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1245 TestObjectV8Internal::uint8ArrayAttributeAttributeSetter(v8Value, info);
1246 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1249 static void selfAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
1251 v8::Handle<v8::Object> holder = info.Holder();
1252 TestObject* impl = V8TestObject::toNative(holder);
1253 v8SetReturnValueFast(info, WTF::getPtr(impl->self()), impl);
1256 static void selfAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1258 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1259 TestObjectV8Internal::selfAttributeGetter(info);
1260 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1263 static void readonlyEventTargetAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
1265 v8::Handle<v8::Object> holder = info.Holder();
1266 TestObject* impl = V8TestObject::toNative(holder);
1267 v8SetReturnValueFast(info, WTF::getPtr(impl->readonlyEventTargetAttribute()), impl);
1270 static void readonlyEventTargetAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1272 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1273 TestObjectV8Internal::readonlyEventTargetAttributeAttributeGetter(info);
1274 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1277 static void readonlyEventTargetOrNullAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
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);
1284 v8SetReturnValueNull(info);
1287 v8SetReturnValueFast(info, WTF::getPtr(v8Value.release()), impl);
1290 static void readonlyEventTargetOrNullAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1292 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1293 TestObjectV8Internal::readonlyEventTargetOrNullAttributeAttributeGetter(info);
1294 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1297 static void readonlyWindowAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
1299 v8::Handle<v8::Object> holder = info.Holder();
1300 TestObject* impl = V8TestObject::toNative(holder);
1301 v8SetReturnValueFast(info, WTF::getPtr(impl->readonlyWindowAttribute()), impl);
1304 static void readonlyWindowAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1306 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1307 TestObjectV8Internal::readonlyWindowAttributeAttributeGetter(info);
1308 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1311 static void htmlCollectionAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
1313 v8::Handle<v8::Object> holder = info.Holder();
1314 TestObject* impl = V8TestObject::toNative(holder);
1315 v8SetReturnValueFast(info, WTF::getPtr(impl->htmlCollectionAttribute()), impl);
1318 static void htmlCollectionAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1320 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1321 TestObjectV8Internal::htmlCollectionAttributeAttributeGetter(info);
1322 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1325 static void htmlElementAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
1327 v8::Handle<v8::Object> holder = info.Holder();
1328 TestObject* impl = V8TestObject::toNative(holder);
1329 v8SetReturnValueFast(info, WTF::getPtr(impl->htmlElementAttribute()), impl);
1332 static void htmlElementAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1334 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1335 TestObjectV8Internal::htmlElementAttributeAttributeGetter(info);
1336 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1339 static void stringArrayAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
1341 v8::Handle<v8::Object> holder = info.Holder();
1342 TestObject* impl = V8TestObject::toNative(holder);
1343 v8SetReturnValue(info, v8Array(impl->stringArrayAttribute(), info.GetIsolate()));
1346 static void stringArrayAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1348 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1349 TestObjectV8Internal::stringArrayAttributeAttributeGetter(info);
1350 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1353 static void stringArrayAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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);
1361 static void stringArrayAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
1363 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1364 TestObjectV8Internal::stringArrayAttributeAttributeSetter(v8Value, info);
1365 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1368 static void testInterfaceEmptyArrayAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
1370 v8::Handle<v8::Object> holder = info.Holder();
1371 TestObject* impl = V8TestObject::toNative(holder);
1372 v8SetReturnValue(info, v8Array(impl->testInterfaceEmptyArrayAttribute(), info.GetIsolate()));
1375 static void testInterfaceEmptyArrayAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1377 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1378 TestObjectV8Internal::testInterfaceEmptyArrayAttributeAttributeGetter(info);
1379 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1382 static void testInterfaceEmptyArrayAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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);
1390 static void testInterfaceEmptyArrayAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
1392 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1393 TestObjectV8Internal::testInterfaceEmptyArrayAttributeAttributeSetter(v8Value, info);
1394 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1397 static void floatArrayAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
1399 v8::Handle<v8::Object> holder = info.Holder();
1400 TestObject* impl = V8TestObject::toNative(holder);
1401 v8SetReturnValue(info, v8Array(impl->floatArrayAttribute(), info.GetIsolate()));
1404 static void floatArrayAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1406 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1407 TestObjectV8Internal::floatArrayAttributeAttributeGetter(info);
1408 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1411 static void floatArrayAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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);
1419 static void floatArrayAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
1421 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1422 TestObjectV8Internal::floatArrayAttributeAttributeSetter(v8Value, info);
1423 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1426 static void stringOrNullAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
1428 v8::Handle<v8::Object> holder = info.Holder();
1429 TestObject* impl = V8TestObject::toNative(holder);
1430 bool isNull = false;
1431 String v8Value = impl->stringOrNullAttribute(isNull);
1433 v8SetReturnValueNull(info);
1436 v8SetReturnValueString(info, v8Value, info.GetIsolate());
1439 static void stringOrNullAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1441 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1442 TestObjectV8Internal::stringOrNullAttributeAttributeGetter(info);
1443 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1446 static void stringOrNullAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
1448 v8::Handle<v8::Object> holder = info.Holder();
1449 TestObject* impl = V8TestObject::toNative(holder);
1450 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value);
1451 impl->setStringOrNullAttribute(cppValue);
1454 static void stringOrNullAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
1456 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1457 TestObjectV8Internal::stringOrNullAttributeAttributeSetter(v8Value, info);
1458 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1461 static void longOrNullAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
1463 v8::Handle<v8::Object> holder = info.Holder();
1464 TestObject* impl = V8TestObject::toNative(holder);
1465 bool isNull = false;
1466 int v8Value = impl->longOrNullAttribute(isNull);
1468 v8SetReturnValueNull(info);
1471 v8SetReturnValueInt(info, v8Value);
1474 static void longOrNullAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1476 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1477 TestObjectV8Internal::longOrNullAttributeAttributeGetter(info);
1478 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1481 static void longOrNullAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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);
1490 static void longOrNullAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
1492 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1493 TestObjectV8Internal::longOrNullAttributeAttributeSetter(v8Value, info);
1494 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1497 static void testInterfaceOrNullAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
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);
1504 v8SetReturnValueNull(info);
1507 v8SetReturnValueFast(info, WTF::getPtr(v8Value.release()), impl);
1510 static void testInterfaceOrNullAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1512 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1513 TestObjectV8Internal::testInterfaceOrNullAttributeAttributeGetter(info);
1514 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1517 static void testInterfaceOrNullAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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));
1525 static void testInterfaceOrNullAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
1527 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1528 TestObjectV8Internal::testInterfaceOrNullAttributeAttributeSetter(v8Value, info);
1529 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1532 static void testEnumAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
1534 v8::Handle<v8::Object> holder = info.Holder();
1535 TestObject* impl = V8TestObject::toNative(holder);
1536 v8SetReturnValueString(info, impl->testEnumAttribute(), info.GetIsolate());
1539 static void testEnumAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1541 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1542 TestObjectV8Internal::testEnumAttributeAttributeGetter(info);
1543 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1546 static void testEnumAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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"))
1554 impl->setTestEnumAttribute(cppValue);
1557 static void testEnumAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
1559 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1560 TestObjectV8Internal::testEnumAttributeAttributeSetter(v8Value, info);
1561 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1564 static void staticStringAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
1566 v8SetReturnValueString(info, TestObject::staticStringAttribute(), info.GetIsolate());
1569 static void staticStringAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1571 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1572 TestObjectV8Internal::staticStringAttributeAttributeGetter(info);
1573 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1576 static void staticStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
1578 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value);
1579 TestObject::setStaticStringAttribute(cppValue);
1582 static void staticStringAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
1584 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1585 TestObjectV8Internal::staticStringAttributeAttributeSetter(v8Value, info);
1586 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1589 static void staticLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
1591 v8SetReturnValueInt(info, TestObject::staticLongAttribute());
1594 static void staticLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1596 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1597 TestObjectV8Internal::staticLongAttributeAttributeGetter(info);
1598 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1601 static void staticLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
1603 ExceptionState exceptionState(ExceptionState::SetterContext, "staticLongAttribute", "TestObject", holder, info.GetIsolate());
1604 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState), exceptionState);
1605 TestObject::setStaticLongAttribute(cppValue);
1608 static void staticLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
1610 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1611 TestObjectV8Internal::staticLongAttributeAttributeSetter(v8Value, info);
1612 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1615 static void eventHandlerAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
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())));
1623 static void eventHandlerAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1625 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1626 TestObjectV8Internal::eventHandlerAttributeAttributeGetter(info);
1627 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1630 static void eventHandlerAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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));
1638 static void eventHandlerAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
1640 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1641 TestObjectV8Internal::eventHandlerAttributeAttributeSetter(v8Value, info);
1642 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1645 static void activityLoggingAccessForAllWorldsLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
1647 v8::Handle<v8::Object> holder = info.Holder();
1648 TestObject* impl = V8TestObject::toNative(holder);
1649 v8SetReturnValueInt(info, impl->activityLoggingAccessForAllWorldsLongAttribute());
1652 static void activityLoggingAccessForAllWorldsLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
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");
1662 static void activityLoggingAccessForAllWorldsLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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);
1671 static void activityLoggingAccessForAllWorldsLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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);
1678 TestObjectV8Internal::activityLoggingAccessForAllWorldsLongAttributeAttributeSetter(v8Value, info);
1679 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1682 static void activityLoggingGetterForAllWorldsLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
1684 v8::Handle<v8::Object> holder = info.Holder();
1685 TestObject* impl = V8TestObject::toNative(holder);
1686 v8SetReturnValueInt(info, impl->activityLoggingGetterForAllWorldsLongAttribute());
1689 static void activityLoggingGetterForAllWorldsLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
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");
1699 static void activityLoggingGetterForAllWorldsLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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);
1708 static void activityLoggingGetterForAllWorldsLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
1710 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1711 TestObjectV8Internal::activityLoggingGetterForAllWorldsLongAttributeAttributeSetter(v8Value, info);
1712 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1715 static void activityLoggingSetterForAllWorldsLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
1717 v8::Handle<v8::Object> holder = info.Holder();
1718 TestObject* impl = V8TestObject::toNative(holder);
1719 v8SetReturnValueInt(info, impl->activityLoggingSetterForAllWorldsLongAttribute());
1722 static void activityLoggingSetterForAllWorldsLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1724 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1725 TestObjectV8Internal::activityLoggingSetterForAllWorldsLongAttributeAttributeGetter(info);
1726 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1729 static void activityLoggingSetterForAllWorldsLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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);
1738 static void activityLoggingSetterForAllWorldsLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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);
1745 TestObjectV8Internal::activityLoggingSetterForAllWorldsLongAttributeAttributeSetter(v8Value, info);
1746 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1749 static void cachedAttributeAnyAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
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);
1761 ScriptValue v8Value = impl->cachedAttributeAnyAttribute();
1762 V8HiddenValue::setHiddenValue(info.GetIsolate(), holder, propertyName, v8Value.v8Value());
1763 v8SetReturnValue(info, v8Value.v8Value());
1766 static void cachedAttributeAnyAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1768 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1769 TestObjectV8Internal::cachedAttributeAnyAttributeAttributeGetter(info);
1770 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1773 static void cachedAttributeAnyAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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.
1782 static void cachedAttributeAnyAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
1784 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1785 TestObjectV8Internal::cachedAttributeAnyAttributeAttributeSetter(v8Value, info);
1786 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1789 static void callWithExecutionContextAnyAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
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());
1797 static void callWithExecutionContextAnyAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1799 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1800 TestObjectV8Internal::callWithExecutionContextAnyAttributeAttributeGetter(info);
1801 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1804 static void callWithExecutionContextAnyAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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);
1813 static void callWithExecutionContextAnyAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
1815 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1816 TestObjectV8Internal::callWithExecutionContextAnyAttributeAttributeSetter(v8Value, info);
1817 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1820 static void callWithScriptStateAnyAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
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());
1828 static void callWithScriptStateAnyAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1830 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1831 TestObjectV8Internal::callWithScriptStateAnyAttributeAttributeGetter(info);
1832 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1835 static void callWithScriptStateAnyAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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);
1843 static void callWithScriptStateAnyAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
1845 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1846 TestObjectV8Internal::callWithScriptStateAnyAttributeAttributeSetter(v8Value, info);
1847 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1850 static void callWithExecutionContextAndScriptStateAnyAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
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());
1859 static void callWithExecutionContextAndScriptStateAnyAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1861 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1862 TestObjectV8Internal::callWithExecutionContextAndScriptStateAnyAttributeAttributeGetter(info);
1863 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1866 static void callWithExecutionContextAndScriptStateAnyAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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);
1875 static void callWithExecutionContextAndScriptStateAnyAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
1877 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1878 TestObjectV8Internal::callWithExecutionContextAndScriptStateAnyAttributeAttributeSetter(v8Value, info);
1879 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1882 static void checkSecurityForNodeReadonlyDocumentAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
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();
1892 v8SetReturnValueFast(info, WTF::getPtr(impl->checkSecurityForNodeReadonlyDocumentAttribute()), impl);
1895 static void checkSecurityForNodeReadonlyDocumentAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1897 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1898 TestObjectV8Internal::checkSecurityForNodeReadonlyDocumentAttributeAttributeGetter(info);
1899 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1902 #if ENABLE(CONDITION)
1903 static void conditionalLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
1905 v8::Handle<v8::Object> holder = info.Holder();
1906 TestObject* impl = V8TestObject::toNative(holder);
1907 v8SetReturnValueInt(info, impl->conditionalLongAttribute());
1909 #endif // ENABLE(CONDITION)
1911 #if ENABLE(CONDITION)
1912 static void conditionalLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1914 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1915 TestObjectV8Internal::conditionalLongAttributeAttributeGetter(info);
1916 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1918 #endif // ENABLE(CONDITION)
1920 #if ENABLE(CONDITION)
1921 static void conditionalLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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);
1929 #endif // ENABLE(CONDITION)
1931 #if ENABLE(CONDITION)
1932 static void conditionalLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
1934 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1935 TestObjectV8Internal::conditionalLongAttributeAttributeSetter(v8Value, info);
1936 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1938 #endif // ENABLE(CONDITION)
1940 #if ENABLE(CONDITION_1) && ENABLE(CONDITION_2)
1941 static void conditionalAndLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
1943 v8::Handle<v8::Object> holder = info.Holder();
1944 TestObject* impl = V8TestObject::toNative(holder);
1945 v8SetReturnValueInt(info, impl->conditionalAndLongAttribute());
1947 #endif // ENABLE(CONDITION_1) && ENABLE(CONDITION_2)
1949 #if ENABLE(CONDITION_1) && ENABLE(CONDITION_2)
1950 static void conditionalAndLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1952 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1953 TestObjectV8Internal::conditionalAndLongAttributeAttributeGetter(info);
1954 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1956 #endif // ENABLE(CONDITION_1) && ENABLE(CONDITION_2)
1958 #if ENABLE(CONDITION_1) && ENABLE(CONDITION_2)
1959 static void conditionalAndLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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);
1967 #endif // ENABLE(CONDITION_1) && ENABLE(CONDITION_2)
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)
1972 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1973 TestObjectV8Internal::conditionalAndLongAttributeAttributeSetter(v8Value, info);
1974 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1976 #endif // ENABLE(CONDITION_1) && ENABLE(CONDITION_2)
1978 #if ENABLE(CONDITION_1) || ENABLE(CONDITION_2)
1979 static void conditionalOrLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
1981 v8::Handle<v8::Object> holder = info.Holder();
1982 TestObject* impl = V8TestObject::toNative(holder);
1983 v8SetReturnValueInt(info, impl->conditionalOrLongAttribute());
1985 #endif // ENABLE(CONDITION_1) || ENABLE(CONDITION_2)
1987 #if ENABLE(CONDITION_1) || ENABLE(CONDITION_2)
1988 static void conditionalOrLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1990 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1991 TestObjectV8Internal::conditionalOrLongAttributeAttributeGetter(info);
1992 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1994 #endif // ENABLE(CONDITION_1) || ENABLE(CONDITION_2)
1996 #if ENABLE(CONDITION_1) || ENABLE(CONDITION_2)
1997 static void conditionalOrLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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);
2005 #endif // ENABLE(CONDITION_1) || ENABLE(CONDITION_2)
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)
2010 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2011 TestObjectV8Internal::conditionalOrLongAttributeAttributeSetter(v8Value, info);
2012 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2014 #endif // ENABLE(CONDITION_1) || ENABLE(CONDITION_2)
2016 static void customObjectAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2018 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2019 V8TestObject::customObjectAttributeAttributeGetterCustom(info);
2020 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2023 static void customObjectAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
2025 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2026 V8TestObject::customObjectAttributeAttributeSetterCustom(v8Value, info);
2027 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2030 static void customGetterLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2032 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2033 V8TestObject::customGetterLongAttributeAttributeGetterCustom(info);
2034 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2037 static void customGetterLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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);
2046 static void customGetterLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
2048 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2049 TestObjectV8Internal::customGetterLongAttributeAttributeSetter(v8Value, info);
2050 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2053 static void customGetterReadonlyObjectAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2055 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2056 V8TestObject::customGetterReadonlyObjectAttributeAttributeGetterCustom(info);
2057 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2060 static void customSetterLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
2062 v8::Handle<v8::Object> holder = info.Holder();
2063 TestObject* impl = V8TestObject::toNative(holder);
2064 v8SetReturnValueInt(info, impl->customSetterLongAttribute());
2067 static void customSetterLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2069 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2070 TestObjectV8Internal::customSetterLongAttributeAttributeGetter(info);
2071 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2074 static void customSetterLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
2076 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2077 V8TestObject::customSetterLongAttributeAttributeSetterCustom(v8Value, info);
2078 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2081 #if ENABLE(CONDITION)
2082 static void customLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2084 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2085 V8TestObject::customLongAttributeAttributeGetterCustom(info);
2086 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2088 #endif // ENABLE(CONDITION)
2090 #if ENABLE(CONDITION)
2091 static void customLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
2093 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2094 V8TestObject::customLongAttributeAttributeSetterCustom(v8Value, info);
2095 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2097 #endif // ENABLE(CONDITION)
2099 static void customElementsCallbacksReadonlyLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
2101 v8::Handle<v8::Object> holder = info.Holder();
2102 TestObject* impl = V8TestObject::toNative(holder);
2103 v8SetReturnValueInt(info, impl->customElementsCallbacksReadonlyLongAttribute());
2106 static void customElementsCallbacksReadonlyLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2108 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2109 TestObjectV8Internal::customElementsCallbacksReadonlyLongAttributeAttributeGetter(info);
2110 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2113 static void deprecatedLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
2115 v8::Handle<v8::Object> holder = info.Holder();
2116 TestObject* impl = V8TestObject::toNative(holder);
2117 v8SetReturnValueInt(info, impl->deprecatedLongAttribute());
2120 static void deprecatedLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
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");
2128 static void deprecatedLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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);
2137 static void deprecatedLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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");
2145 static void enforceRangeLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
2147 v8::Handle<v8::Object> holder = info.Holder();
2148 TestObject* impl = V8TestObject::toNative(holder);
2149 v8SetReturnValueInt(info, impl->enforceRangeLongAttribute());
2152 static void enforceRangeLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2154 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2155 TestObjectV8Internal::enforceRangeLongAttributeAttributeGetter(info);
2156 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2159 static void enforceRangeLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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);
2168 static void enforceRangeLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
2170 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2171 TestObjectV8Internal::enforceRangeLongAttributeAttributeSetter(v8Value, info);
2172 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2175 static void exposeJSAccessorsLongAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
2177 v8::Handle<v8::Object> holder = info.Holder();
2178 TestObject* impl = V8TestObject::toNative(holder);
2179 v8SetReturnValueInt(info, impl->exposeJSAccessorsLongAttribute());
2182 static void exposeJSAccessorsLongAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
2184 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2185 TestObjectV8Internal::exposeJSAccessorsLongAttributeAttributeGetter(info);
2186 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2189 static void exposeJSAccessorsLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
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);
2198 static void exposeJSAccessorsLongAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
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");
2206 static void implementedAsLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
2208 v8::Handle<v8::Object> holder = info.Holder();
2209 TestObject* impl = V8TestObject::toNative(holder);
2210 v8SetReturnValueInt(info, impl->implementedAsName());
2213 static void implementedAsLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2215 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2216 TestObjectV8Internal::implementedAsLongAttributeAttributeGetter(info);
2217 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2220 static void implementedAsLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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);
2229 static void implementedAsLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
2231 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2232 TestObjectV8Internal::implementedAsLongAttributeAttributeSetter(v8Value, info);
2233 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2236 static void customImplementedAsLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2238 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2239 V8TestObject::customImplementedAsLongAttributeAttributeGetterCustom(info);
2240 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2243 static void customImplementedAsLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
2245 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2246 V8TestObject::customImplementedAsLongAttributeAttributeSetterCustom(v8Value, info);
2247 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2250 static void customGetterImplementedAsLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2252 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2253 V8TestObject::customGetterImplementedAsLongAttributeAttributeGetterCustom(info);
2254 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2257 static void customGetterImplementedAsLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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);
2266 static void customGetterImplementedAsLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
2268 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2269 TestObjectV8Internal::customGetterImplementedAsLongAttributeAttributeSetter(v8Value, info);
2270 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2273 static void customSetterImplementedAsLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
2275 v8::Handle<v8::Object> holder = info.Holder();
2276 TestObject* impl = V8TestObject::toNative(holder);
2277 v8SetReturnValueInt(info, impl->implementedAsNameWithCustomGetter());
2280 static void customSetterImplementedAsLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2282 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2283 TestObjectV8Internal::customSetterImplementedAsLongAttributeAttributeGetter(info);
2284 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2287 static void customSetterImplementedAsLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
2289 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2290 V8TestObject::customSetterImplementedAsLongAttributeAttributeSetterCustom(v8Value, info);
2291 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2294 static void measureAsLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
2296 v8::Handle<v8::Object> holder = info.Holder();
2297 TestObject* impl = V8TestObject::toNative(holder);
2298 v8SetReturnValueInt(info, impl->measureAsLongAttribute());
2301 static void measureAsLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
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");
2309 static void measureAsLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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);
2318 static void measureAsLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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");
2326 static void notEnumerableLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
2328 v8::Handle<v8::Object> holder = info.Holder();
2329 TestObject* impl = V8TestObject::toNative(holder);
2330 v8SetReturnValueInt(info, impl->notEnumerableLongAttribute());
2333 static void notEnumerableLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2335 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2336 TestObjectV8Internal::notEnumerableLongAttributeAttributeGetter(info);
2337 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2340 static void notEnumerableLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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);
2349 static void notEnumerableLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
2351 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2352 TestObjectV8Internal::notEnumerableLongAttributeAttributeSetter(v8Value, info);
2353 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2356 static void perContextEnabledLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
2358 v8::Handle<v8::Object> holder = info.Holder();
2359 TestObject* impl = V8TestObject::toNative(holder);
2360 v8SetReturnValueInt(info, impl->perContextEnabledLongAttribute());
2363 static void perContextEnabledLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2365 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2366 TestObjectV8Internal::perContextEnabledLongAttributeAttributeGetter(info);
2367 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2370 static void perContextEnabledLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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);
2379 static void perContextEnabledLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
2381 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2382 TestObjectV8Internal::perContextEnabledLongAttributeAttributeSetter(v8Value, info);
2383 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2386 static void perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
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()))
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);
2400 static void perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2402 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2403 TestObjectV8Internal::perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetter(info);
2404 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2407 static void perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetterForMainWorld(const v8::PropertyCallbackInfo<v8::Value>& info)
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()))
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);
2421 static void perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetterCallbackForMainWorld(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2423 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2424 TestObjectV8Internal::perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetterForMainWorld(info);
2425 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2428 static void activityLoggingAccessPerWorldBindingsLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
2430 v8::Handle<v8::Object> holder = info.Holder();
2431 TestObject* impl = V8TestObject::toNative(holder);
2432 v8SetReturnValueInt(info, impl->activityLoggingAccessPerWorldBindingsLongAttribute());
2435 static void activityLoggingAccessPerWorldBindingsLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
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");
2445 static void activityLoggingAccessPerWorldBindingsLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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);
2454 static void activityLoggingAccessPerWorldBindingsLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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);
2461 TestObjectV8Internal::activityLoggingAccessPerWorldBindingsLongAttributeAttributeSetter(v8Value, info);
2462 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2465 static void activityLoggingAccessPerWorldBindingsLongAttributeAttributeGetterForMainWorld(const v8::PropertyCallbackInfo<v8::Value>& info)
2467 v8::Handle<v8::Object> holder = info.Holder();
2468 TestObject* impl = V8TestObject::toNative(holder);
2469 v8SetReturnValueInt(info, impl->activityLoggingAccessPerWorldBindingsLongAttribute());
2472 static void activityLoggingAccessPerWorldBindingsLongAttributeAttributeGetterCallbackForMainWorld(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
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");
2482 static void activityLoggingAccessPerWorldBindingsLongAttributeAttributeSetterForMainWorld(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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);
2491 static void activityLoggingAccessPerWorldBindingsLongAttributeAttributeSetterCallbackForMainWorld(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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);
2498 TestObjectV8Internal::activityLoggingAccessPerWorldBindingsLongAttributeAttributeSetterForMainWorld(v8Value, info);
2499 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2502 static void activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
2504 v8::Handle<v8::Object> holder = info.Holder();
2505 TestObject* impl = V8TestObject::toNative(holder);
2506 v8SetReturnValueInt(info, impl->activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttribute());
2509 static void activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
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");
2519 static void activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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);
2528 static void activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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);
2535 TestObjectV8Internal::activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeAttributeSetter(v8Value, info);
2536 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2539 static void activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeAttributeGetterForMainWorld(const v8::PropertyCallbackInfo<v8::Value>& info)
2541 v8::Handle<v8::Object> holder = info.Holder();
2542 TestObject* impl = V8TestObject::toNative(holder);
2543 v8SetReturnValueInt(info, impl->activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttribute());
2546 static void activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeAttributeGetterCallbackForMainWorld(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2548 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2549 TestObjectV8Internal::activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeAttributeGetterForMainWorld(info);
2550 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2553 static void activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeAttributeSetterForMainWorld(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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);
2562 static void activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeAttributeSetterCallbackForMainWorld(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
2564 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2565 TestObjectV8Internal::activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeAttributeSetterForMainWorld(v8Value, info);
2566 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2569 static void activityLoggingGetterPerWorldBindingsLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
2571 v8::Handle<v8::Object> holder = info.Holder();
2572 TestObject* impl = V8TestObject::toNative(holder);
2573 v8SetReturnValueInt(info, impl->activityLoggingGetterPerWorldBindingsLongAttribute());
2576 static void activityLoggingGetterPerWorldBindingsLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
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");
2586 static void activityLoggingGetterPerWorldBindingsLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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);
2595 static void activityLoggingGetterPerWorldBindingsLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
2597 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2598 TestObjectV8Internal::activityLoggingGetterPerWorldBindingsLongAttributeAttributeSetter(v8Value, info);
2599 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2602 static void activityLoggingGetterPerWorldBindingsLongAttributeAttributeGetterForMainWorld(const v8::PropertyCallbackInfo<v8::Value>& info)
2604 v8::Handle<v8::Object> holder = info.Holder();
2605 TestObject* impl = V8TestObject::toNative(holder);
2606 v8SetReturnValueInt(info, impl->activityLoggingGetterPerWorldBindingsLongAttribute());
2609 static void activityLoggingGetterPerWorldBindingsLongAttributeAttributeGetterCallbackForMainWorld(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
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");
2619 static void activityLoggingGetterPerWorldBindingsLongAttributeAttributeSetterForMainWorld(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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);
2628 static void activityLoggingGetterPerWorldBindingsLongAttributeAttributeSetterCallbackForMainWorld(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
2630 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2631 TestObjectV8Internal::activityLoggingGetterPerWorldBindingsLongAttributeAttributeSetterForMainWorld(v8Value, info);
2632 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2635 static void activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
2637 v8::Handle<v8::Object> holder = info.Holder();
2638 TestObject* impl = V8TestObject::toNative(holder);
2639 v8SetReturnValueInt(info, impl->activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttribute());
2642 static void activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
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");
2652 static void activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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);
2661 static void activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
2663 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2664 TestObjectV8Internal::activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeAttributeSetter(v8Value, info);
2665 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2668 static void activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeAttributeGetterForMainWorld(const v8::PropertyCallbackInfo<v8::Value>& info)
2670 v8::Handle<v8::Object> holder = info.Holder();
2671 TestObject* impl = V8TestObject::toNative(holder);
2672 v8SetReturnValueInt(info, impl->activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttribute());
2675 static void activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeAttributeGetterCallbackForMainWorld(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2677 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2678 TestObjectV8Internal::activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeAttributeGetterForMainWorld(info);
2679 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2682 static void activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeAttributeSetterForMainWorld(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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);
2691 static void activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeAttributeSetterCallbackForMainWorld(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
2693 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2694 TestObjectV8Internal::activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeAttributeSetterForMainWorld(v8Value, info);
2695 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2698 static void locationAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
2700 v8::Handle<v8::Object> holder = info.Holder();
2701 TestObject* impl = V8TestObject::toNative(holder);
2702 v8SetReturnValueFast(info, WTF::getPtr(impl->location()), impl);
2705 static void locationAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2707 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2708 TestObjectV8Internal::locationAttributeGetter(info);
2709 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2712 static void locationAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
2714 v8::Handle<v8::Object> holder = info.Holder();
2715 TestObject* proxyImpl = V8TestObject::toNative(holder);
2716 RefPtr<TestNode> impl = WTF::getPtr(proxyImpl->location());
2719 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value);
2720 impl->setHref(cppValue);
2723 static void locationAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
2725 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2726 TestObjectV8Internal::locationAttributeSetter(v8Value, info);
2727 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2730 static void locationWithExceptionAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
2732 v8::Handle<v8::Object> holder = info.Holder();
2733 TestObject* impl = V8TestObject::toNative(holder);
2734 v8SetReturnValueFast(info, WTF::getPtr(impl->locationWithException()), impl);
2737 static void locationWithExceptionAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2739 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2740 TestObjectV8Internal::locationWithExceptionAttributeGetter(info);
2741 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2744 static void locationWithExceptionAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
2746 v8::Handle<v8::Object> holder = info.Holder();
2747 TestObject* proxyImpl = V8TestObject::toNative(holder);
2748 RefPtr<TestNode> impl = WTF::getPtr(proxyImpl->locationWithException());
2751 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value);
2752 impl->setHrefThrows(cppValue);
2755 static void locationWithExceptionAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
2757 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2758 TestObjectV8Internal::locationWithExceptionAttributeSetter(v8Value, info);
2759 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2762 static void locationWithCallWithAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
2764 v8::Handle<v8::Object> holder = info.Holder();
2765 TestObject* impl = V8TestObject::toNative(holder);
2766 v8SetReturnValueFast(info, WTF::getPtr(impl->locationWithCallWith()), impl);
2769 static void locationWithCallWithAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2771 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2772 TestObjectV8Internal::locationWithCallWithAttributeGetter(info);
2773 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2776 static void locationWithCallWithAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
2778 v8::Handle<v8::Object> holder = info.Holder();
2779 TestObject* proxyImpl = V8TestObject::toNative(holder);
2780 RefPtr<TestNode> impl = WTF::getPtr(proxyImpl->locationWithCallWith());
2783 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value);
2784 impl->setHrefCallWith(callingDOMWindow(info.GetIsolate()), enteredDOMWindow(info.GetIsolate()), cppValue);
2787 static void locationWithCallWithAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
2789 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2790 TestObjectV8Internal::locationWithCallWithAttributeSetter(v8Value, info);
2791 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2794 static void locationWithPerWorldBindingsAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
2796 v8::Handle<v8::Object> holder = info.Holder();
2797 TestObject* impl = V8TestObject::toNative(holder);
2798 v8SetReturnValueFast(info, WTF::getPtr(impl->locationWithPerWorldBindings()), impl);
2801 static void locationWithPerWorldBindingsAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2803 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2804 TestObjectV8Internal::locationWithPerWorldBindingsAttributeGetter(info);
2805 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2808 static void locationWithPerWorldBindingsAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
2810 v8::Handle<v8::Object> holder = info.Holder();
2811 TestObject* proxyImpl = V8TestObject::toNative(holder);
2812 RefPtr<TestNode> impl = WTF::getPtr(proxyImpl->locationWithPerWorldBindings());
2815 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value);
2816 impl->setHref(cppValue);
2819 static void locationWithPerWorldBindingsAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
2821 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2822 TestObjectV8Internal::locationWithPerWorldBindingsAttributeSetter(v8Value, info);
2823 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2826 static void locationWithPerWorldBindingsAttributeGetterForMainWorld(const v8::PropertyCallbackInfo<v8::Value>& info)
2828 v8::Handle<v8::Object> holder = info.Holder();
2829 TestObject* impl = V8TestObject::toNative(holder);
2830 v8SetReturnValueForMainWorld(info, WTF::getPtr(impl->locationWithPerWorldBindings()));
2833 static void locationWithPerWorldBindingsAttributeGetterCallbackForMainWorld(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2835 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2836 TestObjectV8Internal::locationWithPerWorldBindingsAttributeGetterForMainWorld(info);
2837 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2840 static void locationWithPerWorldBindingsAttributeSetterForMainWorld(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
2842 v8::Handle<v8::Object> holder = info.Holder();
2843 TestObject* proxyImpl = V8TestObject::toNative(holder);
2844 RefPtr<TestNode> impl = WTF::getPtr(proxyImpl->locationWithPerWorldBindings());
2847 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value);
2848 impl->setHref(cppValue);
2851 static void locationWithPerWorldBindingsAttributeSetterCallbackForMainWorld(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
2853 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2854 TestObjectV8Internal::locationWithPerWorldBindingsAttributeSetterForMainWorld(v8Value, info);
2855 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2858 static void locationGarbageCollectedAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
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()))
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);
2872 static void locationGarbageCollectedAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2874 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2875 TestObjectV8Internal::locationGarbageCollectedAttributeGetter(info);
2876 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2879 static void locationGarbageCollectedAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
2881 v8::Handle<v8::Object> holder = info.Holder();
2882 TestObject* proxyImpl = V8TestObject::toNative(holder);
2883 RawPtr<TestInterfaceGarbageCollected> impl = WTF::getPtr(proxyImpl->locationGarbageCollected());
2886 TONATIVE_VOID(TestInterfaceGarbageCollected*, cppValue, V8TestInterfaceGarbageCollected::toNativeWithTypeCheck(info.GetIsolate(), v8Value));
2887 impl->setAttr1(WTF::getPtr(cppValue));
2890 static void locationGarbageCollectedAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
2892 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2893 TestObjectV8Internal::locationGarbageCollectedAttributeSetter(v8Value, info);
2894 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2897 static void locationWillBeGarbageCollectedAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
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()))
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);
2911 static void locationWillBeGarbageCollectedAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2913 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2914 TestObjectV8Internal::locationWillBeGarbageCollectedAttributeGetter(info);
2915 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2918 static void locationWillBeGarbageCollectedAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
2920 v8::Handle<v8::Object> holder = info.Holder();
2921 TestObject* proxyImpl = V8TestObject::toNative(holder);
2922 RefPtrWillBeRawPtr<TestInterfaceWillBeGarbageCollected> impl = WTF::getPtr(proxyImpl->locationWillBeGarbageCollected());
2925 TONATIVE_VOID(TestInterfaceWillBeGarbageCollected*, cppValue, V8TestInterfaceWillBeGarbageCollected::toNativeWithTypeCheck(info.GetIsolate(), v8Value));
2926 impl->setAttr1(WTF::getPtr(cppValue));
2929 static void locationWillBeGarbageCollectedAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
2931 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2932 TestObjectV8Internal::locationWillBeGarbageCollectedAttributeSetter(v8Value, info);
2933 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2936 static void raisesExceptionLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
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()))
2944 v8SetReturnValueInt(info, v8Value);
2947 static void raisesExceptionLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2949 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2950 TestObjectV8Internal::raisesExceptionLongAttributeAttributeGetter(info);
2951 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2954 static void raisesExceptionLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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();
2964 static void raisesExceptionLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
2966 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
2967 TestObjectV8Internal::raisesExceptionLongAttributeAttributeSetter(v8Value, info);
2968 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2971 static void raisesExceptionGetterLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
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()))
2979 v8SetReturnValueInt(info, v8Value);
2982 static void raisesExceptionGetterLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
2984 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
2985 TestObjectV8Internal::raisesExceptionGetterLongAttributeAttributeGetter(info);
2986 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
2989 static void raisesExceptionGetterLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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);
2998 static void raisesExceptionGetterLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
3000 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
3001 TestObjectV8Internal::raisesExceptionGetterLongAttributeAttributeSetter(v8Value, info);
3002 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3005 static void setterRaisesExceptionLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
3007 v8::Handle<v8::Object> holder = info.Holder();
3008 TestObject* impl = V8TestObject::toNative(holder);
3009 v8SetReturnValueInt(info, impl->setterRaisesExceptionLongAttribute());
3012 static void setterRaisesExceptionLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3014 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3015 TestObjectV8Internal::setterRaisesExceptionLongAttributeAttributeGetter(info);
3016 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3019 static void setterRaisesExceptionLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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();
3029 static void setterRaisesExceptionLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
3031 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
3032 TestObjectV8Internal::setterRaisesExceptionLongAttributeAttributeSetter(v8Value, info);
3033 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3036 static void raisesExceptionTestInterfaceEmptyAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
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()))
3044 v8SetReturnValueFast(info, WTF::getPtr(v8Value.release()), impl);
3047 static void raisesExceptionTestInterfaceEmptyAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3049 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3050 TestObjectV8Internal::raisesExceptionTestInterfaceEmptyAttributeAttributeGetter(info);
3051 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3054 static void raisesExceptionTestInterfaceEmptyAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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();
3064 static void raisesExceptionTestInterfaceEmptyAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
3066 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
3067 TestObjectV8Internal::raisesExceptionTestInterfaceEmptyAttributeAttributeSetter(v8Value, info);
3068 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3071 static void cachedAttributeRaisesExceptionGetterAnyAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
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);
3083 ExceptionState exceptionState(ExceptionState::GetterContext, "cachedAttributeRaisesExceptionGetterAnyAttribute", "TestObject", holder, info.GetIsolate());
3084 ScriptValue v8Value = impl->cachedAttributeRaisesExceptionGetterAnyAttribute(exceptionState);
3085 if (UNLIKELY(exceptionState.throwIfNeeded()))
3087 V8HiddenValue::setHiddenValue(info.GetIsolate(), holder, propertyName, v8Value.v8Value());
3088 v8SetReturnValue(info, v8Value.v8Value());
3091 static void cachedAttributeRaisesExceptionGetterAnyAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3093 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3094 TestObjectV8Internal::cachedAttributeRaisesExceptionGetterAnyAttributeAttributeGetter(info);
3095 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3098 static void cachedAttributeRaisesExceptionGetterAnyAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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.
3109 static void cachedAttributeRaisesExceptionGetterAnyAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
3111 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
3112 TestObjectV8Internal::cachedAttributeRaisesExceptionGetterAnyAttributeAttributeSetter(v8Value, info);
3113 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3116 static void reflectTestInterfaceAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
3118 v8::Handle<v8::Object> holder = info.Holder();
3119 TestObject* impl = V8TestObject::toNative(holder);
3120 v8SetReturnValueFast(info, WTF::getPtr(impl->fastGetAttribute(HTMLNames::reflecttestinterfaceattributeAttr)), impl);
3123 static void reflectTestInterfaceAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3125 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3126 TestObjectV8Internal::reflectTestInterfaceAttributeAttributeGetter(info);
3127 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3130 static void reflectTestInterfaceAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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));
3139 static void reflectTestInterfaceAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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");
3147 static void reflectReflectedNameAttributeTestAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
3149 v8::Handle<v8::Object> holder = info.Holder();
3150 TestObject* impl = V8TestObject::toNative(holder);
3151 v8SetReturnValueFast(info, WTF::getPtr(impl->fastGetAttribute(HTMLNames::reflectedNameAttributeAttr)), impl);
3154 static void reflectReflectedNameAttributeTestAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3156 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3157 TestObjectV8Internal::reflectReflectedNameAttributeTestAttributeAttributeGetter(info);
3158 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3161 static void reflectReflectedNameAttributeTestAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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));
3170 static void reflectReflectedNameAttributeTestAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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");
3178 static void reflectBooleanAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
3180 v8::Handle<v8::Object> holder = info.Holder();
3181 TestObject* impl = V8TestObject::toNative(holder);
3182 v8SetReturnValueBool(info, impl->fastHasAttribute(HTMLNames::reflectbooleanattributeAttr));
3185 static void reflectBooleanAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3187 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3188 TestObjectV8Internal::reflectBooleanAttributeAttributeGetter(info);
3189 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3192 static void reflectBooleanAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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);
3201 static void reflectBooleanAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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");
3209 static void reflectLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
3211 v8::Handle<v8::Object> holder = info.Holder();
3212 TestObject* impl = V8TestObject::toNative(holder);
3213 v8SetReturnValueInt(info, impl->getIntegralAttribute(HTMLNames::reflectlongattributeAttr));
3216 static void reflectLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3218 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3219 TestObjectV8Internal::reflectLongAttributeAttributeGetter(info);
3220 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3223 static void reflectLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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);
3233 static void reflectLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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");
3241 static void reflectUnsignedShortAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
3243 v8::Handle<v8::Object> holder = info.Holder();
3244 TestObject* impl = V8TestObject::toNative(holder);
3245 v8SetReturnValueUnsigned(info, std::max(0, impl->fastGetAttribute(HTMLNames::reflectunsignedshortattributeAttr)));
3248 static void reflectUnsignedShortAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3250 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3251 TestObjectV8Internal::reflectUnsignedShortAttributeAttributeGetter(info);
3252 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3255 static void reflectUnsignedShortAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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);
3265 static void reflectUnsignedShortAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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");
3273 static void reflectUnsignedLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
3275 v8::Handle<v8::Object> holder = info.Holder();
3276 TestObject* impl = V8TestObject::toNative(holder);
3277 v8SetReturnValueUnsigned(info, std::max(0, impl->getIntegralAttribute(HTMLNames::reflectunsignedlongattributeAttr)));
3280 static void reflectUnsignedLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3282 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3283 TestObjectV8Internal::reflectUnsignedLongAttributeAttributeGetter(info);
3284 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3287 static void reflectUnsignedLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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);
3297 static void reflectUnsignedLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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");
3305 static void idAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
3307 v8::Handle<v8::Object> holder = info.Holder();
3308 TestObject* impl = V8TestObject::toNative(holder);
3309 v8SetReturnValueString(info, impl->getIdAttribute(), info.GetIsolate());
3312 static void idAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3314 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3315 TestObjectV8Internal::idAttributeGetter(info);
3316 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3319 static void idAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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);
3328 static void idAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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");
3336 static void nameAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
3338 v8::Handle<v8::Object> holder = info.Holder();
3339 TestObject* impl = V8TestObject::toNative(holder);
3340 v8SetReturnValueString(info, impl->getNameAttribute(), info.GetIsolate());
3343 static void nameAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3345 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3346 TestObjectV8Internal::nameAttributeGetter(info);
3347 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3350 static void nameAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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);
3359 static void nameAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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");
3367 static void classAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
3369 v8::Handle<v8::Object> holder = info.Holder();
3370 TestObject* impl = V8TestObject::toNative(holder);
3371 v8SetReturnValueString(info, impl->getClassAttribute(), info.GetIsolate());
3374 static void classAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3376 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3377 TestObjectV8Internal::classAttributeGetter(info);
3378 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3381 static void classAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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);
3390 static void classAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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");
3398 static void reflectedIdAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
3400 v8::Handle<v8::Object> holder = info.Holder();
3401 TestObject* impl = V8TestObject::toNative(holder);
3402 v8SetReturnValueString(info, impl->getIdAttribute(), info.GetIsolate());
3405 static void reflectedIdAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3407 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3408 TestObjectV8Internal::reflectedIdAttributeGetter(info);
3409 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3412 static void reflectedIdAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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);
3421 static void reflectedIdAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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");
3429 static void reflectedNameAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
3431 v8::Handle<v8::Object> holder = info.Holder();
3432 TestObject* impl = V8TestObject::toNative(holder);
3433 v8SetReturnValueString(info, impl->getNameAttribute(), info.GetIsolate());
3436 static void reflectedNameAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3438 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3439 TestObjectV8Internal::reflectedNameAttributeGetter(info);
3440 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3443 static void reflectedNameAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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);
3452 static void reflectedNameAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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");
3460 static void reflectedClassAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
3462 v8::Handle<v8::Object> holder = info.Holder();
3463 TestObject* impl = V8TestObject::toNative(holder);
3464 v8SetReturnValueString(info, impl->getClassAttribute(), info.GetIsolate());
3467 static void reflectedClassAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3469 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3470 TestObjectV8Internal::reflectedClassAttributeGetter(info);
3471 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3474 static void reflectedClassAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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);
3483 static void reflectedClassAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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");
3491 static void limitedToOnlyOneAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
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()) {
3498 } else if (equalIgnoringCase(v8Value, "unique")) {
3503 v8SetReturnValueString(info, v8Value, info.GetIsolate());
3506 static void limitedToOnlyOneAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3508 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3509 TestObjectV8Internal::limitedToOnlyOneAttributeAttributeGetter(info);
3510 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3513 static void limitedToOnlyOneAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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);
3522 static void limitedToOnlyOneAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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");
3530 static void limitedToOnlyAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
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()) {
3537 } else if (equalIgnoringCase(v8Value, "Per")) {
3539 } else if (equalIgnoringCase(v8Value, "Paal")) {
3541 } else if (equalIgnoringCase(v8Value, "Espen")) {
3546 v8SetReturnValueString(info, v8Value, info.GetIsolate());
3549 static void limitedToOnlyAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3551 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3552 TestObjectV8Internal::limitedToOnlyAttributeAttributeGetter(info);
3553 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3556 static void limitedToOnlyAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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);
3565 static void limitedToOnlyAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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");
3573 static void limitedToOnlyOtherAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
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()) {
3580 } else if (equalIgnoringCase(v8Value, "Value1")) {
3582 } else if (equalIgnoringCase(v8Value, "Value2")) {
3587 v8SetReturnValueString(info, v8Value, info.GetIsolate());
3590 static void limitedToOnlyOtherAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3592 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3593 TestObjectV8Internal::limitedToOnlyOtherAttributeAttributeGetter(info);
3594 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3597 static void limitedToOnlyOtherAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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);
3606 static void limitedToOnlyOtherAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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");
3614 static void limitedWithMissingDefaultAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
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()) {
3621 } else if (equalIgnoringCase(v8Value, "rsa")) {
3623 } else if (equalIgnoringCase(v8Value, "dsa")) {
3628 v8SetReturnValueString(info, v8Value, info.GetIsolate());
3631 static void limitedWithMissingDefaultAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3633 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3634 TestObjectV8Internal::limitedWithMissingDefaultAttributeAttributeGetter(info);
3635 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3638 static void limitedWithMissingDefaultAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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);
3647 static void limitedWithMissingDefaultAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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");
3655 static void limitedWithInvalidMissingDefaultAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
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()) {
3662 } else if (equalIgnoringCase(v8Value, "ltr")) {
3664 } else if (equalIgnoringCase(v8Value, "rtl")) {
3666 } else if (equalIgnoringCase(v8Value, "auto")) {
3671 v8SetReturnValueString(info, v8Value, info.GetIsolate());
3674 static void limitedWithInvalidMissingDefaultAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3676 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3677 TestObjectV8Internal::limitedWithInvalidMissingDefaultAttributeAttributeGetter(info);
3678 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3681 static void limitedWithInvalidMissingDefaultAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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);
3690 static void limitedWithInvalidMissingDefaultAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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");
3698 static void corsSettingAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
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()) {
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";
3712 v8Value = "anonymous";
3714 v8SetReturnValueString(info, v8Value, info.GetIsolate());
3717 static void corsSettingAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3719 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3720 TestObjectV8Internal::corsSettingAttributeAttributeGetter(info);
3721 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3724 static void limitedWithEmptyMissingInvalidAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
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()) {
3733 } else if (equalIgnoringCase(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";
3742 v8Value = "invalid";
3744 v8SetReturnValueString(info, v8Value, info.GetIsolate());
3747 static void limitedWithEmptyMissingInvalidAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3749 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3750 TestObjectV8Internal::limitedWithEmptyMissingInvalidAttributeAttributeGetter(info);
3751 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3754 static void replaceableReadonlyLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
3756 v8::Handle<v8::Object> holder = info.Holder();
3757 TestObject* impl = V8TestObject::toNative(holder);
3758 v8SetReturnValueInt(info, impl->replaceableReadonlyLongAttribute());
3761 static void replaceableReadonlyLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3763 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3764 TestObjectV8Internal::replaceableReadonlyLongAttributeAttributeGetter(info);
3765 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3768 static void locationReplaceableAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
3770 v8::Handle<v8::Object> holder = info.Holder();
3771 TestObject* impl = V8TestObject::toNative(holder);
3772 v8SetReturnValueFast(info, WTF::getPtr(impl->locationReplaceable()), impl);
3775 static void locationReplaceableAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3777 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3778 TestObjectV8Internal::locationReplaceableAttributeGetter(info);
3779 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3782 static void locationReplaceableAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
3784 v8::Handle<v8::Object> holder = info.Holder();
3785 TestObject* proxyImpl = V8TestObject::toNative(holder);
3786 RefPtr<TestNode> impl = WTF::getPtr(proxyImpl->locationReplaceable());
3789 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value);
3790 impl->setHref(cppValue);
3793 static void locationReplaceableAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
3795 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
3796 TestObjectV8Internal::locationReplaceableAttributeSetter(v8Value, info);
3797 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3800 static void runtimeEnabledLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
3802 v8::Handle<v8::Object> holder = info.Holder();
3803 TestObject* impl = V8TestObject::toNative(holder);
3804 v8SetReturnValueInt(info, impl->runtimeEnabledLongAttribute());
3807 static void runtimeEnabledLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3809 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3810 TestObjectV8Internal::runtimeEnabledLongAttributeAttributeGetter(info);
3811 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3814 static void runtimeEnabledLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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);
3823 static void runtimeEnabledLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
3825 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
3826 TestObjectV8Internal::runtimeEnabledLongAttributeAttributeSetter(v8Value, info);
3827 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3830 static void perContextEnabledRuntimeEnabledLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
3832 v8::Handle<v8::Object> holder = info.Holder();
3833 TestObject* impl = V8TestObject::toNative(holder);
3834 v8SetReturnValueInt(info, impl->perContextEnabledRuntimeEnabledLongAttribute());
3837 static void perContextEnabledRuntimeEnabledLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3839 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3840 TestObjectV8Internal::perContextEnabledRuntimeEnabledLongAttributeAttributeGetter(info);
3841 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3844 static void perContextEnabledRuntimeEnabledLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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);
3853 static void perContextEnabledRuntimeEnabledLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
3855 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
3856 TestObjectV8Internal::perContextEnabledRuntimeEnabledLongAttributeAttributeSetter(v8Value, info);
3857 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3860 #if ENABLE(CONDITION)
3861 static void conditionalRuntimeEnabledLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
3863 v8::Handle<v8::Object> holder = info.Holder();
3864 TestObject* impl = V8TestObject::toNative(holder);
3865 v8SetReturnValueInt(info, impl->conditionalRuntimeEnabledLongAttribute());
3867 #endif // ENABLE(CONDITION)
3869 #if ENABLE(CONDITION)
3870 static void conditionalRuntimeEnabledLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3872 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3873 TestObjectV8Internal::conditionalRuntimeEnabledLongAttributeAttributeGetter(info);
3874 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3876 #endif // ENABLE(CONDITION)
3878 #if ENABLE(CONDITION)
3879 static void conditionalRuntimeEnabledLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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);
3887 #endif // ENABLE(CONDITION)
3889 #if ENABLE(CONDITION)
3890 static void conditionalRuntimeEnabledLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
3892 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
3893 TestObjectV8Internal::conditionalRuntimeEnabledLongAttributeAttributeSetter(v8Value, info);
3894 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3896 #endif // ENABLE(CONDITION)
3898 static void setterCallWithActiveWindowAndFirstWindowStringAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
3900 v8::Handle<v8::Object> holder = info.Holder();
3901 TestObject* impl = V8TestObject::toNative(holder);
3902 v8SetReturnValueString(info, impl->setterCallWithActiveWindowAndFirstWindowStringAttribute(), info.GetIsolate());
3905 static void setterCallWithActiveWindowAndFirstWindowStringAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3907 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3908 TestObjectV8Internal::setterCallWithActiveWindowAndFirstWindowStringAttributeAttributeGetter(info);
3909 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3912 static void setterCallWithActiveWindowAndFirstWindowStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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);
3920 static void setterCallWithActiveWindowAndFirstWindowStringAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
3922 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
3923 TestObjectV8Internal::setterCallWithActiveWindowAndFirstWindowStringAttributeAttributeSetter(v8Value, info);
3924 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3927 static void setterCallWithExecutionContextStringAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
3929 v8::Handle<v8::Object> holder = info.Holder();
3930 TestObject* impl = V8TestObject::toNative(holder);
3931 v8SetReturnValueString(info, impl->setterCallWithExecutionContextStringAttribute(), info.GetIsolate());
3934 static void setterCallWithExecutionContextStringAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3936 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3937 TestObjectV8Internal::setterCallWithExecutionContextStringAttributeAttributeGetter(info);
3938 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3941 static void setterCallWithExecutionContextStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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);
3950 static void setterCallWithExecutionContextStringAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
3952 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
3953 TestObjectV8Internal::setterCallWithExecutionContextStringAttributeAttributeSetter(v8Value, info);
3954 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3957 static void treatNullAsNullStringStringAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
3959 v8::Handle<v8::Object> holder = info.Holder();
3960 TestObject* impl = V8TestObject::toNative(holder);
3961 v8SetReturnValueString(info, impl->treatNullAsNullStringStringAttribute(), info.GetIsolate());
3964 static void treatNullAsNullStringStringAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3966 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3967 TestObjectV8Internal::treatNullAsNullStringStringAttributeAttributeGetter(info);
3968 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3971 static void treatNullAsNullStringStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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);
3979 static void treatNullAsNullStringStringAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
3981 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
3982 TestObjectV8Internal::treatNullAsNullStringStringAttributeAttributeSetter(v8Value, info);
3983 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
3986 static void treatReturnedNullStringAsNullStringAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
3988 v8::Handle<v8::Object> holder = info.Holder();
3989 TestObject* impl = V8TestObject::toNative(holder);
3990 v8SetReturnValueStringOrNull(info, impl->treatReturnedNullStringAsNullStringAttribute(), info.GetIsolate());
3993 static void treatReturnedNullStringAsNullStringAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
3995 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
3996 TestObjectV8Internal::treatReturnedNullStringAsNullStringAttributeAttributeGetter(info);
3997 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4000 static void treatReturnedNullStringAsNullStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
4002 v8::Handle<v8::Object> holder = info.Holder();
4003 TestObject* impl = V8TestObject::toNative(holder);
4004 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value);
4005 impl->setTreatReturnedNullStringAsNullStringAttribute(cppValue);
4008 static void treatReturnedNullStringAsNullStringAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
4010 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
4011 TestObjectV8Internal::treatReturnedNullStringAsNullStringAttributeAttributeSetter(v8Value, info);
4012 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4015 static void treatReturnedNullStringAsUndefinedStringAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
4017 v8::Handle<v8::Object> holder = info.Holder();
4018 TestObject* impl = V8TestObject::toNative(holder);
4019 v8SetReturnValueStringOrUndefined(info, impl->treatReturnedNullStringAsUndefinedStringAttribute(), info.GetIsolate());
4022 static void treatReturnedNullStringAsUndefinedStringAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
4024 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
4025 TestObjectV8Internal::treatReturnedNullStringAsUndefinedStringAttributeAttributeGetter(info);
4026 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4029 static void treatReturnedNullStringAsUndefinedStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
4031 v8::Handle<v8::Object> holder = info.Holder();
4032 TestObject* impl = V8TestObject::toNative(holder);
4033 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value);
4034 impl->setTreatReturnedNullStringAsUndefinedStringAttribute(cppValue);
4037 static void treatReturnedNullStringAsUndefinedStringAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
4039 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
4040 TestObjectV8Internal::treatReturnedNullStringAsUndefinedStringAttributeAttributeSetter(v8Value, info);
4041 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4044 static void typeCheckingInterfaceNullableStringFloatAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
4046 v8::Handle<v8::Object> holder = info.Holder();
4047 TestObject* impl = V8TestObject::toNative(holder);
4048 v8SetReturnValue(info, impl->typeCheckingInterfaceNullableStringFloatAttribute());
4051 static void typeCheckingInterfaceNullableStringFloatAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
4053 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
4054 TestObjectV8Internal::typeCheckingInterfaceNullableStringFloatAttributeAttributeGetter(info);
4055 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4058 static void typeCheckingInterfaceNullableStringFloatAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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);
4066 static void typeCheckingInterfaceNullableStringFloatAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
4068 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
4069 TestObjectV8Internal::typeCheckingInterfaceNullableStringFloatAttributeAttributeSetter(v8Value, info);
4070 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4073 static void typeCheckingInterfaceTestInterfaceAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
4075 v8::Handle<v8::Object> holder = info.Holder();
4076 TestObject* impl = V8TestObject::toNative(holder);
4077 v8SetReturnValueFast(info, WTF::getPtr(impl->typeCheckingInterfaceTestInterfaceAttribute()), impl);
4080 static void typeCheckingInterfaceTestInterfaceAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
4082 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
4083 TestObjectV8Internal::typeCheckingInterfaceTestInterfaceAttributeAttributeGetter(info);
4084 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4087 static void typeCheckingInterfaceTestInterfaceAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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();
4096 TestObject* impl = V8TestObject::toNative(holder);
4097 TONATIVE_VOID(TestInterfaceImplementation*, cppValue, V8TestInterface::toNativeWithTypeCheck(info.GetIsolate(), v8Value));
4098 impl->setTypeCheckingInterfaceTestInterfaceAttribute(WTF::getPtr(cppValue));
4101 static void typeCheckingInterfaceTestInterfaceAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
4103 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
4104 TestObjectV8Internal::typeCheckingInterfaceTestInterfaceAttributeAttributeSetter(v8Value, info);
4105 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4108 static void typeCheckingNullableTestInterfaceOrNullAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
4110 v8::Handle<v8::Object> holder = info.Holder();
4111 TestObject* impl = V8TestObject::toNative(holder);
4112 RefPtr<TestInterfaceImplementation> v8Value = impl->typeCheckingNullableTestInterfaceOrNullAttribute();
4114 v8SetReturnValueNull(info);
4117 v8SetReturnValueFast(info, WTF::getPtr(v8Value.release()), impl);
4120 static void typeCheckingNullableTestInterfaceOrNullAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
4122 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
4123 TestObjectV8Internal::typeCheckingNullableTestInterfaceOrNullAttributeAttributeGetter(info);
4124 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4127 static void typeCheckingNullableTestInterfaceOrNullAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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));
4136 static void typeCheckingNullableTestInterfaceOrNullAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
4138 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
4139 TestObjectV8Internal::typeCheckingNullableTestInterfaceOrNullAttributeAttributeSetter(v8Value, info);
4140 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4143 static void typeCheckingInterfaceNullableTestInterfaceOrNullAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
4145 v8::Handle<v8::Object> holder = info.Holder();
4146 TestObject* impl = V8TestObject::toNative(holder);
4147 RefPtr<TestInterfaceImplementation> v8Value = impl->typeCheckingInterfaceNullableTestInterfaceOrNullAttribute();
4149 v8SetReturnValueNull(info);
4152 v8SetReturnValueFast(info, WTF::getPtr(v8Value.release()), impl);
4155 static void typeCheckingInterfaceNullableTestInterfaceOrNullAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
4157 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
4158 TestObjectV8Internal::typeCheckingInterfaceNullableTestInterfaceOrNullAttributeAttributeGetter(info);
4159 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4162 static void typeCheckingInterfaceNullableTestInterfaceOrNullAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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();
4171 TestObject* impl = V8TestObject::toNative(holder);
4172 TONATIVE_VOID(TestInterfaceImplementation*, cppValue, V8TestInterface::toNativeWithTypeCheck(info.GetIsolate(), v8Value));
4173 impl->setTypeCheckingInterfaceNullableTestInterfaceOrNullAttribute(WTF::getPtr(cppValue));
4176 static void typeCheckingInterfaceNullableTestInterfaceOrNullAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
4178 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
4179 TestObjectV8Internal::typeCheckingInterfaceNullableTestInterfaceOrNullAttributeAttributeSetter(v8Value, info);
4180 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4183 static void urlStringAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
4185 v8::Handle<v8::Object> holder = info.Holder();
4186 TestObject* impl = V8TestObject::toNative(holder);
4187 v8SetReturnValueString(info, impl->getURLAttribute(HTMLNames::urlstringattributeAttr), info.GetIsolate());
4190 static void urlStringAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
4192 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
4193 TestObjectV8Internal::urlStringAttributeAttributeGetter(info);
4194 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4197 static void urlStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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);
4206 static void urlStringAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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");
4214 static void urlStringAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
4216 v8::Handle<v8::Object> holder = info.Holder();
4217 TestObject* impl = V8TestObject::toNative(holder);
4218 v8SetReturnValueString(info, impl->getURLAttribute(HTMLNames::reflectUrlAttributeAttr), info.GetIsolate());
4221 static void urlStringAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
4223 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
4224 TestObjectV8Internal::urlStringAttributeAttributeGetter(info);
4225 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4228 static void urlStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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);
4237 static void urlStringAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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");
4245 static void unforgeableLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
4247 v8::Handle<v8::Object> holder = V8TestObject::findInstanceInPrototypeChain(info.This(), info.GetIsolate());
4248 if (holder.IsEmpty())
4250 TestObject* impl = V8TestObject::toNative(holder);
4251 v8SetReturnValueInt(info, impl->unforgeableLongAttribute());
4254 static void unforgeableLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
4256 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
4257 TestObjectV8Internal::unforgeableLongAttributeAttributeGetter(info);
4258 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4261 static void unforgeableLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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);
4270 static void unforgeableLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
4272 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
4273 TestObjectV8Internal::unforgeableLongAttributeAttributeSetter(v8Value, info);
4274 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4277 static void activityLoggingSetterOnlyLogPreviousValueAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
4279 v8::Handle<v8::Object> holder = info.Holder();
4280 TestObject* impl = V8TestObject::toNative(holder);
4281 v8SetReturnValueInt(info, impl->activityLoggingSetterOnlyLogPreviousValueAttribute());
4284 static void activityLoggingSetterOnlyLogPreviousValueAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
4286 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
4287 TestObjectV8Internal::activityLoggingSetterOnlyLogPreviousValueAttributeAttributeGetter(info);
4288 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4291 static void activityLoggingSetterOnlyLogPreviousValueAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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);
4300 static void activityLoggingSetterOnlyLogPreviousValueAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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);
4310 TestObjectV8Internal::activityLoggingSetterOnlyLogPreviousValueAttributeAttributeSetter(v8Value, info);
4311 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4314 static void activityLoggingLogPreviousValueInterfaceAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
4316 v8::Handle<v8::Object> holder = info.Holder();
4317 TestObject* impl = V8TestObject::toNative(holder);
4318 v8SetReturnValueFast(info, WTF::getPtr(impl->activityLoggingLogPreviousValueInterfaceAttribute()), impl);
4321 static void activityLoggingLogPreviousValueInterfaceAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
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");
4331 static void activityLoggingLogPreviousValueInterfaceAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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));
4339 static void activityLoggingLogPreviousValueInterfaceAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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);
4349 TestObjectV8Internal::activityLoggingLogPreviousValueInterfaceAttributeAttributeSetter(v8Value, info);
4350 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4353 static void testInterfaceAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
4355 v8::Handle<v8::Object> holder = info.Holder();
4356 TestObject* impl = V8TestObject::toNative(holder);
4357 v8SetReturnValueFast(info, WTF::getPtr(impl->testInterfaceAttribute()), impl);
4360 static void testInterfaceAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
4362 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
4363 TestObjectV8Internal::testInterfaceAttributeAttributeGetter(info);
4364 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4367 static void testInterfaceAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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));
4375 static void testInterfaceAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
4377 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
4378 TestObjectV8Internal::testInterfaceAttributeAttributeSetter(v8Value, info);
4379 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4382 static void testInterfaceGarbageCollectedAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
4384 v8::Handle<v8::Object> holder = info.Holder();
4385 TestObject* impl = V8TestObject::toNative(holder);
4386 v8SetReturnValueFast(info, WTF::getPtr(impl->testInterfaceGarbageCollectedAttribute()), impl);
4389 static void testInterfaceGarbageCollectedAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
4391 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
4392 TestObjectV8Internal::testInterfaceGarbageCollectedAttributeAttributeGetter(info);
4393 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4396 static void testInterfaceGarbageCollectedAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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));
4404 static void testInterfaceGarbageCollectedAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
4406 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
4407 TestObjectV8Internal::testInterfaceGarbageCollectedAttributeAttributeSetter(v8Value, info);
4408 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4411 static void testInterfaceGarbageCollectedOrNullAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
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);
4418 v8SetReturnValueNull(info);
4421 v8SetReturnValueFast(info, WTF::getPtr(v8Value.release()), impl);
4424 static void testInterfaceGarbageCollectedOrNullAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
4426 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
4427 TestObjectV8Internal::testInterfaceGarbageCollectedOrNullAttributeAttributeGetter(info);
4428 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4431 static void testInterfaceGarbageCollectedOrNullAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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));
4439 static void testInterfaceGarbageCollectedOrNullAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
4441 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
4442 TestObjectV8Internal::testInterfaceGarbageCollectedOrNullAttributeAttributeSetter(v8Value, info);
4443 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4446 static void testInterfaceWillBeGarbageCollectedAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
4448 v8::Handle<v8::Object> holder = info.Holder();
4449 TestObject* impl = V8TestObject::toNative(holder);
4450 v8SetReturnValueFast(info, WTF::getPtr(impl->testInterfaceWillBeGarbageCollectedAttribute()), impl);
4453 static void testInterfaceWillBeGarbageCollectedAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
4455 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
4456 TestObjectV8Internal::testInterfaceWillBeGarbageCollectedAttributeAttributeGetter(info);
4457 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4460 static void testInterfaceWillBeGarbageCollectedAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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));
4468 static void testInterfaceWillBeGarbageCollectedAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
4470 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
4471 TestObjectV8Internal::testInterfaceWillBeGarbageCollectedAttributeAttributeSetter(v8Value, info);
4472 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4475 static void testInterfaceWillBeGarbageCollectedOrNullAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
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);
4482 v8SetReturnValueNull(info);
4485 v8SetReturnValueFast(info, WTF::getPtr(v8Value.release()), impl);
4488 static void testInterfaceWillBeGarbageCollectedOrNullAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
4490 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
4491 TestObjectV8Internal::testInterfaceWillBeGarbageCollectedOrNullAttributeAttributeGetter(info);
4492 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4495 static void testInterfaceWillBeGarbageCollectedOrNullAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
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));
4503 static void testInterfaceWillBeGarbageCollectedOrNullAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
4505 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
4506 TestObjectV8Internal::testInterfaceWillBeGarbageCollectedOrNullAttributeAttributeSetter(v8Value, info);
4507 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4510 static void TestObjectConstructorGetter(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
4512 v8::Handle<v8::Value> data = info.Data();
4513 ASSERT(data->IsExternal());
4514 V8PerContextData* perContextData = V8PerContextData::from(info.Holder()->CreationContext());
4515 if (!perContextData)
4517 v8SetReturnValue(info, perContextData->constructorForType(WrapperTypeInfo::unwrap(data)));
4520 static void testInterfaceEmptyConstructorAttributeConstructorGetterCallback(v8::Local<v8::String> property, const v8::PropertyCallbackInfo<v8::Value>& info)
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");
4528 static void measureAsFeatureNameTestInterfaceEmptyConstructorAttributeConstructorGetterCallback(v8::Local<v8::String> property, const v8::PropertyCallbackInfo<v8::Value>& info)
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");
4536 static void TestObjectReplaceableAttributeSetter(v8::Local<v8::String> name, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
4538 if (info.This()->IsObject())
4539 v8::Handle<v8::Object>::Cast(info.This())->ForceSet(name, v8Value);
4542 static void TestObjectReplaceableAttributeSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
4544 TestObjectV8Internal::TestObjectReplaceableAttributeSetter(name, v8Value, info);
4547 static void voidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4549 TestObject* impl = V8TestObject::toNative(info.Holder());
4553 static void voidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4555 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4556 TestObjectV8Internal::voidMethodMethod(info);
4557 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4560 static void staticVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4562 TestObject::staticVoidMethod();
4565 static void staticVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4567 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4568 TestObjectV8Internal::staticVoidMethodMethod(info);
4569 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4572 static void dateMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4574 TestObject* impl = V8TestObject::toNative(info.Holder());
4575 v8SetReturnValue(info, v8DateOrNaN(impl->dateMethod(), info.GetIsolate()));
4578 static void dateMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4580 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4581 TestObjectV8Internal::dateMethodMethod(info);
4582 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4585 static void stringMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4587 TestObject* impl = V8TestObject::toNative(info.Holder());
4588 v8SetReturnValueString(info, impl->stringMethod(), info.GetIsolate());
4591 static void stringMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4593 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4594 TestObjectV8Internal::stringMethodMethod(info);
4595 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4598 static void readonlyDOMTimeStampMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4600 TestObject* impl = V8TestObject::toNative(info.Holder());
4601 v8SetReturnValue(info, static_cast<double>(impl->readonlyDOMTimeStampMethod()));
4604 static void readonlyDOMTimeStampMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4606 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4607 TestObjectV8Internal::readonlyDOMTimeStampMethodMethod(info);
4608 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4611 static void booleanMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4613 TestObject* impl = V8TestObject::toNative(info.Holder());
4614 v8SetReturnValueBool(info, impl->booleanMethod());
4617 static void booleanMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4619 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4620 TestObjectV8Internal::booleanMethodMethod(info);
4621 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4624 static void byteMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4626 TestObject* impl = V8TestObject::toNative(info.Holder());
4627 v8SetReturnValueInt(info, impl->byteMethod());
4630 static void byteMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4632 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4633 TestObjectV8Internal::byteMethodMethod(info);
4634 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4637 static void doubleMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4639 TestObject* impl = V8TestObject::toNative(info.Holder());
4640 v8SetReturnValue(info, impl->doubleMethod());
4643 static void doubleMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4645 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4646 TestObjectV8Internal::doubleMethodMethod(info);
4647 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4650 static void floatMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4652 TestObject* impl = V8TestObject::toNative(info.Holder());
4653 v8SetReturnValue(info, impl->floatMethod());
4656 static void floatMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4658 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4659 TestObjectV8Internal::floatMethodMethod(info);
4660 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4663 static void longMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4665 TestObject* impl = V8TestObject::toNative(info.Holder());
4666 v8SetReturnValueInt(info, impl->longMethod());
4669 static void longMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4671 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4672 TestObjectV8Internal::longMethodMethod(info);
4673 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4676 static void longLongMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4678 TestObject* impl = V8TestObject::toNative(info.Holder());
4679 v8SetReturnValue(info, static_cast<double>(impl->longLongMethod()));
4682 static void longLongMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4684 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4685 TestObjectV8Internal::longLongMethodMethod(info);
4686 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4689 static void octetMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4691 TestObject* impl = V8TestObject::toNative(info.Holder());
4692 v8SetReturnValueUnsigned(info, impl->octetMethod());
4695 static void octetMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4697 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4698 TestObjectV8Internal::octetMethodMethod(info);
4699 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4702 static void shortMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4704 TestObject* impl = V8TestObject::toNative(info.Holder());
4705 v8SetReturnValueInt(info, impl->shortMethod());
4708 static void shortMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4710 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4711 TestObjectV8Internal::shortMethodMethod(info);
4712 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4715 static void unsignedLongMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4717 TestObject* impl = V8TestObject::toNative(info.Holder());
4718 v8SetReturnValueUnsigned(info, impl->unsignedLongMethod());
4721 static void unsignedLongMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4723 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4724 TestObjectV8Internal::unsignedLongMethodMethod(info);
4725 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4728 static void unsignedLongLongMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4730 TestObject* impl = V8TestObject::toNative(info.Holder());
4731 v8SetReturnValue(info, static_cast<double>(impl->unsignedLongLongMethod()));
4734 static void unsignedLongLongMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4736 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4737 TestObjectV8Internal::unsignedLongLongMethodMethod(info);
4738 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4741 static void unsignedShortMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4743 TestObject* impl = V8TestObject::toNative(info.Holder());
4744 v8SetReturnValueUnsigned(info, impl->unsignedShortMethod());
4747 static void unsignedShortMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4749 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4750 TestObjectV8Internal::unsignedShortMethodMethod(info);
4751 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4754 static void voidMethodDateArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4756 if (UNLIKELY(info.Length() < 1)) {
4757 throwArityTypeErrorForMethod("voidMethodDateArg", "TestObject", 1, info.Length(), info.GetIsolate());
4760 TestObject* impl = V8TestObject::toNative(info.Holder());
4761 TONATIVE_VOID(double, dateArg, toCoreDate(info[0]));
4762 impl->voidMethodDateArg(dateArg);
4765 static void voidMethodDateArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4767 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4768 TestObjectV8Internal::voidMethodDateArgMethod(info);
4769 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4772 static void voidMethodStringArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4774 if (UNLIKELY(info.Length() < 1)) {
4775 throwArityTypeErrorForMethod("voidMethodStringArg", "TestObject", 1, info.Length(), info.GetIsolate());
4778 TestObject* impl = V8TestObject::toNative(info.Holder());
4779 TOSTRING_VOID(V8StringResource<>, stringArg, info[0]);
4780 impl->voidMethodStringArg(stringArg);
4783 static void voidMethodStringArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4785 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4786 TestObjectV8Internal::voidMethodStringArgMethod(info);
4787 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4790 static void voidMethodDOMTimeStampArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4792 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodDOMTimeStampArg", "TestObject", info.Holder(), info.GetIsolate());
4793 if (UNLIKELY(info.Length() < 1)) {
4794 throwArityTypeError(exceptionState, 1, info.Length());
4797 TestObject* impl = V8TestObject::toNative(info.Holder());
4798 TONATIVE_VOID_EXCEPTIONSTATE(unsigned long long, domTimeStampArg, toUInt64(info[0], exceptionState), exceptionState);
4799 impl->voidMethodDOMTimeStampArg(domTimeStampArg);
4802 static void voidMethodDOMTimeStampArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4804 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4805 TestObjectV8Internal::voidMethodDOMTimeStampArgMethod(info);
4806 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4809 static void voidMethodBooleanArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4811 if (UNLIKELY(info.Length() < 1)) {
4812 throwArityTypeErrorForMethod("voidMethodBooleanArg", "TestObject", 1, info.Length(), info.GetIsolate());
4815 TestObject* impl = V8TestObject::toNative(info.Holder());
4816 TONATIVE_VOID(bool, booleanArg, info[0]->BooleanValue());
4817 impl->voidMethodBooleanArg(booleanArg);
4820 static void voidMethodBooleanArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4822 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4823 TestObjectV8Internal::voidMethodBooleanArgMethod(info);
4824 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4827 static void voidMethodByteArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4829 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodByteArg", "TestObject", info.Holder(), info.GetIsolate());
4830 if (UNLIKELY(info.Length() < 1)) {
4831 throwArityTypeError(exceptionState, 1, info.Length());
4834 TestObject* impl = V8TestObject::toNative(info.Holder());
4835 TONATIVE_VOID_EXCEPTIONSTATE(int, byteArg, toInt8(info[0], exceptionState), exceptionState);
4836 impl->voidMethodByteArg(byteArg);
4839 static void voidMethodByteArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4841 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4842 TestObjectV8Internal::voidMethodByteArgMethod(info);
4843 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4846 static void voidMethodDoubleArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4848 if (UNLIKELY(info.Length() < 1)) {
4849 throwArityTypeErrorForMethod("voidMethodDoubleArg", "TestObject", 1, info.Length(), info.GetIsolate());
4852 TestObject* impl = V8TestObject::toNative(info.Holder());
4853 TONATIVE_VOID(double, doubleArg, static_cast<double>(info[0]->NumberValue()));
4854 impl->voidMethodDoubleArg(doubleArg);
4857 static void voidMethodDoubleArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4859 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4860 TestObjectV8Internal::voidMethodDoubleArgMethod(info);
4861 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4864 static void voidMethodFloatArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4866 if (UNLIKELY(info.Length() < 1)) {
4867 throwArityTypeErrorForMethod("voidMethodFloatArg", "TestObject", 1, info.Length(), info.GetIsolate());
4870 TestObject* impl = V8TestObject::toNative(info.Holder());
4871 TONATIVE_VOID(float, floatArg, static_cast<float>(info[0]->NumberValue()));
4872 impl->voidMethodFloatArg(floatArg);
4875 static void voidMethodFloatArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4877 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4878 TestObjectV8Internal::voidMethodFloatArgMethod(info);
4879 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4882 static void voidMethodLongArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4884 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodLongArg", "TestObject", info.Holder(), info.GetIsolate());
4885 if (UNLIKELY(info.Length() < 1)) {
4886 throwArityTypeError(exceptionState, 1, info.Length());
4889 TestObject* impl = V8TestObject::toNative(info.Holder());
4890 TONATIVE_VOID_EXCEPTIONSTATE(int, longArg, toInt32(info[0], exceptionState), exceptionState);
4891 impl->voidMethodLongArg(longArg);
4894 static void voidMethodLongArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4896 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4897 TestObjectV8Internal::voidMethodLongArgMethod(info);
4898 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4901 static void voidMethodLongLongArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4903 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodLongLongArg", "TestObject", info.Holder(), info.GetIsolate());
4904 if (UNLIKELY(info.Length() < 1)) {
4905 throwArityTypeError(exceptionState, 1, info.Length());
4908 TestObject* impl = V8TestObject::toNative(info.Holder());
4909 TONATIVE_VOID_EXCEPTIONSTATE(long long, longLongArg, toInt64(info[0], exceptionState), exceptionState);
4910 impl->voidMethodLongLongArg(longLongArg);
4913 static void voidMethodLongLongArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4915 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4916 TestObjectV8Internal::voidMethodLongLongArgMethod(info);
4917 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4920 static void voidMethodOctetArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4922 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodOctetArg", "TestObject", info.Holder(), info.GetIsolate());
4923 if (UNLIKELY(info.Length() < 1)) {
4924 throwArityTypeError(exceptionState, 1, info.Length());
4927 TestObject* impl = V8TestObject::toNative(info.Holder());
4928 TONATIVE_VOID_EXCEPTIONSTATE(unsigned, octetArg, toUInt8(info[0], exceptionState), exceptionState);
4929 impl->voidMethodOctetArg(octetArg);
4932 static void voidMethodOctetArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4934 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4935 TestObjectV8Internal::voidMethodOctetArgMethod(info);
4936 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4939 static void voidMethodShortArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4941 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodShortArg", "TestObject", info.Holder(), info.GetIsolate());
4942 if (UNLIKELY(info.Length() < 1)) {
4943 throwArityTypeError(exceptionState, 1, info.Length());
4946 TestObject* impl = V8TestObject::toNative(info.Holder());
4947 TONATIVE_VOID_EXCEPTIONSTATE(int, shortArg, toInt16(info[0], exceptionState), exceptionState);
4948 impl->voidMethodShortArg(shortArg);
4951 static void voidMethodShortArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4953 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4954 TestObjectV8Internal::voidMethodShortArgMethod(info);
4955 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4958 static void voidMethodUnsignedLongArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4960 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodUnsignedLongArg", "TestObject", info.Holder(), info.GetIsolate());
4961 if (UNLIKELY(info.Length() < 1)) {
4962 throwArityTypeError(exceptionState, 1, info.Length());
4965 TestObject* impl = V8TestObject::toNative(info.Holder());
4966 TONATIVE_VOID_EXCEPTIONSTATE(unsigned, unsignedLongArg, toUInt32(info[0], exceptionState), exceptionState);
4967 impl->voidMethodUnsignedLongArg(unsignedLongArg);
4970 static void voidMethodUnsignedLongArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4972 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4973 TestObjectV8Internal::voidMethodUnsignedLongArgMethod(info);
4974 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4977 static void voidMethodUnsignedLongLongArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4979 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodUnsignedLongLongArg", "TestObject", info.Holder(), info.GetIsolate());
4980 if (UNLIKELY(info.Length() < 1)) {
4981 throwArityTypeError(exceptionState, 1, info.Length());
4984 TestObject* impl = V8TestObject::toNative(info.Holder());
4985 TONATIVE_VOID_EXCEPTIONSTATE(unsigned long long, unsignedLongLongArg, toUInt64(info[0], exceptionState), exceptionState);
4986 impl->voidMethodUnsignedLongLongArg(unsignedLongLongArg);
4989 static void voidMethodUnsignedLongLongArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4991 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4992 TestObjectV8Internal::voidMethodUnsignedLongLongArgMethod(info);
4993 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
4996 static void voidMethodUnsignedShortArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
4998 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodUnsignedShortArg", "TestObject", info.Holder(), info.GetIsolate());
4999 if (UNLIKELY(info.Length() < 1)) {
5000 throwArityTypeError(exceptionState, 1, info.Length());
5003 TestObject* impl = V8TestObject::toNative(info.Holder());
5004 TONATIVE_VOID_EXCEPTIONSTATE(unsigned, unsignedShortArg, toUInt16(info[0], exceptionState), exceptionState);
5005 impl->voidMethodUnsignedShortArg(unsignedShortArg);
5008 static void voidMethodUnsignedShortArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5010 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5011 TestObjectV8Internal::voidMethodUnsignedShortArgMethod(info);
5012 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5015 static void testInterfaceEmptyMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5017 TestObject* impl = V8TestObject::toNative(info.Holder());
5018 v8SetReturnValue(info, impl->testInterfaceEmptyMethod());
5021 static void testInterfaceEmptyMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5023 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5024 TestObjectV8Internal::testInterfaceEmptyMethodMethod(info);
5025 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5028 static void voidMethodTestInterfaceEmptyArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5030 if (UNLIKELY(info.Length() < 1)) {
5031 throwArityTypeErrorForMethod("voidMethodTestInterfaceEmptyArg", "TestObject", 1, info.Length(), info.GetIsolate());
5034 TestObject* impl = V8TestObject::toNative(info.Holder());
5035 TONATIVE_VOID(TestInterfaceEmpty*, testInterfaceEmptyArg, V8TestInterfaceEmpty::toNativeWithTypeCheck(info.GetIsolate(), info[0]));
5036 impl->voidMethodTestInterfaceEmptyArg(testInterfaceEmptyArg);
5039 static void voidMethodTestInterfaceEmptyArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5041 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5042 TestObjectV8Internal::voidMethodTestInterfaceEmptyArgMethod(info);
5043 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5046 static void voidMethodLongArgTestInterfaceEmptyArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5048 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodLongArgTestInterfaceEmptyArg", "TestObject", info.Holder(), info.GetIsolate());
5049 if (UNLIKELY(info.Length() < 2)) {
5050 throwArityTypeError(exceptionState, 2, info.Length());
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);
5059 static void voidMethodLongArgTestInterfaceEmptyArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5061 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5062 TestObjectV8Internal::voidMethodLongArgTestInterfaceEmptyArgMethod(info);
5063 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5066 static void voidCallbackFunctionMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5068 TestObject* impl = V8TestObject::toNative(info.Holder());
5069 v8SetReturnValue(info, impl->voidCallbackFunctionMethod().v8Value());
5072 static void voidCallbackFunctionMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5074 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5075 TestObjectV8Internal::voidCallbackFunctionMethodMethod(info);
5076 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5079 static void anyCallbackFunctionOptionalAnyArgMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5081 TestObject* impl = V8TestObject::toNative(info.Holder());
5082 v8SetReturnValue(info, impl->anyCallbackFunctionOptionalAnyArgMethod().v8Value());
5085 static void anyCallbackFunctionOptionalAnyArgMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5087 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5088 TestObjectV8Internal::anyCallbackFunctionOptionalAnyArgMethodMethod(info);
5089 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5092 static void voidMethodVoidCallbackFunctionArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5094 if (UNLIKELY(info.Length() < 1)) {
5095 throwArityTypeErrorForMethod("voidMethodVoidCallbackFunctionArg", "TestObject", 1, info.Length(), info.GetIsolate());
5098 TestObject* impl = V8TestObject::toNative(info.Holder());
5099 TONATIVE_VOID(ScriptValue, voidCallbackFunctionArg, ScriptValue(ScriptState::current(info.GetIsolate()), info[0]));
5100 impl->voidMethodVoidCallbackFunctionArg(voidCallbackFunctionArg);
5103 static void voidMethodVoidCallbackFunctionArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5105 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5106 TestObjectV8Internal::voidMethodVoidCallbackFunctionArgMethod(info);
5107 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5110 static void voidMethodAnyCallbackFunctionOptionalAnyArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5112 if (UNLIKELY(info.Length() < 1)) {
5113 throwArityTypeErrorForMethod("voidMethodAnyCallbackFunctionOptionalAnyArg", "TestObject", 1, info.Length(), info.GetIsolate());
5116 TestObject* impl = V8TestObject::toNative(info.Holder());
5117 TONATIVE_VOID(ScriptValue, anyCallbackFunctionOptionalAnyArgArg, ScriptValue(ScriptState::current(info.GetIsolate()), info[0]));
5118 impl->voidMethodAnyCallbackFunctionOptionalAnyArg(anyCallbackFunctionOptionalAnyArgArg);
5121 static void voidMethodAnyCallbackFunctionOptionalAnyArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5123 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5124 TestObjectV8Internal::voidMethodAnyCallbackFunctionOptionalAnyArgMethod(info);
5125 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5128 static void compareHowMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5130 TestObject* impl = V8TestObject::toNative(info.Holder());
5131 v8SetReturnValue(info, impl->compareHowMethod());
5134 static void compareHowMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5136 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5137 TestObjectV8Internal::compareHowMethodMethod(info);
5138 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5141 static void anyMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5143 TestObject* impl = V8TestObject::toNative(info.Holder());
5144 v8SetReturnValue(info, impl->anyMethod().v8Value());
5147 static void anyMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5149 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5150 TestObjectV8Internal::anyMethodMethod(info);
5151 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5154 static void voidMethodCompareHowArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5156 if (UNLIKELY(info.Length() < 1)) {
5157 throwArityTypeErrorForMethod("voidMethodCompareHowArg", "TestObject", 1, info.Length(), info.GetIsolate());
5160 TestObject* impl = V8TestObject::toNative(info.Holder());
5161 TONATIVE_VOID(Range::CompareHow, compareHowArg, static_cast<Range::CompareHow>(info[0]->Int32Value()));
5162 impl->voidMethodCompareHowArg(compareHowArg);
5165 static void voidMethodCompareHowArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5167 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5168 TestObjectV8Internal::voidMethodCompareHowArgMethod(info);
5169 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5172 static void voidMethodEventTargetArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5174 if (UNLIKELY(info.Length() < 1)) {
5175 throwArityTypeErrorForMethod("voidMethodEventTargetArg", "TestObject", 1, info.Length(), info.GetIsolate());
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);
5183 static void voidMethodEventTargetArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5185 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5186 TestObjectV8Internal::voidMethodEventTargetArgMethod(info);
5187 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5190 static void voidMethodMediaQueryListListenerArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5192 if (UNLIKELY(info.Length() < 1)) {
5193 throwArityTypeErrorForMethod("voidMethodMediaQueryListListenerArg", "TestObject", 1, info.Length(), info.GetIsolate());
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);
5201 static void voidMethodMediaQueryListListenerArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5203 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5204 TestObjectV8Internal::voidMethodMediaQueryListListenerArgMethod(info);
5205 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5208 static void voidMethodAnyArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5210 if (UNLIKELY(info.Length() < 1)) {
5211 throwArityTypeErrorForMethod("voidMethodAnyArg", "TestObject", 1, info.Length(), info.GetIsolate());
5214 TestObject* impl = V8TestObject::toNative(info.Holder());
5215 TONATIVE_VOID(ScriptValue, anyArg, ScriptValue(ScriptState::current(info.GetIsolate()), info[0]));
5216 impl->voidMethodAnyArg(anyArg);
5219 static void voidMethodAnyArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5221 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5222 TestObjectV8Internal::voidMethodAnyArgMethod(info);
5223 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5226 static void voidMethodAttrArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5228 if (UNLIKELY(info.Length() < 1)) {
5229 throwArityTypeErrorForMethod("voidMethodAttrArg", "TestObject", 1, info.Length(), info.GetIsolate());
5232 TestObject* impl = V8TestObject::toNative(info.Holder());
5233 TONATIVE_VOID(Attr*, attrArg, V8Attr::toNativeWithTypeCheck(info.GetIsolate(), info[0]));
5234 impl->voidMethodAttrArg(attrArg);
5237 static void voidMethodAttrArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5239 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5240 TestObjectV8Internal::voidMethodAttrArgMethod(info);
5241 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5244 static void voidMethodDocumentArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5246 if (UNLIKELY(info.Length() < 1)) {
5247 throwArityTypeErrorForMethod("voidMethodDocumentArg", "TestObject", 1, info.Length(), info.GetIsolate());
5250 TestObject* impl = V8TestObject::toNative(info.Holder());
5251 TONATIVE_VOID(Document*, documentArg, V8Document::toNativeWithTypeCheck(info.GetIsolate(), info[0]));
5252 impl->voidMethodDocumentArg(documentArg);
5255 static void voidMethodDocumentArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5257 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5258 TestObjectV8Internal::voidMethodDocumentArgMethod(info);
5259 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5262 static void voidMethodDocumentTypeArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5264 if (UNLIKELY(info.Length() < 1)) {
5265 throwArityTypeErrorForMethod("voidMethodDocumentTypeArg", "TestObject", 1, info.Length(), info.GetIsolate());
5268 TestObject* impl = V8TestObject::toNative(info.Holder());
5269 TONATIVE_VOID(DocumentType*, documentTypeArg, V8DocumentType::toNativeWithTypeCheck(info.GetIsolate(), info[0]));
5270 impl->voidMethodDocumentTypeArg(documentTypeArg);
5273 static void voidMethodDocumentTypeArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5275 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5276 TestObjectV8Internal::voidMethodDocumentTypeArgMethod(info);
5277 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5280 static void voidMethodElementArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5282 if (UNLIKELY(info.Length() < 1)) {
5283 throwArityTypeErrorForMethod("voidMethodElementArg", "TestObject", 1, info.Length(), info.GetIsolate());
5286 TestObject* impl = V8TestObject::toNative(info.Holder());
5287 TONATIVE_VOID(Element*, elementArg, V8Element::toNativeWithTypeCheck(info.GetIsolate(), info[0]));
5288 impl->voidMethodElementArg(elementArg);
5291 static void voidMethodElementArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5293 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5294 TestObjectV8Internal::voidMethodElementArgMethod(info);
5295 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5298 static void voidMethodNodeArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5300 if (UNLIKELY(info.Length() < 1)) {
5301 throwArityTypeErrorForMethod("voidMethodNodeArg", "TestObject", 1, info.Length(), info.GetIsolate());
5304 TestObject* impl = V8TestObject::toNative(info.Holder());
5305 TONATIVE_VOID(Node*, nodeArg, V8Node::toNativeWithTypeCheck(info.GetIsolate(), info[0]));
5306 impl->voidMethodNodeArg(nodeArg);
5309 static void voidMethodNodeArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5311 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5312 TestObjectV8Internal::voidMethodNodeArgMethod(info);
5313 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5316 static void arrayBufferMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5318 TestObject* impl = V8TestObject::toNative(info.Holder());
5319 v8SetReturnValue(info, impl->arrayBufferMethod());
5322 static void arrayBufferMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5324 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5325 TestObjectV8Internal::arrayBufferMethodMethod(info);
5326 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5329 static void arrayBufferViewMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5331 TestObject* impl = V8TestObject::toNative(info.Holder());
5332 v8SetReturnValue(info, impl->arrayBufferViewMethod());
5335 static void arrayBufferViewMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5337 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5338 TestObjectV8Internal::arrayBufferViewMethodMethod(info);
5339 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5342 static void float32ArrayMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5344 TestObject* impl = V8TestObject::toNative(info.Holder());
5345 v8SetReturnValue(info, impl->float32ArrayMethod());
5348 static void float32ArrayMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5350 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5351 TestObjectV8Internal::float32ArrayMethodMethod(info);
5352 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5355 static void int32ArrayMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5357 TestObject* impl = V8TestObject::toNative(info.Holder());
5358 v8SetReturnValue(info, impl->int32ArrayMethod());
5361 static void int32ArrayMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5363 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5364 TestObjectV8Internal::int32ArrayMethodMethod(info);
5365 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5368 static void uint8ArrayMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5370 TestObject* impl = V8TestObject::toNative(info.Holder());
5371 v8SetReturnValue(info, impl->uint8ArrayMethod());
5374 static void uint8ArrayMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5376 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5377 TestObjectV8Internal::uint8ArrayMethodMethod(info);
5378 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5381 static void voidMethodArrayBufferArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5383 if (UNLIKELY(info.Length() < 1)) {
5384 throwArityTypeErrorForMethod("voidMethodArrayBufferArg", "TestObject", 1, info.Length(), info.GetIsolate());
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);
5392 static void voidMethodArrayBufferArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5394 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5395 TestObjectV8Internal::voidMethodArrayBufferArgMethod(info);
5396 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5399 static void voidMethodArrayBufferOrNullArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5401 if (UNLIKELY(info.Length() < 1)) {
5402 throwArityTypeErrorForMethod("voidMethodArrayBufferOrNullArg", "TestObject", 1, info.Length(), info.GetIsolate());
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);
5410 static void voidMethodArrayBufferOrNullArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5412 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5413 TestObjectV8Internal::voidMethodArrayBufferOrNullArgMethod(info);
5414 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5417 static void voidMethodArrayBufferViewArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5419 if (UNLIKELY(info.Length() < 1)) {
5420 throwArityTypeErrorForMethod("voidMethodArrayBufferViewArg", "TestObject", 1, info.Length(), info.GetIsolate());
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);
5428 static void voidMethodArrayBufferViewArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5430 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5431 TestObjectV8Internal::voidMethodArrayBufferViewArgMethod(info);
5432 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5435 static void voidMethodFloat32ArrayArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5437 if (UNLIKELY(info.Length() < 1)) {
5438 throwArityTypeErrorForMethod("voidMethodFloat32ArrayArg", "TestObject", 1, info.Length(), info.GetIsolate());
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);
5446 static void voidMethodFloat32ArrayArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5448 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5449 TestObjectV8Internal::voidMethodFloat32ArrayArgMethod(info);
5450 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5453 static void voidMethodInt32ArrayArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5455 if (UNLIKELY(info.Length() < 1)) {
5456 throwArityTypeErrorForMethod("voidMethodInt32ArrayArg", "TestObject", 1, info.Length(), info.GetIsolate());
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);
5464 static void voidMethodInt32ArrayArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5466 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5467 TestObjectV8Internal::voidMethodInt32ArrayArgMethod(info);
5468 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5471 static void voidMethodUint8ArrayArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5473 if (UNLIKELY(info.Length() < 1)) {
5474 throwArityTypeErrorForMethod("voidMethodUint8ArrayArg", "TestObject", 1, info.Length(), info.GetIsolate());
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);
5482 static void voidMethodUint8ArrayArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5484 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5485 TestObjectV8Internal::voidMethodUint8ArrayArgMethod(info);
5486 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5489 static void longArrayMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5491 TestObject* impl = V8TestObject::toNative(info.Holder());
5492 v8SetReturnValue(info, v8Array(impl->longArrayMethod(), info.GetIsolate()));
5495 static void longArrayMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5497 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5498 TestObjectV8Internal::longArrayMethodMethod(info);
5499 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5502 static void stringArrayMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5504 TestObject* impl = V8TestObject::toNative(info.Holder());
5505 v8SetReturnValue(info, v8Array(impl->stringArrayMethod(), info.GetIsolate()));
5508 static void stringArrayMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5510 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5511 TestObjectV8Internal::stringArrayMethodMethod(info);
5512 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5515 static void testInterfaceEmptyArrayMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5517 TestObject* impl = V8TestObject::toNative(info.Holder());
5518 v8SetReturnValue(info, v8Array(impl->testInterfaceEmptyArrayMethod(), info.GetIsolate()));
5521 static void testInterfaceEmptyArrayMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5523 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5524 TestObjectV8Internal::testInterfaceEmptyArrayMethodMethod(info);
5525 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5528 static void voidMethodArrayLongArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5530 if (UNLIKELY(info.Length() < 1)) {
5531 throwArityTypeErrorForMethod("voidMethodArrayLongArg", "TestObject", 1, info.Length(), info.GetIsolate());
5534 TestObject* impl = V8TestObject::toNative(info.Holder());
5535 TONATIVE_VOID(Vector<int>, arrayLongArg, toNativeArray<int>(info[0], 1, info.GetIsolate()));
5536 impl->voidMethodArrayLongArg(arrayLongArg);
5539 static void voidMethodArrayLongArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5541 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5542 TestObjectV8Internal::voidMethodArrayLongArgMethod(info);
5543 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5546 static void voidMethodArrayStringArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5548 if (UNLIKELY(info.Length() < 1)) {
5549 throwArityTypeErrorForMethod("voidMethodArrayStringArg", "TestObject", 1, info.Length(), info.GetIsolate());
5552 TestObject* impl = V8TestObject::toNative(info.Holder());
5553 TONATIVE_VOID(Vector<String>, arrayStringArg, toNativeArray<String>(info[0], 1, info.GetIsolate()));
5554 impl->voidMethodArrayStringArg(arrayStringArg);
5557 static void voidMethodArrayStringArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5559 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5560 TestObjectV8Internal::voidMethodArrayStringArgMethod(info);
5561 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5564 static void voidMethodArrayTestInterfaceEmptyArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5566 if (UNLIKELY(info.Length() < 1)) {
5567 throwArityTypeErrorForMethod("voidMethodArrayTestInterfaceEmptyArg", "TestObject", 1, info.Length(), info.GetIsolate());
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);
5575 static void voidMethodArrayTestInterfaceEmptyArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5577 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5578 TestObjectV8Internal::voidMethodArrayTestInterfaceEmptyArgMethod(info);
5579 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5582 static void longSequenceMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5584 TestObject* impl = V8TestObject::toNative(info.Holder());
5585 v8SetReturnValue(info, v8Array(impl->longSequenceMethod(), info.GetIsolate()));
5588 static void longSequenceMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5590 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5591 TestObjectV8Internal::longSequenceMethodMethod(info);
5592 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5595 static void stringSequenceMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5597 TestObject* impl = V8TestObject::toNative(info.Holder());
5598 v8SetReturnValue(info, v8Array(impl->stringSequenceMethod(), info.GetIsolate()));
5601 static void stringSequenceMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5603 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5604 TestObjectV8Internal::stringSequenceMethodMethod(info);
5605 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5608 static void testInterfaceEmptySequenceMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5610 TestObject* impl = V8TestObject::toNative(info.Holder());
5611 v8SetReturnValue(info, v8Array(impl->testInterfaceEmptySequenceMethod(), info.GetIsolate()));
5614 static void testInterfaceEmptySequenceMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5616 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5617 TestObjectV8Internal::testInterfaceEmptySequenceMethodMethod(info);
5618 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5621 static void voidMethodSequenceLongArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5623 if (UNLIKELY(info.Length() < 1)) {
5624 throwArityTypeErrorForMethod("voidMethodSequenceLongArg", "TestObject", 1, info.Length(), info.GetIsolate());
5627 TestObject* impl = V8TestObject::toNative(info.Holder());
5628 TONATIVE_VOID(Vector<int>, longSequenceArg, toNativeArray<int>(info[0], 1, info.GetIsolate()));
5629 impl->voidMethodSequenceLongArg(longSequenceArg);
5632 static void voidMethodSequenceLongArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5634 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5635 TestObjectV8Internal::voidMethodSequenceLongArgMethod(info);
5636 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5639 static void voidMethodSequenceStringArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5641 if (UNLIKELY(info.Length() < 1)) {
5642 throwArityTypeErrorForMethod("voidMethodSequenceStringArg", "TestObject", 1, info.Length(), info.GetIsolate());
5645 TestObject* impl = V8TestObject::toNative(info.Holder());
5646 TONATIVE_VOID(Vector<String>, stringSequenceArg, toNativeArray<String>(info[0], 1, info.GetIsolate()));
5647 impl->voidMethodSequenceStringArg(stringSequenceArg);
5650 static void voidMethodSequenceStringArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5652 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5653 TestObjectV8Internal::voidMethodSequenceStringArgMethod(info);
5654 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5657 static void voidMethodSequenceTestInterfaceEmptyArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5659 if (UNLIKELY(info.Length() < 1)) {
5660 throwArityTypeErrorForMethod("voidMethodSequenceTestInterfaceEmptyArg", "TestObject", 1, info.Length(), info.GetIsolate());
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);
5668 static void voidMethodSequenceTestInterfaceEmptyArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5670 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5671 TestObjectV8Internal::voidMethodSequenceTestInterfaceEmptyArgMethod(info);
5672 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5675 static void voidMethodTestInterfaceEmptyOrNullArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5677 if (UNLIKELY(info.Length() < 1)) {
5678 throwArityTypeErrorForMethod("voidMethodTestInterfaceEmptyOrNullArg", "TestObject", 1, info.Length(), info.GetIsolate());
5681 TestObject* impl = V8TestObject::toNative(info.Holder());
5682 TONATIVE_VOID(TestInterfaceEmpty*, nullableTestInterfaceEmptyArg, V8TestInterfaceEmpty::toNativeWithTypeCheck(info.GetIsolate(), info[0]));
5683 impl->voidMethodTestInterfaceEmptyOrNullArg(nullableTestInterfaceEmptyArg);
5686 static void voidMethodTestInterfaceEmptyOrNullArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5688 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5689 TestObjectV8Internal::voidMethodTestInterfaceEmptyOrNullArgMethod(info);
5690 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5693 static void voidMethodTestCallbackInterfaceArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5695 if (UNLIKELY(info.Length() < 1)) {
5696 throwArityTypeErrorForMethod("voidMethodTestCallbackInterfaceArg", "TestObject", 1, info.Length(), info.GetIsolate());
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());
5704 OwnPtr<TestCallbackInterface> testCallbackInterfaceArg = V8TestCallbackInterface::create(v8::Handle<v8::Function>::Cast(info[0]), currentExecutionContext(info.GetIsolate()));
5705 impl->voidMethodTestCallbackInterfaceArg(testCallbackInterfaceArg.release());
5708 static void voidMethodTestCallbackInterfaceArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5710 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5711 TestObjectV8Internal::voidMethodTestCallbackInterfaceArgMethod(info);
5712 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5715 static void voidMethodOptionalTestCallbackInterfaceArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
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());
5724 optionalTestCallbackInterfaceArg = V8TestCallbackInterface::create(v8::Handle<v8::Function>::Cast(info[0]), currentExecutionContext(info.GetIsolate()));
5726 impl->voidMethodOptionalTestCallbackInterfaceArg(optionalTestCallbackInterfaceArg.release());
5729 static void voidMethodOptionalTestCallbackInterfaceArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5731 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5732 TestObjectV8Internal::voidMethodOptionalTestCallbackInterfaceArgMethod(info);
5733 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5736 static void voidMethodTestCallbackInterfaceOrNullArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5738 if (UNLIKELY(info.Length() < 1)) {
5739 throwArityTypeErrorForMethod("voidMethodTestCallbackInterfaceOrNullArg", "TestObject", 1, info.Length(), info.GetIsolate());
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());
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());
5751 static void voidMethodTestCallbackInterfaceOrNullArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5753 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5754 TestObjectV8Internal::voidMethodTestCallbackInterfaceOrNullArgMethod(info);
5755 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5758 static void testEnumMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5760 TestObject* impl = V8TestObject::toNative(info.Holder());
5761 v8SetReturnValueString(info, impl->testEnumMethod(), info.GetIsolate());
5764 static void testEnumMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5766 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5767 TestObjectV8Internal::testEnumMethodMethod(info);
5768 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5771 static void voidMethodTestEnumArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5773 if (UNLIKELY(info.Length() < 1)) {
5774 throwArityTypeErrorForMethod("voidMethodTestEnumArg", "TestObject", 1, info.Length(), info.GetIsolate());
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());
5784 impl->voidMethodTestEnumArg(testEnumTypeArg);
5787 static void voidMethodTestEnumArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5789 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5790 TestObjectV8Internal::voidMethodTestEnumArgMethod(info);
5791 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5794 static void dictionaryMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5796 TestObject* impl = V8TestObject::toNative(info.Holder());
5797 v8SetReturnValue(info, impl->dictionaryMethod());
5800 static void dictionaryMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5802 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5803 TestObjectV8Internal::dictionaryMethodMethod(info);
5804 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5807 static void nodeFilterMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5809 TestObject* impl = V8TestObject::toNative(info.Holder());
5810 v8SetReturnValue(info, impl->nodeFilterMethod());
5813 static void nodeFilterMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5815 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5816 TestObjectV8Internal::nodeFilterMethodMethod(info);
5817 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5820 static void promiseMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5822 TestObject* impl = V8TestObject::toNative(info.Holder());
5823 v8SetReturnValue(info, impl->promiseMethod().v8Value());
5826 static void promiseMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5828 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5829 TestObjectV8Internal::promiseMethodMethod(info);
5830 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5833 static void serializedScriptValueMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5835 TestObject* impl = V8TestObject::toNative(info.Holder());
5836 v8SetReturnValue(info, impl->serializedScriptValueMethod() ? impl->serializedScriptValueMethod()->deserialize() : v8::Handle<v8::Value>(v8::Null(info.GetIsolate())));
5839 static void serializedScriptValueMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5841 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5842 TestObjectV8Internal::serializedScriptValueMethodMethod(info);
5843 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5846 static void xPathNSResolverMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5848 TestObject* impl = V8TestObject::toNative(info.Holder());
5849 v8SetReturnValue(info, impl->xPathNSResolverMethod());
5852 static void xPathNSResolverMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5854 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5855 TestObjectV8Internal::xPathNSResolverMethodMethod(info);
5856 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5859 static void voidMethodDictionaryArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5861 if (UNLIKELY(info.Length() < 1)) {
5862 throwArityTypeErrorForMethod("voidMethodDictionaryArg", "TestObject", 1, info.Length(), info.GetIsolate());
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());
5871 impl->voidMethodDictionaryArg(dictionaryArg);
5874 static void voidMethodDictionaryArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5876 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5877 TestObjectV8Internal::voidMethodDictionaryArgMethod(info);
5878 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5881 static void voidMethodEventListenerArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5883 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodEventListenerArg", "TestObject", info.Holder(), info.GetIsolate());
5884 if (UNLIKELY(info.Length() < 1)) {
5885 throwArityTypeError(exceptionState, 1, info.Length());
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());
5895 static void voidMethodEventListenerArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5897 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5898 TestObjectV8Internal::voidMethodEventListenerArgMethod(info);
5899 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5902 static void voidMethodNodeFilterArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5904 if (UNLIKELY(info.Length() < 1)) {
5905 throwArityTypeErrorForMethod("voidMethodNodeFilterArg", "TestObject", 1, info.Length(), info.GetIsolate());
5908 TestObject* impl = V8TestObject::toNative(info.Holder());
5909 TONATIVE_VOID(RefPtr<NodeFilter>, nodeFilterArg, toNodeFilter(info[0], info.GetIsolate()));
5910 impl->voidMethodNodeFilterArg(nodeFilterArg.release());
5913 static void voidMethodNodeFilterArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5915 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5916 TestObjectV8Internal::voidMethodNodeFilterArgMethod(info);
5917 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5920 static void voidMethodPromiseArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5922 if (UNLIKELY(info.Length() < 1)) {
5923 throwArityTypeErrorForMethod("voidMethodPromiseArg", "TestObject", 1, info.Length(), info.GetIsolate());
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());
5932 impl->voidMethodPromiseArg(promiseArg);
5935 static void voidMethodPromiseArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5937 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5938 TestObjectV8Internal::voidMethodPromiseArgMethod(info);
5939 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5942 static void voidMethodSerializedScriptValueArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5944 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodSerializedScriptValueArg", "TestObject", info.Holder(), info.GetIsolate());
5945 if (UNLIKELY(info.Length() < 1)) {
5946 throwArityTypeError(exceptionState, 1, info.Length());
5949 TestObject* impl = V8TestObject::toNative(info.Holder());
5950 RefPtr<SerializedScriptValue> serializedScriptValueArg = SerializedScriptValue::create(info[0], 0, 0, exceptionState, info.GetIsolate());
5951 if (exceptionState.throwIfNeeded())
5953 impl->voidMethodSerializedScriptValueArg(serializedScriptValueArg);
5956 static void voidMethodSerializedScriptValueArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5958 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5959 TestObjectV8Internal::voidMethodSerializedScriptValueArgMethod(info);
5960 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5963 static void voidMethodXPathNSResolverArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5965 if (UNLIKELY(info.Length() < 1)) {
5966 throwArityTypeErrorForMethod("voidMethodXPathNSResolverArg", "TestObject", 1, info.Length(), info.GetIsolate());
5969 TestObject* impl = V8TestObject::toNative(info.Holder());
5970 TONATIVE_VOID(RefPtrWillBeRawPtr<XPathNSResolver>, xPathNSResolverArg, toXPathNSResolver(info[0], info.GetIsolate()));
5971 impl->voidMethodXPathNSResolverArg(xPathNSResolverArg.release());
5974 static void voidMethodXPathNSResolverArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5976 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5977 TestObjectV8Internal::voidMethodXPathNSResolverArgMethod(info);
5978 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5981 static void voidMethodDictionarySequenceArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
5983 if (UNLIKELY(info.Length() < 1)) {
5984 throwArityTypeErrorForMethod("voidMethodDictionarySequenceArg", "TestObject", 1, info.Length(), info.GetIsolate());
5987 TestObject* impl = V8TestObject::toNative(info.Holder());
5988 TONATIVE_VOID(Vector<Dictionary>, dictionarySequenceArg, toNativeArray<Dictionary>(info[0], 1, info.GetIsolate()));
5989 impl->voidMethodDictionarySequenceArg(dictionarySequenceArg);
5992 static void voidMethodDictionarySequenceArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
5994 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
5995 TestObjectV8Internal::voidMethodDictionarySequenceArgMethod(info);
5996 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
5999 static void voidMethodStringArgLongArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6001 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodStringArgLongArg", "TestObject", info.Holder(), info.GetIsolate());
6002 if (UNLIKELY(info.Length() < 2)) {
6003 throwArityTypeError(exceptionState, 2, info.Length());
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);
6012 static void voidMethodStringArgLongArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6014 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6015 TestObjectV8Internal::voidMethodStringArgLongArgMethod(info);
6016 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6019 static void voidMethodOptionalStringArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6021 TestObject* impl = V8TestObject::toNative(info.Holder());
6022 if (UNLIKELY(info.Length() <= 0)) {
6023 impl->voidMethodOptionalStringArg();
6026 TOSTRING_VOID(V8StringResource<>, optionalStringArg, info[0]);
6027 impl->voidMethodOptionalStringArg(optionalStringArg);
6030 static void voidMethodOptionalStringArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6032 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6033 TestObjectV8Internal::voidMethodOptionalStringArgMethod(info);
6034 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6037 static void voidMethodOptionalTestInterfaceEmptyArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6039 TestObject* impl = V8TestObject::toNative(info.Holder());
6040 if (UNLIKELY(info.Length() <= 0)) {
6041 impl->voidMethodOptionalTestInterfaceEmptyArg();
6044 TONATIVE_VOID(TestInterfaceEmpty*, optionalTestInterfaceEmptyArg, V8TestInterfaceEmpty::toNativeWithTypeCheck(info.GetIsolate(), info[0]));
6045 impl->voidMethodOptionalTestInterfaceEmptyArg(optionalTestInterfaceEmptyArg);
6048 static void voidMethodOptionalTestInterfaceEmptyArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6050 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6051 TestObjectV8Internal::voidMethodOptionalTestInterfaceEmptyArgMethod(info);
6052 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6055 static void voidMethodOptionalLongArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
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();
6063 TONATIVE_VOID_EXCEPTIONSTATE(int, optionalLongArg, toInt32(info[0], exceptionState), exceptionState);
6064 impl->voidMethodOptionalLongArg(optionalLongArg);
6067 static void voidMethodOptionalLongArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6069 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6070 TestObjectV8Internal::voidMethodOptionalLongArgMethod(info);
6071 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6074 static void stringMethodOptionalLongArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
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());
6082 TONATIVE_VOID_EXCEPTIONSTATE(int, optionalLongArg, toInt32(info[0], exceptionState), exceptionState);
6083 v8SetReturnValueString(info, impl->stringMethodOptionalLongArg(optionalLongArg), info.GetIsolate());
6086 static void stringMethodOptionalLongArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6088 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6089 TestObjectV8Internal::stringMethodOptionalLongArgMethod(info);
6090 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6093 static void testInterfaceEmptyMethodOptionalLongArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
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());
6101 TONATIVE_VOID_EXCEPTIONSTATE(int, optionalLongArg, toInt32(info[0], exceptionState), exceptionState);
6102 v8SetReturnValue(info, impl->testInterfaceEmptyMethodOptionalLongArg(optionalLongArg));
6105 static void testInterfaceEmptyMethodOptionalLongArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6107 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6108 TestObjectV8Internal::testInterfaceEmptyMethodOptionalLongArgMethod(info);
6109 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6112 static void longMethodOptionalLongArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
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());
6120 TONATIVE_VOID_EXCEPTIONSTATE(int, optionalLongArg, toInt32(info[0], exceptionState), exceptionState);
6121 v8SetReturnValueInt(info, impl->longMethodOptionalLongArg(optionalLongArg));
6124 static void longMethodOptionalLongArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6126 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6127 TestObjectV8Internal::longMethodOptionalLongArgMethod(info);
6128 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6131 static void voidMethodLongArgOptionalLongArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6133 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodLongArgOptionalLongArg", "TestObject", info.Holder(), info.GetIsolate());
6134 if (UNLIKELY(info.Length() < 1)) {
6135 throwArityTypeError(exceptionState, 1, info.Length());
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);
6144 TONATIVE_VOID_EXCEPTIONSTATE(int, optionalLongArg, toInt32(info[1], exceptionState), exceptionState);
6145 impl->voidMethodLongArgOptionalLongArg(longArg, optionalLongArg);
6148 static void voidMethodLongArgOptionalLongArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6150 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6151 TestObjectV8Internal::voidMethodLongArgOptionalLongArgMethod(info);
6152 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6155 static void voidMethodLongArgOptionalLongArgOptionalLongArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6157 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodLongArgOptionalLongArgOptionalLongArg", "TestObject", info.Holder(), info.GetIsolate());
6158 if (UNLIKELY(info.Length() < 1)) {
6159 throwArityTypeError(exceptionState, 1, info.Length());
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);
6168 TONATIVE_VOID_EXCEPTIONSTATE(int, optionalLongArg1, toInt32(info[1], exceptionState), exceptionState);
6169 if (UNLIKELY(info.Length() <= 2)) {
6170 impl->voidMethodLongArgOptionalLongArgOptionalLongArg(longArg, optionalLongArg1);
6173 TONATIVE_VOID_EXCEPTIONSTATE(int, optionalLongArg2, toInt32(info[2], exceptionState), exceptionState);
6174 impl->voidMethodLongArgOptionalLongArgOptionalLongArg(longArg, optionalLongArg1, optionalLongArg2);
6177 static void voidMethodLongArgOptionalLongArgOptionalLongArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6179 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6180 TestObjectV8Internal::voidMethodLongArgOptionalLongArgOptionalLongArgMethod(info);
6181 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6184 static void voidMethodLongArgOptionalTestInterfaceEmptyArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6186 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodLongArgOptionalTestInterfaceEmptyArg", "TestObject", info.Holder(), info.GetIsolate());
6187 if (UNLIKELY(info.Length() < 1)) {
6188 throwArityTypeError(exceptionState, 1, info.Length());
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);
6197 TONATIVE_VOID(TestInterfaceEmpty*, optionalTestInterfaceEmpty, V8TestInterfaceEmpty::toNativeWithTypeCheck(info.GetIsolate(), info[1]));
6198 impl->voidMethodLongArgOptionalTestInterfaceEmptyArg(longArg, optionalTestInterfaceEmpty);
6201 static void voidMethodLongArgOptionalTestInterfaceEmptyArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6203 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6204 TestObjectV8Internal::voidMethodLongArgOptionalTestInterfaceEmptyArgMethod(info);
6205 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6208 static void voidMethodTestInterfaceEmptyArgOptionalLongArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6210 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodTestInterfaceEmptyArgOptionalLongArg", "TestObject", info.Holder(), info.GetIsolate());
6211 if (UNLIKELY(info.Length() < 1)) {
6212 throwArityTypeError(exceptionState, 1, info.Length());
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);
6221 TONATIVE_VOID_EXCEPTIONSTATE(int, longArg, toInt32(info[1], exceptionState), exceptionState);
6222 impl->voidMethodTestInterfaceEmptyArgOptionalLongArg(optionalTestInterfaceEmpty, longArg);
6225 static void voidMethodTestInterfaceEmptyArgOptionalLongArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6227 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6228 TestObjectV8Internal::voidMethodTestInterfaceEmptyArgOptionalLongArgMethod(info);
6229 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6232 static void voidMethodOptionalDictionaryArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
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());
6240 impl->voidMethodOptionalDictionaryArg(optionalDictionaryArg);
6243 static void voidMethodOptionalDictionaryArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6245 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6246 TestObjectV8Internal::voidMethodOptionalDictionaryArgMethod(info);
6247 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6250 static void voidMethodVariadicStringArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6252 TestObject* impl = V8TestObject::toNative(info.Holder());
6253 TONATIVE_VOID(Vector<String>, variadicStringArgs, toNativeArguments<String>(info, 0));
6254 impl->voidMethodVariadicStringArg(variadicStringArgs);
6257 static void voidMethodVariadicStringArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6259 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6260 TestObjectV8Internal::voidMethodVariadicStringArgMethod(info);
6261 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6264 static void voidMethodStringArgVariadicStringArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6266 if (UNLIKELY(info.Length() < 1)) {
6267 throwArityTypeErrorForMethod("voidMethodStringArgVariadicStringArg", "TestObject", 1, info.Length(), info.GetIsolate());
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);
6276 static void voidMethodStringArgVariadicStringArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6278 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6279 TestObjectV8Internal::voidMethodStringArgVariadicStringArgMethod(info);
6280 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6283 static void voidMethodVariadicTestInterfaceEmptyArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
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());
6292 variadicTestInterfaceEmptyArgs.append(V8TestInterfaceEmpty::toNative(v8::Handle<v8::Object>::Cast(info[i])));
6294 impl->voidMethodVariadicTestInterfaceEmptyArg(variadicTestInterfaceEmptyArgs);
6297 static void voidMethodVariadicTestInterfaceEmptyArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6299 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6300 TestObjectV8Internal::voidMethodVariadicTestInterfaceEmptyArgMethod(info);
6301 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6304 static void voidMethodTestInterfaceEmptyArgVariadicTestInterfaceEmptyArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6306 if (UNLIKELY(info.Length() < 1)) {
6307 throwArityTypeErrorForMethod("voidMethodTestInterfaceEmptyArgVariadicTestInterfaceEmptyArg", "TestObject", 1, info.Length(), info.GetIsolate());
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());
6318 variadicTestInterfaceEmptyArgs.append(V8TestInterfaceEmpty::toNative(v8::Handle<v8::Object>::Cast(info[i])));
6320 impl->voidMethodTestInterfaceEmptyArgVariadicTestInterfaceEmptyArg(testInterfaceEmptyArg, variadicTestInterfaceEmptyArgs);
6323 static void voidMethodTestInterfaceEmptyArgVariadicTestInterfaceEmptyArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6325 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6326 TestObjectV8Internal::voidMethodTestInterfaceEmptyArgVariadicTestInterfaceEmptyArgMethod(info);
6327 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6330 static void voidMethodVariadicTestInterfaceGarbageCollectedArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
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());
6339 variadicTestInterfaceGarbageCollectedArg.append(V8TestInterfaceGarbageCollected::toNative(v8::Handle<v8::Object>::Cast(info[i])));
6341 impl->voidMethodVariadicTestInterfaceGarbageCollectedArg(variadicTestInterfaceGarbageCollectedArg);
6344 static void voidMethodVariadicTestInterfaceGarbageCollectedArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6346 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6347 TestObjectV8Internal::voidMethodVariadicTestInterfaceGarbageCollectedArgMethod(info);
6348 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6351 static void voidMethodVariadicTestInterfaceWillBeGarbageCollectedArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
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());
6360 variadicTestInterfaceWillBeGarbageCollectedArg.append(V8TestInterfaceWillBeGarbageCollected::toNative(v8::Handle<v8::Object>::Cast(info[i])));
6362 impl->voidMethodVariadicTestInterfaceWillBeGarbageCollectedArg(variadicTestInterfaceWillBeGarbageCollectedArg);
6365 static void voidMethodVariadicTestInterfaceWillBeGarbageCollectedArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6367 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6368 TestObjectV8Internal::voidMethodVariadicTestInterfaceWillBeGarbageCollectedArgMethod(info);
6369 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6372 static void overloadedMethodA1Method(const v8::FunctionCallbackInfo<v8::Value>& info)
6374 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedMethodA", "TestObject", info.Holder(), info.GetIsolate());
6375 if (UNLIKELY(info.Length() < 1)) {
6376 throwArityTypeError(exceptionState, 1, info.Length());
6379 TestObject* impl = V8TestObject::toNative(info.Holder());
6380 TONATIVE_VOID_EXCEPTIONSTATE(int, longArg, toInt32(info[0], exceptionState), exceptionState);
6381 impl->overloadedMethodA(longArg);
6384 static void overloadedMethodA2Method(const v8::FunctionCallbackInfo<v8::Value>& info)
6386 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedMethodA", "TestObject", info.Holder(), info.GetIsolate());
6387 if (UNLIKELY(info.Length() < 2)) {
6388 throwArityTypeError(exceptionState, 2, info.Length());
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);
6397 static void overloadedMethodAMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6399 if (((info.Length() == 1))) {
6400 overloadedMethodA1Method(info);
6403 if (((info.Length() == 2))) {
6404 overloadedMethodA2Method(info);
6407 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedMethodA", "TestObject", info.Holder(), info.GetIsolate());
6408 if (UNLIKELY(info.Length() < 1)) {
6409 throwArityTypeError(exceptionState, 1, info.Length());
6412 exceptionState.throwTypeError("No function was found that matched the signature provided.");
6413 exceptionState.throwIfNeeded();
6416 static void overloadedMethodAMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6418 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6419 TestObjectV8Internal::overloadedMethodAMethod(info);
6420 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6423 static void overloadedMethodB1Method(const v8::FunctionCallbackInfo<v8::Value>& info)
6425 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedMethodB", "TestObject", info.Holder(), info.GetIsolate());
6426 if (UNLIKELY(info.Length() < 1)) {
6427 throwArityTypeError(exceptionState, 1, info.Length());
6430 TestObject* impl = V8TestObject::toNative(info.Holder());
6431 TONATIVE_VOID_EXCEPTIONSTATE(int, longArg, toInt32(info[0], exceptionState), exceptionState);
6432 impl->overloadedMethodB(longArg);
6435 static void overloadedMethodB2Method(const v8::FunctionCallbackInfo<v8::Value>& info)
6437 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedMethodB", "TestObject", info.Holder(), info.GetIsolate());
6438 if (UNLIKELY(info.Length() < 1)) {
6439 throwArityTypeError(exceptionState, 1, info.Length());
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);
6448 TONATIVE_VOID_EXCEPTIONSTATE(int, longArg, toInt32(info[1], exceptionState), exceptionState);
6449 impl->overloadedMethodB(booleanArg, longArg);
6452 static void overloadedMethodBMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6454 if (((info.Length() == 1))) {
6455 overloadedMethodB1Method(info);
6458 if (((info.Length() == 1)) || ((info.Length() == 2))) {
6459 overloadedMethodB2Method(info);
6462 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedMethodB", "TestObject", info.Holder(), info.GetIsolate());
6463 if (UNLIKELY(info.Length() < 1)) {
6464 throwArityTypeError(exceptionState, 1, info.Length());
6467 exceptionState.throwTypeError("No function was found that matched the signature provided.");
6468 exceptionState.throwIfNeeded();
6471 static void overloadedMethodBMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6473 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6474 TestObjectV8Internal::overloadedMethodBMethod(info);
6475 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6478 static void overloadedMethodC1Method(const v8::FunctionCallbackInfo<v8::Value>& info)
6480 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedMethodC", "TestObject", info.Holder(), info.GetIsolate());
6481 if (UNLIKELY(info.Length() < 1)) {
6482 throwArityTypeError(exceptionState, 1, info.Length());
6485 TestObject* impl = V8TestObject::toNative(info.Holder());
6486 TONATIVE_VOID_EXCEPTIONSTATE(int, longArg, toInt32(info[0], exceptionState), exceptionState);
6487 impl->overloadedMethodC(longArg);
6490 static void overloadedMethodC2Method(const v8::FunctionCallbackInfo<v8::Value>& info)
6492 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedMethodC", "TestObject", info.Holder(), info.GetIsolate());
6493 if (UNLIKELY(info.Length() < 1)) {
6494 throwArityTypeError(exceptionState, 1, info.Length());
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);
6503 static void overloadedMethodCMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6505 if (((info.Length() == 1))) {
6506 overloadedMethodC1Method(info);
6510 overloadedMethodC2Method(info);
6513 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedMethodC", "TestObject", info.Holder(), info.GetIsolate());
6514 if (UNLIKELY(info.Length() < 1)) {
6515 throwArityTypeError(exceptionState, 1, info.Length());
6518 exceptionState.throwTypeError("No function was found that matched the signature provided.");
6519 exceptionState.throwIfNeeded();
6522 static void overloadedMethodCMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6524 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6525 TestObjectV8Internal::overloadedMethodCMethod(info);
6526 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6529 static void overloadedMethodD1Method(const v8::FunctionCallbackInfo<v8::Value>& info)
6531 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedMethodD", "TestObject", info.Holder(), info.GetIsolate());
6532 if (UNLIKELY(info.Length() < 1)) {
6533 throwArityTypeError(exceptionState, 1, info.Length());
6536 TestObject* impl = V8TestObject::toNative(info.Holder());
6537 TONATIVE_VOID_EXCEPTIONSTATE(int, longArg, toInt32(info[0], exceptionState), exceptionState);
6538 impl->overloadedMethodD(longArg);
6541 static void overloadedMethodD2Method(const v8::FunctionCallbackInfo<v8::Value>& info)
6543 if (UNLIKELY(info.Length() < 1)) {
6544 throwArityTypeErrorForMethod("overloadedMethodD", "TestObject", 1, info.Length(), info.GetIsolate());
6547 TestObject* impl = V8TestObject::toNative(info.Holder());
6548 TONATIVE_VOID(TestInterfaceEmpty*, testInterfaceEmptyArg, V8TestInterfaceEmpty::toNativeWithTypeCheck(info.GetIsolate(), info[0]));
6549 impl->overloadedMethodD(testInterfaceEmptyArg);
6552 static void overloadedMethodDMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6554 if (((info.Length() == 1))) {
6555 overloadedMethodD1Method(info);
6558 if (((info.Length() == 1) && (V8TestInterfaceEmpty::hasInstance(info[0], info.GetIsolate())))) {
6559 overloadedMethodD2Method(info);
6562 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedMethodD", "TestObject", info.Holder(), info.GetIsolate());
6563 if (UNLIKELY(info.Length() < 1)) {
6564 throwArityTypeError(exceptionState, 1, info.Length());
6567 exceptionState.throwTypeError("No function was found that matched the signature provided.");
6568 exceptionState.throwIfNeeded();
6571 static void overloadedMethodDMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6573 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6574 TestObjectV8Internal::overloadedMethodDMethod(info);
6575 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6578 static void overloadedMethodE1Method(const v8::FunctionCallbackInfo<v8::Value>& info)
6580 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedMethodE", "TestObject", info.Holder(), info.GetIsolate());
6581 if (UNLIKELY(info.Length() < 1)) {
6582 throwArityTypeError(exceptionState, 1, info.Length());
6585 TestObject* impl = V8TestObject::toNative(info.Holder());
6586 TONATIVE_VOID_EXCEPTIONSTATE(int, longArg, toInt32(info[0], exceptionState), exceptionState);
6587 impl->overloadedMethodE(longArg);
6590 static void overloadedMethodE2Method(const v8::FunctionCallbackInfo<v8::Value>& info)
6592 if (UNLIKELY(info.Length() < 1)) {
6593 throwArityTypeErrorForMethod("overloadedMethodE", "TestObject", 1, info.Length(), info.GetIsolate());
6596 TestObject* impl = V8TestObject::toNative(info.Holder());
6597 TONATIVE_VOID(Vector<int>, longArrayArg, toNativeArray<int>(info[0], 1, info.GetIsolate()));
6598 impl->overloadedMethodE(longArrayArg);
6601 static void overloadedMethodEMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6603 if (((info.Length() == 1))) {
6604 overloadedMethodE1Method(info);
6607 if (((info.Length() == 1) && (info[0]->IsArray()))) {
6608 overloadedMethodE2Method(info);
6611 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedMethodE", "TestObject", info.Holder(), info.GetIsolate());
6612 if (UNLIKELY(info.Length() < 1)) {
6613 throwArityTypeError(exceptionState, 1, info.Length());
6616 exceptionState.throwTypeError("No function was found that matched the signature provided.");
6617 exceptionState.throwIfNeeded();
6620 static void overloadedMethodEMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6622 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6623 TestObjectV8Internal::overloadedMethodEMethod(info);
6624 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6627 static void overloadedMethodF1Method(const v8::FunctionCallbackInfo<v8::Value>& info)
6629 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedMethodF", "TestObject", info.Holder(), info.GetIsolate());
6630 if (UNLIKELY(info.Length() < 1)) {
6631 throwArityTypeError(exceptionState, 1, info.Length());
6634 TestObject* impl = V8TestObject::toNative(info.Holder());
6635 TONATIVE_VOID_EXCEPTIONSTATE(int, longArg, toInt32(info[0], exceptionState), exceptionState);
6636 impl->overloadedMethodF(longArg);
6639 static void overloadedMethodF2Method(const v8::FunctionCallbackInfo<v8::Value>& info)
6641 if (UNLIKELY(info.Length() < 1)) {
6642 throwArityTypeErrorForMethod("overloadedMethodF", "TestObject", 1, info.Length(), info.GetIsolate());
6645 TestObject* impl = V8TestObject::toNative(info.Holder());
6646 TONATIVE_VOID(TestInterfaceEmpty*, testInterfaceEmptyOrNullArg, V8TestInterfaceEmpty::toNativeWithTypeCheck(info.GetIsolate(), info[0]));
6647 impl->overloadedMethodF(testInterfaceEmptyOrNullArg);
6650 static void overloadedMethodFMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6652 if (((info.Length() == 1))) {
6653 overloadedMethodF1Method(info);
6656 if (((info.Length() == 1) && (info[0]->IsNull() || V8TestInterfaceEmpty::hasInstance(info[0], info.GetIsolate())))) {
6657 overloadedMethodF2Method(info);
6660 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedMethodF", "TestObject", info.Holder(), info.GetIsolate());
6661 if (UNLIKELY(info.Length() < 1)) {
6662 throwArityTypeError(exceptionState, 1, info.Length());
6665 exceptionState.throwTypeError("No function was found that matched the signature provided.");
6666 exceptionState.throwIfNeeded();
6669 static void overloadedMethodFMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6671 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6672 TestObjectV8Internal::overloadedMethodFMethod(info);
6673 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6676 static void overloadedMethodG1Method(const v8::FunctionCallbackInfo<v8::Value>& info)
6678 TestObject* impl = V8TestObject::toNative(info.Holder());
6679 impl->overloadedMethodG();
6682 static void overloadedMethodG2Method(const v8::FunctionCallbackInfo<v8::Value>& info)
6684 if (UNLIKELY(info.Length() < 1)) {
6685 throwArityTypeErrorForMethod("overloadedMethodG", "TestObject", 1, info.Length(), info.GetIsolate());
6688 TestObject* impl = V8TestObject::toNative(info.Holder());
6689 TOSTRING_VOID(V8StringResource<>, legacyOverloadStringStringArg, info[0]);
6690 impl->overloadedMethodG(legacyOverloadStringStringArg);
6693 static void overloadedMethodGMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6695 if (((info.Length() == 0))) {
6696 overloadedMethodG1Method(info);
6699 if (((info.Length() == 1) && (isUndefinedOrNull(info[0]) || info[0]->IsString() || info[0]->IsObject()))) {
6700 overloadedMethodG2Method(info);
6703 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethodG", "TestObject", "No function was found that matched the signature provided."), info.GetIsolate());
6706 static void overloadedMethodGMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6708 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6709 TestObjectV8Internal::overloadedMethodGMethod(info);
6710 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6713 static void overloadedMethodH1Method(const v8::FunctionCallbackInfo<v8::Value>& info)
6715 TestObject* impl = V8TestObject::toNative(info.Holder());
6716 impl->overloadedMethodH();
6719 static void overloadedMethodH2Method(const v8::FunctionCallbackInfo<v8::Value>& info)
6721 if (UNLIKELY(info.Length() < 1)) {
6722 throwArityTypeErrorForMethod("overloadedMethodH", "TestObject", 1, info.Length(), info.GetIsolate());
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());
6730 OwnPtr<TestCallbackInterface> testCallbackInterfaceArg = V8TestCallbackInterface::create(v8::Handle<v8::Function>::Cast(info[0]), currentExecutionContext(info.GetIsolate()));
6731 impl->overloadedMethodH(testCallbackInterfaceArg.release());
6734 static void overloadedMethodHMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6736 if (((info.Length() == 0))) {
6737 overloadedMethodH1Method(info);
6740 if (((info.Length() == 1) && (info[0]->IsNull() || info[0]->IsFunction()))) {
6741 overloadedMethodH2Method(info);
6744 throwTypeError(ExceptionMessages::failedToExecute("overloadedMethodH", "TestObject", "No function was found that matched the signature provided."), info.GetIsolate());
6747 static void overloadedMethodHMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6749 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6750 TestObjectV8Internal::overloadedMethodHMethod(info);
6751 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6754 static void overloadedMethodI1Method(const v8::FunctionCallbackInfo<v8::Value>& info)
6756 if (UNLIKELY(info.Length() < 1)) {
6757 throwArityTypeErrorForMethod("overloadedMethodI", "TestObject", 1, info.Length(), info.GetIsolate());
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());
6766 impl->overloadedMethodI(dictionaryArg);
6769 static void overloadedMethodI2Method(const v8::FunctionCallbackInfo<v8::Value>& info)
6771 if (UNLIKELY(info.Length() < 1)) {
6772 throwArityTypeErrorForMethod("overloadedMethodI", "TestObject", 1, info.Length(), info.GetIsolate());
6775 TestObject* impl = V8TestObject::toNative(info.Holder());
6776 TONATIVE_VOID(double, doubleArg, static_cast<double>(info[0]->NumberValue()));
6777 impl->overloadedMethodI(doubleArg);
6780 static void overloadedMethodIMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6782 if (((info.Length() == 1) && (info[0]->IsObject()))) {
6783 overloadedMethodI1Method(info);
6786 if (((info.Length() == 1))) {
6787 overloadedMethodI2Method(info);
6790 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedMethodI", "TestObject", info.Holder(), info.GetIsolate());
6791 if (UNLIKELY(info.Length() < 1)) {
6792 throwArityTypeError(exceptionState, 1, info.Length());
6795 exceptionState.throwTypeError("No function was found that matched the signature provided.");
6796 exceptionState.throwIfNeeded();
6799 static void overloadedMethodIMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6801 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6802 TestObjectV8Internal::overloadedMethodIMethod(info);
6803 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6806 static void overloadedMethodJ1Method(const v8::FunctionCallbackInfo<v8::Value>& info)
6808 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedMethodJ", "TestObject", info.Holder(), info.GetIsolate());
6809 if (UNLIKELY(info.Length() < 1)) {
6810 throwArityTypeError(exceptionState, 1, info.Length());
6813 TestObject* impl = V8TestObject::toNative(info.Holder());
6814 TONATIVE_VOID_EXCEPTIONSTATE(int, longArg, toInt32(info[0], exceptionState), exceptionState);
6815 impl->overloadedMethodJ(longArg);
6818 static void overloadedMethodJ2Method(const v8::FunctionCallbackInfo<v8::Value>& info)
6820 if (UNLIKELY(info.Length() < 1)) {
6821 throwArityTypeErrorForMethod("overloadedMethodJ", "TestObject", 1, info.Length(), info.GetIsolate());
6824 TestObject* impl = V8TestObject::toNative(info.Holder());
6825 TONATIVE_VOID(TestInterfaceEmpty*, testInterfaceEmptyOrNullArg, V8TestInterfaceEmpty::toNativeWithTypeCheck(info.GetIsolate(), info[0]));
6826 impl->overloadedMethodJ(testInterfaceEmptyOrNullArg);
6829 static void overloadedMethodJMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6831 if (((info.Length() == 1))) {
6832 overloadedMethodJ1Method(info);
6835 if (((info.Length() == 1) && (isUndefinedOrNull(info[0]) || V8TestInterfaceEmpty::hasInstance(info[0], info.GetIsolate())))) {
6836 overloadedMethodJ2Method(info);
6839 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedMethodJ", "TestObject", info.Holder(), info.GetIsolate());
6840 if (UNLIKELY(info.Length() < 1)) {
6841 throwArityTypeError(exceptionState, 1, info.Length());
6844 exceptionState.throwTypeError("No function was found that matched the signature provided.");
6845 exceptionState.throwIfNeeded();
6848 static void overloadedMethodJMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6850 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6851 TestObjectV8Internal::overloadedMethodJMethod(info);
6852 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6855 static void overloadedPerWorldBindingsMethod1Method(const v8::FunctionCallbackInfo<v8::Value>& info)
6857 TestObject* impl = V8TestObject::toNative(info.Holder());
6858 impl->overloadedPerWorldBindingsMethod();
6861 static void overloadedPerWorldBindingsMethod1MethodForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info)
6863 TestObject* impl = V8TestObject::toNative(info.Holder());
6864 impl->overloadedPerWorldBindingsMethod();
6867 static void overloadedPerWorldBindingsMethod2Method(const v8::FunctionCallbackInfo<v8::Value>& info)
6869 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedPerWorldBindingsMethod", "TestObject", info.Holder(), info.GetIsolate());
6870 if (UNLIKELY(info.Length() < 1)) {
6871 throwArityTypeError(exceptionState, 1, info.Length());
6874 TestObject* impl = V8TestObject::toNative(info.Holder());
6875 TONATIVE_VOID_EXCEPTIONSTATE(int, longArg, toInt32(info[0], exceptionState), exceptionState);
6876 impl->overloadedPerWorldBindingsMethod(longArg);
6879 static void overloadedPerWorldBindingsMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6881 if (((info.Length() == 0))) {
6882 overloadedPerWorldBindingsMethod1Method(info);
6885 if (((info.Length() == 1))) {
6886 overloadedPerWorldBindingsMethod2Method(info);
6889 throwTypeError(ExceptionMessages::failedToExecute("overloadedPerWorldBindingsMethod", "TestObject", "No function was found that matched the signature provided."), info.GetIsolate());
6892 static void overloadedPerWorldBindingsMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6894 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6895 TestObjectV8Internal::overloadedPerWorldBindingsMethodMethod(info);
6896 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6899 static void overloadedPerWorldBindingsMethod2MethodForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info)
6901 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedPerWorldBindingsMethod", "TestObject", info.Holder(), info.GetIsolate());
6902 if (UNLIKELY(info.Length() < 1)) {
6903 throwArityTypeError(exceptionState, 1, info.Length());
6906 TestObject* impl = V8TestObject::toNative(info.Holder());
6907 TONATIVE_VOID_EXCEPTIONSTATE(int, longArg, toInt32(info[0], exceptionState), exceptionState);
6908 impl->overloadedPerWorldBindingsMethod(longArg);
6911 static void overloadedPerWorldBindingsMethodMethodForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info)
6913 if (((info.Length() == 0))) {
6914 overloadedPerWorldBindingsMethod1MethodForMainWorld(info);
6917 if (((info.Length() == 1))) {
6918 overloadedPerWorldBindingsMethod2MethodForMainWorld(info);
6921 throwTypeError(ExceptionMessages::failedToExecute("overloadedPerWorldBindingsMethod", "TestObject", "No function was found that matched the signature provided."), info.GetIsolate());
6924 static void overloadedPerWorldBindingsMethodMethodCallbackForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info)
6926 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6927 TestObjectV8Internal::overloadedPerWorldBindingsMethodMethodForMainWorld(info);
6928 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6931 static void overloadedStaticMethod1Method(const v8::FunctionCallbackInfo<v8::Value>& info)
6933 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedStaticMethod", "TestObject", info.Holder(), info.GetIsolate());
6934 if (UNLIKELY(info.Length() < 1)) {
6935 throwArityTypeError(exceptionState, 1, info.Length());
6938 TONATIVE_VOID_EXCEPTIONSTATE(int, longArg, toInt32(info[0], exceptionState), exceptionState);
6939 TestObject::overloadedStaticMethod(longArg);
6942 static void overloadedStaticMethod2Method(const v8::FunctionCallbackInfo<v8::Value>& info)
6944 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedStaticMethod", "TestObject", info.Holder(), info.GetIsolate());
6945 if (UNLIKELY(info.Length() < 2)) {
6946 throwArityTypeError(exceptionState, 2, info.Length());
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);
6954 static void overloadedStaticMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6956 if (((info.Length() == 1))) {
6957 overloadedStaticMethod1Method(info);
6960 if (((info.Length() == 2))) {
6961 overloadedStaticMethod2Method(info);
6964 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedStaticMethod", "TestObject", info.Holder(), info.GetIsolate());
6965 if (UNLIKELY(info.Length() < 1)) {
6966 throwArityTypeError(exceptionState, 1, info.Length());
6969 exceptionState.throwTypeError("No function was found that matched the signature provided.");
6970 exceptionState.throwIfNeeded();
6973 static void overloadedStaticMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6975 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6976 TestObjectV8Internal::overloadedStaticMethodMethod(info);
6977 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
6980 static void voidMethodClampUnsignedShortArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
6982 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodClampUnsignedShortArg", "TestObject", info.Holder(), info.GetIsolate());
6983 if (UNLIKELY(info.Length() < 1)) {
6984 throwArityTypeError(exceptionState, 1, info.Length());
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);
6995 static void voidMethodClampUnsignedShortArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
6997 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
6998 TestObjectV8Internal::voidMethodClampUnsignedShortArgMethod(info);
6999 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7002 static void voidMethodClampUnsignedLongArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
7004 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodClampUnsignedLongArg", "TestObject", info.Holder(), info.GetIsolate());
7005 if (UNLIKELY(info.Length() < 1)) {
7006 throwArityTypeError(exceptionState, 1, info.Length());
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);
7017 static void voidMethodClampUnsignedLongArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
7019 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7020 TestObjectV8Internal::voidMethodClampUnsignedLongArgMethod(info);
7021 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7024 static void voidMethodDefaultUndefinedTestInterfaceEmptyArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
7026 TestObject* impl = V8TestObject::toNative(info.Holder());
7027 TONATIVE_VOID(TestInterfaceEmpty*, defaultUndefinedTestInterfaceEmptyArg, V8TestInterfaceEmpty::toNativeWithTypeCheck(info.GetIsolate(), info[0]));
7028 impl->voidMethodDefaultUndefinedTestInterfaceEmptyArg(defaultUndefinedTestInterfaceEmptyArg);
7031 static void voidMethodDefaultUndefinedTestInterfaceEmptyArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
7033 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7034 TestObjectV8Internal::voidMethodDefaultUndefinedTestInterfaceEmptyArgMethod(info);
7035 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7038 static void voidMethodDefaultUndefinedLongArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
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);
7046 static void voidMethodDefaultUndefinedLongArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
7048 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7049 TestObjectV8Internal::voidMethodDefaultUndefinedLongArgMethod(info);
7050 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7053 static void voidMethodDefaultUndefinedStringArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
7055 TestObject* impl = V8TestObject::toNative(info.Holder());
7056 TOSTRING_VOID(V8StringResource<>, defaultUndefinedStringArg, info[0]);
7057 impl->voidMethodDefaultUndefinedStringArg(defaultUndefinedStringArg);
7060 static void voidMethodDefaultUndefinedStringArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
7062 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7063 TestObjectV8Internal::voidMethodDefaultUndefinedStringArgMethod(info);
7064 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7067 static void voidMethodDefaultNullStringStringArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
7069 TestObject* impl = V8TestObject::toNative(info.Holder());
7070 TOSTRING_VOID(V8StringResource<>, defaultNullStringStringArg, argumentOrNull(info, 0));
7071 impl->voidMethodDefaultNullStringStringArg(defaultNullStringStringArg);
7074 static void voidMethodDefaultNullStringStringArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
7076 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7077 TestObjectV8Internal::voidMethodDefaultNullStringStringArgMethod(info);
7078 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7081 static void voidMethodEnforceRangeLongArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
7083 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodEnforceRangeLongArg", "TestObject", info.Holder(), info.GetIsolate());
7084 if (UNLIKELY(info.Length() < 1)) {
7085 throwArityTypeError(exceptionState, 1, info.Length());
7088 TestObject* impl = V8TestObject::toNative(info.Holder());
7089 TONATIVE_VOID_EXCEPTIONSTATE(int, enforceRangeLongArg, toInt32(info[0], EnforceRange, exceptionState), exceptionState);
7090 impl->voidMethodEnforceRangeLongArg(enforceRangeLongArg);
7093 static void voidMethodEnforceRangeLongArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
7095 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7096 TestObjectV8Internal::voidMethodEnforceRangeLongArgMethod(info);
7097 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7100 static void voidMethodTreatNullAsNullStringStringArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
7102 if (UNLIKELY(info.Length() < 1)) {
7103 throwArityTypeErrorForMethod("voidMethodTreatNullAsNullStringStringArg", "TestObject", 1, info.Length(), info.GetIsolate());
7106 TestObject* impl = V8TestObject::toNative(info.Holder());
7107 TOSTRING_VOID(V8StringResource<WithNullCheck>, treatNullAsNullStringStringArg, info[0]);
7108 impl->voidMethodTreatNullAsNullStringStringArg(treatNullAsNullStringStringArg);
7111 static void voidMethodTreatNullAsNullStringStringArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
7113 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7114 TestObjectV8Internal::voidMethodTreatNullAsNullStringStringArgMethod(info);
7115 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7118 static void voidMethodTreatNullAsNullStringTreatUndefinedAsNullStringStringArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
7120 if (UNLIKELY(info.Length() < 1)) {
7121 throwArityTypeErrorForMethod("voidMethodTreatNullAsNullStringTreatUndefinedAsNullStringStringArg", "TestObject", 1, info.Length(), info.GetIsolate());
7124 TestObject* impl = V8TestObject::toNative(info.Holder());
7125 TOSTRING_VOID(V8StringResource<WithUndefinedOrNullCheck>, treatNullAsNullStringStringArg, info[0]);
7126 impl->voidMethodTreatNullAsNullStringTreatUndefinedAsNullStringStringArg(treatNullAsNullStringStringArg);
7129 static void voidMethodTreatNullAsNullStringTreatUndefinedAsNullStringStringArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
7131 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7132 TestObjectV8Internal::voidMethodTreatNullAsNullStringTreatUndefinedAsNullStringStringArgMethod(info);
7133 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7136 static void activityLoggingAccessForAllWorldsMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
7138 TestObject* impl = V8TestObject::toNative(info.Holder());
7139 impl->activityLoggingAccessForAllWorldsMethod();
7142 static void activityLoggingAccessForAllWorldsMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
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());
7150 TestObjectV8Internal::activityLoggingAccessForAllWorldsMethodMethod(info);
7151 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7154 static void callWithExecutionContextVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
7156 TestObject* impl = V8TestObject::toNative(info.Holder());
7157 ExecutionContext* scriptContext = currentExecutionContext(info.GetIsolate());
7158 impl->callWithExecutionContextVoidMethod(scriptContext);
7161 static void callWithExecutionContextVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
7163 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7164 TestObjectV8Internal::callWithExecutionContextVoidMethodMethod(info);
7165 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7168 static void callWithScriptStateVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
7170 TestObject* impl = V8TestObject::toNative(info.Holder());
7171 ScriptState* state = ScriptState::current(info.GetIsolate());
7172 impl->callWithScriptStateVoidMethod(state);
7175 static void callWithScriptStateVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
7177 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7178 TestObjectV8Internal::callWithScriptStateVoidMethodMethod(info);
7179 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7182 static void callWithScriptStateLongMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
7184 TestObject* impl = V8TestObject::toNative(info.Holder());
7185 ScriptState* state = ScriptState::current(info.GetIsolate());
7186 int result = impl->callWithScriptStateLongMethod(state);
7187 v8SetReturnValueInt(info, result);
7190 static void callWithScriptStateLongMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
7192 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7193 TestObjectV8Internal::callWithScriptStateLongMethodMethod(info);
7194 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7197 static void callWithScriptStateExecutionContextVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
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);
7205 static void callWithScriptStateExecutionContextVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
7207 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7208 TestObjectV8Internal::callWithScriptStateExecutionContextVoidMethodMethod(info);
7209 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7212 static void callWithScriptStateScriptArgumentsVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
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());
7220 static void callWithScriptStateScriptArgumentsVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
7222 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7223 TestObjectV8Internal::callWithScriptStateScriptArgumentsVoidMethodMethod(info);
7224 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7227 static void callWithScriptStateScriptArgumentsVoidMethodOptionalBooleanArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
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());
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);
7242 static void callWithScriptStateScriptArgumentsVoidMethodOptionalBooleanArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
7244 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7245 TestObjectV8Internal::callWithScriptStateScriptArgumentsVoidMethodOptionalBooleanArgMethod(info);
7246 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7249 static void callWithActiveWindowMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
7251 TestObject* impl = V8TestObject::toNative(info.Holder());
7252 impl->callWithActiveWindow(callingDOMWindow(info.GetIsolate()));
7255 static void callWithActiveWindowMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
7257 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7258 TestObjectV8Internal::callWithActiveWindowMethod(info);
7259 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7262 static void callWithActiveWindowScriptWindowMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
7264 TestObject* impl = V8TestObject::toNative(info.Holder());
7265 impl->callWithActiveWindowScriptWindow(callingDOMWindow(info.GetIsolate()), enteredDOMWindow(info.GetIsolate()));
7268 static void callWithActiveWindowScriptWindowMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
7270 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7271 TestObjectV8Internal::callWithActiveWindowScriptWindowMethod(info);
7272 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7275 static void checkSecurityForNodeVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
7277 TestObject* impl = V8TestObject::toNative(info.Holder());
7278 if (!BindingSecurity::shouldAllowAccessToNode(info.GetIsolate(), impl->checkSecurityForNodeVoidMethod(exceptionState), exceptionState)) {
7279 v8SetReturnValueNull(info);
7280 exceptionState.throwIfNeeded();
7283 impl->checkSecurityForNodeVoidMethod();
7286 static void checkSecurityForNodeVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
7288 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7289 TestObjectV8Internal::checkSecurityForNodeVoidMethodMethod(info);
7290 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7293 #if ENABLE(CONDITION)
7294 static void conditionalConditionVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
7296 TestObject* impl = V8TestObject::toNative(info.Holder());
7297 impl->conditionalConditionVoidMethod();
7299 #endif // ENABLE(CONDITION)
7301 #if ENABLE(CONDITION)
7302 static void conditionalConditionVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
7304 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7305 TestObjectV8Internal::conditionalConditionVoidMethodMethod(info);
7306 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7308 #endif // ENABLE(CONDITION)
7310 #if ENABLE(CONDITION_1) && ENABLE(CONDITION_2)
7311 static void conditionalCondition1AndCondition2VoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
7313 TestObject* impl = V8TestObject::toNative(info.Holder());
7314 impl->conditionalCondition1AndCondition2VoidMethod();
7316 #endif // ENABLE(CONDITION_1) && ENABLE(CONDITION_2)
7318 #if ENABLE(CONDITION_1) && ENABLE(CONDITION_2)
7319 static void conditionalCondition1AndCondition2VoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
7321 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7322 TestObjectV8Internal::conditionalCondition1AndCondition2VoidMethodMethod(info);
7323 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7325 #endif // ENABLE(CONDITION_1) && ENABLE(CONDITION_2)
7327 #if ENABLE(CONDITION)
7328 static void conditionalConditionStaticVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
7330 TestObject::conditionalConditionStaticVoidMethod();
7332 #endif // ENABLE(CONDITION)
7334 #if ENABLE(CONDITION)
7335 static void conditionalConditionStaticVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
7337 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7338 TestObjectV8Internal::conditionalConditionStaticVoidMethodMethod(info);
7339 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7341 #endif // ENABLE(CONDITION)
7343 static void customVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
7345 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7346 V8TestObject::customVoidMethodMethodCustom(info);
7347 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7350 #if ENABLE(CONDITION)
7351 static void conditionalConditionCustomVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
7353 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7354 V8TestObject::conditionalConditionCustomVoidMethodMethodCustom(info);
7355 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7357 #endif // ENABLE(CONDITION)
7359 static void customElementCallbacksVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
7361 TestObject* impl = V8TestObject::toNative(info.Holder());
7362 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
7363 impl->customElementCallbacksVoidMethod();
7366 static void customElementCallbacksVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
7368 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7369 TestObjectV8Internal::customElementCallbacksVoidMethodMethod(info);
7370 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7373 static void deprecatedVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
7375 TestObject* impl = V8TestObject::toNative(info.Holder());
7376 impl->deprecatedVoidMethod();
7379 static void deprecatedVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
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");
7387 static void doNotCheckSignatureVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
7389 TestObject* impl = V8TestObject::toNative(info.Holder());
7390 impl->doNotCheckSignatureVoidMethod();
7393 static void doNotCheckSignatureVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
7395 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7396 TestObjectV8Internal::doNotCheckSignatureVoidMethodMethod(info);
7397 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7400 static void implementedAsVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
7402 TestObject* impl = V8TestObject::toNative(info.Holder());
7403 impl->implementedAsMethodName();
7406 static void implementedAsVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
7408 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7409 TestObjectV8Internal::implementedAsVoidMethodMethod(info);
7410 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7413 static void measureAsVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
7415 TestObject* impl = V8TestObject::toNative(info.Holder());
7416 impl->measureAsVoidMethod();
7419 static void measureAsVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
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");
7427 static void DeprecateAsOverloadedMethod1Method(const v8::FunctionCallbackInfo<v8::Value>& info)
7429 TestObject* impl = V8TestObject::toNative(info.Holder());
7430 impl->DeprecateAsOverloadedMethod();
7433 static void DeprecateAsOverloadedMethod2Method(const v8::FunctionCallbackInfo<v8::Value>& info)
7435 ExceptionState exceptionState(ExceptionState::ExecutionContext, "DeprecateAsOverloadedMethod", "TestObject", info.Holder(), info.GetIsolate());
7436 if (UNLIKELY(info.Length() < 1)) {
7437 throwArityTypeError(exceptionState, 1, info.Length());
7440 TestObject* impl = V8TestObject::toNative(info.Holder());
7441 TONATIVE_VOID_EXCEPTIONSTATE(int, arg, toInt32(info[0], exceptionState), exceptionState);
7442 impl->DeprecateAsOverloadedMethod(arg);
7445 static void DeprecateAsOverloadedMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
7447 if (((info.Length() == 0))) {
7448 UseCounter::countDeprecation(callingExecutionContext(info.GetIsolate()), UseCounter::TestFeatureA);
7449 DeprecateAsOverloadedMethod1Method(info);
7452 if (((info.Length() == 1))) {
7453 UseCounter::countDeprecation(callingExecutionContext(info.GetIsolate()), UseCounter::TestFeatureB);
7454 DeprecateAsOverloadedMethod2Method(info);
7457 throwTypeError(ExceptionMessages::failedToExecute("DeprecateAsOverloadedMethod", "TestObject", "No function was found that matched the signature provided."), info.GetIsolate());
7460 static void DeprecateAsOverloadedMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
7462 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7463 TestObjectV8Internal::DeprecateAsOverloadedMethodMethod(info);
7464 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7467 static void DeprecateAsSameValueOverloadedMethod1Method(const v8::FunctionCallbackInfo<v8::Value>& info)
7469 TestObject* impl = V8TestObject::toNative(info.Holder());
7470 impl->DeprecateAsSameValueOverloadedMethod();
7473 static void DeprecateAsSameValueOverloadedMethod2Method(const v8::FunctionCallbackInfo<v8::Value>& info)
7475 ExceptionState exceptionState(ExceptionState::ExecutionContext, "DeprecateAsSameValueOverloadedMethod", "TestObject", info.Holder(), info.GetIsolate());
7476 if (UNLIKELY(info.Length() < 1)) {
7477 throwArityTypeError(exceptionState, 1, info.Length());
7480 TestObject* impl = V8TestObject::toNative(info.Holder());
7481 TONATIVE_VOID_EXCEPTIONSTATE(int, arg, toInt32(info[0], exceptionState), exceptionState);
7482 impl->DeprecateAsSameValueOverloadedMethod(arg);
7485 static void DeprecateAsSameValueOverloadedMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
7487 UseCounter::countDeprecation(callingExecutionContext(info.GetIsolate()), UseCounter::TestFeature);
7488 if (((info.Length() == 0))) {
7489 DeprecateAsSameValueOverloadedMethod1Method(info);
7492 if (((info.Length() == 1))) {
7493 DeprecateAsSameValueOverloadedMethod2Method(info);
7496 throwTypeError(ExceptionMessages::failedToExecute("DeprecateAsSameValueOverloadedMethod", "TestObject", "No function was found that matched the signature provided."), info.GetIsolate());
7499 static void DeprecateAsSameValueOverloadedMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
7501 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7502 TestObjectV8Internal::DeprecateAsSameValueOverloadedMethodMethod(info);
7503 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7506 static void measureAsOverloadedMethod1Method(const v8::FunctionCallbackInfo<v8::Value>& info)
7508 TestObject* impl = V8TestObject::toNative(info.Holder());
7509 impl->measureAsOverloadedMethod();
7512 static void measureAsOverloadedMethod2Method(const v8::FunctionCallbackInfo<v8::Value>& info)
7514 ExceptionState exceptionState(ExceptionState::ExecutionContext, "measureAsOverloadedMethod", "TestObject", info.Holder(), info.GetIsolate());
7515 if (UNLIKELY(info.Length() < 1)) {
7516 throwArityTypeError(exceptionState, 1, info.Length());
7519 TestObject* impl = V8TestObject::toNative(info.Holder());
7520 TONATIVE_VOID_EXCEPTIONSTATE(int, arg, toInt32(info[0], exceptionState), exceptionState);
7521 impl->measureAsOverloadedMethod(arg);
7524 static void measureAsOverloadedMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
7526 if (((info.Length() == 0))) {
7527 UseCounter::count(callingExecutionContext(info.GetIsolate()), UseCounter::TestFeatureA);
7528 measureAsOverloadedMethod1Method(info);
7531 if (((info.Length() == 1))) {
7532 UseCounter::count(callingExecutionContext(info.GetIsolate()), UseCounter::TestFeatureB);
7533 measureAsOverloadedMethod2Method(info);
7536 throwTypeError(ExceptionMessages::failedToExecute("measureAsOverloadedMethod", "TestObject", "No function was found that matched the signature provided."), info.GetIsolate());
7539 static void measureAsOverloadedMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
7541 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7542 TestObjectV8Internal::measureAsOverloadedMethodMethod(info);
7543 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7546 static void measureAsSameValueOverloadedMethod1Method(const v8::FunctionCallbackInfo<v8::Value>& info)
7548 TestObject* impl = V8TestObject::toNative(info.Holder());
7549 impl->measureAsSameValueOverloadedMethod();
7552 static void measureAsSameValueOverloadedMethod2Method(const v8::FunctionCallbackInfo<v8::Value>& info)
7554 ExceptionState exceptionState(ExceptionState::ExecutionContext, "measureAsSameValueOverloadedMethod", "TestObject", info.Holder(), info.GetIsolate());
7555 if (UNLIKELY(info.Length() < 1)) {
7556 throwArityTypeError(exceptionState, 1, info.Length());
7559 TestObject* impl = V8TestObject::toNative(info.Holder());
7560 TONATIVE_VOID_EXCEPTIONSTATE(int, arg, toInt32(info[0], exceptionState), exceptionState);
7561 impl->measureAsSameValueOverloadedMethod(arg);
7564 static void measureAsSameValueOverloadedMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
7566 UseCounter::count(callingExecutionContext(info.GetIsolate()), UseCounter::TestFeature);
7567 if (((info.Length() == 0))) {
7568 measureAsSameValueOverloadedMethod1Method(info);
7571 if (((info.Length() == 1))) {
7572 measureAsSameValueOverloadedMethod2Method(info);
7575 throwTypeError(ExceptionMessages::failedToExecute("measureAsSameValueOverloadedMethod", "TestObject", "No function was found that matched the signature provided."), info.GetIsolate());
7578 static void measureAsSameValueOverloadedMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
7580 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7581 TestObjectV8Internal::measureAsSameValueOverloadedMethodMethod(info);
7582 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7585 static void deprecateAsMeasureAsSameValueOverloadedMethod1Method(const v8::FunctionCallbackInfo<v8::Value>& info)
7587 TestObject* impl = V8TestObject::toNative(info.Holder());
7588 impl->deprecateAsMeasureAsSameValueOverloadedMethod();
7591 static void deprecateAsMeasureAsSameValueOverloadedMethod2Method(const v8::FunctionCallbackInfo<v8::Value>& info)
7593 ExceptionState exceptionState(ExceptionState::ExecutionContext, "deprecateAsMeasureAsSameValueOverloadedMethod", "TestObject", info.Holder(), info.GetIsolate());
7594 if (UNLIKELY(info.Length() < 1)) {
7595 throwArityTypeError(exceptionState, 1, info.Length());
7598 TestObject* impl = V8TestObject::toNative(info.Holder());
7599 TONATIVE_VOID_EXCEPTIONSTATE(int, arg, toInt32(info[0], exceptionState), exceptionState);
7600 impl->deprecateAsMeasureAsSameValueOverloadedMethod(arg);
7603 static void deprecateAsMeasureAsSameValueOverloadedMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
7605 UseCounter::count(callingExecutionContext(info.GetIsolate()), UseCounter::TestFeature);
7606 if (((info.Length() == 0))) {
7607 UseCounter::countDeprecation(callingExecutionContext(info.GetIsolate()), UseCounter::TestFeatureA);
7608 deprecateAsMeasureAsSameValueOverloadedMethod1Method(info);
7611 if (((info.Length() == 1))) {
7612 UseCounter::countDeprecation(callingExecutionContext(info.GetIsolate()), UseCounter::TestFeatureB);
7613 deprecateAsMeasureAsSameValueOverloadedMethod2Method(info);
7616 throwTypeError(ExceptionMessages::failedToExecute("deprecateAsMeasureAsSameValueOverloadedMethod", "TestObject", "No function was found that matched the signature provided."), info.GetIsolate());
7619 static void deprecateAsMeasureAsSameValueOverloadedMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
7621 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7622 TestObjectV8Internal::deprecateAsMeasureAsSameValueOverloadedMethodMethod(info);
7623 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7626 static void deprecateAsSameValueMeasureAsOverloadedMethod1Method(const v8::FunctionCallbackInfo<v8::Value>& info)
7628 TestObject* impl = V8TestObject::toNative(info.Holder());
7629 impl->deprecateAsSameValueMeasureAsOverloadedMethod();
7632 static void deprecateAsSameValueMeasureAsOverloadedMethod2Method(const v8::FunctionCallbackInfo<v8::Value>& info)
7634 ExceptionState exceptionState(ExceptionState::ExecutionContext, "deprecateAsSameValueMeasureAsOverloadedMethod", "TestObject", info.Holder(), info.GetIsolate());
7635 if (UNLIKELY(info.Length() < 1)) {
7636 throwArityTypeError(exceptionState, 1, info.Length());
7639 TestObject* impl = V8TestObject::toNative(info.Holder());
7640 TONATIVE_VOID_EXCEPTIONSTATE(int, arg, toInt32(info[0], exceptionState), exceptionState);
7641 impl->deprecateAsSameValueMeasureAsOverloadedMethod(arg);
7644 static void deprecateAsSameValueMeasureAsOverloadedMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
7646 UseCounter::countDeprecation(callingExecutionContext(info.GetIsolate()), UseCounter::TestFeature);
7647 if (((info.Length() == 0))) {
7648 UseCounter::count(callingExecutionContext(info.GetIsolate()), UseCounter::TestFeatureA);
7649 deprecateAsSameValueMeasureAsOverloadedMethod1Method(info);
7652 if (((info.Length() == 1))) {
7653 UseCounter::count(callingExecutionContext(info.GetIsolate()), UseCounter::TestFeatureB);
7654 deprecateAsSameValueMeasureAsOverloadedMethod2Method(info);
7657 throwTypeError(ExceptionMessages::failedToExecute("deprecateAsSameValueMeasureAsOverloadedMethod", "TestObject", "No function was found that matched the signature provided."), info.GetIsolate());
7660 static void deprecateAsSameValueMeasureAsOverloadedMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
7662 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7663 TestObjectV8Internal::deprecateAsSameValueMeasureAsOverloadedMethodMethod(info);
7664 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7667 static void deprecateAsSameValueMeasureAsSameValueOverloadedMethod1Method(const v8::FunctionCallbackInfo<v8::Value>& info)
7669 TestObject* impl = V8TestObject::toNative(info.Holder());
7670 impl->deprecateAsSameValueMeasureAsSameValueOverloadedMethod();
7673 static void deprecateAsSameValueMeasureAsSameValueOverloadedMethod2Method(const v8::FunctionCallbackInfo<v8::Value>& info)
7675 ExceptionState exceptionState(ExceptionState::ExecutionContext, "deprecateAsSameValueMeasureAsSameValueOverloadedMethod", "TestObject", info.Holder(), info.GetIsolate());
7676 if (UNLIKELY(info.Length() < 1)) {
7677 throwArityTypeError(exceptionState, 1, info.Length());
7680 TestObject* impl = V8TestObject::toNative(info.Holder());
7681 TONATIVE_VOID_EXCEPTIONSTATE(int, arg, toInt32(info[0], exceptionState), exceptionState);
7682 impl->deprecateAsSameValueMeasureAsSameValueOverloadedMethod(arg);
7685 static void deprecateAsSameValueMeasureAsSameValueOverloadedMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
7687 UseCounter::count(callingExecutionContext(info.GetIsolate()), UseCounter::TestFeatureB);
7688 UseCounter::countDeprecation(callingExecutionContext(info.GetIsolate()), UseCounter::TestFeatureA);
7689 if (((info.Length() == 0))) {
7690 deprecateAsSameValueMeasureAsSameValueOverloadedMethod1Method(info);
7693 if (((info.Length() == 1))) {
7694 deprecateAsSameValueMeasureAsSameValueOverloadedMethod2Method(info);
7697 throwTypeError(ExceptionMessages::failedToExecute("deprecateAsSameValueMeasureAsSameValueOverloadedMethod", "TestObject", "No function was found that matched the signature provided."), info.GetIsolate());
7700 static void deprecateAsSameValueMeasureAsSameValueOverloadedMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
7702 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7703 TestObjectV8Internal::deprecateAsSameValueMeasureAsSameValueOverloadedMethodMethod(info);
7704 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7707 static void notEnumerableVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
7709 TestObject* impl = V8TestObject::toNative(info.Holder());
7710 impl->notEnumerableVoidMethod();
7713 static void notEnumerableVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
7715 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7716 TestObjectV8Internal::notEnumerableVoidMethodMethod(info);
7717 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7720 static void perContextEnabledVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
7722 TestObject* impl = V8TestObject::toNative(info.Holder());
7723 impl->perContextEnabledVoidMethod();
7726 static void perContextEnabledVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
7728 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7729 TestObjectV8Internal::perContextEnabledVoidMethodMethod(info);
7730 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7733 static void perWorldBindingsVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
7735 TestObject* impl = V8TestObject::toNative(info.Holder());
7736 impl->perWorldBindingsVoidMethod();
7739 static void perWorldBindingsVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
7741 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7742 TestObjectV8Internal::perWorldBindingsVoidMethodMethod(info);
7743 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7746 static void perWorldBindingsVoidMethodMethodForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info)
7748 TestObject* impl = V8TestObject::toNative(info.Holder());
7749 impl->perWorldBindingsVoidMethod();
7752 static void perWorldBindingsVoidMethodMethodCallbackForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info)
7754 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7755 TestObjectV8Internal::perWorldBindingsVoidMethodMethodForMainWorld(info);
7756 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7759 static void perWorldBindingsVoidMethodTestInterfaceEmptyArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
7761 if (UNLIKELY(info.Length() < 1)) {
7762 throwArityTypeErrorForMethod("perWorldBindingsVoidMethodTestInterfaceEmptyArg", "TestObject", 1, info.Length(), info.GetIsolate());
7765 TestObject* impl = V8TestObject::toNative(info.Holder());
7766 TONATIVE_VOID(TestInterfaceEmpty*, testInterfaceEmptyArg, V8TestInterfaceEmpty::toNativeWithTypeCheck(info.GetIsolate(), info[0]));
7767 impl->perWorldBindingsVoidMethodTestInterfaceEmptyArg(testInterfaceEmptyArg);
7770 static void perWorldBindingsVoidMethodTestInterfaceEmptyArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
7772 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7773 TestObjectV8Internal::perWorldBindingsVoidMethodTestInterfaceEmptyArgMethod(info);
7774 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7777 static void perWorldBindingsVoidMethodTestInterfaceEmptyArgMethodForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info)
7779 if (UNLIKELY(info.Length() < 1)) {
7780 throwArityTypeErrorForMethod("perWorldBindingsVoidMethodTestInterfaceEmptyArg", "TestObject", 1, info.Length(), info.GetIsolate());
7783 TestObject* impl = V8TestObject::toNative(info.Holder());
7784 TONATIVE_VOID(TestInterfaceEmpty*, testInterfaceEmptyArg, V8TestInterfaceEmpty::toNativeWithTypeCheck(info.GetIsolate(), info[0]));
7785 impl->perWorldBindingsVoidMethodTestInterfaceEmptyArg(testInterfaceEmptyArg);
7788 static void perWorldBindingsVoidMethodTestInterfaceEmptyArgMethodCallbackForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info)
7790 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7791 TestObjectV8Internal::perWorldBindingsVoidMethodTestInterfaceEmptyArgMethodForMainWorld(info);
7792 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7795 static void activityLoggingForAllWorldsPerWorldBindingsVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
7797 TestObject* impl = V8TestObject::toNative(info.Holder());
7798 impl->activityLoggingForAllWorldsPerWorldBindingsVoidMethod();
7801 static void activityLoggingForAllWorldsPerWorldBindingsVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
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());
7809 TestObjectV8Internal::activityLoggingForAllWorldsPerWorldBindingsVoidMethodMethod(info);
7810 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7813 static void activityLoggingForAllWorldsPerWorldBindingsVoidMethodMethodForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info)
7815 TestObject* impl = V8TestObject::toNative(info.Holder());
7816 impl->activityLoggingForAllWorldsPerWorldBindingsVoidMethod();
7819 static void activityLoggingForAllWorldsPerWorldBindingsVoidMethodMethodCallbackForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info)
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());
7827 TestObjectV8Internal::activityLoggingForAllWorldsPerWorldBindingsVoidMethodMethodForMainWorld(info);
7828 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7831 static void activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
7833 TestObject* impl = V8TestObject::toNative(info.Holder());
7834 impl->activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethod();
7837 static void activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
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());
7845 TestObjectV8Internal::activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethodMethod(info);
7846 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7849 static void activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethodMethodForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info)
7851 TestObject* impl = V8TestObject::toNative(info.Holder());
7852 impl->activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethod();
7855 static void activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethodMethodCallbackForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info)
7857 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7858 TestObjectV8Internal::activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethodMethodForMainWorld(info);
7859 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7862 static void raisesExceptionVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
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())
7871 static void raisesExceptionVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
7873 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7874 TestObjectV8Internal::raisesExceptionVoidMethodMethod(info);
7875 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7878 static void raisesExceptionStringMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
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())
7885 v8SetReturnValueString(info, result, info.GetIsolate());
7888 static void raisesExceptionStringMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
7890 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7891 TestObjectV8Internal::raisesExceptionStringMethodMethod(info);
7892 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7895 static void raisesExceptionVoidMethodOptionalLongArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
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())
7905 TONATIVE_VOID_EXCEPTIONSTATE(int, optionalLongArg, toInt32(info[0], exceptionState), exceptionState);
7906 impl->raisesExceptionVoidMethodOptionalLongArg(optionalLongArg, exceptionState);
7907 if (exceptionState.throwIfNeeded())
7911 static void raisesExceptionVoidMethodOptionalLongArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
7913 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7914 TestObjectV8Internal::raisesExceptionVoidMethodOptionalLongArgMethod(info);
7915 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7918 static void raisesExceptionVoidMethodTestCallbackInterfaceArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
7920 ExceptionState exceptionState(ExceptionState::ExecutionContext, "raisesExceptionVoidMethodTestCallbackInterfaceArg", "TestObject", info.Holder(), info.GetIsolate());
7921 if (UNLIKELY(info.Length() < 1)) {
7922 throwArityTypeError(exceptionState, 1, info.Length());
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();
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())
7937 static void raisesExceptionVoidMethodTestCallbackInterfaceArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
7939 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7940 TestObjectV8Internal::raisesExceptionVoidMethodTestCallbackInterfaceArgMethod(info);
7941 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7944 static void raisesExceptionVoidMethodOptionalTestCallbackInterfaceArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
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();
7955 optionalTestCallbackInterfaceArg = V8TestCallbackInterface::create(v8::Handle<v8::Function>::Cast(info[0]), currentExecutionContext(info.GetIsolate()));
7957 impl->raisesExceptionVoidMethodOptionalTestCallbackInterfaceArg(optionalTestCallbackInterfaceArg.release(), exceptionState);
7958 if (exceptionState.throwIfNeeded())
7962 static void raisesExceptionVoidMethodOptionalTestCallbackInterfaceArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
7964 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7965 TestObjectV8Internal::raisesExceptionVoidMethodOptionalTestCallbackInterfaceArgMethod(info);
7966 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7969 static void raisesExceptionTestInterfaceEmptyVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
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())
7976 v8SetReturnValue(info, result.release());
7979 static void raisesExceptionTestInterfaceEmptyVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
7981 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
7982 TestObjectV8Internal::raisesExceptionTestInterfaceEmptyVoidMethodMethod(info);
7983 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
7986 static void callWithExecutionContextRaisesExceptionVoidMethodLongArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
7988 ExceptionState exceptionState(ExceptionState::ExecutionContext, "callWithExecutionContextRaisesExceptionVoidMethodLongArg", "TestObject", info.Holder(), info.GetIsolate());
7989 if (UNLIKELY(info.Length() < 1)) {
7990 throwArityTypeError(exceptionState, 1, info.Length());
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())
8001 static void callWithExecutionContextRaisesExceptionVoidMethodLongArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
8003 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
8004 TestObjectV8Internal::callWithExecutionContextRaisesExceptionVoidMethodLongArgMethod(info);
8005 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
8008 static void readOnlyVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
8010 TestObject* impl = V8TestObject::toNative(info.Holder());
8011 impl->readOnlyVoidMethod();
8014 static void readOnlyVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
8016 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
8017 TestObjectV8Internal::readOnlyVoidMethodMethod(info);
8018 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
8021 static void notEnumerableReadOnlyVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
8023 TestObject* impl = V8TestObject::toNative(info.Holder());
8024 impl->notEnumerableReadOnlyVoidMethod();
8027 static void notEnumerableReadOnlyVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
8029 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
8030 TestObjectV8Internal::notEnumerableReadOnlyVoidMethodMethod(info);
8031 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
8034 static void runtimeEnabledVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
8036 TestObject* impl = V8TestObject::toNative(info.Holder());
8037 impl->runtimeEnabledVoidMethod();
8040 static void runtimeEnabledVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
8042 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
8043 TestObjectV8Internal::runtimeEnabledVoidMethodMethod(info);
8044 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
8047 static void perWorldBindingsRuntimeEnabledVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
8049 TestObject* impl = V8TestObject::toNative(info.Holder());
8050 impl->perWorldBindingsRuntimeEnabledVoidMethod();
8053 static void perWorldBindingsRuntimeEnabledVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
8055 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
8056 TestObjectV8Internal::perWorldBindingsRuntimeEnabledVoidMethodMethod(info);
8057 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
8060 static void perWorldBindingsRuntimeEnabledVoidMethodMethodForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info)
8062 TestObject* impl = V8TestObject::toNative(info.Holder());
8063 impl->perWorldBindingsRuntimeEnabledVoidMethod();
8066 static void perWorldBindingsRuntimeEnabledVoidMethodMethodCallbackForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info)
8068 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
8069 TestObjectV8Internal::perWorldBindingsRuntimeEnabledVoidMethodMethodForMainWorld(info);
8070 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
8073 static void treatReturnedNullStringAsNullStringMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
8075 TestObject* impl = V8TestObject::toNative(info.Holder());
8076 v8SetReturnValueStringOrNull(info, impl->treatReturnedNullStringAsNullStringMethod(), info.GetIsolate());
8079 static void treatReturnedNullStringAsNullStringMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
8081 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
8082 TestObjectV8Internal::treatReturnedNullStringAsNullStringMethodMethod(info);
8083 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
8086 static void treatReturnedNullStringAsUndefinedStringMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
8088 TestObject* impl = V8TestObject::toNative(info.Holder());
8089 v8SetReturnValueStringOrUndefined(info, impl->treatReturnedNullStringAsUndefinedStringMethod(), info.GetIsolate());
8092 static void treatReturnedNullStringAsUndefinedStringMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
8094 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
8095 TestObjectV8Internal::treatReturnedNullStringAsUndefinedStringMethodMethod(info);
8096 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
8099 static void typeCheckingInterfaceVoidMethodTestInterfaceEmptyArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
8101 if (UNLIKELY(info.Length() < 1)) {
8102 throwArityTypeErrorForMethod("typeCheckingInterfaceVoidMethodTestInterfaceEmptyArg", "TestObject", 1, info.Length(), info.GetIsolate());
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());
8110 TONATIVE_VOID(TestInterfaceEmpty*, testInterfaceEmptyArg, V8TestInterfaceEmpty::toNativeWithTypeCheck(info.GetIsolate(), info[0]));
8111 impl->typeCheckingInterfaceVoidMethodTestInterfaceEmptyArg(testInterfaceEmptyArg);
8114 static void typeCheckingInterfaceVoidMethodTestInterfaceEmptyArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
8116 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
8117 TestObjectV8Internal::typeCheckingInterfaceVoidMethodTestInterfaceEmptyArgMethod(info);
8118 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
8121 static void typeCheckingNullableVoidMethodTestInterfaceEmptyOrNullArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
8123 if (UNLIKELY(info.Length() < 1)) {
8124 throwArityTypeErrorForMethod("typeCheckingNullableVoidMethodTestInterfaceEmptyOrNullArg", "TestObject", 1, info.Length(), info.GetIsolate());
8127 TestObject* impl = V8TestObject::toNative(info.Holder());
8128 TONATIVE_VOID(TestInterfaceEmpty*, testInterfaceEmptyOrNullArg, V8TestInterfaceEmpty::toNativeWithTypeCheck(info.GetIsolate(), info[0]));
8129 impl->typeCheckingNullableVoidMethodTestInterfaceEmptyOrNullArg(testInterfaceEmptyOrNullArg);
8132 static void typeCheckingNullableVoidMethodTestInterfaceEmptyOrNullArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
8134 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
8135 TestObjectV8Internal::typeCheckingNullableVoidMethodTestInterfaceEmptyOrNullArgMethod(info);
8136 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
8139 static void typeCheckingInterfaceNullableVoidMethodTestInterfaceEmptyOrNullArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
8141 if (UNLIKELY(info.Length() < 1)) {
8142 throwArityTypeErrorForMethod("typeCheckingInterfaceNullableVoidMethodTestInterfaceEmptyOrNullArg", "TestObject", 1, info.Length(), info.GetIsolate());
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());
8150 TONATIVE_VOID(TestInterfaceEmpty*, testInterfaceEmptyOrNullArg, V8TestInterfaceEmpty::toNativeWithTypeCheck(info.GetIsolate(), info[0]));
8151 impl->typeCheckingInterfaceNullableVoidMethodTestInterfaceEmptyOrNullArg(testInterfaceEmptyOrNullArg);
8154 static void typeCheckingInterfaceNullableVoidMethodTestInterfaceEmptyOrNullArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
8156 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
8157 TestObjectV8Internal::typeCheckingInterfaceNullableVoidMethodTestInterfaceEmptyOrNullArgMethod(info);
8158 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
8161 static void typeCheckingUnrestrictedVoidMethodFloatArgDoubleArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
8163 if (UNLIKELY(info.Length() < 2)) {
8164 throwArityTypeErrorForMethod("typeCheckingUnrestrictedVoidMethodFloatArgDoubleArg", "TestObject", 2, info.Length(), info.GetIsolate());
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());
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());
8178 impl->typeCheckingUnrestrictedVoidMethodFloatArgDoubleArg(floatArg, doubleArg);
8181 static void typeCheckingUnrestrictedVoidMethodFloatArgDoubleArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
8183 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
8184 TestObjectV8Internal::typeCheckingUnrestrictedVoidMethodFloatArgDoubleArgMethod(info);
8185 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
8188 static void unforgeableVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
8190 TestObject* impl = V8TestObject::toNative(info.Holder());
8191 impl->unforgeableVoidMethod();
8194 static void unforgeableVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
8196 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
8197 TestObjectV8Internal::unforgeableVoidMethodMethod(info);
8198 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
8201 static void voidMethodTestInterfaceGarbageCollectedSequenceArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
8203 if (UNLIKELY(info.Length() < 1)) {
8204 throwArityTypeErrorForMethod("voidMethodTestInterfaceGarbageCollectedSequenceArg", "TestObject", 1, info.Length(), info.GetIsolate());
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);
8212 static void voidMethodTestInterfaceGarbageCollectedSequenceArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
8214 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
8215 TestObjectV8Internal::voidMethodTestInterfaceGarbageCollectedSequenceArgMethod(info);
8216 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
8219 static void voidMethodTestInterfaceGarbageCollectedArrayArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
8221 if (UNLIKELY(info.Length() < 1)) {
8222 throwArityTypeErrorForMethod("voidMethodTestInterfaceGarbageCollectedArrayArg", "TestObject", 1, info.Length(), info.GetIsolate());
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);
8230 static void voidMethodTestInterfaceGarbageCollectedArrayArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
8232 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
8233 TestObjectV8Internal::voidMethodTestInterfaceGarbageCollectedArrayArgMethod(info);
8234 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
8237 static void voidMethodTestInterfaceWillBeGarbageCollectedSequenceArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
8239 if (UNLIKELY(info.Length() < 1)) {
8240 throwArityTypeErrorForMethod("voidMethodTestInterfaceWillBeGarbageCollectedSequenceArg", "TestObject", 1, info.Length(), info.GetIsolate());
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);
8248 static void voidMethodTestInterfaceWillBeGarbageCollectedSequenceArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
8250 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
8251 TestObjectV8Internal::voidMethodTestInterfaceWillBeGarbageCollectedSequenceArgMethod(info);
8252 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
8255 static void voidMethodTestInterfaceWillBeGarbageCollectedArrayArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
8257 if (UNLIKELY(info.Length() < 1)) {
8258 throwArityTypeErrorForMethod("voidMethodTestInterfaceWillBeGarbageCollectedArrayArg", "TestObject", 1, info.Length(), info.GetIsolate());
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);
8266 static void voidMethodTestInterfaceWillBeGarbageCollectedArrayArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
8268 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
8269 TestObjectV8Internal::voidMethodTestInterfaceWillBeGarbageCollectedArrayArgMethod(info);
8270 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
8273 } // namespace TestObjectV8Internal
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 */},
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)},
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},
8610 static void configureV8TestObjectTemplate(v8::Handle<v8::FunctionTemplate> functionTemplate, v8::Isolate* isolate)
8612 functionTemplate->ReadOnlyPrototype();
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),
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);
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);
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},
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);
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));
8691 if (RuntimeEnabledFeatures::featureNameEnabled())
8692 prototypeTemplate->Set(v8AtomicString(isolate, "perWorldBindingsRuntimeEnabledVoidMethod"), v8::FunctionTemplate::New(isolate, TestObjectV8Internal::perWorldBindingsRuntimeEnabledVoidMethodMethodCallback, v8Undefined(), defaultSignature, 0));
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));
8698 // Custom toString template
8699 functionTemplate->Set(v8AtomicString(isolate, "toString"), V8PerIsolateData::from(isolate)->toStringTemplate());
8702 v8::Handle<v8::FunctionTemplate> V8TestObject::domTemplate(v8::Isolate* isolate)
8704 V8PerIsolateData* data = V8PerIsolateData::from(isolate);
8705 v8::Local<v8::FunctionTemplate> result = data->existingDOMTemplate(const_cast<WrapperTypeInfo*>(&wrapperTypeInfo));
8706 if (!result.IsEmpty())
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);
8716 bool V8TestObject::hasInstance(v8::Handle<v8::Value> v8Value, v8::Isolate* isolate)
8718 return V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, v8Value);
8721 v8::Handle<v8::Object> V8TestObject::findInstanceInPrototypeChain(v8::Handle<v8::Value> v8Value, v8::Isolate* isolate)
8723 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrapperTypeInfo, v8Value);
8726 TestObject* V8TestObject::toNativeWithTypeCheck(v8::Isolate* isolate, v8::Handle<v8::Value> value)
8728 return hasInstance(value, isolate) ? fromInternalPointer(v8::Handle<v8::Object>::Cast(value)->GetAlignedPointerFromInternalField(v8DOMWrapperObjectIndex)) : 0;
8731 void V8TestObject::installPerContextEnabledProperties(v8::Handle<v8::Object> instanceTemplate, TestObject* impl, v8::Isolate* isolate)
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);
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);
8746 void V8TestObject::installPerContextEnabledMethods(v8::Handle<v8::Object> prototypeTemplate, v8::Isolate* isolate)
8748 v8::Local<v8::Signature> defaultSignature = v8::Signature::New(isolate, domTemplate(isolate));
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());
8755 v8::Handle<v8::Object> V8TestObject::createWrapper(PassRefPtr<TestObject> impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
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);
8766 v8::Handle<v8::Object> wrapper = V8DOMWrapper::createWrapper(creationContext, &wrapperTypeInfo, toInternalPointer(impl.get()), isolate);
8767 if (UNLIKELY(wrapper.IsEmpty()))
8770 installPerContextEnabledProperties(wrapper, impl.get(), isolate);
8771 V8DOMWrapper::associateObjectWithWrapper<V8TestObject>(impl, &wrapperTypeInfo, wrapper, isolate, WrapperConfiguration::Independent);
8775 void V8TestObject::derefObject(void* object)
8777 fromInternalPointer(object)->deref();
8781 v8::Handle<v8::Value> toV8NoInline(TestObject* impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
8783 return toV8(impl, creationContext, isolate);
8786 } // namespace WebCore