blob: 641c26f17df133c57db671b51a9a32e7f066078b [file] [log] [blame]
/*
This file is part of the Blink open source project.
This file has been auto-generated by CodeGeneratorV8.pm. DO NOT MODIFY!
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
*/
#include "config.h"
#include "V8TestObject.h"
#include "HTMLNames.h"
#include "RuntimeEnabledFeatures.h"
#include "V8DOMStringList.h"
#include "V8Document.h"
#include "V8Float32Array.h"
#include "V8MessagePort.h"
#include "V8Node.h"
#include "V8SVGDocument.h"
#include "V8SVGPoint.h"
#include "V8TestCallback.h"
#include "V8TestInterface.h"
#include "V8TestNode.h"
#include "V8TestObjectectA.h"
#include "V8TestObjectectB.h"
#include "V8TestObjectectC.h"
#include "V8TestSubObj.h"
#include "bindings/v8/BindingSecurity.h"
#include "bindings/v8/Dictionary.h"
#include "bindings/v8/ScriptController.h"
#include "bindings/v8/ScriptValue.h"
#include "bindings/v8/SerializedScriptValue.h"
#include "bindings/v8/V8Binding.h"
#include "bindings/v8/V8DOMActivityLogger.h"
#include "bindings/v8/V8DOMConfiguration.h"
#include "bindings/v8/V8DOMWrapper.h"
#include "bindings/v8/V8EventListenerList.h"
#include "bindings/v8/V8HiddenPropertyName.h"
#include "bindings/v8/V8ObjectConstructor.h"
#include "core/dom/ContextFeatures.h"
#include "core/dom/CustomElementCallbackDispatcher.h"
#include "core/dom/Document.h"
#include "core/dom/ExceptionCode.h"
#include "core/page/Frame.h"
#include "core/page/PageConsole.h"
#include "core/page/UseCounter.h"
#include "core/platform/chromium/TraceEvent.h"
#include "core/svg/properties/SVGPropertyTearOff.h"
#include "core/svg/properties/SVGStaticPropertyTearOff.h"
#include "wtf/GetPtr.h"
#include "wtf/RefCounted.h"
#include "wtf/RefPtr.h"
#include "wtf/UnusedParam.h"
#include "wtf/Vector.h"
namespace WebCore {
static void initializeScriptWrappableForInterface(TestObj* object)
{
if (ScriptWrappable::wrapperCanBeStoredInObject(object))
ScriptWrappable::setTypeInfoInObject(object, &V8TestObject::info);
else
ASSERT_NOT_REACHED();
}
} // namespace WebCore
// In ScriptWrappable::init, the use of a local function declaration has an issue on Windows:
// the local declaration does not pick up the surrounding namespace. Therefore, we provide this function
// in the global namespace.
// (More info on the MSVC bug here: http://connect.microsoft.com/VisualStudio/feedback/details/664619/the-namespace-of-local-function-declarations-in-c)
void webCoreInitializeScriptWrappableForInterface(WebCore::TestObj* object)
{
WebCore::initializeScriptWrappableForInterface(object);
}
namespace WebCore {
WrapperTypeInfo V8TestObject::info = { V8TestObject::GetTemplate, V8TestObject::derefObject, 0, 0, 0, V8TestObject::installPerContextPrototypeProperties, 0, WrapperTypeObjectPrototype };
namespace TestObjV8Internal {
template <typename T> void V8_USE(T) { }
static void readOnlyLongAttrAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
v8SetReturnValueInt(info, imp->readOnlyLongAttr());
return;
}
static void readOnlyLongAttrAttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::readOnlyLongAttrAttrGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void readOnlyStringAttrAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
v8SetReturnValueString(info, imp->readOnlyStringAttr(), info.GetIsolate(), NullStringAsEmpty);
return;
}
static void readOnlyStringAttrAttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::readOnlyStringAttrAttrGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void readOnlyTestObjectAttrAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
RefPtr<TestObj> result = imp->readOnlyTestObjectAttr();
v8::Handle<v8::Value> wrapper = result.get() ? v8::Handle<v8::Value>(DOMDataStore::getWrapper<V8TestObject>(result.get(), info.GetIsolate())) : v8Undefined();
if (wrapper.IsEmpty()) {
wrapper = toV8(result.get(), info.Holder(), info.GetIsolate());
if (!wrapper.IsEmpty())
V8HiddenPropertyName::setNamedHiddenReference(info.Holder(), "readOnlyTestObjectAttr", wrapper);
}
v8SetReturnValue(info, wrapper);
return;
}
static void readOnlyTestObjectAttrAttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::readOnlyTestObjectAttrAttrGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void staticReadOnlyLongAttrAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
v8SetReturnValueInt(info, TestObj::staticReadOnlyLongAttr());
return;
}
static void staticReadOnlyLongAttrAttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::staticReadOnlyLongAttrAttrGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void staticStringAttrAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
v8SetReturnValueString(info, TestObj::staticStringAttr(), info.GetIsolate(), NullStringAsEmpty);
return;
}
static void staticStringAttrAttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::staticStringAttrAttrGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void staticStringAttrAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, v, value);
TestObj::setStaticStringAttr(v);
return;
}
static void staticStringAttrAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
TestObjV8Internal::staticStringAttrAttrSetter(name, value, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void enumAttrAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
v8SetReturnValueString(info, imp->enumAttr(), info.GetIsolate(), NullStringAsEmpty);
return;
}
static void enumAttrAttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::enumAttrAttrGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void enumAttrAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, v, value);
String string = v;
if (!(string == "" || string == "EnumValue1" || string == "EnumValue2" || string == "EnumValue3"))
return;
imp->setEnumAttr(v);
return;
}
static void enumAttrAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
TestObjV8Internal::enumAttrAttrSetter(name, value, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void readOnlyEnumAttrAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
v8SetReturnValueString(info, imp->readOnlyEnumAttr(), info.GetIsolate(), NullStringAsEmpty);
return;
}
static void readOnlyEnumAttrAttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::readOnlyEnumAttrAttrGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void byteAttrAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
v8SetReturnValueInt(info, imp->byteAttr());
return;
}
static void byteAttrAttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::byteAttrAttrGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void byteAttrAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
V8TRYCATCH_VOID(int, v, toInt8(value));
imp->setByteAttr(v);
return;
}
static void byteAttrAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
TestObjV8Internal::byteAttrAttrSetter(name, value, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void octetAttrAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
v8SetReturnValueUnsigned(info, imp->octetAttr());
return;
}
static void octetAttrAttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::octetAttrAttrGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void octetAttrAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
V8TRYCATCH_VOID(unsigned, v, toUInt8(value));
imp->setOctetAttr(v);
return;
}
static void octetAttrAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
TestObjV8Internal::octetAttrAttrSetter(name, value, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void shortAttrAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
v8SetReturnValueInt(info, imp->shortAttr());
return;
}
static void shortAttrAttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::shortAttrAttrGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void shortAttrAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
V8TRYCATCH_VOID(int, v, toInt32(value));
imp->setShortAttr(v);
return;
}
static void shortAttrAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
TestObjV8Internal::shortAttrAttrSetter(name, value, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void unsignedShortAttrAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
v8SetReturnValueUnsigned(info, imp->unsignedShortAttr());
return;
}
static void unsignedShortAttrAttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::unsignedShortAttrAttrGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void unsignedShortAttrAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
V8TRYCATCH_VOID(unsigned, v, toUInt32(value));
imp->setUnsignedShortAttr(v);
return;
}
static void unsignedShortAttrAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
TestObjV8Internal::unsignedShortAttrAttrSetter(name, value, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void longAttrAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
v8SetReturnValueInt(info, imp->longAttr());
return;
}
static void longAttrAttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::longAttrAttrGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void longAttrAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
V8TRYCATCH_VOID(int, v, toInt32(value));
imp->setLongAttr(v);
return;
}
static void longAttrAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
TestObjV8Internal::longAttrAttrSetter(name, value, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void longLongAttrAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
v8SetReturnValue(info, static_cast<double>(imp->longLongAttr()));
return;
}
static void longLongAttrAttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::longLongAttrAttrGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void longLongAttrAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
V8TRYCATCH_VOID(long long, v, toInt64(value));
imp->setLongLongAttr(v);
return;
}
static void longLongAttrAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
TestObjV8Internal::longLongAttrAttrSetter(name, value, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void unsignedLongLongAttrAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
v8SetReturnValue(info, static_cast<double>(imp->unsignedLongLongAttr()));
return;
}
static void unsignedLongLongAttrAttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::unsignedLongLongAttrAttrGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void unsignedLongLongAttrAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
V8TRYCATCH_VOID(unsigned long long, v, toUInt64(value));
imp->setUnsignedLongLongAttr(v);
return;
}
static void unsignedLongLongAttrAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
TestObjV8Internal::unsignedLongLongAttrAttrSetter(name, value, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void stringAttrAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
v8SetReturnValueString(info, imp->stringAttr(), info.GetIsolate(), NullStringAsEmpty);
return;
}
static void stringAttrAttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::stringAttrAttrGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void stringAttrAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, v, value);
imp->setStringAttr(v);
return;
}
static void stringAttrAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
TestObjV8Internal::stringAttrAttrSetter(name, value, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void testObjAttrAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
v8SetReturnValue(info, toV8Fast(imp->testObjAttr(), info, imp));
return;
}
static void testObjAttrAttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
UseCounter::count(activeDOMWindow(), UseCounter::TestFeature);
TestObjV8Internal::testObjAttrAttrGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void testObjAttrAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
V8TRYCATCH_VOID(TestObj*, v, V8TestObject::HasInstance(value, info.GetIsolate(), worldType(info.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8::Object>::Cast(value)) : 0);
imp->setTestObjAttr(WTF::getPtr(v));
return;
}
static void testObjAttrAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
UseCounter::count(activeDOMWindow(), UseCounter::TestFeature);
TestObjV8Internal::testObjAttrAttrSetter(name, value, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void XMLObjAttrAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
v8SetReturnValue(info, toV8Fast(imp->xmlObjAttr(), info, imp));
return;
}
static void XMLObjAttrAttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::XMLObjAttrAttrGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void XMLObjAttrAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
V8TRYCATCH_VOID(TestObj*, v, V8TestObject::HasInstance(value, info.GetIsolate(), worldType(info.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8::Object>::Cast(value)) : 0);
imp->setXMLObjAttr(WTF::getPtr(v));
return;
}
static void XMLObjAttrAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
TestObjV8Internal::XMLObjAttrAttrSetter(name, value, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void createAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
v8SetReturnValueBool(info, imp->isCreate());
return;
}
static void createAttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::createAttrGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void createAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
V8TRYCATCH_VOID(bool, v, value->BooleanValue());
imp->setCreate(v);
return;
}
static void createAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
TestObjV8Internal::createAttrSetter(name, value, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void reflectedStringAttrAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
v8SetReturnValueString(info, imp->fastGetAttribute(WebCore::HTMLNames::reflectedstringattrAttr), info.GetIsolate(), NullStringAsEmpty);
return;
}
static void reflectedStringAttrAttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::reflectedStringAttrAttrGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void reflectedStringAttrAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithNullCheck>, v, value);
CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
imp->setAttribute(WebCore::HTMLNames::reflectedstringattrAttr, v);
return;
}
static void reflectedStringAttrAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
TestObjV8Internal::reflectedStringAttrAttrSetter(name, value, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void reflectedIntegralAttrAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
v8SetReturnValueInt(info, imp->getIntegralAttribute(WebCore::HTMLNames::reflectedintegralattrAttr));
return;
}
static void reflectedIntegralAttrAttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::reflectedIntegralAttrAttrGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void reflectedIntegralAttrAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
V8TRYCATCH_VOID(int, v, toInt32(value));
CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
imp->setIntegralAttribute(WebCore::HTMLNames::reflectedintegralattrAttr, v);
return;
}
static void reflectedIntegralAttrAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
TestObjV8Internal::reflectedIntegralAttrAttrSetter(name, value, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void reflectedUnsignedIntegralAttrAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
v8SetReturnValueUnsigned(info, std::max(0, imp->getIntegralAttribute(WebCore::HTMLNames::reflectedunsignedintegralattrAttr)));
return;
}
static void reflectedUnsignedIntegralAttrAttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::reflectedUnsignedIntegralAttrAttrGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void reflectedUnsignedIntegralAttrAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
V8TRYCATCH_VOID(unsigned, v, toUInt32(value));
CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
imp->setUnsignedIntegralAttribute(WebCore::HTMLNames::reflectedunsignedintegralattrAttr, v);
return;
}
static void reflectedUnsignedIntegralAttrAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
TestObjV8Internal::reflectedUnsignedIntegralAttrAttrSetter(name, value, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void reflectedBooleanAttrAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
v8SetReturnValueBool(info, imp->fastHasAttribute(WebCore::HTMLNames::reflectedbooleanattrAttr));
return;
}
static void reflectedBooleanAttrAttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::reflectedBooleanAttrAttrGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void reflectedBooleanAttrAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
V8TRYCATCH_VOID(bool, v, value->BooleanValue());
CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
imp->setBooleanAttribute(WebCore::HTMLNames::reflectedbooleanattrAttr, v);
return;
}
static void reflectedBooleanAttrAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
TestObjV8Internal::reflectedBooleanAttrAttrSetter(name, value, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void reflectedURLAttrAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
v8SetReturnValueString(info, imp->getURLAttribute(WebCore::HTMLNames::reflectedurlattrAttr), info.GetIsolate(), NullStringAsEmpty);
return;
}
static void reflectedURLAttrAttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::reflectedURLAttrAttrGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void reflectedURLAttrAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithNullCheck>, v, value);
CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
imp->setAttribute(WebCore::HTMLNames::reflectedurlattrAttr, v);
return;
}
static void reflectedURLAttrAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
TestObjV8Internal::reflectedURLAttrAttrSetter(name, value, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void reflectedStringAttrAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
v8SetReturnValueString(info, imp->fastGetAttribute(WebCore::HTMLNames::customContentStringAttrAttr), info.GetIsolate(), NullStringAsEmpty);
return;
}
static void reflectedStringAttrAttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::reflectedStringAttrAttrGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void reflectedStringAttrAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithNullCheck>, v, value);
CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
imp->setAttribute(WebCore::HTMLNames::customContentStringAttrAttr, v);
return;
}
static void reflectedStringAttrAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
TestObjV8Internal::reflectedStringAttrAttrSetter(name, value, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void reflectedCustomIntegralAttrAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
v8SetReturnValueInt(info, imp->getIntegralAttribute(WebCore::HTMLNames::customContentIntegralAttrAttr));
return;
}
static void reflectedCustomIntegralAttrAttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::reflectedCustomIntegralAttrAttrGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void reflectedCustomIntegralAttrAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
V8TRYCATCH_VOID(int, v, toInt32(value));
CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
imp->setIntegralAttribute(WebCore::HTMLNames::customContentIntegralAttrAttr, v);
return;
}
static void reflectedCustomIntegralAttrAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
TestObjV8Internal::reflectedCustomIntegralAttrAttrSetter(name, value, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void reflectedCustomBooleanAttrAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
v8SetReturnValueBool(info, imp->fastHasAttribute(WebCore::HTMLNames::customContentBooleanAttrAttr));
return;
}
static void reflectedCustomBooleanAttrAttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::reflectedCustomBooleanAttrAttrGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void reflectedCustomBooleanAttrAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
V8TRYCATCH_VOID(bool, v, value->BooleanValue());
CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
imp->setBooleanAttribute(WebCore::HTMLNames::customContentBooleanAttrAttr, v);
return;
}
static void reflectedCustomBooleanAttrAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
TestObjV8Internal::reflectedCustomBooleanAttrAttrSetter(name, value, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void reflectedCustomURLAttrAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
v8SetReturnValueString(info, imp->getURLAttribute(WebCore::HTMLNames::customContentURLAttrAttr), info.GetIsolate(), NullStringAsEmpty);
return;
}
static void reflectedCustomURLAttrAttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::reflectedCustomURLAttrAttrGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void reflectedCustomURLAttrAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithNullCheck>, v, value);
CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
imp->setAttribute(WebCore::HTMLNames::customContentURLAttrAttr, v);
return;
}
static void reflectedCustomURLAttrAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
TestObjV8Internal::reflectedCustomURLAttrAttrSetter(name, value, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void typedArrayAttrAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
v8SetReturnValue(info, toV8Fast(imp->typedArrayAttr(), info, imp));
return;
}
static void typedArrayAttrAttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::typedArrayAttrAttrGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void typedArrayAttrAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
V8TRYCATCH_VOID(Float32Array*, v, V8Float32Array::HasInstance(value, info.GetIsolate(), worldType(info.GetIsolate())) ? V8Float32Array::toNative(v8::Handle<v8::Object>::Cast(value)) : 0);
imp->setTypedArrayAttr(WTF::getPtr(v));
return;
}
static void typedArrayAttrAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
TestObjV8Internal::typedArrayAttrAttrSetter(name, value, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void attrWithGetterExceptionAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
ExceptionCode ec = 0;
int v = imp->attrWithGetterException(ec);
if (UNLIKELY(ec)) {
setDOMException(ec, info.GetIsolate());
return;
};
v8SetReturnValueInt(info, v);
return;
}
static void attrWithGetterExceptionAttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::attrWithGetterExceptionAttrGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void attrWithGetterExceptionAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
V8TRYCATCH_VOID(int, v, toInt32(value));
imp->setAttrWithGetterException(v);
return;
}
static void attrWithGetterExceptionAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
TestObjV8Internal::attrWithGetterExceptionAttrSetter(name, value, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void attrWithSetterExceptionAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
v8SetReturnValueInt(info, imp->attrWithSetterException());
return;
}
static void attrWithSetterExceptionAttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::attrWithSetterExceptionAttrGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void attrWithSetterExceptionAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
V8TRYCATCH_VOID(int, v, toInt32(value));
ExceptionCode ec = 0;
imp->setAttrWithSetterException(v, ec);
if (UNLIKELY(ec))
setDOMException(ec, info.GetIsolate());
return;
}
static void attrWithSetterExceptionAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
TestObjV8Internal::attrWithSetterExceptionAttrSetter(name, value, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void stringAttrWithGetterExceptionAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
ExceptionCode ec = 0;
String v = imp->stringAttrWithGetterException(ec);
if (UNLIKELY(ec)) {
setDOMException(ec, info.GetIsolate());
return;
};
v8SetReturnValueString(info, v, info.GetIsolate(), NullStringAsEmpty);
return;
}
static void stringAttrWithGetterExceptionAttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::stringAttrWithGetterExceptionAttrGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void stringAttrWithGetterExceptionAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, v, value);
imp->setStringAttrWithGetterException(v);
return;
}
static void stringAttrWithGetterExceptionAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
TestObjV8Internal::stringAttrWithGetterExceptionAttrSetter(name, value, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void stringAttrWithSetterExceptionAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
v8SetReturnValueString(info, imp->stringAttrWithSetterException(), info.GetIsolate(), NullStringAsEmpty);
return;
}
static void stringAttrWithSetterExceptionAttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::stringAttrWithSetterExceptionAttrGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void stringAttrWithSetterExceptionAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, v, value);
ExceptionCode ec = 0;
imp->setStringAttrWithSetterException(v, ec);
if (UNLIKELY(ec))
setDOMException(ec, info.GetIsolate());
return;
}
static void stringAttrWithSetterExceptionAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
TestObjV8Internal::stringAttrWithSetterExceptionAttrSetter(name, value, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void customAttrAttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
V8TestObject::customAttrAttrGetterCustom(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void customAttrAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
V8TestObject::customAttrAttrSetterCustom(name, value, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void withScriptStateAttributeAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
ScriptState* currentState = ScriptState::current();
if (!currentState)
return v8Undefined();
ScriptState& state = *currentState;
v8SetReturnValueInt(info, imp->withScriptStateAttribute(&state));
return;
}
static void withScriptStateAttributeAttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::withScriptStateAttributeAttrGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void withScriptStateAttributeAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
V8TRYCATCH_VOID(int, v, toInt32(value));
ScriptState* currentState = ScriptState::current();
if (!currentState)
return;
ScriptState& state = *currentState;
imp->setWithScriptStateAttribute(&state, v);
if (state.hadException())
throwError(state.exception(), info.GetIsolate());
return;
}
static void withScriptStateAttributeAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
TestObjV8Internal::withScriptStateAttributeAttrSetter(name, value, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void withScriptExecutionContextAttributeAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
ScriptExecutionContext* scriptContext = getScriptExecutionContext();
v8SetReturnValue(info, toV8Fast(imp->withScriptExecutionContextAttribute(scriptContext), info, imp));
return;
}
static void withScriptExecutionContextAttributeAttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::withScriptExecutionContextAttributeAttrGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void withScriptExecutionContextAttributeAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
V8TRYCATCH_VOID(TestObj*, v, V8TestObject::HasInstance(value, info.GetIsolate(), worldType(info.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8::Object>::Cast(value)) : 0);
ScriptExecutionContext* scriptContext = getScriptExecutionContext();
imp->setWithScriptExecutionContextAttribute(scriptContext, WTF::getPtr(v));
return;
}
static void withScriptExecutionContextAttributeAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
TestObjV8Internal::withScriptExecutionContextAttributeAttrSetter(name, value, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void withActiveWindowAndFirstWindowAttributeAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
v8SetReturnValue(info, toV8Fast(imp->withActiveWindowAndFirstWindowAttribute(), info, imp));
return;
}
static void withActiveWindowAndFirstWindowAttributeAttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::withActiveWindowAndFirstWindowAttributeAttrGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void withActiveWindowAndFirstWindowAttributeAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
V8TRYCATCH_VOID(TestObj*, v, V8TestObject::HasInstance(value, info.GetIsolate(), worldType(info.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8::Object>::Cast(value)) : 0);
imp->setWithActiveWindowAndFirstWindowAttribute(activeDOMWindow(), firstDOMWindow(), WTF::getPtr(v));
return;
}
static void withActiveWindowAndFirstWindowAttributeAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
TestObjV8Internal::withActiveWindowAndFirstWindowAttributeAttrSetter(name, value, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void withScriptStateAttributeRaisesAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
ExceptionCode ec = 0;
ScriptState* currentState = ScriptState::current();
if (!currentState)
return v8Undefined();
ScriptState& state = *currentState;
RefPtr<TestObj> v = imp->withScriptStateAttributeRaises(&state, ec);
if (UNLIKELY(ec)) {
setDOMException(ec, info.GetIsolate());
return;
};
if (state.hadException()) {
throwError(state.exception(), info.GetIsolate());
return;
}
v8SetReturnValue(info, toV8Fast(v.release(), info, imp));
return;
}
static void withScriptStateAttributeRaisesAttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::withScriptStateAttributeRaisesAttrGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void withScriptStateAttributeRaisesAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
V8TRYCATCH_VOID(TestObj*, v, V8TestObject::HasInstance(value, info.GetIsolate(), worldType(info.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8::Object>::Cast(value)) : 0);
ScriptState* currentState = ScriptState::current();
if (!currentState)
return;
ScriptState& state = *currentState;
imp->setWithScriptStateAttributeRaises(&state, WTF::getPtr(v));
if (state.hadException())
throwError(state.exception(), info.GetIsolate());
return;
}
static void withScriptStateAttributeRaisesAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
TestObjV8Internal::withScriptStateAttributeRaisesAttrSetter(name, value, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void withScriptExecutionContextAttributeRaisesAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
ExceptionCode ec = 0;
ScriptExecutionContext* scriptContext = getScriptExecutionContext();
RefPtr<TestObj> v = imp->withScriptExecutionContextAttributeRaises(scriptContext, ec);
if (UNLIKELY(ec)) {
setDOMException(ec, info.GetIsolate());
return;
};
v8SetReturnValue(info, toV8Fast(v.release(), info, imp));
return;
}
static void withScriptExecutionContextAttributeRaisesAttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::withScriptExecutionContextAttributeRaisesAttrGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void withScriptExecutionContextAttributeRaisesAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
V8TRYCATCH_VOID(TestObj*, v, V8TestObject::HasInstance(value, info.GetIsolate(), worldType(info.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8::Object>::Cast(value)) : 0);
ScriptExecutionContext* scriptContext = getScriptExecutionContext();
imp->setWithScriptExecutionContextAttributeRaises(scriptContext, WTF::getPtr(v));
return;
}
static void withScriptExecutionContextAttributeRaisesAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
TestObjV8Internal::withScriptExecutionContextAttributeRaisesAttrSetter(name, value, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void withScriptExecutionContextAndScriptStateAttributeAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
ScriptState* currentState = ScriptState::current();
if (!currentState)
return v8Undefined();
ScriptState& state = *currentState;
ScriptExecutionContext* scriptContext = getScriptExecutionContext();
v8SetReturnValue(info, toV8Fast(imp->withScriptExecutionContextAndScriptStateAttribute(&state, scriptContext), info, imp));
return;
}
static void withScriptExecutionContextAndScriptStateAttributeAttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::withScriptExecutionContextAndScriptStateAttributeAttrGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void withScriptExecutionContextAndScriptStateAttributeAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
V8TRYCATCH_VOID(TestObj*, v, V8TestObject::HasInstance(value, info.GetIsolate(), worldType(info.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8::Object>::Cast(value)) : 0);
ScriptState* currentState = ScriptState::current();
if (!currentState)
return;
ScriptState& state = *currentState;
ScriptExecutionContext* scriptContext = getScriptExecutionContext();
imp->setWithScriptExecutionContextAndScriptStateAttribute(&state, scriptContext, WTF::getPtr(v));
if (state.hadException())
throwError(state.exception(), info.GetIsolate());
return;
}
static void withScriptExecutionContextAndScriptStateAttributeAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
TestObjV8Internal::withScriptExecutionContextAndScriptStateAttributeAttrSetter(name, value, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void withScriptExecutionContextAndScriptStateAttributeRaisesAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
ExceptionCode ec = 0;
ScriptState* currentState = ScriptState::current();
if (!currentState)
return v8Undefined();
ScriptState& state = *currentState;
ScriptExecutionContext* scriptContext = getScriptExecutionContext();
RefPtr<TestObj> v = imp->withScriptExecutionContextAndScriptStateAttributeRaises(&state, scriptContext, ec);
if (UNLIKELY(ec)) {
setDOMException(ec, info.GetIsolate());
return;
};
if (state.hadException()) {
throwError(state.exception(), info.GetIsolate());
return;
}
v8SetReturnValue(info, toV8Fast(v.release(), info, imp));
return;
}
static void withScriptExecutionContextAndScriptStateAttributeRaisesAttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::withScriptExecutionContextAndScriptStateAttributeRaisesAttrGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void withScriptExecutionContextAndScriptStateAttributeRaisesAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
V8TRYCATCH_VOID(TestObj*, v, V8TestObject::HasInstance(value, info.GetIsolate(), worldType(info.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8::Object>::Cast(value)) : 0);
ScriptState* currentState = ScriptState::current();
if (!currentState)
return;
ScriptState& state = *currentState;
ScriptExecutionContext* scriptContext = getScriptExecutionContext();
imp->setWithScriptExecutionContextAndScriptStateAttributeRaises(&state, scriptContext, WTF::getPtr(v));
if (state.hadException())
throwError(state.exception(), info.GetIsolate());
return;
}
static void withScriptExecutionContextAndScriptStateAttributeRaisesAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
TestObjV8Internal::withScriptExecutionContextAndScriptStateAttributeRaisesAttrSetter(name, value, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void withScriptExecutionContextAndScriptStateWithSpacesAttributeAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
ScriptState* currentState = ScriptState::current();
if (!currentState)
return v8Undefined();
ScriptState& state = *currentState;
ScriptExecutionContext* scriptContext = getScriptExecutionContext();
v8SetReturnValue(info, toV8Fast(imp->withScriptExecutionContextAndScriptStateWithSpacesAttribute(&state, scriptContext), info, imp));
return;
}
static void withScriptExecutionContextAndScriptStateWithSpacesAttributeAttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::withScriptExecutionContextAndScriptStateWithSpacesAttributeAttrGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void withScriptExecutionContextAndScriptStateWithSpacesAttributeAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
V8TRYCATCH_VOID(TestObj*, v, V8TestObject::HasInstance(value, info.GetIsolate(), worldType(info.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8::Object>::Cast(value)) : 0);
ScriptState* currentState = ScriptState::current();
if (!currentState)
return;
ScriptState& state = *currentState;
ScriptExecutionContext* scriptContext = getScriptExecutionContext();
imp->setWithScriptExecutionContextAndScriptStateWithSpacesAttribute(&state, scriptContext, WTF::getPtr(v));
if (state.hadException())
throwError(state.exception(), info.GetIsolate());
return;
}
static void withScriptExecutionContextAndScriptStateWithSpacesAttributeAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
TestObjV8Internal::withScriptExecutionContextAndScriptStateWithSpacesAttributeAttrSetter(name, value, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void enforcedRangeByteAttrAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
v8SetReturnValueInt(info, imp->enforcedRangeByteAttr());
return;
}
static void enforcedRangeByteAttrAttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::enforcedRangeByteAttrAttrGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void enforcedRangeByteAttrAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
V8TRYCATCH_WITH_TYPECHECK_VOID(int, v, toInt8(value, EnforceRange, ok), info.GetIsolate());
imp->setEnforcedRangeByteAttr(v);
return;
}
static void enforcedRangeByteAttrAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
TestObjV8Internal::enforcedRangeByteAttrAttrSetter(name, value, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void enforcedRangeOctetAttrAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
v8SetReturnValueUnsigned(info, imp->enforcedRangeOctetAttr());
return;
}
static void enforcedRangeOctetAttrAttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::enforcedRangeOctetAttrAttrGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void enforcedRangeOctetAttrAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
V8TRYCATCH_WITH_TYPECHECK_VOID(unsigned, v, toUInt8(value, EnforceRange, ok), info.GetIsolate());
imp->setEnforcedRangeOctetAttr(v);
return;
}
static void enforcedRangeOctetAttrAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
TestObjV8Internal::enforcedRangeOctetAttrAttrSetter(name, value, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void enforcedRangeLongAttrAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
v8SetReturnValueInt(info, imp->enforcedRangeLongAttr());
return;
}
static void enforcedRangeLongAttrAttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::enforcedRangeLongAttrAttrGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void enforcedRangeLongAttrAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
V8TRYCATCH_WITH_TYPECHECK_VOID(int, v, toInt32(value, EnforceRange, ok), info.GetIsolate());
imp->setEnforcedRangeLongAttr(v);
return;
}
static void enforcedRangeLongAttrAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
TestObjV8Internal::enforcedRangeLongAttrAttrSetter(name, value, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void enforcedRangeUnsignedLongAttrAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
v8SetReturnValueUnsigned(info, imp->enforcedRangeUnsignedLongAttr());
return;
}
static void enforcedRangeUnsignedLongAttrAttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::enforcedRangeUnsignedLongAttrAttrGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void enforcedRangeUnsignedLongAttrAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
V8TRYCATCH_WITH_TYPECHECK_VOID(unsigned, v, toUInt32(value, EnforceRange, ok), info.GetIsolate());
imp->setEnforcedRangeUnsignedLongAttr(v);
return;
}
static void enforcedRangeUnsignedLongAttrAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
TestObjV8Internal::enforcedRangeUnsignedLongAttrAttrSetter(name, value, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void enforcedRangeLongLongAttrAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
v8SetReturnValue(info, static_cast<double>(imp->enforcedRangeLongLongAttr()));
return;
}
static void enforcedRangeLongLongAttrAttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::enforcedRangeLongLongAttrAttrGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void enforcedRangeLongLongAttrAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
V8TRYCATCH_WITH_TYPECHECK_VOID(long long, v, toInt64(value, EnforceRange, ok), info.GetIsolate());
imp->setEnforcedRangeLongLongAttr(v);
return;
}
static void enforcedRangeLongLongAttrAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
TestObjV8Internal::enforcedRangeLongLongAttrAttrSetter(name, value, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void enforcedRangeUnsignedLongLongAttrAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
v8SetReturnValue(info, static_cast<double>(imp->enforcedRangeUnsignedLongLongAttr()));
return;
}
static void enforcedRangeUnsignedLongLongAttrAttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::enforcedRangeUnsignedLongLongAttrAttrGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void enforcedRangeUnsignedLongLongAttrAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
V8TRYCATCH_WITH_TYPECHECK_VOID(unsigned long long, v, toUInt64(value, EnforceRange, ok), info.GetIsolate());
imp->setEnforcedRangeUnsignedLongLongAttr(v);
return;
}
static void enforcedRangeUnsignedLongLongAttrAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
TestObjV8Internal::enforcedRangeUnsignedLongLongAttrAttrSetter(name, value, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
#if ENABLE(Condition1)
static void conditionalAttr1AttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
v8SetReturnValueInt(info, imp->conditionalAttr1());
return;
}
#endif // ENABLE(Condition1)
#if ENABLE(Condition1)
static void conditionalAttr1AttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::conditionalAttr1AttrGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
#endif // ENABLE(Condition1)
#if ENABLE(Condition1)
static void conditionalAttr1AttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
V8TRYCATCH_VOID(int, v, toInt32(value));
imp->setConditionalAttr1(v);
return;
}
#endif // ENABLE(Condition1)
#if ENABLE(Condition1)
static void conditionalAttr1AttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
TestObjV8Internal::conditionalAttr1AttrSetter(name, value, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
#endif // ENABLE(Condition1)
#if ENABLE(Condition1) && ENABLE(Condition2)
static void conditionalAttr2AttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
v8SetReturnValueInt(info, imp->conditionalAttr2());
return;
}
#endif // ENABLE(Condition1) && ENABLE(Condition2)
#if ENABLE(Condition1) && ENABLE(Condition2)
static void conditionalAttr2AttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::conditionalAttr2AttrGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
#endif // ENABLE(Condition1) && ENABLE(Condition2)
#if ENABLE(Condition1) && ENABLE(Condition2)
static void conditionalAttr2AttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
V8TRYCATCH_VOID(int, v, toInt32(value));
imp->setConditionalAttr2(v);
return;
}
#endif // ENABLE(Condition1) && ENABLE(Condition2)
#if ENABLE(Condition1) && ENABLE(Condition2)
static void conditionalAttr2AttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
TestObjV8Internal::conditionalAttr2AttrSetter(name, value, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
#endif // ENABLE(Condition1) && ENABLE(Condition2)
#if ENABLE(Condition1) || ENABLE(Condition2)
static void conditionalAttr3AttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
v8SetReturnValueInt(info, imp->conditionalAttr3());
return;
}
#endif // ENABLE(Condition1) || ENABLE(Condition2)
#if ENABLE(Condition1) || ENABLE(Condition2)
static void conditionalAttr3AttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::conditionalAttr3AttrGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
#endif // ENABLE(Condition1) || ENABLE(Condition2)
#if ENABLE(Condition1) || ENABLE(Condition2)
static void conditionalAttr3AttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
V8TRYCATCH_VOID(int, v, toInt32(value));
imp->setConditionalAttr3(v);
return;
}
#endif // ENABLE(Condition1) || ENABLE(Condition2)
#if ENABLE(Condition1) || ENABLE(Condition2)
static void conditionalAttr3AttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
TestObjV8Internal::conditionalAttr3AttrSetter(name, value, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
#endif // ENABLE(Condition1) || ENABLE(Condition2)
static void cachedAttribute1AttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
v8SetReturnValue(info, imp->cachedAttribute1().v8Value());
return;
}
static void cachedAttribute1AttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::cachedAttribute1AttrGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void cachedAttribute2AttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
v8SetReturnValue(info, imp->cachedAttribute2().v8Value());
return;
}
static void cachedAttribute2AttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::cachedAttribute2AttrGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void anyAttributeAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
v8SetReturnValue(info, imp->anyAttribute().v8Value());
return;
}
static void anyAttributeAttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::anyAttributeAttrGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void anyAttributeAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
V8TRYCATCH_VOID(ScriptValue, v, ScriptValue(value));
imp->setAnyAttribute(v);
return;
}
static void anyAttributeAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
TestObjV8Internal::anyAttributeAttrSetter(name, value, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void callbackFunctionAttributeAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
v8SetReturnValue(info, imp->callbackFunctionAttribute().v8Value());
return;
}
static void callbackFunctionAttributeAttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::callbackFunctionAttributeAttrGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void callbackFunctionAttributeAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
V8TRYCATCH_VOID(ScriptValue, v, ScriptValue(value));
imp->setCallbackFunctionAttribute(v);
return;
}
static void callbackFunctionAttributeAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
TestObjV8Internal::callbackFunctionAttributeAttrSetter(name, value, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void enabledAtRuntimeAttr1AttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
v8SetReturnValueInt(info, imp->enabledAtRuntimeAttr1());
return;
}
static void enabledAtRuntimeAttr1AttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::enabledAtRuntimeAttr1AttrGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void enabledAtRuntimeAttr1AttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
V8TRYCATCH_VOID(int, v, toInt32(value));
imp->setEnabledAtRuntimeAttr1(v);
return;
}
static void enabledAtRuntimeAttr1AttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
TestObjV8Internal::enabledAtRuntimeAttr1AttrSetter(name, value, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void enabledAtRuntimeAttr2AttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
v8SetReturnValueInt(info, imp->enabledAtRuntimeAttr2());
return;
}
static void enabledAtRuntimeAttr2AttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::enabledAtRuntimeAttr2AttrGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void enabledAtRuntimeAttr2AttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
V8TRYCATCH_VOID(int, v, toInt32(value));
imp->setEnabledAtRuntimeAttr2(v);
return;
}
static void enabledAtRuntimeAttr2AttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
TestObjV8Internal::enabledAtRuntimeAttr2AttrSetter(name, value, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void enabledPerContextAttr1AttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
v8SetReturnValueInt(info, imp->enabledPerContextAttr1());
return;
}
static void enabledPerContextAttr1AttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::enabledPerContextAttr1AttrGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void enabledPerContextAttr1AttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
V8TRYCATCH_VOID(int, v, toInt32(value));
imp->setEnabledPerContextAttr1(v);
return;
}
static void enabledPerContextAttr1AttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
TestObjV8Internal::enabledPerContextAttr1AttrSetter(name, value, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void enabledPerContextAttr2AttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
v8SetReturnValueInt(info, imp->enabledPerContextAttr2());
return;
}
static void enabledPerContextAttr2AttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::enabledPerContextAttr2AttrGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void enabledPerContextAttr2AttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
V8TRYCATCH_VOID(int, v, toInt32(value));
imp->setEnabledPerContextAttr2(v);
return;
}
static void enabledPerContextAttr2AttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
TestObjV8Internal::enabledPerContextAttr2AttrSetter(name, value, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void floatArrayAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
v8SetReturnValue(info, v8Array(imp->floatArray(), info.GetIsolate()));
return;
}
static void floatArrayAttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::floatArrayAttrGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void floatArrayAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
V8TRYCATCH_VOID(Vector<float>, v, toNativeArray<float>(value));
imp->setFloatArray(v);
return;
}
static void floatArrayAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
TestObjV8Internal::floatArrayAttrSetter(name, value, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void doubleArrayAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
v8SetReturnValue(info, v8Array(imp->doubleArray(), info.GetIsolate()));
return;
}
static void doubleArrayAttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::doubleArrayAttrGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void doubleArrayAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
V8TRYCATCH_VOID(Vector<double>, v, toNativeArray<double>(value));
imp->setDoubleArray(v);
return;
}
static void doubleArrayAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
TestObjV8Internal::doubleArrayAttrSetter(name, value, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void messagePortArrayAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
v8SetReturnValue(info, v8Array(imp->messagePortArray(), info.GetIsolate()));
return;
}
static void messagePortArrayAttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::messagePortArrayAttrGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void messagePortArrayAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
V8TRYCATCH_VOID(Vector<RefPtr<MessagePort> >, v, (toRefPtrNativeArray<MessagePort, V8MessagePort>(value, info.GetIsolate())));
imp->setMessagePortArray(v);
return;
}
static void messagePortArrayAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
TestObjV8Internal::messagePortArrayAttrSetter(name, value, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void contentDocumentAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
if (!BindingSecurity::shouldAllowAccessToNode(imp->contentDocument())) {
v8SetReturnValueNull(info);
return;
}
v8SetReturnValue(info, toV8Fast(imp->contentDocument(), info, imp));
return;
}
static void contentDocumentAttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::contentDocumentAttrGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void mutablePointAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
v8SetReturnValue(info, toV8Fast(WTF::getPtr(SVGStaticPropertyTearOff<TestObj, FloatPoint>::create(imp, imp->mutablePoint(), &TestObj::updateMutablePoint)), info, imp));
return;
}
static void mutablePointAttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::mutablePointAttrGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void mutablePointAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
V8TRYCATCH_VOID(RefPtr<SVGPropertyTearOff<FloatPoint> >, v, V8SVGPoint::HasInstance(value, info.GetIsolate(), worldType(info.GetIsolate())) ? V8SVGPoint::toNative(v8::Handle<v8::Object>::Cast(value)) : 0);
imp->setMutablePoint(WTF::getPtr(v));
return;
}
static void mutablePointAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
TestObjV8Internal::mutablePointAttrSetter(name, value, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void immutablePointAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
v8SetReturnValue(info, toV8Fast(WTF::getPtr(SVGPropertyTearOff<FloatPoint>::create(imp->immutablePoint())), info, imp));
return;
}
static void immutablePointAttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::immutablePointAttrGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void immutablePointAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
V8TRYCATCH_VOID(RefPtr<SVGPropertyTearOff<FloatPoint> >, v, V8SVGPoint::HasInstance(value, info.GetIsolate(), worldType(info.GetIsolate())) ? V8SVGPoint::toNative(v8::Handle<v8::Object>::Cast(value)) : 0);
imp->setImmutablePoint(WTF::getPtr(v));
return;
}
static void immutablePointAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
TestObjV8Internal::immutablePointAttrSetter(name, value, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void strawberryAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
v8SetReturnValueInt(info, imp->blueberry());
return;
}
static void strawberryAttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::strawberryAttrGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void strawberryAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
V8TRYCATCH_VOID(int, v, toInt32(value));
imp->setBlueberry(v);
return;
}
static void strawberryAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
TestObjV8Internal::strawberryAttrSetter(name, value, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void strictFloatAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
v8SetReturnValue(info, imp->strictFloat());
return;
}
static void strictFloatAttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::strictFloatAttrGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void strictFloatAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
V8TRYCATCH_VOID(float, v, static_cast<float>(value->NumberValue()));
imp->setStrictFloat(v);
return;
}
static void strictFloatAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
TestObjV8Internal::strictFloatAttrSetter(name, value, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void descriptionAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
v8SetReturnValueInt(info, imp->description());
return;
}
static void descriptionAttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::descriptionAttrGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void idAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
v8SetReturnValueInt(info, imp->id());
return;
}
static void idAttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::idAttrGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void idAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
V8TRYCATCH_VOID(int, v, toInt32(value));
imp->setId(v);
return;
}
static void idAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
TestObjV8Internal::idAttrSetter(name, value, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void hashAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
v8SetReturnValueString(info, imp->hash(), info.GetIsolate(), NullStringAsEmpty);
return;
}
static void hashAttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::hashAttrGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void replaceableAttributeAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
v8SetReturnValueInt(info, imp->replaceableAttribute());
return;
}
static void replaceableAttributeAttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::replaceableAttributeAttrGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void nullableDoubleAttributeAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
bool isNull = false;
double v = imp->nullableDoubleAttribute(isNull);
if (isNull) {
v8SetReturnValueNull(info);
return;
}
v8SetReturnValue(info, v);
return;
}
static void nullableDoubleAttributeAttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::nullableDoubleAttributeAttrGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void nullableLongAttributeAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
bool isNull = false;
int v = imp->nullableLongAttribute(isNull);
if (isNull) {
v8SetReturnValueNull(info);
return;
}
v8SetReturnValueInt(info, v);
return;
}
static void nullableLongAttributeAttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::nullableLongAttributeAttrGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void nullableBooleanAttributeAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
bool isNull = false;
bool v = imp->nullableBooleanAttribute(isNull);
if (isNull) {
v8SetReturnValueNull(info);
return;
}
v8SetReturnValueBool(info, v);
return;
}
static void nullableBooleanAttributeAttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::nullableBooleanAttributeAttrGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void nullableStringAttributeAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
bool isNull = false;
String v = imp->nullableStringAttribute(isNull);
if (isNull) {
v8SetReturnValueNull(info);
return;
}
v8SetReturnValueString(info, v, info.GetIsolate(), NullStringAsEmpty);
return;
}
static void nullableStringAttributeAttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::nullableStringAttributeAttrGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void nullableLongSettableAttributeAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
bool isNull = false;
int v = imp->nullableLongSettableAttribute(isNull);
if (isNull) {
v8SetReturnValueNull(info);
return;
}
v8SetReturnValueInt(info, v);
return;
}
static void nullableLongSettableAttributeAttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::nullableLongSettableAttributeAttrGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void nullableLongSettableAttributeAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
V8TRYCATCH_VOID(int, v, toInt32(value));
imp->setNullableLongSettableAttribute(v);
return;
}
static void nullableLongSettableAttributeAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
TestObjV8Internal::nullableLongSettableAttributeAttrSetter(name, value, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void nullableStringValueAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
ExceptionCode ec = 0;
bool isNull = false;
int v = imp->nullableStringValue(isNull, ec);
if (isNull) {
v8SetReturnValueNull(info);
return;
}
if (UNLIKELY(ec)) {
setDOMException(ec, info.GetIsolate());
return;
};
v8SetReturnValueInt(info, v);
return;
}
static void nullableStringValueAttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::nullableStringValueAttrGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void nullableStringValueAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
V8TRYCATCH_VOID(int, v, toInt32(value));
imp->setNullableStringValue(v);
return;
}
static void nullableStringValueAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
TestObjV8Internal::nullableStringValueAttrSetter(name, value, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void perWorldReadOnlyAttributeAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
RefPtr<TestObj> result = imp->perWorldReadOnlyAttribute();
v8::Handle<v8::Value> wrapper = result.get() ? v8::Handle<v8::Value>(DOMDataStore::getWrapper<V8TestObject>(result.get(), info.GetIsolate())) : v8Undefined();
if (wrapper.IsEmpty()) {
wrapper = toV8(result.get(), info.Holder(), info.GetIsolate());
if (!wrapper.IsEmpty())
V8HiddenPropertyName::setNamedHiddenReference(info.Holder(), "perWorldReadOnlyAttribute", wrapper);
}
v8SetReturnValue(info, wrapper);
return;
}
static void perWorldReadOnlyAttributeAttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::perWorldReadOnlyAttributeAttrGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void perWorldReadOnlyAttributeAttrGetterForMainWorld(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
RefPtr<TestObj> result = imp->perWorldReadOnlyAttribute();
v8::Handle<v8::Value> wrapper = result.get() ? v8::Handle<v8::Value>(DOMDataStore::getWrapperForMainWorld<V8TestObject>(result.get())) : v8Undefined();
if (wrapper.IsEmpty()) {
wrapper = toV8(result.get(), info.Holder(), info.GetIsolate());
if (!wrapper.IsEmpty())
V8HiddenPropertyName::setNamedHiddenReference(info.Holder(), "perWorldReadOnlyAttribute", wrapper);
}
v8SetReturnValue(info, wrapper);
return;
}
static void perWorldReadOnlyAttributeAttrGetterCallbackForMainWorld(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::perWorldReadOnlyAttributeAttrGetterForMainWorld(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void perWorldAttributeAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
v8SetReturnValue(info, toV8Fast(imp->perWorldAttribute(), info, imp));
return;
}
static void perWorldAttributeAttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::perWorldAttributeAttrGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void perWorldAttributeAttrGetterForMainWorld(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
v8SetReturnValue(info, toV8FastForMainWorld(imp->perWorldAttribute(), info, imp));
return;
}
static void perWorldAttributeAttrGetterCallbackForMainWorld(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::perWorldAttributeAttrGetterForMainWorld(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void perWorldAttributeAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
V8TRYCATCH_VOID(TestObj*, v, V8TestObject::HasInstance(value, info.GetIsolate(), worldType(info.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8::Object>::Cast(value)) : 0);
imp->setPerWorldAttribute(WTF::getPtr(v));
return;
}
static void perWorldAttributeAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
TestObjV8Internal::perWorldAttributeAttrSetter(name, value, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void perWorldAttributeAttrSetterForMainWorld(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
V8TRYCATCH_VOID(TestObj*, v, V8TestObject::HasInstance(value, info.GetIsolate(), worldType(info.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8::Object>::Cast(value)) : 0);
imp->setPerWorldAttribute(WTF::getPtr(v));
return;
}
static void perWorldAttributeAttrSetterCallbackForMainWorld(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
TestObjV8Internal::perWorldAttributeAttrSetterForMainWorld(name, value, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void activityLoggedAttr1AttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
v8SetReturnValueInt(info, imp->activityLoggedAttr1());
return;
}
static void activityLoggedAttr1AttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->GetCurrentContext());
if (contextData && contextData->activityLogger())
contextData->activityLogger()->log("TestObject.activityLoggedAttr1", 0, 0, "Getter");
TestObjV8Internal::activityLoggedAttr1AttrGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void activityLoggedAttr1AttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
V8TRYCATCH_VOID(int, v, toInt32(value));
imp->setActivityLoggedAttr1(v);
return;
}
static void activityLoggedAttr1AttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->GetCurrentContext());
if (contextData && contextData->activityLogger()) {
v8::Handle<v8::Value> loggerArg[] = { value };
contextData->activityLogger()->log("TestObject.activityLoggedAttr1", 1, &loggerArg[0], "Setter");
}
TestObjV8Internal::activityLoggedAttr1AttrSetter(name, value, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void activityLoggedAttr2AttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
v8SetReturnValueInt(info, imp->activityLoggedAttr2());
return;
}
static void activityLoggedAttr2AttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->GetCurrentContext());
if (contextData && contextData->activityLogger())
contextData->activityLogger()->log("TestObject.activityLoggedAttr2", 0, 0, "Getter");
TestObjV8Internal::activityLoggedAttr2AttrGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void activityLoggedAttr2AttrGetterForMainWorld(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
v8SetReturnValueInt(info, imp->activityLoggedAttr2());
return;
}
static void activityLoggedAttr2AttrGetterCallbackForMainWorld(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->GetCurrentContext());
if (contextData && contextData->activityLogger())
contextData->activityLogger()->log("TestObject.activityLoggedAttr2", 0, 0, "Getter");
TestObjV8Internal::activityLoggedAttr2AttrGetterForMainWorld(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void activityLoggedAttr2AttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
V8TRYCATCH_VOID(int, v, toInt32(value));
imp->setActivityLoggedAttr2(v);
return;
}
static void activityLoggedAttr2AttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->GetCurrentContext());
if (contextData && contextData->activityLogger()) {
v8::Handle<v8::Value> loggerArg[] = { value };
contextData->activityLogger()->log("TestObject.activityLoggedAttr2", 1, &loggerArg[0], "Setter");
}
TestObjV8Internal::activityLoggedAttr2AttrSetter(name, value, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void activityLoggedAttr2AttrSetterForMainWorld(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
V8TRYCATCH_VOID(int, v, toInt32(value));
imp->setActivityLoggedAttr2(v);
return;
}
static void activityLoggedAttr2AttrSetterCallbackForMainWorld(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->GetCurrentContext());
if (contextData && contextData->activityLogger()) {
v8::Handle<v8::Value> loggerArg[] = { value };
contextData->activityLogger()->log("TestObject.activityLoggedAttr2", 1, &loggerArg[0], "Setter");
}
TestObjV8Internal::activityLoggedAttr2AttrSetterForMainWorld(name, value, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void activityLoggedInIsolatedWorldsAttrAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
v8SetReturnValueInt(info, imp->activityLoggedInIsolatedWorldsAttr());
return;
}
static void activityLoggedInIsolatedWorldsAttrAttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->GetCurrentContext());
if (contextData && contextData->activityLogger())
contextData->activityLogger()->log("TestObject.activityLoggedInIsolatedWorldsAttr", 0, 0, "Getter");
TestObjV8Internal::activityLoggedInIsolatedWorldsAttrAttrGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void activityLoggedInIsolatedWorldsAttrAttrGetterForMainWorld(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
v8SetReturnValueInt(info, imp->activityLoggedInIsolatedWorldsAttr());
return;
}
static void activityLoggedInIsolatedWorldsAttrAttrGetterCallbackForMainWorld(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::activityLoggedInIsolatedWorldsAttrAttrGetterForMainWorld(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void activityLoggedInIsolatedWorldsAttrAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
V8TRYCATCH_VOID(int, v, toInt32(value));
imp->setActivityLoggedInIsolatedWorldsAttr(v);
return;
}
static void activityLoggedInIsolatedWorldsAttrAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->GetCurrentContext());
if (contextData && contextData->activityLogger()) {
v8::Handle<v8::Value> loggerArg[] = { value };
contextData->activityLogger()->log("TestObject.activityLoggedInIsolatedWorldsAttr", 1, &loggerArg[0], "Setter");
}
TestObjV8Internal::activityLoggedInIsolatedWorldsAttrAttrSetter(name, value, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void activityLoggedInIsolatedWorldsAttrAttrSetterForMainWorld(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
V8TRYCATCH_VOID(int, v, toInt32(value));
imp->setActivityLoggedInIsolatedWorldsAttr(v);
return;
}
static void activityLoggedInIsolatedWorldsAttrAttrSetterCallbackForMainWorld(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
TestObjV8Internal::activityLoggedInIsolatedWorldsAttrAttrSetterForMainWorld(name, value, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void activityLoggedAttrSetter1AttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
v8SetReturnValueInt(info, imp->activityLoggedAttrSetter1());
return;
}
static void activityLoggedAttrSetter1AttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::activityLoggedAttrSetter1AttrGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void activityLoggedAttrSetter1AttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
V8TRYCATCH_VOID(int, v, toInt32(value));
imp->setActivityLoggedAttrSetter1(v);
return;
}
static void activityLoggedAttrSetter1AttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->GetCurrentContext());
if (contextData && contextData->activityLogger()) {
v8::Handle<v8::Value> loggerArg[] = { value };
contextData->activityLogger()->log("TestObject.activityLoggedAttrSetter1", 1, &loggerArg[0], "Setter");
}
TestObjV8Internal::activityLoggedAttrSetter1AttrSetter(name, value, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void activityLoggedAttrSetter2AttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
v8SetReturnValueInt(info, imp->activityLoggedAttrSetter2());
return;
}
static void activityLoggedAttrSetter2AttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::activityLoggedAttrSetter2AttrGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void activityLoggedAttrSetter2AttrGetterForMainWorld(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
v8SetReturnValueInt(info, imp->activityLoggedAttrSetter2());
return;
}
static void activityLoggedAttrSetter2AttrGetterCallbackForMainWorld(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::activityLoggedAttrSetter2AttrGetterForMainWorld(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void activityLoggedAttrSetter2AttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
V8TRYCATCH_VOID(int, v, toInt32(value));
imp->setActivityLoggedAttrSetter2(v);
return;
}
static void activityLoggedAttrSetter2AttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->GetCurrentContext());
if (contextData && contextData->activityLogger()) {
v8::Handle<v8::Value> loggerArg[] = { value };
contextData->activityLogger()->log("TestObject.activityLoggedAttrSetter2", 1, &loggerArg[0], "Setter");
}
TestObjV8Internal::activityLoggedAttrSetter2AttrSetter(name, value, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void activityLoggedAttrSetter2AttrSetterForMainWorld(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
V8TRYCATCH_VOID(int, v, toInt32(value));
imp->setActivityLoggedAttrSetter2(v);
return;
}
static void activityLoggedAttrSetter2AttrSetterCallbackForMainWorld(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->GetCurrentContext());
if (contextData && contextData->activityLogger()) {
v8::Handle<v8::Value> loggerArg[] = { value };
contextData->activityLogger()->log("TestObject.activityLoggedAttrSetter2", 1, &loggerArg[0], "Setter");
}
TestObjV8Internal::activityLoggedAttrSetter2AttrSetterForMainWorld(name, value, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void activityLoggedInIsolatedWorldsAttrSetterAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
v8SetReturnValueInt(info, imp->activityLoggedInIsolatedWorldsAttrSetter());
return;
}
static void activityLoggedInIsolatedWorldsAttrSetterAttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::activityLoggedInIsolatedWorldsAttrSetterAttrGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void activityLoggedInIsolatedWorldsAttrSetterAttrGetterForMainWorld(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
v8SetReturnValueInt(info, imp->activityLoggedInIsolatedWorldsAttrSetter());
return;
}
static void activityLoggedInIsolatedWorldsAttrSetterAttrGetterCallbackForMainWorld(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::activityLoggedInIsolatedWorldsAttrSetterAttrGetterForMainWorld(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void activityLoggedInIsolatedWorldsAttrSetterAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
V8TRYCATCH_VOID(int, v, toInt32(value));
imp->setActivityLoggedInIsolatedWorldsAttrSetter(v);
return;
}
static void activityLoggedInIsolatedWorldsAttrSetterAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->GetCurrentContext());
if (contextData && contextData->activityLogger()) {
v8::Handle<v8::Value> loggerArg[] = { value };
contextData->activityLogger()->log("TestObject.activityLoggedInIsolatedWorldsAttrSetter", 1, &loggerArg[0], "Setter");
}
TestObjV8Internal::activityLoggedInIsolatedWorldsAttrSetterAttrSetter(name, value, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void activityLoggedInIsolatedWorldsAttrSetterAttrSetterForMainWorld(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
V8TRYCATCH_VOID(int, v, toInt32(value));
imp->setActivityLoggedInIsolatedWorldsAttrSetter(v);
return;
}
static void activityLoggedInIsolatedWorldsAttrSetterAttrSetterCallbackForMainWorld(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
TestObjV8Internal::activityLoggedInIsolatedWorldsAttrSetterAttrSetterForMainWorld(name, value, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void activityLoggedAttrGetter1AttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
v8SetReturnValueInt(info, imp->activityLoggedAttrGetter1());
return;
}
static void activityLoggedAttrGetter1AttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->GetCurrentContext());
if (contextData && contextData->activityLogger())
contextData->activityLogger()->log("TestObject.activityLoggedAttrGetter1", 0, 0, "Getter");
TestObjV8Internal::activityLoggedAttrGetter1AttrGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void activityLoggedAttrGetter1AttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
V8TRYCATCH_VOID(int, v, toInt32(value));
imp->setActivityLoggedAttrGetter1(v);
return;
}
static void activityLoggedAttrGetter1AttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
TestObjV8Internal::activityLoggedAttrGetter1AttrSetter(name, value, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void activityLoggedAttrGetter2AttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
v8SetReturnValueInt(info, imp->activityLoggedAttrGetter2());
return;
}
static void activityLoggedAttrGetter2AttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->GetCurrentContext());
if (contextData && contextData->activityLogger())
contextData->activityLogger()->log("TestObject.activityLoggedAttrGetter2", 0, 0, "Getter");
TestObjV8Internal::activityLoggedAttrGetter2AttrGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void activityLoggedAttrGetter2AttrGetterForMainWorld(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
v8SetReturnValueInt(info, imp->activityLoggedAttrGetter2());
return;
}
static void activityLoggedAttrGetter2AttrGetterCallbackForMainWorld(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->GetCurrentContext());
if (contextData && contextData->activityLogger())
contextData->activityLogger()->log("TestObject.activityLoggedAttrGetter2", 0, 0, "Getter");
TestObjV8Internal::activityLoggedAttrGetter2AttrGetterForMainWorld(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void activityLoggedAttrGetter2AttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
V8TRYCATCH_VOID(int, v, toInt32(value));
imp->setActivityLoggedAttrGetter2(v);
return;
}
static void activityLoggedAttrGetter2AttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
TestObjV8Internal::activityLoggedAttrGetter2AttrSetter(name, value, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void activityLoggedAttrGetter2AttrSetterForMainWorld(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
V8TRYCATCH_VOID(int, v, toInt32(value));
imp->setActivityLoggedAttrGetter2(v);
return;
}
static void activityLoggedAttrGetter2AttrSetterCallbackForMainWorld(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
TestObjV8Internal::activityLoggedAttrGetter2AttrSetterForMainWorld(name, value, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void activityLoggedInIsolatedWorldsAttrGetterAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
v8SetReturnValueInt(info, imp->activityLoggedInIsolatedWorldsAttrGetter());
return;
}
static void activityLoggedInIsolatedWorldsAttrGetterAttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->GetCurrentContext());
if (contextData && contextData->activityLogger())
contextData->activityLogger()->log("TestObject.activityLoggedInIsolatedWorldsAttrGetter", 0, 0, "Getter");
TestObjV8Internal::activityLoggedInIsolatedWorldsAttrGetterAttrGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void activityLoggedInIsolatedWorldsAttrGetterAttrGetterForMainWorld(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
v8SetReturnValueInt(info, imp->activityLoggedInIsolatedWorldsAttrGetter());
return;
}
static void activityLoggedInIsolatedWorldsAttrGetterAttrGetterCallbackForMainWorld(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::activityLoggedInIsolatedWorldsAttrGetterAttrGetterForMainWorld(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void activityLoggedInIsolatedWorldsAttrGetterAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
V8TRYCATCH_VOID(int, v, toInt32(value));
imp->setActivityLoggedInIsolatedWorldsAttrGetter(v);
return;
}
static void activityLoggedInIsolatedWorldsAttrGetterAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
TestObjV8Internal::activityLoggedInIsolatedWorldsAttrGetterAttrSetter(name, value, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void activityLoggedInIsolatedWorldsAttrGetterAttrSetterForMainWorld(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
V8TRYCATCH_VOID(int, v, toInt32(value));
imp->setActivityLoggedInIsolatedWorldsAttrGetter(v);
return;
}
static void activityLoggedInIsolatedWorldsAttrGetterAttrSetterCallbackForMainWorld(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
TestObjV8Internal::activityLoggedInIsolatedWorldsAttrGetterAttrSetterForMainWorld(name, value, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void deprecatedStaticReadOnlyAttrAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
v8SetReturnValueInt(info, TestObj::deprecatedStaticReadOnlyAttr());
return;
}
static void deprecatedStaticReadOnlyAttrAttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
UseCounter::countDeprecation(activeDOMWindow(), UseCounter::StaticReadonlyAttribute);
TestObjV8Internal::deprecatedStaticReadOnlyAttrAttrGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void deprecatedStaticAttrAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
v8SetReturnValueInt(info, TestObj::deprecatedStaticAttr());
return;
}
static void deprecatedStaticAttrAttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
UseCounter::countDeprecation(activeDOMWindow(), UseCounter::StaticAttribute);
TestObjV8Internal::deprecatedStaticAttrAttrGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void deprecatedStaticAttrAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
V8TRYCATCH_VOID(int, v, toInt32(value));
TestObj::setDeprecatedStaticAttr(v);
return;
}
static void deprecatedStaticAttrAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
UseCounter::countDeprecation(activeDOMWindow(), UseCounter::StaticAttribute);
TestObjV8Internal::deprecatedStaticAttrAttrSetter(name, value, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void deprecatedReadonlyAttrAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
v8SetReturnValueInt(info, imp->deprecatedReadonlyAttr());
return;
}
static void deprecatedReadonlyAttrAttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
UseCounter::countDeprecation(activeDOMWindow(), UseCounter::ReadonlyAttribute);
TestObjV8Internal::deprecatedReadonlyAttrAttrGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void deprecatedAttrAttrGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
v8SetReturnValueInt(info, imp->deprecatedAttr());
return;
}
static void deprecatedAttrAttrGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
UseCounter::countDeprecation(activeDOMWindow(), UseCounter::Attribute);
TestObjV8Internal::deprecatedAttrAttrGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void deprecatedAttrAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
V8TRYCATCH_VOID(int, v, toInt32(value));
imp->setDeprecatedAttr(v);
return;
}
static void deprecatedAttrAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
UseCounter::countDeprecation(activeDOMWindow(), UseCounter::Attribute);
TestObjV8Internal::deprecatedAttrAttrSetter(name, value, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void TestObjConstructorGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
v8::Handle<v8::Value> data = info.Data();
ASSERT(data->IsExternal());
V8PerContextData* perContextData = V8PerContextData::from(info.Holder()->CreationContext());
if (!perContextData)
return;
v8SetReturnValue(info, perContextData->constructorForType(WrapperTypeInfo::unwrap(data)));
}
static void TestObjReplaceableAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
info.This()->ForceSet(name, value);
}
static void TestObjReplaceableAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TestObjV8Internal::TestObjReplaceableAttrSetter(name, value, info);
}
static void voidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
{
TestObj* imp = V8TestObject::toNative(args.Holder());
imp->voidMethod();
return;
}
static void voidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
TestObjV8Internal::voidMethodMethod(args);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void voidMethodWithArgsMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
{
if (args.Length() < 3) {
throwNotEnoughArgumentsError(args.GetIsolate());
return;
}
TestObj* imp = V8TestObject::toNative(args.Holder());
V8TRYCATCH_VOID(int, longArg, toInt32(args[0]));
V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, args[1]);
V8TRYCATCH_VOID(TestObj*, objArg, V8TestObject::HasInstance(args[2], args.GetIsolate(), worldType(args.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8::Object>::Cast(args[2])) : 0);
imp->voidMethodWithArgs(longArg, strArg, objArg);
return;
}
static void voidMethodWithArgsMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
TestObjV8Internal::voidMethodWithArgsMethod(args);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void longMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
{
TestObj* imp = V8TestObject::toNative(args.Holder());
v8SetReturnValueInt(args, imp->longMethod());
return;
}
static void longMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
TestObjV8Internal::longMethodMethod(args);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void longMethodWithArgsMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
{
if (args.Length() < 3) {
throwNotEnoughArgumentsError(args.GetIsolate());
return;
}
TestObj* imp = V8TestObject::toNative(args.Holder());
V8TRYCATCH_VOID(int, longArg, toInt32(args[0]));
V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, args[1]);
V8TRYCATCH_VOID(TestObj*, objArg, V8TestObject::HasInstance(args[2], args.GetIsolate(), worldType(args.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8::Object>::Cast(args[2])) : 0);
v8SetReturnValueInt(args, imp->longMethodWithArgs(longArg, strArg, objArg));
return;
}
static void longMethodWithArgsMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
TestObjV8Internal::longMethodWithArgsMethod(args);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void objMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
{
TestObj* imp = V8TestObject::toNative(args.Holder());
v8SetReturnValue(args, toV8(imp->objMethod(), args.Holder(), args.GetIsolate()));
return;
}
static void objMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
UseCounter::count(activeDOMWindow(), UseCounter::TestFeature);
TestObjV8Internal::objMethodMethod(args);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void objMethodWithArgsMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
{
if (args.Length() < 3) {
throwNotEnoughArgumentsError(args.GetIsolate());
return;
}
TestObj* imp = V8TestObject::toNative(args.Holder());
V8TRYCATCH_VOID(int, longArg, toInt32(args[0]));
V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, args[1]);
V8TRYCATCH_VOID(TestObj*, objArg, V8TestObject::HasInstance(args[2], args.GetIsolate(), worldType(args.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8::Object>::Cast(args[2])) : 0);
v8SetReturnValue(args, toV8(imp->objMethodWithArgs(longArg, strArg, objArg), args.Holder(), args.GetIsolate()));
return;
}
static void objMethodWithArgsMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
TestObjV8Internal::objMethodWithArgsMethod(args);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void methodWithSequenceArgMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
{
if (args.Length() < 1) {
throwNotEnoughArgumentsError(args.GetIsolate());
return;
}
TestObj* imp = V8TestObject::toNative(args.Holder());
V8TRYCATCH_VOID(Vector<RefPtr<TestInterface> >, sequenceArg, (toRefPtrNativeArray<TestInterface, V8TestInterface>(args[0], args.GetIsolate())));
imp->methodWithSequenceArg(sequenceArg);
return;
}
static void methodWithSequenceArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
TestObjV8Internal::methodWithSequenceArgMethod(args);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void methodReturningSequenceMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
{
if (args.Length() < 1) {
throwNotEnoughArgumentsError(args.GetIsolate());
return;
}
TestObj* imp = V8TestObject::toNative(args.Holder());
V8TRYCATCH_VOID(int, longArg, toInt32(args[0]));
v8SetReturnValue(args, v8Array(imp->methodReturningSequence(longArg), args.GetIsolate()));
return;
}
static void methodReturningSequenceMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
TestObjV8Internal::methodReturningSequenceMethod(args);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void methodWithEnumArgMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
{
if (args.Length() < 1) {
throwNotEnoughArgumentsError(args.GetIsolate());
return;
}
TestObj* imp = V8TestObject::toNative(args.Holder());
V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, enumArg, args[0]);
String string = enumArg;
if (!(string == "" || string == "EnumValue1" || string == "EnumValue2" || string == "EnumValue3")) {
throwTypeError(0, args.GetIsolate());
return;
}
imp->methodWithEnumArg(enumArg);
return;
}
static void methodWithEnumArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
TestObjV8Internal::methodWithEnumArgMethod(args);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void methodThatRequiresAllArgsAndThrowsMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
{
if (args.Length() < 2) {
throwNotEnoughArgumentsError(args.GetIsolate());
return;
}
TestObj* imp = V8TestObject::toNative(args.Holder());
ExceptionCode ec = 0;
V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, args[0]);
V8TRYCATCH_VOID(TestObj*, objArg, V8TestObject::HasInstance(args[1], args.GetIsolate(), worldType(args.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8::Object>::Cast(args[1])) : 0);
RefPtr<TestObj> result = imp->methodThatRequiresAllArgsAndThrows(strArg, objArg, ec);
if (UNLIKELY(ec)) {
setDOMException(ec, args.GetIsolate());
return;
}
v8SetReturnValue(args, toV8(result.release(), args.Holder(), args.GetIsolate()));
return;
}
static void methodThatRequiresAllArgsAndThrowsMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
TestObjV8Internal::methodThatRequiresAllArgsAndThrowsMethod(args);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void serializedValueMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
{
if (args.Length() < 1) {
throwNotEnoughArgumentsError(args.GetIsolate());
return;
}
TestObj* imp = V8TestObject::toNative(args.Holder());
bool serializedArgDidThrow = false;
RefPtr<SerializedScriptValue> serializedArg = SerializedScriptValue::create(args[0], 0, 0, serializedArgDidThrow, args.GetIsolate());
if (serializedArgDidThrow)
return;
imp->serializedValue(serializedArg);
return;
}
static void serializedValueMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
TestObjV8Internal::serializedValueMethod(args);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void optionsObjectMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
{
if (args.Length() < 1) {
throwNotEnoughArgumentsError(args.GetIsolate());
return;
}
TestObj* imp = V8TestObject::toNative(args.Holder());
V8TRYCATCH_VOID(Dictionary, oo, Dictionary(args[0], args.GetIsolate()));
if (!oo.isUndefinedOrNull() && !oo.isObject()) {
throwTypeError("Not an object.", args.GetIsolate());
return;
}
V8TRYCATCH_VOID(Dictionary, ooo, Dictionary(args[1], args.GetIsolate()));
if (!ooo.isUndefinedOrNull() && !ooo.isObject()) {
throwTypeError("Not an object.", args.GetIsolate());
return;
}
imp->optionsObject(oo, ooo);
return;
}
static void optionsObjectMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
TestObjV8Internal::optionsObjectMethod(args);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void methodWithExceptionMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
{
TestObj* imp = V8TestObject::toNative(args.Holder());
ExceptionCode ec = 0;
imp->methodWithException(ec);
if (UNLIKELY(ec)) {
setDOMException(ec, args.GetIsolate());
return;
}
return;
}
static void methodWithExceptionMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
TestObjV8Internal::methodWithExceptionMethod(args);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void customMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
UseCounter::count(activeDOMWindow(), UseCounter::CustomTestFeature);
V8TestObject::customMethodMethodCustom(args);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void customMethodWithArgsMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
V8TestObject::customMethodWithArgsMethodCustom(args);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void addEventListenerMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
{
RefPtr<EventListener> listener = V8EventListenerList::getEventListener(args[1], false, ListenerFindOrCreate);
if (listener) {
V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithNullCheck>, stringResource, args[0]);
V8TestObject::toNative(args.Holder())->addEventListener(stringResource, listener, args[2]->BooleanValue());
createHiddenDependency(args.Holder(), args[1], V8TestObject::eventListenerCacheIndex, args.GetIsolate());
}
}
static void addEventListenerMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
TestObjV8Internal::addEventListenerMethod(args);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void removeEventListenerMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
{
RefPtr<EventListener> listener = V8EventListenerList::getEventListener(args[1], false, ListenerFindOnly);
if (listener) {
V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithNullCheck>, stringResource, args[0]);
V8TestObject::toNative(args.Holder())->removeEventListener(stringResource, listener.get(), args[2]->BooleanValue());
removeHiddenDependency(args.Holder(), args[1], V8TestObject::eventListenerCacheIndex, args.GetIsolate());
}
}
static void removeEventListenerMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
TestObjV8Internal::removeEventListenerMethod(args);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void withScriptStateVoidMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
{
TestObj* imp = V8TestObject::toNative(args.Holder());
ScriptState* currentState = ScriptState::current();
if (!currentState)
return;
ScriptState& state = *currentState;
imp->withScriptStateVoid(&state);
if (state.hadException()) {
v8::Local<v8::Value> exception = state.exception();
state.clearException();
throwError(exception, args.GetIsolate());
return;
}
return;
}
static void withScriptStateVoidMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
TestObjV8Internal::withScriptStateVoidMethod(args);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void withScriptStateObjMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
{
TestObj* imp = V8TestObject::toNative(args.Holder());
ScriptState* currentState = ScriptState::current();
if (!currentState)
return;
ScriptState& state = *currentState;
RefPtr<TestObj> result = imp->withScriptStateObj(&state);
if (state.hadException()) {
v8::Local<v8::Value> exception = state.exception();
state.clearException();
throwError(exception, args.GetIsolate());
return;
}
v8SetReturnValue(args, toV8(result.release(), args.Holder(), args.GetIsolate()));
return;
}
static void withScriptStateObjMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
TestObjV8Internal::withScriptStateObjMethod(args);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void withScriptStateVoidExceptionMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
{
TestObj* imp = V8TestObject::toNative(args.Holder());
ExceptionCode ec = 0;
ScriptState* currentState = ScriptState::current();
if (!currentState)
return;
ScriptState& state = *currentState;
imp->withScriptStateVoidException(&state, ec);
if (UNLIKELY(ec)) {
setDOMException(ec, args.GetIsolate());
return;
}
if (state.hadException()) {
v8::Local<v8::Value> exception = state.exception();
state.clearException();
throwError(exception, args.GetIsolate());
return;
}
return;
}
static void withScriptStateVoidExceptionMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
TestObjV8Internal::withScriptStateVoidExceptionMethod(args);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void withScriptStateObjExceptionMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
{
TestObj* imp = V8TestObject::toNative(args.Holder());
ExceptionCode ec = 0;
ScriptState* currentState = ScriptState::current();
if (!currentState)
return;
ScriptState& state = *currentState;
RefPtr<TestObj> result = imp->withScriptStateObjException(&state, ec);
if (UNLIKELY(ec)) {
setDOMException(ec, args.GetIsolate());
return;
}
if (state.hadException()) {
v8::Local<v8::Value> exception = state.exception();
state.clearException();
throwError(exception, args.GetIsolate());
return;
}
v8SetReturnValue(args, toV8(result.release(), args.Holder(), args.GetIsolate()));
return;
}
static void withScriptStateObjExceptionMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
TestObjV8Internal::withScriptStateObjExceptionMethod(args);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void withScriptExecutionContextMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
{
TestObj* imp = V8TestObject::toNative(args.Holder());
ScriptExecutionContext* scriptContext = getScriptExecutionContext();
imp->withScriptExecutionContext(scriptContext);
return;
}
static void withScriptExecutionContextMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
TestObjV8Internal::withScriptExecutionContextMethod(args);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void withScriptExecutionContextAndScriptStateMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
{
TestObj* imp = V8TestObject::toNative(args.Holder());
ScriptState* currentState = ScriptState::current();
if (!currentState)
return;
ScriptState& state = *currentState;
ScriptExecutionContext* scriptContext = getScriptExecutionContext();
imp->withScriptExecutionContextAndScriptState(&state, scriptContext);
if (state.hadException()) {
v8::Local<v8::Value> exception = state.exception();
state.clearException();
throwError(exception, args.GetIsolate());
return;
}
return;
}
static void withScriptExecutionContextAndScriptStateMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
TestObjV8Internal::withScriptExecutionContextAndScriptStateMethod(args);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void withScriptExecutionContextAndScriptStateObjExceptionMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
{
TestObj* imp = V8TestObject::toNative(args.Holder());
ExceptionCode ec = 0;
ScriptState* currentState = ScriptState::current();
if (!currentState)
return;
ScriptState& state = *currentState;
ScriptExecutionContext* scriptContext = getScriptExecutionContext();
RefPtr<TestObj> result = imp->withScriptExecutionContextAndScriptStateObjException(&state, scriptContext, ec);
if (UNLIKELY(ec)) {
setDOMException(ec, args.GetIsolate());
return;
}
if (state.hadException()) {
v8::Local<v8::Value> exception = state.exception();
state.clearException();
throwError(exception, args.GetIsolate());
return;
}
v8SetReturnValue(args, toV8(result.release(), args.Holder(), args.GetIsolate()));
return;
}
static void withScriptExecutionContextAndScriptStateObjExceptionMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
TestObjV8Internal::withScriptExecutionContextAndScriptStateObjExceptionMethod(args);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void withScriptExecutionContextAndScriptStateWithSpacesMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
{
TestObj* imp = V8TestObject::toNative(args.Holder());
ScriptState* currentState = ScriptState::current();
if (!currentState)
return;
ScriptState& state = *currentState;
ScriptExecutionContext* scriptContext = getScriptExecutionContext();
RefPtr<TestObj> result = imp->withScriptExecutionContextAndScriptStateWithSpaces(&state, scriptContext);
if (state.hadException()) {
v8::Local<v8::Value> exception = state.exception();
state.clearException();
throwError(exception, args.GetIsolate());
return;
}
v8SetReturnValue(args, toV8(result.release(), args.Holder(), args.GetIsolate()));
return;
}
static void withScriptExecutionContextAndScriptStateWithSpacesMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
TestObjV8Internal::withScriptExecutionContextAndScriptStateWithSpacesMethod(args);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void withActiveWindowAndFirstWindowMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
{
TestObj* imp = V8TestObject::toNative(args.Holder());
imp->withActiveWindowAndFirstWindow(activeDOMWindow(), firstDOMWindow());
return;
}
static void withActiveWindowAndFirstWindowMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
TestObjV8Internal::withActiveWindowAndFirstWindowMethod(args);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void methodWithOptionalArgMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
{
TestObj* imp = V8TestObject::toNative(args.Holder());
if (args.Length() <= 0) {
imp->methodWithOptionalArg();
return;
}
V8TRYCATCH_VOID(int, opt, toInt32(args[0]));
imp->methodWithOptionalArg(opt);
return;
}
static void methodWithOptionalArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
TestObjV8Internal::methodWithOptionalArgMethod(args);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void methodWithNonOptionalArgAndOptionalArgMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
{
if (args.Length() < 1) {
throwNotEnoughArgumentsError(args.GetIsolate());
return;
}
TestObj* imp = V8TestObject::toNative(args.Holder());
V8TRYCATCH_VOID(int, nonOpt, toInt32(args[0]));
if (args.Length() <= 1) {
imp->methodWithNonOptionalArgAndOptionalArg(nonOpt);
return;
}
V8TRYCATCH_VOID(int, opt, toInt32(args[1]));
imp->methodWithNonOptionalArgAndOptionalArg(nonOpt, opt);
return;
}
static void methodWithNonOptionalArgAndOptionalArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
TestObjV8Internal::methodWithNonOptionalArgAndOptionalArgMethod(args);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void methodWithNonOptionalArgAndTwoOptionalArgsMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
{
if (args.Length() < 1) {
throwNotEnoughArgumentsError(args.GetIsolate());
return;
}
TestObj* imp = V8TestObject::toNative(args.Holder());
V8TRYCATCH_VOID(int, nonOpt, toInt32(args[0]));
if (args.Length() <= 1) {
imp->methodWithNonOptionalArgAndTwoOptionalArgs(nonOpt);
return;
}
V8TRYCATCH_VOID(int, opt1, toInt32(args[1]));
if (args.Length() <= 2) {
imp->methodWithNonOptionalArgAndTwoOptionalArgs(nonOpt, opt1);
return;
}
V8TRYCATCH_VOID(int, opt2, toInt32(args[2]));
imp->methodWithNonOptionalArgAndTwoOptionalArgs(nonOpt, opt1, opt2);
return;
}
static void methodWithNonOptionalArgAndTwoOptionalArgsMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
TestObjV8Internal::methodWithNonOptionalArgAndTwoOptionalArgsMethod(args);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void methodWithOptionalStringMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
{
TestObj* imp = V8TestObject::toNative(args.Holder());
if (args.Length() <= 0) {
imp->methodWithOptionalString();
return;
}
V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, str, args[0]);
imp->methodWithOptionalString(str);
return;
}
static void methodWithOptionalStringMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
TestObjV8Internal::methodWithOptionalStringMethod(args);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void methodWithOptionalStringIsUndefinedMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
{
TestObj* imp = V8TestObject::toNative(args.Holder());
V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, str, args[0]);
imp->methodWithOptionalStringIsUndefined(str);
return;
}
static void methodWithOptionalStringIsUndefinedMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
TestObjV8Internal::methodWithOptionalStringIsUndefinedMethod(args);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void methodWithOptionalStringIsNullStringMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
{
TestObj* imp = V8TestObject::toNative(args.Holder());
V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, str, argumentOrNull(args, 0));
imp->methodWithOptionalStringIsNullString(str);
return;
}
static void methodWithOptionalStringIsNullStringMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
TestObjV8Internal::methodWithOptionalStringIsNullStringMethod(args);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void methodWithCallbackArgMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
{
if (args.Length() < 1) {
throwNotEnoughArgumentsError(args.GetIsolate());
return;
}
TestObj* imp = V8TestObject::toNative(args.Holder());
if (args.Length() <= 0 || !args[0]->IsFunction()) {
throwTypeError(0, args.GetIsolate());
return;
}
RefPtr<TestCallback> callback = V8TestCallback::create(args[0], getScriptExecutionContext());
imp->methodWithCallbackArg(callback);
return;
}
static void methodWithCallbackArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
TestObjV8Internal::methodWithCallbackArgMethod(args);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void methodWithNonCallbackArgAndCallbackArgMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
{
if (args.Length() < 2) {
throwNotEnoughArgumentsError(args.GetIsolate());
return;
}
TestObj* imp = V8TestObject::toNative(args.Holder());
V8TRYCATCH_VOID(int, nonCallback, toInt32(args[0]));
if (args.Length() <= 1 || !args[1]->IsFunction()) {
throwTypeError(0, args.GetIsolate());
return;
}
RefPtr<TestCallback> callback = V8TestCallback::create(args[1], getScriptExecutionContext());
imp->methodWithNonCallbackArgAndCallbackArg(nonCallback, callback);
return;
}
static void methodWithNonCallbackArgAndCallbackArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
TestObjV8Internal::methodWithNonCallbackArgAndCallbackArgMethod(args);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void methodWithCallbackAndOptionalArgMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
{
TestObj* imp = V8TestObject::toNative(args.Holder());
RefPtr<TestCallback> callback;
if (args.Length() > 0 && !args[0]->IsNull() && !args[0]->IsUndefined()) {
if (!args[0]->IsFunction()) {
throwTypeError(0, args.GetIsolate());
return;
}
callback = V8TestCallback::create(args[0], getScriptExecutionContext());
}
imp->methodWithCallbackAndOptionalArg(callback);
return;
}
static void methodWithCallbackAndOptionalArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
TestObjV8Internal::methodWithCallbackAndOptionalArgMethod(args);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void staticMethodWithCallbackAndOptionalArgMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
{
RefPtr<TestCallback> callback;
if (args.Length() > 0 && !args[0]->IsNull() && !args[0]->IsUndefined()) {
if (!args[0]->IsFunction()) {
throwTypeError(0, args.GetIsolate());
return;
}
callback = V8TestCallback::create(args[0], getScriptExecutionContext());
}
TestObj::staticMethodWithCallbackAndOptionalArg(callback);
return;
}
static void staticMethodWithCallbackAndOptionalArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
TestObjV8Internal::staticMethodWithCallbackAndOptionalArgMethod(args);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void staticMethodWithCallbackArgMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
{
if (args.Length() < 1) {
throwNotEnoughArgumentsError(args.GetIsolate());
return;
}
if (args.Length() <= 0 || !args[0]->IsFunction()) {
throwTypeError(0, args.GetIsolate());
return;
}
RefPtr<TestCallback> callback = V8TestCallback::create(args[0], getScriptExecutionContext());
TestObj::staticMethodWithCallbackArg(callback);
return;
}
static void staticMethodWithCallbackArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
TestObjV8Internal::staticMethodWithCallbackArgMethod(args);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void methodWithEnforceRangeInt8Method(const v8::FunctionCallbackInfo<v8::Value>& args)
{
if (args.Length() < 1) {
throwNotEnoughArgumentsError(args.GetIsolate());
return;
}
TestObj* imp = V8TestObject::toNative(args.Holder());
V8TRYCATCH_WITH_TYPECHECK_VOID(int, value, toInt8(args[0], EnforceRange, ok), args.GetIsolate());
imp->methodWithEnforceRangeInt8(value);
return;
}
static void methodWithEnforceRangeInt8MethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
TestObjV8Internal::methodWithEnforceRangeInt8Method(args);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void methodWithEnforceRangeUInt8Method(const v8::FunctionCallbackInfo<v8::Value>& args)
{
if (args.Length() < 1) {
throwNotEnoughArgumentsError(args.GetIsolate());
return;
}
TestObj* imp = V8TestObject::toNative(args.Holder());
V8TRYCATCH_WITH_TYPECHECK_VOID(unsigned, value, toUInt8(args[0], EnforceRange, ok), args.GetIsolate());
imp->methodWithEnforceRangeUInt8(value);
return;
}
static void methodWithEnforceRangeUInt8MethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
TestObjV8Internal::methodWithEnforceRangeUInt8Method(args);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void methodWithEnforceRangeInt32Method(const v8::FunctionCallbackInfo<v8::Value>& args)
{
if (args.Length() < 1) {
throwNotEnoughArgumentsError(args.GetIsolate());
return;
}
TestObj* imp = V8TestObject::toNative(args.Holder());
V8TRYCATCH_WITH_TYPECHECK_VOID(int, value, toInt32(args[0], EnforceRange, ok), args.GetIsolate());
imp->methodWithEnforceRangeInt32(value);
return;
}
static void methodWithEnforceRangeInt32MethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
TestObjV8Internal::methodWithEnforceRangeInt32Method(args);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void methodWithEnforceRangeUInt32Method(const v8::FunctionCallbackInfo<v8::Value>& args)
{
if (args.Length() < 1) {
throwNotEnoughArgumentsError(args.GetIsolate());
return;
}
TestObj* imp = V8TestObject::toNative(args.Holder());
V8TRYCATCH_WITH_TYPECHECK_VOID(unsigned, value, toUInt32(args[0], EnforceRange, ok), args.GetIsolate());
imp->methodWithEnforceRangeUInt32(value);
return;
}
static void methodWithEnforceRangeUInt32MethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
TestObjV8Internal::methodWithEnforceRangeUInt32Method(args);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void methodWithEnforceRangeInt64Method(const v8::FunctionCallbackInfo<v8::Value>& args)
{
if (args.Length() < 1) {
throwNotEnoughArgumentsError(args.GetIsolate());
return;
}
TestObj* imp = V8TestObject::toNative(args.Holder());
V8TRYCATCH_WITH_TYPECHECK_VOID(long long, value, toInt64(args[0], EnforceRange, ok), args.GetIsolate());
imp->methodWithEnforceRangeInt64(value);
return;
}
static void methodWithEnforceRangeInt64MethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
TestObjV8Internal::methodWithEnforceRangeInt64Method(args);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void methodWithEnforceRangeUInt64Method(const v8::FunctionCallbackInfo<v8::Value>& args)
{
if (args.Length() < 1) {
throwNotEnoughArgumentsError(args.GetIsolate());
return;
}
TestObj* imp = V8TestObject::toNative(args.Holder());
V8TRYCATCH_WITH_TYPECHECK_VOID(unsigned long long, value, toUInt64(args[0], EnforceRange, ok), args.GetIsolate());
imp->methodWithEnforceRangeUInt64(value);
return;
}
static void methodWithEnforceRangeUInt64MethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
TestObjV8Internal::methodWithEnforceRangeUInt64Method(args);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
#if ENABLE(Condition1)
static void conditionalMethod1Method(const v8::FunctionCallbackInfo<v8::Value>& args)
{
TestObj* imp = V8TestObject::toNative(args.Holder());
v8SetReturnValueString(args, imp->conditionalMethod1(), args.GetIsolate(), NullStringAsEmpty);
return;
}
#endif // ENABLE(Condition1)
#if ENABLE(Condition1)
static void conditionalMethod1MethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
TestObjV8Internal::conditionalMethod1Method(args);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
#endif // ENABLE(Condition1)
#if ENABLE(Condition1) && ENABLE(Condition2)
static void conditionalMethod2Method(const v8::FunctionCallbackInfo<v8::Value>& args)
{
TestObj* imp = V8TestObject::toNative(args.Holder());
imp->conditionalMethod2();
return;
}
#endif // ENABLE(Condition1) && ENABLE(Condition2)
#if ENABLE(Condition1) && ENABLE(Condition2)
static void conditionalMethod2MethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
TestObjV8Internal::conditionalMethod2Method(args);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
#endif // ENABLE(Condition1) && ENABLE(Condition2)
#if ENABLE(Condition1) || ENABLE(Condition2)
static void conditionalMethod3Method(const v8::FunctionCallbackInfo<v8::Value>& args)
{
TestObj* imp = V8TestObject::toNative(args.Holder());
imp->conditionalMethod3();
return;
}
#endif // ENABLE(Condition1) || ENABLE(Condition2)
#if ENABLE(Condition1) || ENABLE(Condition2)
static void conditionalMethod3MethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
TestObjV8Internal::conditionalMethod3Method(args);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
#endif // ENABLE(Condition1) || ENABLE(Condition2)
static void callbackFunctionReturnValueMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
{
TestObj* imp = V8TestObject::toNative(args.Holder());
v8SetReturnValue(args, imp->callbackFunctionReturnValue().v8Value());
return;
}
static void callbackFunctionReturnValueMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
TestObjV8Internal::callbackFunctionReturnValueMethod(args);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void callbackFunctionArgumentMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
{
if (args.Length() < 1) {
throwNotEnoughArgumentsError(args.GetIsolate());
return;
}
TestObj* imp = V8TestObject::toNative(args.Holder());
V8TRYCATCH_VOID(ScriptValue, function, ScriptValue(args[0]));
imp->callbackFunctionArgument(function);
return;
}
static void callbackFunctionArgumentMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
TestObjV8Internal::callbackFunctionArgumentMethod(args);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void overloadedMethod1Method(const v8::FunctionCallbackInfo<v8::Value>& args)
{
if (args.Length() < 2) {
throwNotEnoughArgumentsError(args.GetIsolate());
return;
}
TestObj* imp = V8TestObject::toNative(args.Holder());
V8TRYCATCH_VOID(TestObj*, objArg, V8TestObject::HasInstance(args[0], args.GetIsolate(), worldType(args.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8::Object>::Cast(args[0])) : 0);
V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, args[1]);
imp->overloadedMethod(objArg, strArg);
return;
}
static void overloadedMethod2Method(const v8::FunctionCallbackInfo<v8::Value>& args)
{
if (args.Length() < 1) {
throwNotEnoughArgumentsError(args.GetIsolate());
return;
}
TestObj* imp = V8TestObject::toNative(args.Holder());
V8TRYCATCH_VOID(TestObj*, objArg, V8TestObject::HasInstance(args[0], args.GetIsolate(), worldType(args.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8::Object>::Cast(args[0])) : 0);
if (args.Length() <= 1) {
imp->overloadedMethod(objArg);
return;
}
V8TRYCATCH_VOID(int, longArg, toInt32(args[1]));
imp->overloadedMethod(objArg, longArg);
return;
}
static void overloadedMethod3Method(const v8::FunctionCallbackInfo<v8::Value>& args)
{
if (args.Length() < 1) {
throwNotEnoughArgumentsError(args.GetIsolate());
return;
}
TestObj* imp = V8TestObject::toNative(args.Holder());
V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, args[0]);
imp->overloadedMethod(strArg);
return;
}
static void overloadedMethod4Method(const v8::FunctionCallbackInfo<v8::Value>& args)
{
if (args.Length() < 1) {
throwNotEnoughArgumentsError(args.GetIsolate());
return;
}
TestObj* imp = V8TestObject::toNative(args.Holder());
V8TRYCATCH_VOID(int, longArg, toInt32(args[0]));
imp->overloadedMethod(longArg);
return;
}
static void overloadedMethod5Method(const v8::FunctionCallbackInfo<v8::Value>& args)
{
if (args.Length() < 1) {
throwNotEnoughArgumentsError(args.GetIsolate());
return;
}
TestObj* imp = V8TestObject::toNative(args.Holder());
if (args.Length() <= 0 || !args[0]->IsFunction()) {
throwTypeError(0, args.GetIsolate());
return;
}
RefPtr<TestCallback> callback = V8TestCallback::create(args[0], getScriptExecutionContext());
imp->overloadedMethod(callback);
return;
}
static void overloadedMethod6Method(const v8::FunctionCallbackInfo<v8::Value>& args)
{
if (args.Length() < 1) {
throwNotEnoughArgumentsError(args.GetIsolate());
return;
}
TestObj* imp = V8TestObject::toNative(args.Holder());
V8TRYCATCH_VOID(RefPtr<DOMStringList>, listArg, toDOMStringList(args[0], args.GetIsolate()));
imp->overloadedMethod(listArg);
return;
}
static void overloadedMethod7Method(const v8::FunctionCallbackInfo<v8::Value>& args)
{
if (args.Length() < 1) {
throwNotEnoughArgumentsError(args.GetIsolate());
return;
}
TestObj* imp = V8TestObject::toNative(args.Holder());
V8TRYCATCH_VOID(Vector<String>, arrayArg, toNativeArray<String>(args[0]));
imp->overloadedMethod(arrayArg);
return;
}
static void overloadedMethod8Method(const v8::FunctionCallbackInfo<v8::Value>& args)
{
if (args.Length() < 1) {
throwNotEnoughArgumentsError(args.GetIsolate());
return;
}
TestObj* imp = V8TestObject::toNative(args.Holder());
V8TRYCATCH_VOID(TestObj*, objArg, V8TestObject::HasInstance(args[0], args.GetIsolate(), worldType(args.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8::Object>::Cast(args[0])) : 0);
imp->overloadedMethod(objArg);
return;
}
static void overloadedMethod9Method(const v8::FunctionCallbackInfo<v8::Value>& args)
{
if (args.Length() < 1) {
throwNotEnoughArgumentsError(args.GetIsolate());
return;
}
TestObj* imp = V8TestObject::toNative(args.Holder());
V8TRYCATCH_VOID(Vector<String>, arrayArg, toNativeArray<String>(args[0]));
imp->overloadedMethod(arrayArg);
return;
}
static void overloadedMethod10Method(const v8::FunctionCallbackInfo<v8::Value>& args)
{
if (args.Length() < 1) {
throwNotEnoughArgumentsError(args.GetIsolate());
return;
}
TestObj* imp = V8TestObject::toNative(args.Holder());
V8TRYCATCH_VOID(Vector<unsigned>, arrayArg, toNativeArray<unsigned>(args[0]));
imp->overloadedMethod(arrayArg);
return;
}
static void overloadedMethod11Method(const v8::FunctionCallbackInfo<v8::Value>& args)
{
if (args.Length() < 1) {
throwNotEnoughArgumentsError(args.GetIsolate());
return;
}
TestObj* imp = V8TestObject::toNative(args.Holder());
V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, args[0]);
imp->overloadedMethod(strArg);
return;
}
static void overloadedMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
{
if ((args.Length() == 2 && (args[0]->IsNull() || V8TestObject::HasInstance(args[0], args.GetIsolate(), worldType(args.GetIsolate()))) && (args[1]->IsNull() || args[1]->IsUndefined() || args[1]->IsString() || args[1]->IsObject()))) {
overloadedMethod1Method(args);
return;
}
if ((args.Length() == 1 && (args[0]->IsNull() || V8TestObject::HasInstance(args[0], args.GetIsolate(), worldType(args.GetIsolate())))) || (args.Length() == 2 && (args[0]->IsNull() || V8TestObject::HasInstance(args[0], args.GetIsolate(), worldType(args.GetIsolate()))))) {
overloadedMethod2Method(args);
return;
}
if ((args.Length() == 1 && (args[0]->IsNull() || args[0]->IsUndefined() || args[0]->IsString() || args[0]->IsObject()))) {
overloadedMethod3Method(args);
return;
}
if (args.Length() == 1) {
overloadedMethod4Method(args);
return;
}
if ((args.Length() == 1 && (args[0]->IsNull() || args[0]->IsFunction()))) {
overloadedMethod5Method(args);
return;
}
if ((args.Length() == 1 && (args[0]->IsNull() || V8DOMStringList::HasInstance(args[0], args.GetIsolate(), worldType(args.GetIsolate()))))) {
overloadedMethod6Method(args);
return;
}
if ((args.Length() == 1 && (args[0]->IsNull() || args[0]->IsArray()))) {
overloadedMethod7Method(args);
return;
}
if ((args.Length() == 1 && (V8TestObject::HasInstance(args[0], args.GetIsolate(), worldType(args.GetIsolate()))))) {
overloadedMethod8Method(args);
return;
}
if ((args.Length() == 1 && (args[0]->IsArray()))) {
overloadedMethod9Method(args);
return;
}
if ((args.Length() == 1 && (args[0]->IsArray()))) {
overloadedMethod10Method(args);
return;
}
if (args.Length() == 1) {
overloadedMethod11Method(args);
return;
}
if (args.Length() < 1) {
throwNotEnoughArgumentsError(args.GetIsolate());
return;
}
throwTypeError(0, args.GetIsolate());
}
static void overloadedMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
TestObjV8Internal::overloadedMethodMethod(args);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void classMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
{
TestObj::classMethod();
return;
}
static void classMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
TestObjV8Internal::classMethodMethod(args);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void classMethodWithOptionalMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
{
if (args.Length() <= 0) {
v8SetReturnValueInt(args, TestObj::classMethodWithOptional());
return;
}
V8TRYCATCH_VOID(int, arg, toInt32(args[0]));
v8SetReturnValueInt(args, TestObj::classMethodWithOptional(arg));
return;
}
static void classMethodWithOptionalMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
TestObjV8Internal::classMethodWithOptionalMethod(args);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void classMethod2MethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
V8TestObject::classMethod2MethodCustom(args);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
#if ENABLE(Condition1)
static void overloadedMethod11Method(const v8::FunctionCallbackInfo<v8::Value>& args)
{
if (args.Length() < 1) {
throwNotEnoughArgumentsError(args.GetIsolate());
return;
}
V8TRYCATCH_VOID(int, arg, toInt32(args[0]));
TestObj::overloadedMethod1(arg);
return;
}
#endif // ENABLE(Condition1)
#if ENABLE(Condition1)
static void overloadedMethod12Method(const v8::FunctionCallbackInfo<v8::Value>& args)
{
if (args.Length() < 1) {
throwNotEnoughArgumentsError(args.GetIsolate());
return;
}
V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, type, args[0]);
TestObj::overloadedMethod1(type);
return;
}
#endif // ENABLE(Condition1)
#if ENABLE(Condition1)
static void overloadedMethod1Method(const v8::FunctionCallbackInfo<v8::Value>& args)
{
if (args.Length() == 1) {
overloadedMethod11Method(args);
return;
}
if ((args.Length() == 1 && (args[0]->IsNull() || args[0]->IsUndefined() || args[0]->IsString() || args[0]->IsObject()))) {
overloadedMethod12Method(args);
return;
}
if (args.Length() < 1) {
throwNotEnoughArgumentsError(args.GetIsolate());
return;
}
throwTypeError(0, args.GetIsolate());
}
#endif // ENABLE(Condition1)
#if ENABLE(Condition1)
static void overloadedMethod1MethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
TestObjV8Internal::overloadedMethod1Method(args);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
#endif // ENABLE(Condition1)
static void classMethodWithClampMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
{
if (args.Length() < 2) {
throwNotEnoughArgumentsError(args.GetIsolate());
return;
}
TestObj* imp = V8TestObject::toNative(args.Holder());
unsigned short objArgsShort = 0;
V8TRYCATCH_VOID(double, objArgsShortNativeValue, args[0]->NumberValue());
if (!std::isnan(objArgsShortNativeValue))
objArgsShort = clampTo<unsigned short>(objArgsShortNativeValue);
unsigned long objArgsLong = 0;
V8TRYCATCH_VOID(double, objArgsLongNativeValue, args[1]->NumberValue());
if (!std::isnan(objArgsLongNativeValue))
objArgsLong = clampTo<unsigned long>(objArgsLongNativeValue);
imp->classMethodWithClamp(objArgsShort, objArgsLong);
return;
}
static void classMethodWithClampMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
TestObjV8Internal::classMethodWithClampMethod(args);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void enabledAtRuntimeMethod1Method(const v8::FunctionCallbackInfo<v8::Value>& args)
{
if (args.Length() < 1) {
throwNotEnoughArgumentsError(args.GetIsolate());
return;
}
TestObj* imp = V8TestObject::toNative(args.Holder());
V8TRYCATCH_VOID(int, longArg, toInt32(args[0]));
imp->enabledAtRuntimeMethod1(longArg);
return;
}
static void enabledAtRuntimeMethod1MethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
TestObjV8Internal::enabledAtRuntimeMethod1Method(args);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void enabledAtRuntimeMethod2Method(const v8::FunctionCallbackInfo<v8::Value>& args)
{
if (args.Length() < 1) {
throwNotEnoughArgumentsError(args.GetIsolate());
return;
}
TestObj* imp = V8TestObject::toNative(args.Holder());
V8TRYCATCH_VOID(int, longArg, toInt32(args[0]));
imp->enabledAtRuntimeMethod2(longArg);
return;
}
static void enabledAtRuntimeMethod2MethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
TestObjV8Internal::enabledAtRuntimeMethod2Method(args);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void enabledPerContextMethod1Method(const v8::FunctionCallbackInfo<v8::Value>& args)
{
if (args.Length() < 1) {
throwNotEnoughArgumentsError(args.GetIsolate());
return;
}
TestObj* imp = V8TestObject::toNative(args.Holder());
V8TRYCATCH_VOID(int, longArg, toInt32(args[0]));
imp->enabledPerContextMethod1(longArg);
return;
}
static void enabledPerContextMethod1MethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
TestObjV8Internal::enabledPerContextMethod1Method(args);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void enabledPerContextMethod2Method(const v8::FunctionCallbackInfo<v8::Value>& args)
{
if (args.Length() < 1) {
throwNotEnoughArgumentsError(args.GetIsolate());
return;
}
TestObj* imp = V8TestObject::toNative(args.Holder());
V8TRYCATCH_VOID(int, longArg, toInt32(args[0]));
imp->enabledPerContextMethod2(longArg);
return;
}
static void enabledPerContextMethod2MethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
TestObjV8Internal::enabledPerContextMethod2Method(args);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void methodWithUnsignedLongSequenceMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
{
if (args.Length() < 1) {
throwNotEnoughArgumentsError(args.GetIsolate());
return;
}
TestObj* imp = V8TestObject::toNative(args.Holder());
V8TRYCATCH_VOID(Vector<unsigned>, unsignedLongSequence, toNativeArray<unsigned>(args[0]));
imp->methodWithUnsignedLongSequence(unsignedLongSequence);
return;
}
static void methodWithUnsignedLongSequenceMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
TestObjV8Internal::methodWithUnsignedLongSequenceMethod(args);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void stringArrayFunctionMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
{
if (args.Length() < 1) {
throwNotEnoughArgumentsError(args.GetIsolate());
return;
}
TestObj* imp = V8TestObject::toNative(args.Holder());
ExceptionCode ec = 0;
V8TRYCATCH_VOID(Vector<String>, values, toNativeArray<String>(args[0]));
Vector<String> result = imp->stringArrayFunction(values, ec);
if (UNLIKELY(ec)) {
setDOMException(ec, args.GetIsolate());
return;
}
v8SetReturnValue(args, v8Array(result, args.GetIsolate()));
return;
}
static void stringArrayFunctionMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
TestObjV8Internal::stringArrayFunctionMethod(args);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void domStringListFunctionMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
{
if (args.Length() < 1) {
throwNotEnoughArgumentsError(args.GetIsolate());
return;
}
TestObj* imp = V8TestObject::toNative(args.Holder());
ExceptionCode ec = 0;
V8TRYCATCH_VOID(RefPtr<DOMStringList>, values, toDOMStringList(args[0], args.GetIsolate()));
RefPtr<DOMStringList> result = imp->domStringListFunction(values, ec);
if (UNLIKELY(ec)) {
setDOMException(ec, args.GetIsolate());
return;
}
v8SetReturnValue(args, toV8(result.release(), args.Holder(), args.GetIsolate()));
return;
}
static void domStringListFunctionMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
TestObjV8Internal::domStringListFunctionMethod(args);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void getSVGDocumentMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
{
TestObj* imp = V8TestObject::toNative(args.Holder());
ExceptionCode ec = 0;
if (!BindingSecurity::shouldAllowAccessToNode(imp->getSVGDocument(ec))) {
v8SetReturnValueNull(args);
return;
}
RefPtr<SVGDocument> result = imp->getSVGDocument(ec);
if (UNLIKELY(ec)) {
setDOMException(ec, args.GetIsolate());
return;
}
v8SetReturnValue(args, toV8(result.release(), args.Holder(), args.GetIsolate()));
return;
}
static void getSVGDocumentMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
TestObjV8Internal::getSVGDocumentMethod(args);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void convert1Method(const v8::FunctionCallbackInfo<v8::Value>& args)
{
if (args.Length() < 1) {
throwNotEnoughArgumentsError(args.GetIsolate());
return;
}
TestObj* imp = V8TestObject::toNative(args.Holder());
V8TRYCATCH_VOID(TestNode*, value, V8TestNode::HasInstance(args[0], args.GetIsolate(), worldType(args.GetIsolate())) ? V8TestNode::toNative(v8::Handle<v8::Object>::Cast(args[0])) : 0);
imp->convert1(value);
return;
}
static void convert1MethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
TestObjV8Internal::convert1Method(args);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void convert2Method(const v8::FunctionCallbackInfo<v8::Value>& args)
{
if (args.Length() < 1) {
throwNotEnoughArgumentsError(args.GetIsolate());
return;
}
TestObj* imp = V8TestObject::toNative(args.Holder());
V8TRYCATCH_VOID(TestNode*, value, V8TestNode::HasInstance(args[0], args.GetIsolate(), worldType(args.GetIsolate())) ? V8TestNode::toNative(v8::Handle<v8::Object>::Cast(args[0])) : 0);
imp->convert2(value);
return;
}
static void convert2MethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
TestObjV8Internal::convert2Method(args);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void convert4Method(const v8::FunctionCallbackInfo<v8::Value>& args)
{
if (args.Length() < 1) {
throwNotEnoughArgumentsError(args.GetIsolate());
return;
}
TestObj* imp = V8TestObject::toNative(args.Holder());
V8TRYCATCH_VOID(TestNode*, value, V8TestNode::HasInstance(args[0], args.GetIsolate(), worldType(args.GetIsolate())) ? V8TestNode::toNative(v8::Handle<v8::Object>::Cast(args[0])) : 0);
imp->convert4(value);
return;
}
static void convert4MethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
TestObjV8Internal::convert4Method(args);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void convert5Method(const v8::FunctionCallbackInfo<v8::Value>& args)
{
if (args.Length() < 1) {
throwNotEnoughArgumentsError(args.GetIsolate());
return;
}
TestObj* imp = V8TestObject::toNative(args.Holder());
V8TRYCATCH_VOID(TestNode*, value, V8TestNode::HasInstance(args[0], args.GetIsolate(), worldType(args.GetIsolate())) ? V8TestNode::toNative(v8::Handle<v8::Object>::Cast(args[0])) : 0);
imp->convert5(value);
return;
}
static void convert5MethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
TestObjV8Internal::convert5Method(args);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void mutablePointFunctionMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
{
TestObj* imp = V8TestObject::toNative(args.Holder());
v8SetReturnValue(args, toV8(WTF::getPtr(SVGPropertyTearOff<FloatPoint>::create(imp->mutablePointFunction())), args.Holder(), args.GetIsolate()));
return;
}
static void mutablePointFunctionMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
TestObjV8Internal::mutablePointFunctionMethod(args);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void immutablePointFunctionMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
{
TestObj* imp = V8TestObject::toNative(args.Holder());
v8SetReturnValue(args, toV8(WTF::getPtr(SVGPropertyTearOff<FloatPoint>::create(imp->immutablePointFunction())), args.Holder(), args.GetIsolate()));
return;
}
static void immutablePointFunctionMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
TestObjV8Internal::immutablePointFunctionMethod(args);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void orangeMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
{
TestObj* imp = V8TestObject::toNative(args.Holder());
imp->banana();
return;
}
static void orangeMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
TestObjV8Internal::orangeMethod(args);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void strictFunctionMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
{
if (args.Length() < 3) {
throwNotEnoughArgumentsError(args.GetIsolate());
return;
}
TestObj* imp = V8TestObject::toNative(args.Holder());
ExceptionCode ec = 0;
V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, str, args[0]);
V8TRYCATCH_VOID(float, a, static_cast<float>(args[1]->NumberValue()));
V8TRYCATCH_VOID(int, b, toInt32(args[2]));
bool result = imp->strictFunction(str, a, b, ec);
if (UNLIKELY(ec)) {
setDOMException(ec, args.GetIsolate());
return;
}
v8SetReturnValueBool(args, result);
return;
}
static void strictFunctionMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
TestObjV8Internal::strictFunctionMethod(args);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void variadicStringMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
{
if (args.Length() < 1) {
throwNotEnoughArgumentsError(args.GetIsolate());
return;
}
TestObj* imp = V8TestObject::toNative(args.Holder());
V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, head, args[0]);
V8TRYCATCH_VOID(Vector<String>, tail, toNativeArguments<String>(args, 1));
imp->variadicStringMethod(head, tail);
return;
}
static void variadicStringMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
TestObjV8Internal::variadicStringMethodMethod(args);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void variadicDoubleMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
{
if (args.Length() < 1) {
throwNotEnoughArgumentsError(args.GetIsolate());
return;
}
TestObj* imp = V8TestObject::toNative(args.Holder());
V8TRYCATCH_VOID(double, head, static_cast<double>(args[0]->NumberValue()));
V8TRYCATCH_VOID(Vector<double>, tail, toNativeArguments<double>(args, 1));
imp->variadicDoubleMethod(head, tail);
return;
}
static void variadicDoubleMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
TestObjV8Internal::variadicDoubleMethodMethod(args);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void variadicNodeMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
{
if (args.Length() < 1) {
throwNotEnoughArgumentsError(args.GetIsolate());
return;
}
TestObj* imp = V8TestObject::toNative(args.Holder());
V8TRYCATCH_VOID(Node*, head, V8Node::HasInstance(args[0], args.GetIsolate(), worldType(args.GetIsolate())) ? V8Node::toNative(v8::Handle<v8::Object>::Cast(args[0])) : 0);
Vector<RefPtr<Node> > tail;
for (int i = 1; i < args.Length(); ++i) {
if (!V8Node::HasInstance(args[i], args.GetIsolate(), worldType(args.GetIsolate()))) {
throwTypeError(0, args.GetIsolate());
return;
}
tail.append(V8Node::toNative(v8::Handle<v8::Object>::Cast(args[i])));
}
imp->variadicNodeMethod(head, tail);
return;
}
static void variadicNodeMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
TestObjV8Internal::variadicNodeMethodMethod(args);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void perWorldMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
{
TestObj* imp = V8TestObject::toNative(args.Holder());
imp->perWorldMethod();
return;
}
static void perWorldMethodMethodForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& args)
{
TestObj* imp = V8TestObject::toNative(args.Holder());
imp->perWorldMethod();
return;
}
static void perWorldMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
TestObjV8Internal::perWorldMethodMethod(args);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void perWorldMethodMethodCallbackForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& args)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
TestObjV8Internal::perWorldMethodMethodForMainWorld(args);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void overloadedPerWorldMethod1Method(const v8::FunctionCallbackInfo<v8::Value>& args)
{
if (args.Length() < 1) {
throwNotEnoughArgumentsError(args.GetIsolate());
return;
}
TestObj* imp = V8TestObject::toNative(args.Holder());
V8TRYCATCH_VOID(int, longArg, toInt32(args[0]));
imp->overloadedPerWorldMethod(longArg);
return;
}
static void overloadedPerWorldMethod1MethodForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& args)
{
if (args.Length() < 1) {
throwNotEnoughArgumentsError(args.GetIsolate());
return;
}
TestObj* imp = V8TestObject::toNative(args.Holder());
V8TRYCATCH_VOID(int, longArg, toInt32(args[0]));
imp->overloadedPerWorldMethod(longArg);
return;
}
static void overloadedPerWorldMethod2Method(const v8::FunctionCallbackInfo<v8::Value>& args)
{
if (args.Length() < 2) {
throwNotEnoughArgumentsError(args.GetIsolate());
return;
}
TestObj* imp = V8TestObject::toNative(args.Holder());
V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, args[0]);
V8TRYCATCH_VOID(int, longArg, toInt32(args[1]));
imp->overloadedPerWorldMethod(strArg, longArg);
return;
}
static void overloadedPerWorldMethod2MethodForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& args)
{
if (args.Length() < 2) {
throwNotEnoughArgumentsError(args.GetIsolate());
return;
}
TestObj* imp = V8TestObject::toNative(args.Holder());
V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, args[0]);
V8TRYCATCH_VOID(int, longArg, toInt32(args[1]));
imp->overloadedPerWorldMethod(strArg, longArg);
return;
}
static void overloadedPerWorldMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
{
if (args.Length() == 1) {
overloadedPerWorldMethod1Method(args);
return;
}
if (args.Length() == 2) {
overloadedPerWorldMethod2Method(args);
return;
}
if (args.Length() < 1) {
throwNotEnoughArgumentsError(args.GetIsolate());
return;
}
throwTypeError(0, args.GetIsolate());
}
static void overloadedPerWorldMethodMethodForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& args)
{
if (args.Length() == 1) {
overloadedPerWorldMethod1MethodForMainWorld(args);
return;
}
if (args.Length() == 2) {
overloadedPerWorldMethod2MethodForMainWorld(args);
return;
}
if (args.Length() < 1) {
throwNotEnoughArgumentsError(args.GetIsolate());
return;
}
throwTypeError(0, args.GetIsolate());
}
static void overloadedPerWorldMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
TestObjV8Internal::overloadedPerWorldMethodMethod(args);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void overloadedPerWorldMethodMethodCallbackForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& args)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
TestObjV8Internal::overloadedPerWorldMethodMethodForMainWorld(args);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void activityLoggedMethod1Method(const v8::FunctionCallbackInfo<v8::Value>& args)
{
if (args.Length() < 1) {
throwNotEnoughArgumentsError(args.GetIsolate());
return;
}
TestObj* imp = V8TestObject::toNative(args.Holder());
V8TRYCATCH_VOID(int, longArg, toInt32(args[0]));
imp->activityLoggedMethod1(longArg);
return;
}
static void activityLoggedMethod1MethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
V8PerContextData* contextData = V8PerContextData::from(args.GetIsolate()->GetCurrentContext());
if (contextData && contextData->activityLogger()) {
Vector<v8::Handle<v8::Value> > loggerArgs = toVectorOfArguments(args);
contextData->activityLogger()->log("TestObject.activityLoggedMethod1", args.Length(), loggerArgs.data(), "Method");
}
TestObjV8Internal::activityLoggedMethod1Method(args);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void activityLoggedMethod2Method(const v8::FunctionCallbackInfo<v8::Value>& args)
{
if (args.Length() < 1) {
throwNotEnoughArgumentsError(args.GetIsolate());
return;
}
TestObj* imp = V8TestObject::toNative(args.Holder());
V8TRYCATCH_VOID(int, longArg, toInt32(args[0]));
imp->activityLoggedMethod2(longArg);
return;
}
static void activityLoggedMethod2MethodForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& args)
{
if (args.Length() < 1) {
throwNotEnoughArgumentsError(args.GetIsolate());
return;
}
TestObj* imp = V8TestObject::toNative(args.Holder());
V8TRYCATCH_VOID(int, longArg, toInt32(args[0]));
imp->activityLoggedMethod2(longArg);
return;
}
static void activityLoggedMethod2MethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
V8PerContextData* contextData = V8PerContextData::from(args.GetIsolate()->GetCurrentContext());
if (contextData && contextData->activityLogger()) {
Vector<v8::Handle<v8::Value> > loggerArgs = toVectorOfArguments(args);
contextData->activityLogger()->log("TestObject.activityLoggedMethod2", args.Length(), loggerArgs.data(), "Method");
}
TestObjV8Internal::activityLoggedMethod2Method(args);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void activityLoggedMethod2MethodCallbackForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& args)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
V8PerContextData* contextData = V8PerContextData::from(args.GetIsolate()->GetCurrentContext());
if (contextData && contextData->activityLogger()) {
Vector<v8::Handle<v8::Value> > loggerArgs = toVectorOfArguments(args);
contextData->activityLogger()->log("TestObject.activityLoggedMethod2", args.Length(), loggerArgs.data(), "Method");
}
TestObjV8Internal::activityLoggedMethod2MethodForMainWorld(args);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void activityLoggedInIsolatedWorldMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
{
if (args.Length() < 1) {
throwNotEnoughArgumentsError(args.GetIsolate());
return;
}
TestObj* imp = V8TestObject::toNative(args.Holder());
V8TRYCATCH_VOID(int, longArg, toInt32(args[0]));
imp->activityLoggedInIsolatedWorldMethod(longArg);
return;
}
static void activityLoggedInIsolatedWorldMethodMethodForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& args)
{
if (args.Length() < 1) {
throwNotEnoughArgumentsError(args.GetIsolate());
return;
}
TestObj* imp = V8TestObject::toNative(args.Holder());
V8TRYCATCH_VOID(int, longArg, toInt32(args[0]));
imp->activityLoggedInIsolatedWorldMethod(longArg);
return;
}
static void activityLoggedInIsolatedWorldMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
V8PerContextData* contextData = V8PerContextData::from(args.GetIsolate()->GetCurrentContext());
if (contextData && contextData->activityLogger()) {
Vector<v8::Handle<v8::Value> > loggerArgs = toVectorOfArguments(args);
contextData->activityLogger()->log("TestObject.activityLoggedInIsolatedWorldMethod", args.Length(), loggerArgs.data(), "Method");
}
TestObjV8Internal::activityLoggedInIsolatedWorldMethodMethod(args);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void activityLoggedInIsolatedWorldMethodMethodCallbackForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& args)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
TestObjV8Internal::activityLoggedInIsolatedWorldMethodMethodForMainWorld(args);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void overloadedActivityLoggedMethod1Method(const v8::FunctionCallbackInfo<v8::Value>& args)
{
if (args.Length() < 1) {
throwNotEnoughArgumentsError(args.GetIsolate());
return;
}
TestObj* imp = V8TestObject::toNative(args.Holder());
V8TRYCATCH_VOID(int, longArg, toInt32(args[0]));
imp->overloadedActivityLoggedMethod(longArg);
return;
}
static void overloadedActivityLoggedMethod1MethodForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& args)
{
if (args.Length() < 1) {
throwNotEnoughArgumentsError(args.GetIsolate());
return;
}
TestObj* imp = V8TestObject::toNative(args.Holder());
V8TRYCATCH_VOID(int, longArg, toInt32(args[0]));
imp->overloadedActivityLoggedMethod(longArg);
return;
}
static void overloadedActivityLoggedMethod2Method(const v8::FunctionCallbackInfo<v8::Value>& args)
{
if (args.Length() < 2) {
throwNotEnoughArgumentsError(args.GetIsolate());
return;
}
TestObj* imp = V8TestObject::toNative(args.Holder());
V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, args[0]);
V8TRYCATCH_VOID(int, longArg, toInt32(args[1]));
imp->overloadedActivityLoggedMethod(strArg, longArg);
return;
}
static void overloadedActivityLoggedMethod2MethodForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& args)
{
if (args.Length() < 2) {
throwNotEnoughArgumentsError(args.GetIsolate());
return;
}
TestObj* imp = V8TestObject::toNative(args.Holder());
V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, args[0]);
V8TRYCATCH_VOID(int, longArg, toInt32(args[1]));
imp->overloadedActivityLoggedMethod(strArg, longArg);
return;
}
static void overloadedActivityLoggedMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
{
if (args.Length() == 1) {
overloadedActivityLoggedMethod1Method(args);
return;
}
if (args.Length() == 2) {
overloadedActivityLoggedMethod2Method(args);
return;
}
if (args.Length() < 1) {
throwNotEnoughArgumentsError(args.GetIsolate());
return;
}
throwTypeError(0, args.GetIsolate());
}
static void overloadedActivityLoggedMethodMethodForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& args)
{
if (args.Length() == 1) {
overloadedActivityLoggedMethod1MethodForMainWorld(args);
return;
}
if (args.Length() == 2) {
overloadedActivityLoggedMethod2MethodForMainWorld(args);
return;
}
if (args.Length() < 1) {
throwNotEnoughArgumentsError(args.GetIsolate());
return;
}
throwTypeError(0, args.GetIsolate());
}
static void overloadedActivityLoggedMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
V8PerContextData* contextData = V8PerContextData::from(args.GetIsolate()->GetCurrentContext());
if (contextData && contextData->activityLogger()) {
Vector<v8::Handle<v8::Value> > loggerArgs = toVectorOfArguments(args);
contextData->activityLogger()->log("TestObject.overloadedActivityLoggedMethod", args.Length(), loggerArgs.data(), "Method");
}
TestObjV8Internal::overloadedActivityLoggedMethodMethod(args);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void overloadedActivityLoggedMethodMethodCallbackForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& args)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
V8PerContextData* contextData = V8PerContextData::from(args.GetIsolate()->GetCurrentContext());
if (contextData && contextData->activityLogger()) {
Vector<v8::Handle<v8::Value> > loggerArgs = toVectorOfArguments(args);
contextData->activityLogger()->log("TestObject.overloadedActivityLoggedMethod", args.Length(), loggerArgs.data(), "Method");
}
TestObjV8Internal::overloadedActivityLoggedMethodMethodForMainWorld(args);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void deprecatedMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
{
TestObj* imp = V8TestObject::toNative(args.Holder());
imp->deprecatedMethod();
return;
}
static void deprecatedMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
UseCounter::countDeprecation(activeDOMWindow(), UseCounter::Method);
TestObjV8Internal::deprecatedMethodMethod(args);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void deprecatedStaticMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
{
TestObj::deprecatedStaticMethod();
return;
}
static void deprecatedStaticMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
UseCounter::countDeprecation(activeDOMWindow(), UseCounter::StaticMethod);
TestObjV8Internal::deprecatedStaticMethodMethod(args);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void constructor(const v8::FunctionCallbackInfo<v8::Value>& args)
{
if (args.Length() < 1) {
throwNotEnoughArgumentsError(args.GetIsolate());
return;
}
if (args.Length() <= 0 || !args[0]->IsFunction()) {
throwTypeError(0, args.GetIsolate());
return;
}
RefPtr<TestCallback> testCallback = V8TestCallback::create(args[0], getScriptExecutionContext());
RefPtr<TestObj> impl = TestObj::create(testCallback);
v8::Handle<v8::Object> wrapper = args.Holder();
V8DOMWrapper::associateObjectWithWrapper<V8TestObject>(impl.release(), &V8TestObject::info, wrapper, args.GetIsolate(), WrapperConfiguration::Dependent);
args.GetReturnValue().Set(wrapper);
}
static void indexedPropertyGetter(uint32_t index, const v8::PropertyCallbackInfo<v8::Value>& info)
{
ASSERT(V8DOMWrapper::maybeDOMWrapper(info.Holder()));
TestObj* collection = V8TestObject::toNative(info.Holder());
RefPtr<Node> element = collection->item(index);
if (!element)
return;
v8SetReturnValue(info, toV8Fast(element.release(), info, collection));
}
static void indexedPropertyGetterCallback(uint32_t index, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMIndexedProperty");
TestObjV8Internal::indexedPropertyGetter(index, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void namedPropertyGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
if (!info.Holder()->GetRealNamedPropertyInPrototypeChain(name).IsEmpty())
return;
if (info.Holder()->HasRealNamedCallbackProperty(name))
return;
if (info.Holder()->HasRealNamedProperty(name))
return;
ASSERT(V8DOMWrapper::maybeDOMWrapper(info.Holder()));
TestObj* collection = V8TestObject::toNative(info.Holder());
AtomicString propertyName = toWebCoreAtomicString(name);
String element = collection->namedItem(propertyName);
if (element.isNull())
return;
v8SetReturnValueString(info, element, info.GetIsolate(), NullStringAsEmpty);
}
static void namedPropertyGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMNamedProperty");
TestObjV8Internal::namedPropertyGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void namedPropertyEnumerator(const v8::PropertyCallbackInfo<v8::Array>& info)
{
ExceptionCode ec = 0;
TestObj* collection = V8TestObject::toNative(info.Holder());
Vector<String> names;
collection->namedPropertyEnumerator(names, ec);
if (ec) {
setDOMException(ec, info.GetIsolate());
return;
}
v8::Handle<v8::Array> v8names = v8::Array::New(names.size());
for (size_t i = 0; i < names.size(); ++i)
v8names->Set(v8::Integer::New(i, info.GetIsolate()), v8String(names[i], info.GetIsolate()));
v8SetReturnValue(info, v8names);
}
static void namedPropertyQuery(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Integer>& info)
{
TestObj* collection = V8TestObject::toNative(info.Holder());
AtomicString propertyName = toWebCoreAtomicString(name);
ExceptionCode ec = 0;
bool result = collection->namedPropertyQuery(propertyName, ec);
if (ec) {
setDOMException(ec, info.GetIsolate());
return;
}
if (!result)
return;
v8SetReturnValueInt(info, v8::None);
}
static void namedPropertyEnumeratorCallback(const v8::PropertyCallbackInfo<v8::Array>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMNamedProperty");
TestObjV8Internal::namedPropertyEnumerator(info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void namedPropertyQueryCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Integer>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMNamedProperty");
TestObjV8Internal::namedPropertyQuery(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
} // namespace TestObjV8Internal
static const V8DOMConfiguration::BatchedAttribute V8TestObjectAttrs[] = {
// Attribute 'readOnlyLongAttr'
{"readOnlyLongAttr", TestObjV8Internal::readOnlyLongAttrAttrGetterCallback, 0, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
// Attribute 'readOnlyStringAttr'
{"readOnlyStringAttr", TestObjV8Internal::readOnlyStringAttrAttrGetterCallback, 0, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
// Attribute 'readOnlyTestObjectAttr'
{"readOnlyTestObjectAttr", TestObjV8Internal::readOnlyTestObjectAttrAttrGetterCallback, 0, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
// Attribute 'staticReadOnlyLongAttr'
{"staticReadOnlyLongAttr", TestObjV8Internal::staticReadOnlyLongAttrAttrGetterCallback, 0, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
// Attribute 'staticStringAttr'
{"staticStringAttr", TestObjV8Internal::staticStringAttrAttrGetterCallback, TestObjV8Internal::staticStringAttrAttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
// Attribute 'TestSubObj'
{"TestSubObj", TestObjV8Internal::TestObjConstructorGetter, 0, 0, 0, &V8TestSubObj::info, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None | v8::DontEnum), 0 /* on instance */},
// Attribute 'enumAttr'
{"enumAttr", TestObjV8Internal::enumAttrAttrGetterCallback, TestObjV8Internal::enumAttrAttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
// Attribute 'readOnlyEnumAttr'
{"readOnlyEnumAttr", TestObjV8Internal::readOnlyEnumAttrAttrGetterCallback, 0, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
// Attribute 'byteAttr'
{"byteAttr", TestObjV8Internal::byteAttrAttrGetterCallback, TestObjV8Internal::byteAttrAttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
// Attribute 'octetAttr'
{"octetAttr", TestObjV8Internal::octetAttrAttrGetterCallback, TestObjV8Internal::octetAttrAttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
// Attribute 'shortAttr'
{"shortAttr", TestObjV8Internal::shortAttrAttrGetterCallback, TestObjV8Internal::shortAttrAttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
// Attribute 'unsignedShortAttr'
{"unsignedShortAttr", TestObjV8Internal::unsignedShortAttrAttrGetterCallback, TestObjV8Internal::unsignedShortAttrAttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
// Attribute 'longAttr'
{"longAttr", TestObjV8Internal::longAttrAttrGetterCallback, TestObjV8Internal::longAttrAttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
// Attribute 'longLongAttr'
{"longLongAttr", TestObjV8Internal::longLongAttrAttrGetterCallback, TestObjV8Internal::longLongAttrAttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
// Attribute 'unsignedLongLongAttr'
{"unsignedLongLongAttr", TestObjV8Internal::unsignedLongLongAttrAttrGetterCallback, TestObjV8Internal::unsignedLongLongAttrAttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
// Attribute 'stringAttr'
{"stringAttr", TestObjV8Internal::stringAttrAttrGetterCallback, TestObjV8Internal::stringAttrAttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
// Attribute 'testObjAttr'
{"testObjAttr", TestObjV8Internal::testObjAttrAttrGetterCallback, TestObjV8Internal::testObjAttrAttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
// Attribute 'XMLObjAttr'
{"XMLObjAttr", TestObjV8Internal::XMLObjAttrAttrGetterCallback, TestObjV8Internal::XMLObjAttrAttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
// Attribute 'create'
{"create", TestObjV8Internal::createAttrGetterCallback, TestObjV8Internal::createAttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
// Attribute 'reflectedStringAttr'
{"reflectedStringAttr", TestObjV8Internal::reflectedStringAttrAttrGetterCallback, TestObjV8Internal::reflectedStringAttrAttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
// Attribute 'reflectedIntegralAttr'
{"reflectedIntegralAttr", TestObjV8Internal::reflectedIntegralAttrAttrGetterCallback, TestObjV8Internal::reflectedIntegralAttrAttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
// Attribute 'reflectedUnsignedIntegralAttr'
{"reflectedUnsignedIntegralAttr", TestObjV8Internal::reflectedUnsignedIntegralAttrAttrGetterCallback, TestObjV8Internal::reflectedUnsignedIntegralAttrAttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
// Attribute 'reflectedBooleanAttr'
{"reflectedBooleanAttr", TestObjV8Internal::reflectedBooleanAttrAttrGetterCallback, TestObjV8Internal::reflectedBooleanAttrAttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
// Attribute 'reflectedURLAttr'
{"reflectedURLAttr", TestObjV8Internal::reflectedURLAttrAttrGetterCallback, TestObjV8Internal::reflectedURLAttrAttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
// Attribute 'reflectedStringAttr'
{"reflectedStringAttr", TestObjV8Internal::reflectedStringAttrAttrGetterCallback, TestObjV8Internal::reflectedStringAttrAttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
// Attribute 'reflectedCustomIntegralAttr'
{"reflectedCustomIntegralAttr", TestObjV8Internal::reflectedCustomIntegralAttrAttrGetterCallback, TestObjV8Internal::reflectedCustomIntegralAttrAttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
// Attribute 'reflectedCustomBooleanAttr'
{"reflectedCustomBooleanAttr", TestObjV8Internal::reflectedCustomBooleanAttrAttrGetterCallback, TestObjV8Internal::reflectedCustomBooleanAttrAttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
// Attribute 'reflectedCustomURLAttr'
{"reflectedCustomURLAttr", TestObjV8Internal::reflectedCustomURLAttrAttrGetterCallback, TestObjV8Internal::reflectedCustomURLAttrAttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
// Attribute 'typedArrayAttr'
{"typedArrayAttr", TestObjV8Internal::typedArrayAttrAttrGetterCallback, TestObjV8Internal::typedArrayAttrAttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
// Attribute 'attrWithGetterException'
{"attrWithGetterException", TestObjV8Internal::attrWithGetterExceptionAttrGetterCallback, TestObjV8Internal::attrWithGetterExceptionAttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
// Attribute 'attrWithSetterException'
{"attrWithSetterException", TestObjV8Internal::attrWithSetterExceptionAttrGetterCallback, TestObjV8Internal::attrWithSetterExceptionAttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
// Attribute 'stringAttrWithGetterException'
{"stringAttrWithGetterException", TestObjV8Internal::stringAttrWithGetterExceptionAttrGetterCallback, TestObjV8Internal::stringAttrWithGetterExceptionAttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
// Attribute 'stringAttrWithSetterException'
{"stringAttrWithSetterException", TestObjV8Internal::stringAttrWithSetterExceptionAttrGetterCallback, TestObjV8Internal::stringAttrWithSetterExceptionAttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
// Attribute 'customAttr'
{"customAttr", TestObjV8Internal::customAttrAttrGetterCallback, TestObjV8Internal::customAttrAttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
// Attribute 'withScriptStateAttribute'
{"withScriptStateAttribute", TestObjV8Internal::withScriptStateAttributeAttrGetterCallback, TestObjV8Internal::withScriptStateAttributeAttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
// Attribute 'withScriptExecutionContextAttribute'
{"withScriptExecutionContextAttribute", TestObjV8Internal::withScriptExecutionContextAttributeAttrGetterCallback, TestObjV8Internal::withScriptExecutionContextAttributeAttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
// Attribute 'withActiveWindowAndFirstWindowAttribute'
{"withActiveWindowAndFirstWindowAttribute", TestObjV8Internal::withActiveWindowAndFirstWindowAttributeAttrGetterCallback, TestObjV8Internal::withActiveWindowAndFirstWindowAttributeAttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
// Attribute 'withScriptStateAttributeRaises'
{"withScriptStateAttributeRaises", TestObjV8Internal::withScriptStateAttributeRaisesAttrGetterCallback, TestObjV8Internal::withScriptStateAttributeRaisesAttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
// Attribute 'withScriptExecutionContextAttributeRaises'
{"withScriptExecutionContextAttributeRaises", TestObjV8Internal::withScriptExecutionContextAttributeRaisesAttrGetterCallback, TestObjV8Internal::withScriptExecutionContextAttributeRaisesAttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
// Attribute 'withScriptExecutionContextAndScriptStateAttribute'
{"withScriptExecutionContextAndScriptStateAttribute", TestObjV8Internal::withScriptExecutionContextAndScriptStateAttributeAttrGetterCallback, TestObjV8Internal::withScriptExecutionContextAndScriptStateAttributeAttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
// Attribute 'withScriptExecutionContextAndScriptStateAttributeRaises'
{"withScriptExecutionContextAndScriptStateAttributeRaises", TestObjV8Internal::withScriptExecutionContextAndScriptStateAttributeRaisesAttrGetterCallback, TestObjV8Internal::withScriptExecutionContextAndScriptStateAttributeRaisesAttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
// Attribute 'withScriptExecutionContextAndScriptStateWithSpacesAttribute'
{"withScriptExecutionContextAndScriptStateWithSpacesAttribute", TestObjV8Internal::withScriptExecutionContextAndScriptStateWithSpacesAttributeAttrGetterCallback, TestObjV8Internal::withScriptExecutionContextAndScriptStateWithSpacesAttributeAttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
// Attribute 'enforcedRangeByteAttr'
{"enforcedRangeByteAttr", TestObjV8Internal::enforcedRangeByteAttrAttrGetterCallback, TestObjV8Internal::enforcedRangeByteAttrAttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
// Attribute 'enforcedRangeOctetAttr'
{"enforcedRangeOctetAttr", TestObjV8Internal::enforcedRangeOctetAttrAttrGetterCallback, TestObjV8Internal::enforcedRangeOctetAttrAttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
// Attribute 'enforcedRangeLongAttr'
{"enforcedRangeLongAttr", TestObjV8Internal::enforcedRangeLongAttrAttrGetterCallback, TestObjV8Internal::enforcedRangeLongAttrAttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
// Attribute 'enforcedRangeUnsignedLongAttr'
{"enforcedRangeUnsignedLongAttr", TestObjV8Internal::enforcedRangeUnsignedLongAttrAttrGetterCallback, TestObjV8Internal::enforcedRangeUnsignedLongAttrAttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
// Attribute 'enforcedRangeLongLongAttr'
{"enforcedRangeLongLongAttr", TestObjV8Internal::enforcedRangeLongLongAttrAttrGetterCallback, TestObjV8Internal::enforcedRangeLongLongAttrAttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
// Attribute 'enforcedRangeUnsignedLongLongAttr'
{"enforcedRangeUnsignedLongLongAttr", TestObjV8Internal::enforcedRangeUnsignedLongLongAttrAttrGetterCallback, TestObjV8Internal::enforcedRangeUnsignedLongLongAttrAttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
#if ENABLE(Condition1)
// Attribute 'conditionalAttr1'
{"conditionalAttr1", TestObjV8Internal::conditionalAttr1AttrGetterCallback, TestObjV8Internal::conditionalAttr1AttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
#endif // ENABLE(Condition1)
#if ENABLE(Condition1) && ENABLE(Condition2)
// Attribute 'conditionalAttr2'
{"conditionalAttr2", TestObjV8Internal::conditionalAttr2AttrGetterCallback, TestObjV8Internal::conditionalAttr2AttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
#endif // ENABLE(Condition1) && ENABLE(Condition2)
#if ENABLE(Condition1) || ENABLE(Condition2)
// Attribute 'conditionalAttr3'
{"conditionalAttr3", TestObjV8Internal::conditionalAttr3AttrGetterCallback, TestObjV8Internal::conditionalAttr3AttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
#endif // ENABLE(Condition1) || ENABLE(Condition2)
#if ENABLE(Condition1)
// Attribute 'conditionalAttr4'
{"conditionalAttr4", TestObjV8Internal::TestObjConstructorGetter, TestObjV8Internal::TestObjReplaceableAttrSetterCallback, 0, 0, &V8TestObjectectA::info, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None | v8::DontEnum), 0 /* on instance */},
#endif // ENABLE(Condition1)
#if ENABLE(Condition1) && ENABLE(Condition2)
// Attribute 'conditionalAttr5'
{"conditionalAttr5", TestObjV8Internal::TestObjConstructorGetter, TestObjV8Internal::TestObjReplaceableAttrSetterCallback, 0, 0, &V8TestObjectectB::info, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None | v8::DontEnum), 0 /* on instance */},
#endif // ENABLE(Condition1) && ENABLE(Condition2)
#if ENABLE(Condition1) || ENABLE(Condition2)
// Attribute 'conditionalAttr6'
{"conditionalAttr6", TestObjV8Internal::TestObjConstructorGetter, TestObjV8Internal::TestObjReplaceableAttrSetterCallback, 0, 0, &V8TestObjectectC::info, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None | v8::DontEnum), 0 /* on instance */},
#endif // ENABLE(Condition1) || ENABLE(Condition2)
// Attribute 'cachedAttribute1'
{"cachedAttribute1", TestObjV8Internal::cachedAttribute1AttrGetterCallback, 0, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
// Attribute 'cachedAttribute2'
{"cachedAttribute2", TestObjV8Internal::cachedAttribute2AttrGetterCallback, 0, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
// Attribute 'anyAttribute'
{"anyAttribute", TestObjV8Internal::anyAttributeAttrGetterCallback, TestObjV8Internal::anyAttributeAttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
// Attribute 'callbackFunctionAttribute'
{"callbackFunctionAttribute", TestObjV8Internal::callbackFunctionAttributeAttrGetterCallback, TestObjV8Internal::callbackFunctionAttributeAttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
// Attribute 'floatArray'
{"floatArray", TestObjV8Internal::floatArrayAttrGetterCallback, TestObjV8Internal::floatArrayAttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
// Attribute 'doubleArray'
{"doubleArray", TestObjV8Internal::doubleArrayAttrGetterCallback, TestObjV8Internal::doubleArrayAttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
// Attribute 'messagePortArray'
{"messagePortArray", TestObjV8Internal::messagePortArrayAttrGetterCallback, TestObjV8Internal::messagePortArrayAttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
// Attribute 'contentDocument'
{"contentDocument", TestObjV8Internal::contentDocumentAttrGetterCallback, 0, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
// Attribute 'mutablePoint'
{"mutablePoint", TestObjV8Internal::mutablePointAttrGetterCallback, TestObjV8Internal::mutablePointAttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
// Attribute 'immutablePoint'
{"immutablePoint", TestObjV8Internal::immutablePointAttrGetterCallback, TestObjV8Internal::immutablePointAttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
// Attribute 'strawberry'
{"strawberry", TestObjV8Internal::strawberryAttrGetterCallback, TestObjV8Internal::strawberryAttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
// Attribute 'strictFloat'
{"strictFloat", TestObjV8Internal::strictFloatAttrGetterCallback, TestObjV8Internal::strictFloatAttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
// Attribute 'description'
{"description", TestObjV8Internal::descriptionAttrGetterCallback, 0, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
// Attribute 'id'
{"id", TestObjV8Internal::idAttrGetterCallback, TestObjV8Internal::idAttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
// Attribute 'hash'
{"hash", TestObjV8Internal::hashAttrGetterCallback, 0, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
// Attribute 'replaceableAttribute'
{"replaceableAttribute", TestObjV8Internal::replaceableAttributeAttrGetterCallback, TestObjV8Internal::TestObjReplaceableAttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
// Attribute 'nullableDoubleAttribute'
{"nullableDoubleAttribute", TestObjV8Internal::nullableDoubleAttributeAttrGetterCallback, 0, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
// Attribute 'nullableLongAttribute'
{"nullableLongAttribute", TestObjV8Internal::nullableLongAttributeAttrGetterCallback, 0, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
// Attribute 'nullableBooleanAttribute'
{"nullableBooleanAttribute", TestObjV8Internal::nullableBooleanAttributeAttrGetterCallback, 0, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
// Attribute 'nullableStringAttribute'
{"nullableStringAttribute", TestObjV8Internal::nullableStringAttributeAttrGetterCallback, 0, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
// Attribute 'nullableLongSettableAttribute'
{"nullableLongSettableAttribute", TestObjV8Internal::nullableLongSettableAttributeAttrGetterCallback, TestObjV8Internal::nullableLongSettableAttributeAttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
// Attribute 'nullableStringValue'
{"nullableStringValue", TestObjV8Internal::nullableStringValueAttrGetterCallback, TestObjV8Internal::nullableStringValueAttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
// Attribute 'perWorldReadOnlyAttribute'
{"perWorldReadOnlyAttribute", TestObjV8Internal::perWorldReadOnlyAttributeAttrGetterCallback, 0, TestObjV8Internal::perWorldReadOnlyAttributeAttrGetterCallbackForMainWorld, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
// Attribute 'perWorldAttribute'
{"perWorldAttribute", TestObjV8Internal::perWorldAttributeAttrGetterCallback, TestObjV8Internal::perWorldAttributeAttrSetterCallback, TestObjV8Internal::perWorldAttributeAttrGetterCallbackForMainWorld, TestObjV8Internal::perWorldAttributeAttrSetterCallbackForMainWorld, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
// Attribute 'activityLoggedAttr1'
{"activityLoggedAttr1", TestObjV8Internal::activityLoggedAttr1AttrGetterCallback, TestObjV8Internal::activityLoggedAttr1AttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
// Attribute 'activityLoggedAttr2'
{"activityLoggedAttr2", TestObjV8Internal::activityLoggedAttr2AttrGetterCallback, TestObjV8Internal::activityLoggedAttr2AttrSetterCallback, TestObjV8Internal::activityLoggedAttr2AttrGetterCallbackForMainWorld, TestObjV8Internal::activityLoggedAttr2AttrSetterCallbackForMainWorld, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
// Attribute 'activityLoggedInIsolatedWorldsAttr'
{"activityLoggedInIsolatedWorldsAttr", TestObjV8Internal::activityLoggedInIsolatedWorldsAttrAttrGetterCallback, TestObjV8Internal::activityLoggedInIsolatedWorldsAttrAttrSetterCallback, TestObjV8Internal::activityLoggedInIsolatedWorldsAttrAttrGetterCallbackForMainWorld, TestObjV8Internal::activityLoggedInIsolatedWorldsAttrAttrSetterCallbackForMainWorld, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
// Attribute 'activityLoggedAttrSetter1'
{"activityLoggedAttrSetter1", TestObjV8Internal::activityLoggedAttrSetter1AttrGetterCallback, TestObjV8Internal::activityLoggedAttrSetter1AttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
// Attribute 'activityLoggedAttrSetter2'
{"activityLoggedAttrSetter2", TestObjV8Internal::activityLoggedAttrSetter2AttrGetterCallback, TestObjV8Internal::activityLoggedAttrSetter2AttrSetterCallback, TestObjV8Internal::activityLoggedAttrSetter2AttrGetterCallbackForMainWorld, TestObjV8Internal::activityLoggedAttrSetter2AttrSetterCallbackForMainWorld, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
// Attribute 'activityLoggedInIsolatedWorldsAttrSetter'
{"activityLoggedInIsolatedWorldsAttrSetter", TestObjV8Internal::activityLoggedInIsolatedWorldsAttrSetterAttrGetterCallback, TestObjV8Internal::activityLoggedInIsolatedWorldsAttrSetterAttrSetterCallback, TestObjV8Internal::activityLoggedInIsolatedWorldsAttrSetterAttrGetterCallbackForMainWorld, TestObjV8Internal::activityLoggedInIsolatedWorldsAttrSetterAttrSetterCallbackForMainWorld, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
// Attribute 'activityLoggedAttrGetter1'
{"activityLoggedAttrGetter1", TestObjV8Internal::activityLoggedAttrGetter1AttrGetterCallback, TestObjV8Internal::activityLoggedAttrGetter1AttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
// Attribute 'activityLoggedAttrGetter2'
{"activityLoggedAttrGetter2", TestObjV8Internal::activityLoggedAttrGetter2AttrGetterCallback, TestObjV8Internal::activityLoggedAttrGetter2AttrSetterCallback, TestObjV8Internal::activityLoggedAttrGetter2AttrGetterCallbackForMainWorld, TestObjV8Internal::activityLoggedAttrGetter2AttrSetterCallbackForMainWorld, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
// Attribute 'activityLoggedInIsolatedWorldsAttrGetter'
{"activityLoggedInIsolatedWorldsAttrGetter", TestObjV8Internal::activityLoggedInIsolatedWorldsAttrGetterAttrGetterCallback, TestObjV8Internal::activityLoggedInIsolatedWorldsAttrGetterAttrSetterCallback, TestObjV8Internal::activityLoggedInIsolatedWorldsAttrGetterAttrGetterCallbackForMainWorld, TestObjV8Internal::activityLoggedInIsolatedWorldsAttrGetterAttrSetterCallbackForMainWorld, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
// Attribute 'deprecatedStaticReadOnlyAttr'
{"deprecatedStaticReadOnlyAttr", TestObjV8Internal::deprecatedStaticReadOnlyAttrAttrGetterCallback, 0, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
// Attribute 'deprecatedStaticAttr'
{"deprecatedStaticAttr", TestObjV8Internal::deprecatedStaticAttrAttrGetterCallback, TestObjV8Internal::deprecatedStaticAttrAttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
// Attribute 'deprecatedReadonlyAttr'
{"deprecatedReadonlyAttr", TestObjV8Internal::deprecatedReadonlyAttrAttrGetterCallback, 0, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
// Attribute 'deprecatedAttr'
{"deprecatedAttr", TestObjV8Internal::deprecatedAttrAttrGetterCallback, TestObjV8Internal::deprecatedAttrAttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
};
static const V8DOMConfiguration::BatchedMethod V8TestObjectMethods[] = {
{"voidMethod", TestObjV8Internal::voidMethodMethodCallback, 0, 0},
{"longMethod", TestObjV8Internal::longMethodMethodCallback, 0, 0},
{"objMethod", TestObjV8Internal::objMethodMethodCallback, 0, 0},
{"methodWithSequenceArg", TestObjV8Internal::methodWithSequenceArgMethodCallback, 0, 1},
{"methodReturningSequence", TestObjV8Internal::methodReturningSequenceMethodCallback, 0, 1},
{"methodWithEnumArg", TestObjV8Internal::methodWithEnumArgMethodCallback, 0, 1},
{"serializedValue", TestObjV8Internal::serializedValueMethodCallback, 0, 1},
{"optionsObject", TestObjV8Internal::optionsObjectMethodCallback, 0, 1},
{"methodWithException", TestObjV8Internal::methodWithExceptionMethodCallback, 0, 0},
{"customMethod", TestObjV8Internal::customMethodMethodCallback, 0, 0},
{"customMethodWithArgs", TestObjV8Internal::customMethodWithArgsMethodCallback, 0, 3},
{"addEventListener", TestObjV8Internal::addEventListenerMethodCallback, 0, 2},
{"removeEventListener", TestObjV8Internal::removeEventListenerMethodCallback, 0, 2},
{"withScriptStateVoid", TestObjV8Internal::withScriptStateVoidMethodCallback, 0, 0},
{"withScriptStateObj", TestObjV8Internal::withScriptStateObjMethodCallback, 0, 0},
{"withScriptStateVoidException", TestObjV8Internal::withScriptStateVoidExceptionMethodCallback, 0, 0},
{"withScriptStateObjException", TestObjV8Internal::withScriptStateObjExceptionMethodCallback, 0, 0},
{"withScriptExecutionContext", TestObjV8Internal::withScriptExecutionContextMethodCallback, 0, 0},
{"withScriptExecutionContextAndScriptState", TestObjV8Internal::withScriptExecutionContextAndScriptStateMethodCallback, 0, 0},
{"withScriptExecutionContextAndScriptStateObjException", TestObjV8Internal::withScriptExecutionContextAndScriptStateObjExceptionMethodCallback, 0, 0},
{"withScriptExecutionContextAndScriptStateWithSpaces", TestObjV8Internal::withScriptExecutionContextAndScriptStateWithSpacesMethodCallback, 0, 0},
{"withActiveWindowAndFirstWindow", TestObjV8Internal::withActiveWindowAndFirstWindowMethodCallback, 0, 0},
{"methodWithOptionalArg", TestObjV8Internal::methodWithOptionalArgMethodCallback, 0, 0},
{"methodWithNonOptionalArgAndOptionalArg", TestObjV8Internal::methodWithNonOptionalArgAndOptionalArgMethodCallback, 0, 1},
{"methodWithNonOptionalArgAndTwoOptionalArgs", TestObjV8Internal::methodWithNonOptionalArgAndTwoOptionalArgsMethodCallback, 0, 1},
{"methodWithOptionalString", TestObjV8Internal::methodWithOptionalStringMethodCallback, 0, 0},
{"methodWithOptionalStringIsUndefined", TestObjV8Internal::methodWithOptionalStringIsUndefinedMethodCallback, 0, 0},
{"methodWithOptionalStringIsNullString", TestObjV8Internal::methodWithOptionalStringIsNullStringMethodCallback, 0, 0},
{"methodWithCallbackArg", TestObjV8Internal::methodWithCallbackArgMethodCallback, 0, 1},
{"methodWithNonCallbackArgAndCallbackArg", TestObjV8Internal::methodWithNonCallbackArgAndCallbackArgMethodCallback, 0, 2},
{"methodWithCallbackAndOptionalArg", TestObjV8Internal::methodWithCallbackAndOptionalArgMethodCallback, 0, 0},
{"methodWithEnforceRangeInt8", TestObjV8Internal::methodWithEnforceRangeInt8MethodCallback, 0, 1},
{"methodWithEnforceRangeUInt8", TestObjV8Internal::methodWithEnforceRangeUInt8MethodCallback, 0, 1},
{"methodWithEnforceRangeInt32", TestObjV8Internal::methodWithEnforceRangeInt32MethodCallback, 0, 1},
{"methodWithEnforceRangeUInt32", TestObjV8Internal::methodWithEnforceRangeUInt32MethodCallback, 0, 1},
{"methodWithEnforceRangeInt64", TestObjV8Internal::methodWithEnforceRangeInt64MethodCallback, 0, 1},
{"methodWithEnforceRangeUInt64", TestObjV8Internal::methodWithEnforceRangeUInt64MethodCallback, 0, 1},
#if ENABLE(Condition1)
{"conditionalMethod1", TestObjV8Internal::conditionalMethod1MethodCallback, 0, 0},
#endif
#if ENABLE(Condition1) && ENABLE(Condition2)
{"conditionalMethod2", TestObjV8Internal::conditionalMethod2MethodCallback, 0, 0},
#endif
#if ENABLE(Condition1) || ENABLE(Condition2)
{"conditionalMethod3", TestObjV8Internal::conditionalMethod3MethodCallback, 0, 0},
#endif
{"callbackFunctionReturnValue", TestObjV8Internal::callbackFunctionReturnValueMethodCallback, 0, 0},
{"callbackFunctionArgument", TestObjV8Internal::callbackFunctionArgumentMethodCallback, 0, 1},
{"overloadedMethod", TestObjV8Internal::overloadedMethodMethodCallback, 0, 2},
{"classMethodWithClamp", TestObjV8Internal::classMethodWithClampMethodCallback, 0, 2},
{"methodWithUnsignedLongSequence", TestObjV8Internal::methodWithUnsignedLongSequenceMethodCallback, 0, 1},
{"stringArrayFunction", TestObjV8Internal::stringArrayFunctionMethodCallback, 0, 1},
{"getSVGDocument", TestObjV8Internal::getSVGDocumentMethodCallback, 0, 0},
{"mutablePointFunction", TestObjV8Internal::mutablePointFunctionMethodCallback, 0, 0},
{"immutablePointFunction", TestObjV8Internal::immutablePointFunctionMethodCallback, 0, 0},
{"orange", TestObjV8Internal::orangeMethodCallback, 0, 0},
{"strictFunction", TestObjV8Internal::strictFunctionMethodCallback, 0, 3},
{"variadicStringMethod", TestObjV8Internal::variadicStringMethodMethodCallback, 0, 2},
{"variadicDoubleMethod", TestObjV8Internal::variadicDoubleMethodMethodCallback, 0, 2},
{"perWorldMethod", TestObjV8Internal::perWorldMethodMethodCallback, TestObjV8Internal::perWorldMethodMethodCallbackForMainWorld, 0},
{"overloadedPerWorldMethod", TestObjV8Internal::overloadedPerWorldMethodMethodCallback, TestObjV8Internal::overloadedPerWorldMethodMethodCallbackForMainWorld, 1},
{"activityLoggedMethod1", TestObjV8Internal::activityLoggedMethod1MethodCallback, 0, 1},
{"activityLoggedMethod2", TestObjV8Internal::activityLoggedMethod2MethodCallback, TestObjV8Internal::activityLoggedMethod2MethodCallbackForMainWorld, 1},
{"activityLoggedInIsolatedWorldMethod", TestObjV8Internal::activityLoggedInIsolatedWorldMethodMethodCallback, TestObjV8Internal::activityLoggedInIsolatedWorldMethodMethodCallbackForMainWorld, 1},
{"overloadedActivityLoggedMethod", TestObjV8Internal::overloadedActivityLoggedMethodMethodCallback, TestObjV8Internal::overloadedActivityLoggedMethodMethodCallbackForMainWorld, 1},
{"deprecatedMethod", TestObjV8Internal::deprecatedMethodMethodCallback, 0, 0},
};
static const V8DOMConfiguration::BatchedConstant V8TestObjectConsts[] = {
#if ENABLE(Condition1)
{"CONDITIONAL_CONST", 0},
#endif
{"CONST_VALUE_0", 0},
{"CONST_VALUE_1", 1},
{"CONST_VALUE_2", 2},
{"CONST_VALUE_4", 4},
{"CONST_VALUE_8", 8},
{"CONST_VALUE_9", -1},
{"CONST_VALUE_10", "my constant string"},
{"CONST_VALUE_11", -1},
{"CONST_VALUE_12", 1},
{"CONST_VALUE_13", 0X20},
{"CONST_VALUE_14", 6844},
{"CONST_JAVASCRIPT", 15},
{"DEPRECATED_CONSTANT", 1},
};
#if ENABLE(Condition1)
COMPILE_ASSERT(0 == TestObj::CONDITIONAL_CONST, TestObjEnumCONDITIONAL_CONSTIsWrongUseDoNotCheckConstants);
#endif
COMPILE_ASSERT(0 == TestObj::CONST_VALUE_0, TestObjEnumCONST_VALUE_0IsWrongUseDoNotCheckConstants);
COMPILE_ASSERT(1 == TestObj::CONST_VALUE_1, TestObjEnumCONST_VALUE_1IsWrongUseDoNotCheckConstants);
COMPILE_ASSERT(2 == TestObj::CONST_VALUE_2, TestObjEnumCONST_VALUE_2IsWrongUseDoNotCheckConstants);
COMPILE_ASSERT(4 == TestObj::CONST_VALUE_4, TestObjEnumCONST_VALUE_4IsWrongUseDoNotCheckConstants);
COMPILE_ASSERT(8 == TestObj::CONST_VALUE_8, TestObjEnumCONST_VALUE_8IsWrongUseDoNotCheckConstants);
COMPILE_ASSERT(-1 == TestObj::CONST_VALUE_9, TestObjEnumCONST_VALUE_9IsWrongUseDoNotCheckConstants);
COMPILE_ASSERT("my constant string" == TestObj::CONST_VALUE_10, TestObjEnumCONST_VALUE_10IsWrongUseDoNotCheckConstants);
COMPILE_ASSERT(0xffffffff == TestObj::CONST_VALUE_11, TestObjEnumCONST_VALUE_11IsWrongUseDoNotCheckConstants);
COMPILE_ASSERT(0x01 == TestObj::CONST_VALUE_12, TestObjEnumCONST_VALUE_12IsWrongUseDoNotCheckConstants);
COMPILE_ASSERT(0X20 == TestObj::CONST_VALUE_13, TestObjEnumCONST_VALUE_13IsWrongUseDoNotCheckConstants);
COMPILE_ASSERT(0x1abc == TestObj::CONST_VALUE_14, TestObjEnumCONST_VALUE_14IsWrongUseDoNotCheckConstants);
COMPILE_ASSERT(15 == TestObj::CONST_IMPL, TestObjEnumCONST_IMPLIsWrongUseDoNotCheckConstants);
COMPILE_ASSERT(1 == TestObj::DEPRECATED_CONSTANT, TestObjEnumDEPRECATED_CONSTANTIsWrongUseDoNotCheckConstants);
void V8TestObject::constructorCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
TRACE_EVENT_SCOPED_SAMPLING_STATE("Blink", "DOMConstructor");
if (!args.IsConstructCall()) {
throwTypeError("DOM object constructor cannot be called as a function.", args.GetIsolate());
return;
}
if (ConstructorMode::current() == ConstructorMode::WrapExistingObject) {
args.GetReturnValue().Set(args.Holder());
return;
}
TestObjV8Internal::constructor(args);
}
static v8::Handle<v8::FunctionTemplate> ConfigureV8TestObjectTemplate(v8::Handle<v8::FunctionTemplate> desc, v8::Isolate* isolate, WrapperWorldType currentWorldType)
{
desc->ReadOnlyPrototype();
v8::Local<v8::Signature> defaultSignature;
defaultSignature = V8DOMConfiguration::configureTemplate(desc, "TestObject", v8::Local<v8::FunctionTemplate>(), V8TestObject::internalFieldCount,
V8TestObjectAttrs, WTF_ARRAY_LENGTH(V8TestObjectAttrs),
V8TestObjectMethods, WTF_ARRAY_LENGTH(V8TestObjectMethods), isolate, currentWorldType);
UNUSED_PARAM(defaultSignature); // In some cases, it will not be used.
desc->SetCallHandler(V8TestObject::constructorCallback);
desc->SetLength(1);
v8::Local<v8::ObjectTemplate> instance = desc->InstanceTemplate();
v8::Local<v8::ObjectTemplate> proto = desc->PrototypeTemplate();
UNUSED_PARAM(instance); // In some cases, it will not be used.
UNUSED_PARAM(proto); // In some cases, it will not be used.
if (RuntimeEnabledFeatures::enabledAtRuntimeAttr1Enabled()) {
static const V8DOMConfiguration::BatchedAttribute attrData =\
// Attribute 'enabledAtRuntimeAttr1'
{"enabledAtRuntimeAttr1", TestObjV8Internal::enabledAtRuntimeAttr1AttrGetterCallback, TestObjV8Internal::enabledAtRuntimeAttr1AttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */};
V8DOMConfiguration::configureAttribute(instance, proto, attrData, isolate, currentWorldType);
}
if (RuntimeEnabledFeatures::featureNameEnabled()) {
static const V8DOMConfiguration::BatchedAttribute attrData =\
// Attribute 'enabledAtRuntimeAttr2'
{"enabledAtRuntimeAttr2", TestObjV8Internal::enabledAtRuntimeAttr2AttrGetterCallback, TestObjV8Internal::enabledAtRuntimeAttr2AttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */};
V8DOMConfiguration::configureAttribute(instance, proto, attrData, isolate, currentWorldType);
}
desc->InstanceTemplate()->SetIndexedPropertyHandler(TestObjV8Internal::indexedPropertyGetterCallback, 0, 0, 0, indexedPropertyEnumerator<TestObj>);
desc->InstanceTemplate()->SetNamedPropertyHandler(TestObjV8Internal::namedPropertyGetterCallback, 0, TestObjV8Internal::namedPropertyQueryCallback, 0, TestObjV8Internal::namedPropertyEnumeratorCallback);
// Custom Signature 'voidMethodWithArgs'
const int voidMethodWithArgsArgc = 3;
v8::Handle<v8::FunctionTemplate> voidMethodWithArgsArgv[voidMethodWithArgsArgc] = { v8::Handle<v8::FunctionTemplate>(), v8::Handle<v8::FunctionTemplate>(), V8PerIsolateData::from(isolate)->rawTemplate(&V8TestObject::info, currentWorldType) };
v8::Handle<v8::Signature> voidMethodWithArgsSignature = v8::Signature::New(desc, voidMethodWithArgsArgc, voidMethodWithArgsArgv);
proto->Set(v8::String::NewSymbol("voidMethodWithArgs"), v8::FunctionTemplate::New(TestObjV8Internal::voidMethodWithArgsMethodCallback, v8Undefined(), voidMethodWithArgsSignature, 3));
// Custom Signature 'longMethodWithArgs'
const int longMethodWithArgsArgc = 3;
v8::Handle<v8::FunctionTemplate> longMethodWithArgsArgv[longMethodWithArgsArgc] = { v8::Handle<v8::FunctionTemplate>(), v8::Handle<v8::FunctionTemplate>(), V8PerIsolateData::from(isolate)->rawTemplate(&V8TestObject::info, currentWorldType) };
v8::Handle<v8::Signature> longMethodWithArgsSignature = v8::Signature::New(desc, longMethodWithArgsArgc, longMethodWithArgsArgv);
proto->Set(v8::String::NewSymbol("longMethodWithArgs"), v8::FunctionTemplate::New(TestObjV8Internal::longMethodWithArgsMethodCallback, v8Undefined(), longMethodWithArgsSignature, 3));
// Custom Signature 'objMethodWithArgs'
const int objMethodWithArgsArgc = 3;
v8::Handle<v8::FunctionTemplate> objMethodWithArgsArgv[objMethodWithArgsArgc] = { v8::Handle<v8::FunctionTemplate>(), v8::Handle<v8::FunctionTemplate>(), V8PerIsolateData::from(isolate)->rawTemplate(&V8TestObject::info, currentWorldType) };
v8::Handle<v8::Signature> objMethodWithArgsSignature = v8::Signature::New(desc, objMethodWithArgsArgc, objMethodWithArgsArgv);
proto->Set(v8::String::NewSymbol("objMethodWithArgs"), v8::FunctionTemplate::New(TestObjV8Internal::objMethodWithArgsMethodCallback, v8Undefined(), objMethodWithArgsSignature, 3));
// Custom Signature 'methodThatRequiresAllArgsAndThrows'
const int methodThatRequiresAllArgsAndThrowsArgc = 2;
v8::Handle<v8::FunctionTemplate> methodThatRequiresAllArgsAndThrowsArgv[methodThatRequiresAllArgsAndThrowsArgc] = { v8::Handle<v8::FunctionTemplate>(), V8PerIsolateData::from(isolate)->rawTemplate(&V8TestObject::info, currentWorldType) };
v8::Handle<v8::Signature> methodThatRequiresAllArgsAndThrowsSignature = v8::Signature::New(desc, methodThatRequiresAllArgsAndThrowsArgc, methodThatRequiresAllArgsAndThrowsArgv);
proto->Set(v8::String::NewSymbol("methodThatRequiresAllArgsAndThrows"), v8::FunctionTemplate::New(TestObjV8Internal::methodThatRequiresAllArgsAndThrowsMethodCallback, v8Undefined(), methodThatRequiresAllArgsAndThrowsSignature, 2));
desc->Set(v8::String::NewSymbol("staticMethodWithCallbackAndOptionalArg"), v8::FunctionTemplate::New(TestObjV8Internal::staticMethodWithCallbackAndOptionalArgMethodCallback, v8Undefined(), v8::Local<v8::Signature>(), 0));
desc->Set(v8::String::NewSymbol("staticMethodWithCallbackArg"), v8::FunctionTemplate::New(TestObjV8Internal::staticMethodWithCallbackArgMethodCallback, v8Undefined(), v8::Local<v8::Signature>(), 1));
desc->Set(v8::String::NewSymbol("classMethod"), v8::FunctionTemplate::New(TestObjV8Internal::classMethodMethodCallback, v8Undefined(), v8::Local<v8::Signature>(), 0));
desc->Set(v8::String::NewSymbol("classMethodWithOptional"), v8::FunctionTemplate::New(TestObjV8Internal::classMethodWithOptionalMethodCallback, v8Undefined(), v8::Local<v8::Signature>(), 0));
desc->Set(v8::String::NewSymbol("classMethod2"), v8::FunctionTemplate::New(TestObjV8Internal::classMethod2MethodCallback, v8Undefined(), v8::Local<v8::Signature>(), 1));
#if ENABLE(Condition1)
desc->Set(v8::String::NewSymbol("overloadedMethod1"), v8::FunctionTemplate::New(TestObjV8Internal::overloadedMethod1MethodCallback, v8Undefined(), v8::Local<v8::Signature>(), 1));
#endif // ENABLE(Condition1)
if (RuntimeEnabledFeatures::enabledAtRuntimeMethod1Enabled())
proto->Set(v8::String::NewSymbol("enabledAtRuntimeMethod1"), v8::FunctionTemplate::New(TestObjV8Internal::enabledAtRuntimeMethod1MethodCallback, v8Undefined(), defaultSignature, 1));
if (RuntimeEnabledFeatures::featureNameEnabled())
proto->Set(v8::String::NewSymbol("enabledAtRuntimeMethod2"), v8::FunctionTemplate::New(TestObjV8Internal::enabledAtRuntimeMethod2MethodCallback, v8Undefined(), defaultSignature, 1));
// Custom Signature 'domStringListFunction'
const int domStringListFunctionArgc = 1;
v8::Handle<v8::FunctionTemplate> domStringListFunctionArgv[domStringListFunctionArgc] = { V8PerIsolateData::from(isolate)->rawTemplate(&V8DOMStringList::info, currentWorldType) };
v8::Handle<v8::Signature> domStringListFunctionSignature = v8::Signature::New(desc, domStringListFunctionArgc, domStringListFunctionArgv);
proto->Set(v8::String::NewSymbol("domStringListFunction"), v8::FunctionTemplate::New(TestObjV8Internal::domStringListFunctionMethodCallback, v8Undefined(), domStringListFunctionSignature, 1));
// Custom Signature 'convert1'
const int convert1Argc = 1;
v8::Handle<v8::FunctionTemplate> convert1Argv[convert1Argc] = { V8PerIsolateData::from(isolate)->rawTemplate(&V8TestNode::info, currentWorldType) };
v8::Handle<v8::Signature> convert1Signature = v8::Signature::New(desc, convert1Argc, convert1Argv);
proto->Set(v8::String::NewSymbol("convert1"), v8::FunctionTemplate::New(TestObjV8Internal::convert1MethodCallback, v8Undefined(), convert1Signature, 1));
// Custom Signature 'convert2'
const int convert2Argc = 1;
v8::Handle<v8::FunctionTemplate> convert2Argv[convert2Argc] = { V8PerIsolateData::from(isolate)->rawTemplate(&V8TestNode::info, currentWorldType) };
v8::Handle<v8::Signature> convert2Signature = v8::Signature::New(desc, convert2Argc, convert2Argv);
proto->Set(v8::String::NewSymbol("convert2"), v8::FunctionTemplate::New(TestObjV8Internal::convert2MethodCallback, v8Undefined(), convert2Signature, 1));
// Custom Signature 'convert4'
const int convert4Argc = 1;
v8::Handle<v8::FunctionTemplate> convert4Argv[convert4Argc] = { V8PerIsolateData::from(isolate)->rawTemplate(&V8TestNode::info, currentWorldType) };
v8::Handle<v8::Signature> convert4Signature = v8::Signature::New(desc, convert4Argc, convert4Argv);
proto->Set(v8::String::NewSymbol("convert4"), v8::FunctionTemplate::New(TestObjV8Internal::convert4MethodCallback, v8Undefined(), convert4Signature, 1));
// Custom Signature 'convert5'
const int convert5Argc = 1;
v8::Handle<v8::FunctionTemplate> convert5Argv[convert5Argc] = { V8PerIsolateData::from(isolate)->rawTemplate(&V8TestNode::info, currentWorldType) };
v8::Handle<v8::Signature> convert5Signature = v8::Signature::New(desc, convert5Argc, convert5Argv);
proto->Set(v8::String::NewSymbol("convert5"), v8::FunctionTemplate::New(TestObjV8Internal::convert5MethodCallback, v8Undefined(), convert5Signature, 1));
// Custom Signature 'variadicNodeMethod'
const int variadicNodeMethodArgc = 2;
v8::Handle<v8::FunctionTemplate> variadicNodeMethodArgv[variadicNodeMethodArgc] = { V8PerIsolateData::from(isolate)->rawTemplate(&V8Node::info, currentWorldType), V8PerIsolateData::from(isolate)->rawTemplate(&V8Node::info, currentWorldType) };
v8::Handle<v8::Signature> variadicNodeMethodSignature = v8::Signature::New(desc, variadicNodeMethodArgc, variadicNodeMethodArgv);
proto->Set(v8::String::NewSymbol("variadicNodeMethod"), v8::FunctionTemplate::New(TestObjV8Internal::variadicNodeMethodMethodCallback, v8Undefined(), variadicNodeMethodSignature, 2));
desc->Set(v8::String::NewSymbol("deprecatedStaticMethod"), v8::FunctionTemplate::New(TestObjV8Internal::deprecatedStaticMethodMethodCallback, v8Undefined(), v8::Local<v8::Signature>(), 0));
V8DOMConfiguration::batchConfigureConstants(desc, proto, V8TestObjectConsts, WTF_ARRAY_LENGTH(V8TestObjectConsts), isolate);
// Custom toString template
desc->Set(v8::String::NewSymbol("toString"), V8PerIsolateData::current()->toStringTemplate());
return desc;
}
v8::Handle<v8::FunctionTemplate> V8TestObject::GetTemplate(v8::Isolate* isolate, WrapperWorldType currentWorldType)
{
V8PerIsolateData* data = V8PerIsolateData::from(isolate);
V8PerIsolateData::TemplateMap::iterator result = data->templateMap(currentWorldType).find(&info);
if (result != data->templateMap(currentWorldType).end())
return result->value.newLocal(isolate);
TRACE_EVENT_SCOPED_SAMPLING_STATE("Blink", "BuildDOMTemplate");
v8::HandleScope handleScope(isolate);
v8::Handle<v8::FunctionTemplate> templ =
ConfigureV8TestObjectTemplate(data->rawTemplate(&info, currentWorldType), isolate, currentWorldType);
data->templateMap(currentWorldType).add(&info, UnsafePersistent<v8::FunctionTemplate>(isolate, templ));
return handleScope.Close(templ);
}
bool V8TestObject::HasInstance(v8::Handle<v8::Value> value, v8::Isolate* isolate, WrapperWorldType currentWorldType)
{
return V8PerIsolateData::from(isolate)->hasInstance(&info, value, currentWorldType);
}
bool V8TestObject::HasInstanceInAnyWorld(v8::Handle<v8::Value> value, v8::Isolate* isolate)
{
return V8PerIsolateData::from(isolate)->hasInstance(&info, value, MainWorld)
|| V8PerIsolateData::from(isolate)->hasInstance(&info, value, IsolatedWorld)
|| V8PerIsolateData::from(isolate)->hasInstance(&info, value, WorkerWorld);
}
void V8TestObject::installPerContextProperties(v8::Handle<v8::Object> instance, TestObj* impl, v8::Isolate* isolate)
{
v8::Local<v8::Object> proto = v8::Local<v8::Object>::Cast(instance->GetPrototype());
if (ContextFeatures::enabledPerContextAttr1Enabled(impl->document())) {
static const V8DOMConfiguration::BatchedAttribute attrData =\
// Attribute 'enabledPerContextAttr1'
{"enabledPerContextAttr1", TestObjV8Internal::enabledPerContextAttr1AttrGetterCallback, TestObjV8Internal::enabledPerContextAttr1AttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */};
V8DOMConfiguration::configureAttribute(instance, proto, attrData, isolate);
}
if (ContextFeatures::featureNameEnabled(impl->document())) {
static const V8DOMConfiguration::BatchedAttribute attrData =\
// Attribute 'enabledPerContextAttr2'
{"enabledPerContextAttr2", TestObjV8Internal::enabledPerContextAttr2AttrGetterCallback, TestObjV8Internal::enabledPerContextAttr2AttrSetterCallback, 0, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */};
V8DOMConfiguration::configureAttribute(instance, proto, attrData, isolate);
}
}
void V8TestObject::installPerContextPrototypeProperties(v8::Handle<v8::Object> proto, v8::Isolate* isolate)
{
UNUSED_PARAM(proto);
v8::Local<v8::Signature> defaultSignature = v8::Signature::New(GetTemplate(isolate, worldType(isolate)));
UNUSED_PARAM(defaultSignature); // In some cases, it will not be used.
ScriptExecutionContext* context = toScriptExecutionContext(proto->CreationContext());
if (context && context->isDocument() && ContextFeatures::enabledPerContextMethod1Enabled(toDocument(context)))
proto->Set(v8::String::NewSymbol("enabledPerContextMethod1"), v8::FunctionTemplate::New(TestObjV8Internal::enabledPerContextMethod1MethodCallback, v8Undefined(), defaultSignature, 1)->GetFunction());
if (context && context->isDocument() && ContextFeatures::featureNameEnabled(toDocument(context)))
proto->Set(v8::String::NewSymbol("enabledPerContextMethod2"), v8::FunctionTemplate::New(TestObjV8Internal::enabledPerContextMethod2MethodCallback, v8Undefined(), defaultSignature, 1)->GetFunction());
}
v8::Handle<v8::Object> V8TestObject::createWrapper(PassRefPtr<TestObj> impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
{
ASSERT(impl.get());
ASSERT(DOMDataStore::getWrapper<V8TestObject>(impl.get(), isolate).IsEmpty());
v8::Handle<v8::Object> wrapper = V8DOMWrapper::createWrapper(creationContext, &info, toInternalPointer(impl.get()), isolate);
if (UNLIKELY(wrapper.IsEmpty()))
return wrapper;
installPerContextProperties(wrapper, impl.get(), isolate);
V8DOMWrapper::associateObjectWithWrapper<V8TestObject>(impl, &info, wrapper, isolate, WrapperConfiguration::Independent);
return wrapper;
}
void V8TestObject::derefObject(void* object)
{
fromInternalPointer(object)->deref();
}
} // namespace WebCore