blob: 492528e87c08ed158c30b66065e17f404726a9d1 [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 "V8EventTarget.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/ExceptionMessages.h"
#include "bindings/v8/ExceptionState.h"
#include "bindings/v8/ScriptController.h"
#include "bindings/v8/ScriptValue.h"
#include "bindings/v8/SerializedScriptValue.h"
#include "bindings/v8/V8AbstractEventListener.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 "bindings/v8/custom/V8Float32ArrayCustom.h"
#include "core/dom/ContextFeatures.h"
#include "core/dom/Document.h"
#include "core/dom/ExceptionCode.h"
#include "core/dom/custom/CustomElementCallbackDispatcher.h"
#include "core/frame/DOMWindow.h"
#include "core/page/UseCounter.h"
#include "core/svg/properties/SVGPropertyTearOff.h"
#include "core/svg/properties/SVGStaticPropertyTearOff.h"
#include "platform/TraceEvent.h"
#include "wtf/GetPtr.h"
#include "wtf/RefPtr.h"
#include "wtf/UnusedParam.h"
namespace WebCore {
static void initializeScriptWrappableForInterface(TestObj* object)
{
if (ScriptWrappable::wrapperCanBeStoredInObject(object))
ScriptWrappable::setTypeInfoInObject(object, &V8TestObject::wrapperTypeInfo);
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 {
const WrapperTypeInfo V8TestObject::wrapperTypeInfo = { V8TestObject::GetTemplate, V8TestObject::derefObject, 0, V8TestObject::toEventTarget, 0, V8TestObject::installPerContextEnabledPrototypeProperties, &V8EventTarget::wrapperTypeInfo, WrapperTypeObjectPrototype };
namespace TestObjV8Internal {
template <typename T> void V8_USE(T) { }
static void readOnlyLongAttrAttributeGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
v8SetReturnValueInt(info, imp->readOnlyLongAttr());
}
static void readOnlyLongAttrAttributeGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::readOnlyLongAttrAttributeGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void readOnlyStringAttrAttributeGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
v8SetReturnValueString(info, imp->readOnlyStringAttr(), info.GetIsolate());
}
static void readOnlyStringAttrAttributeGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::readOnlyStringAttrAttributeGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void readOnlyTestObjectAttrAttributeGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
RefPtr<TestObj> result = imp->readOnlyTestObjectAttr();
if (result && DOMDataStore::setReturnValueFromWrapper<V8TestObject>(info.GetReturnValue(), result.get()))
return;
v8::Handle<v8::Value> wrapper = toV8(result.get(), info.Holder(), info.GetIsolate());
if (!wrapper.IsEmpty()) {
V8HiddenPropertyName::setNamedHiddenReference(info.Holder(), "readOnlyTestObjectAttr", wrapper);
v8SetReturnValue(info, wrapper);
}
}
static void readOnlyTestObjectAttrAttributeGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::readOnlyTestObjectAttrAttributeGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void staticReadOnlyLongAttrAttributeGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
v8SetReturnValueInt(info, TestObj::staticReadOnlyLongAttr());
}
static void staticReadOnlyLongAttrAttributeGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::staticReadOnlyLongAttrAttributeGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void staticStringAttrAttributeGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
v8SetReturnValueString(info, TestObj::staticStringAttr(), info.GetIsolate());
}
static void staticStringAttrAttributeGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::staticStringAttrAttributeGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void staticStringAttrAttributeSetter(v8::Local<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue);
TestObj::setStaticStringAttr(cppValue);
}
static void staticStringAttrAttributeSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
TestObjV8Internal::staticStringAttrAttributeSetter(name, jsValue, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void enumAttrAttributeGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
v8SetReturnValueString(info, imp->enumAttr(), info.GetIsolate());
}
static void enumAttrAttributeGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::enumAttrAttributeGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void enumAttrAttributeSetter(v8::Local<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue);
String string = cppValue;
if (!(string == "" || string == "EnumValue1" || string == "EnumValue2" || string == "EnumValue3"))
return;
imp->setEnumAttr(cppValue);
}
static void enumAttrAttributeSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
TestObjV8Internal::enumAttrAttributeSetter(name, jsValue, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void readOnlyEnumAttrAttributeGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
v8SetReturnValueString(info, imp->readOnlyEnumAttr(), info.GetIsolate());
}
static void readOnlyEnumAttrAttributeGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::readOnlyEnumAttrAttributeGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void byteAttrAttributeGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
v8SetReturnValueInt(info, imp->byteAttr());
}
static void byteAttrAttributeGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::byteAttrAttributeGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void byteAttrAttributeSetter(v8::Local<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
V8TRYCATCH_VOID(int, cppValue, toInt8(jsValue));
imp->setByteAttr(cppValue);
}
static void byteAttrAttributeSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
TestObjV8Internal::byteAttrAttributeSetter(name, jsValue, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void octetAttrAttributeGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
v8SetReturnValueUnsigned(info, imp->octetAttr());
}
static void octetAttrAttributeGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::octetAttrAttributeGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void octetAttrAttributeSetter(v8::Local<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
V8TRYCATCH_VOID(unsigned, cppValue, toUInt8(jsValue));
imp->setOctetAttr(cppValue);
}
static void octetAttrAttributeSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
TestObjV8Internal::octetAttrAttributeSetter(name, jsValue, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void shortAttrAttributeGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
v8SetReturnValueInt(info, imp->shortAttr());
}
static void shortAttrAttributeGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::shortAttrAttributeGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void shortAttrAttributeSetter(v8::Local<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue));
imp->setShortAttr(cppValue);
}
static void shortAttrAttributeSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
TestObjV8Internal::shortAttrAttributeSetter(name, jsValue, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void unsignedShortAttrAttributeGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
v8SetReturnValueUnsigned(info, imp->unsignedShortAttr());
}
static void unsignedShortAttrAttributeGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::unsignedShortAttrAttributeGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void unsignedShortAttrAttributeSetter(v8::Local<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
V8TRYCATCH_VOID(unsigned, cppValue, toUInt32(jsValue));
imp->setUnsignedShortAttr(cppValue);
}
static void unsignedShortAttrAttributeSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
TestObjV8Internal::unsignedShortAttrAttributeSetter(name, jsValue, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void longAttrAttributeGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
v8SetReturnValueInt(info, imp->longAttr());
}
static void longAttrAttributeGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::longAttrAttributeGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void longAttrAttributeSetter(v8::Local<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue));
imp->setLongAttr(cppValue);
}
static void longAttrAttributeSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
TestObjV8Internal::longAttrAttributeSetter(name, jsValue, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void longLongAttrAttributeGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
v8SetReturnValue(info, static_cast<double>(imp->longLongAttr()));
}
static void longLongAttrAttributeGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::longLongAttrAttributeGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void longLongAttrAttributeSetter(v8::Local<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
V8TRYCATCH_VOID(long long, cppValue, toInt64(jsValue));
imp->setLongLongAttr(cppValue);
}
static void longLongAttrAttributeSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
TestObjV8Internal::longLongAttrAttributeSetter(name, jsValue, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void unsignedLongLongAttrAttributeGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
v8SetReturnValue(info, static_cast<double>(imp->unsignedLongLongAttr()));
}
static void unsignedLongLongAttrAttributeGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::unsignedLongLongAttrAttributeGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void unsignedLongLongAttrAttributeSetter(v8::Local<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
V8TRYCATCH_VOID(unsigned long long, cppValue, toUInt64(jsValue));
imp->setUnsignedLongLongAttr(cppValue);
}
static void unsignedLongLongAttrAttributeSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
TestObjV8Internal::unsignedLongLongAttrAttributeSetter(name, jsValue, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void stringAttrAttributeGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
v8SetReturnValueString(info, imp->stringAttr(), info.GetIsolate());
}
static void stringAttrAttributeGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::stringAttrAttributeGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void stringAttrAttributeSetter(v8::Local<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue);
imp->setStringAttr(cppValue);
}
static void stringAttrAttributeSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
TestObjV8Internal::stringAttrAttributeSetter(name, jsValue, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void eventHandlerAttrAttributeGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
EventListener* jsValue = imp->eventHandlerAttr(isolatedWorldForIsolate(info.GetIsolate()));
v8SetReturnValue(info, jsValue ? v8::Handle<v8::Value>(V8AbstractEventListener::cast(jsValue)->getListenerObject(imp->executionContext())) : v8::Handle<v8::Value>(v8::Null(info.GetIsolate())));
}
static void eventHandlerAttrAttributeGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::eventHandlerAttrAttributeGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void eventHandlerAttrAttributeSetter(v8::Local<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
transferHiddenDependency(info.Holder(), imp->eventHandlerAttr(isolatedWorldForIsolate(info.GetIsolate())), jsValue, V8TestObject::eventListenerCacheIndex, info.GetIsolate());
imp->setEventHandlerAttr(V8EventListenerList::getEventListener(jsValue, true, ListenerFindOrCreate), isolatedWorldForIsolate(info.GetIsolate()));
}
static void eventHandlerAttrAttributeSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
TestObjV8Internal::eventHandlerAttrAttributeSetter(name, jsValue, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void testObjAttrAttributeGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
v8SetReturnValueFast(info, imp->testObjAttr(), imp);
}
static void testObjAttrAttributeGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
UseCounter::count(activeDOMWindow(), UseCounter::TestFeature);
TestObjV8Internal::testObjAttrAttributeGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void testObjAttrAttributeSetter(v8::Local<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
V8TRYCATCH_VOID(TestObj*, cppValue, V8TestObject::HasInstance(jsValue, info.GetIsolate(), worldType(info.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8::Object>::Cast(jsValue)) : 0);
imp->setTestObjAttr(WTF::getPtr(cppValue));
}
static void testObjAttrAttributeSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
UseCounter::count(activeDOMWindow(), UseCounter::TestFeature);
TestObjV8Internal::testObjAttrAttributeSetter(name, jsValue, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void XMLObjAttrAttributeGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
v8SetReturnValueFast(info, imp->xmlObjAttr(), imp);
}
static void XMLObjAttrAttributeGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::XMLObjAttrAttributeGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void XMLObjAttrAttributeSetter(v8::Local<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
V8TRYCATCH_VOID(TestObj*, cppValue, V8TestObject::HasInstance(jsValue, info.GetIsolate(), worldType(info.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8::Object>::Cast(jsValue)) : 0);
imp->setXMLObjAttr(WTF::getPtr(cppValue));
}
static void XMLObjAttrAttributeSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
TestObjV8Internal::XMLObjAttrAttributeSetter(name, jsValue, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void createAttributeGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
v8SetReturnValueBool(info, imp->isCreate());
}
static void createAttributeGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::createAttributeGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void createAttributeSetter(v8::Local<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
V8TRYCATCH_VOID(bool, cppValue, jsValue->BooleanValue());
imp->setCreate(cppValue);
}
static void createAttributeSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
TestObjV8Internal::createAttributeSetter(name, jsValue, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void reflectedStringAttrAttributeGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
v8SetReturnValueString(info, imp->fastGetAttribute(HTMLNames::reflectedstringattrAttr), info.GetIsolate());
}
static void reflectedStringAttrAttributeGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::reflectedStringAttrAttributeGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void reflectedStringAttrAttributeSetter(v8::Local<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithNullCheck>, cppValue, jsValue);
CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
imp->setAttribute(HTMLNames::reflectedstringattrAttr, cppValue);
}
static void reflectedStringAttrAttributeSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
TestObjV8Internal::reflectedStringAttrAttributeSetter(name, jsValue, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void reflectedIntegralAttrAttributeGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
v8SetReturnValueInt(info, imp->getIntegralAttribute(HTMLNames::reflectedintegralattrAttr));
}
static void reflectedIntegralAttrAttributeGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::reflectedIntegralAttrAttributeGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void reflectedIntegralAttrAttributeSetter(v8::Local<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue));
CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
imp->setIntegralAttribute(HTMLNames::reflectedintegralattrAttr, cppValue);
}
static void reflectedIntegralAttrAttributeSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
TestObjV8Internal::reflectedIntegralAttrAttributeSetter(name, jsValue, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void reflectedUnsignedIntegralAttrAttributeGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
v8SetReturnValueUnsigned(info, std::max(0, imp->getIntegralAttribute(HTMLNames::reflectedunsignedintegralattrAttr)));
}
static void reflectedUnsignedIntegralAttrAttributeGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::reflectedUnsignedIntegralAttrAttributeGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void reflectedUnsignedIntegralAttrAttributeSetter(v8::Local<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
V8TRYCATCH_VOID(unsigned, cppValue, toUInt32(jsValue));
CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
imp->setUnsignedIntegralAttribute(HTMLNames::reflectedunsignedintegralattrAttr, cppValue);
}
static void reflectedUnsignedIntegralAttrAttributeSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
TestObjV8Internal::reflectedUnsignedIntegralAttrAttributeSetter(name, jsValue, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void reflectedBooleanAttrAttributeGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
v8SetReturnValueBool(info, imp->fastHasAttribute(HTMLNames::reflectedbooleanattrAttr));
}
static void reflectedBooleanAttrAttributeGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::reflectedBooleanAttrAttributeGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void reflectedBooleanAttrAttributeSetter(v8::Local<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
V8TRYCATCH_VOID(bool, cppValue, jsValue->BooleanValue());
CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
imp->setBooleanAttribute(HTMLNames::reflectedbooleanattrAttr, cppValue);
}
static void reflectedBooleanAttrAttributeSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
TestObjV8Internal::reflectedBooleanAttrAttributeSetter(name, jsValue, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void reflectedURLAttrAttributeGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
v8SetReturnValueString(info, imp->getURLAttribute(HTMLNames::reflectedurlattrAttr), info.GetIsolate());
}
static void reflectedURLAttrAttributeGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::reflectedURLAttrAttributeGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void reflectedURLAttrAttributeSetter(v8::Local<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithNullCheck>, cppValue, jsValue);
CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
imp->setAttribute(HTMLNames::reflectedurlattrAttr, cppValue);
}
static void reflectedURLAttrAttributeSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
TestObjV8Internal::reflectedURLAttrAttributeSetter(name, jsValue, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void reflectedStringAttrAttributeGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
v8SetReturnValueString(info, imp->fastGetAttribute(HTMLNames::customContentStringAttrAttr), info.GetIsolate());
}
static void reflectedStringAttrAttributeGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::reflectedStringAttrAttributeGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void reflectedStringAttrAttributeSetter(v8::Local<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithNullCheck>, cppValue, jsValue);
CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
imp->setAttribute(HTMLNames::customContentStringAttrAttr, cppValue);
}
static void reflectedStringAttrAttributeSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
TestObjV8Internal::reflectedStringAttrAttributeSetter(name, jsValue, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void reflectedCustomIntegralAttrAttributeGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
v8SetReturnValueInt(info, imp->getIntegralAttribute(HTMLNames::customContentIntegralAttrAttr));
}
static void reflectedCustomIntegralAttrAttributeGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::reflectedCustomIntegralAttrAttributeGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void reflectedCustomIntegralAttrAttributeSetter(v8::Local<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue));
CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
imp->setIntegralAttribute(HTMLNames::customContentIntegralAttrAttr, cppValue);
}
static void reflectedCustomIntegralAttrAttributeSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
TestObjV8Internal::reflectedCustomIntegralAttrAttributeSetter(name, jsValue, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void reflectedCustomBooleanAttrAttributeGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
v8SetReturnValueBool(info, imp->fastHasAttribute(HTMLNames::customContentBooleanAttrAttr));
}
static void reflectedCustomBooleanAttrAttributeGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::reflectedCustomBooleanAttrAttributeGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void reflectedCustomBooleanAttrAttributeSetter(v8::Local<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
V8TRYCATCH_VOID(bool, cppValue, jsValue->BooleanValue());
CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
imp->setBooleanAttribute(HTMLNames::customContentBooleanAttrAttr, cppValue);
}
static void reflectedCustomBooleanAttrAttributeSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
TestObjV8Internal::reflectedCustomBooleanAttrAttributeSetter(name, jsValue, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void reflectedCustomURLAttrAttributeGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
v8SetReturnValueString(info, imp->getURLAttribute(HTMLNames::customContentURLAttrAttr), info.GetIsolate());
}
static void reflectedCustomURLAttrAttributeGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::reflectedCustomURLAttrAttributeGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void reflectedCustomURLAttrAttributeSetter(v8::Local<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithNullCheck>, cppValue, jsValue);
CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
imp->setAttribute(HTMLNames::customContentURLAttrAttr, cppValue);
}
static void reflectedCustomURLAttrAttributeSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
TestObjV8Internal::reflectedCustomURLAttrAttributeSetter(name, jsValue, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void typedArrayAttrAttributeGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
v8SetReturnValueFast(info, imp->typedArrayAttr(), imp);
}
static void typedArrayAttrAttributeGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::typedArrayAttrAttributeGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void typedArrayAttrAttributeSetter(v8::Local<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
V8TRYCATCH_VOID(Float32Array*, cppValue, jsValue->IsFloat32Array() ? V8Float32Array::toNative(v8::Handle<v8::Float32Array>::Cast(jsValue)) : 0);
imp->setTypedArrayAttr(WTF::getPtr(cppValue));
}
static void typedArrayAttrAttributeSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
TestObjV8Internal::typedArrayAttrAttributeSetter(name, jsValue, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void attrWithGetterExceptionAttributeGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
ExceptionState es(info.GetIsolate());
int jsValue = imp->attrWithGetterException(es);
if (UNLIKELY(es.throwIfNeeded()))
return;
v8SetReturnValueInt(info, jsValue);
}
static void attrWithGetterExceptionAttributeGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::attrWithGetterExceptionAttributeGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void attrWithGetterExceptionAttributeSetter(v8::Local<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue));
imp->setAttrWithGetterException(cppValue);
}
static void attrWithGetterExceptionAttributeSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
TestObjV8Internal::attrWithGetterExceptionAttributeSetter(name, jsValue, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void attrWithSetterExceptionAttributeGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
v8SetReturnValueInt(info, imp->attrWithSetterException());
}
static void attrWithSetterExceptionAttributeGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::attrWithSetterExceptionAttributeGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void attrWithSetterExceptionAttributeSetter(v8::Local<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue));
ExceptionState es(info.GetIsolate());
imp->setAttrWithSetterException(cppValue, es);
es.throwIfNeeded();
}
static void attrWithSetterExceptionAttributeSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
TestObjV8Internal::attrWithSetterExceptionAttributeSetter(name, jsValue, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void stringAttrWithGetterExceptionAttributeGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
ExceptionState es(info.GetIsolate());
String jsValue = imp->stringAttrWithGetterException(es);
if (UNLIKELY(es.throwIfNeeded()))
return;
v8SetReturnValueString(info, jsValue, info.GetIsolate());
}
static void stringAttrWithGetterExceptionAttributeGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::stringAttrWithGetterExceptionAttributeGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void stringAttrWithGetterExceptionAttributeSetter(v8::Local<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue);
imp->setStringAttrWithGetterException(cppValue);
}
static void stringAttrWithGetterExceptionAttributeSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
TestObjV8Internal::stringAttrWithGetterExceptionAttributeSetter(name, jsValue, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void stringAttrWithSetterExceptionAttributeGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
v8SetReturnValueString(info, imp->stringAttrWithSetterException(), info.GetIsolate());
}
static void stringAttrWithSetterExceptionAttributeGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::stringAttrWithSetterExceptionAttributeGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void stringAttrWithSetterExceptionAttributeSetter(v8::Local<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue);
ExceptionState es(info.GetIsolate());
imp->setStringAttrWithSetterException(cppValue, es);
es.throwIfNeeded();
}
static void stringAttrWithSetterExceptionAttributeSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
TestObjV8Internal::stringAttrWithSetterExceptionAttributeSetter(name, jsValue, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void customAttrAttributeGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
V8TestObject::customAttrAttributeGetterCustom(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void customAttrAttributeSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
V8TestObject::customAttrAttributeSetterCustom(name, jsValue, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void withScriptStateAttributeAttributeGetter(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));
}
static void withScriptStateAttributeAttributeGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::withScriptStateAttributeAttributeGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void withScriptStateAttributeAttributeSetter(v8::Local<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue));
ScriptState* currentState = ScriptState::current();
if (!currentState)
return;
ScriptState& state = *currentState;
imp->setWithScriptStateAttribute(&state, cppValue);
if (state.hadException())
throwError(state.exception(), info.GetIsolate());
}
static void withScriptStateAttributeAttributeSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
TestObjV8Internal::withScriptStateAttributeAttributeSetter(name, jsValue, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void withExecutionContextAttributeAttributeGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
ExecutionContext* scriptContext = getExecutionContext();
v8SetReturnValueFast(info, imp->withExecutionContextAttribute(scriptContext), imp);
}
static void withExecutionContextAttributeAttributeGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::withExecutionContextAttributeAttributeGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void withExecutionContextAttributeAttributeSetter(v8::Local<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
V8TRYCATCH_VOID(TestObj*, cppValue, V8TestObject::HasInstance(jsValue, info.GetIsolate(), worldType(info.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8::Object>::Cast(jsValue)) : 0);
ExecutionContext* scriptContext = getExecutionContext();
imp->setWithExecutionContextAttribute(scriptContext, WTF::getPtr(cppValue));
}
static void withExecutionContextAttributeAttributeSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
TestObjV8Internal::withExecutionContextAttributeAttributeSetter(name, jsValue, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void withActiveWindowAndFirstWindowAttributeAttributeGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
v8SetReturnValueFast(info, imp->withActiveWindowAndFirstWindowAttribute(), imp);
}
static void withActiveWindowAndFirstWindowAttributeAttributeGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::withActiveWindowAndFirstWindowAttributeAttributeGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void withActiveWindowAndFirstWindowAttributeAttributeSetter(v8::Local<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
V8TRYCATCH_VOID(TestObj*, cppValue, V8TestObject::HasInstance(jsValue, info.GetIsolate(), worldType(info.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8::Object>::Cast(jsValue)) : 0);
imp->setWithActiveWindowAndFirstWindowAttribute(activeDOMWindow(), firstDOMWindow(), WTF::getPtr(cppValue));
}
static void withActiveWindowAndFirstWindowAttributeAttributeSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
TestObjV8Internal::withActiveWindowAndFirstWindowAttributeAttributeSetter(name, jsValue, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void withScriptStateAttributeRaisesAttributeGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
ExceptionState es(info.GetIsolate());
ScriptState* currentState = ScriptState::current();
if (!currentState)
return v8Undefined();
ScriptState& state = *currentState;
RefPtr<TestObj> jsValue = imp->withScriptStateAttributeRaises(&state, es);
if (UNLIKELY(es.throwIfNeeded()))
return;
if (state.hadException()) {
throwError(state.exception(), info.GetIsolate());
return;
}
v8SetReturnValueFast(info, jsValue.release(), imp);
}
static void withScriptStateAttributeRaisesAttributeGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::withScriptStateAttributeRaisesAttributeGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void withScriptStateAttributeRaisesAttributeSetter(v8::Local<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
V8TRYCATCH_VOID(TestObj*, cppValue, V8TestObject::HasInstance(jsValue, info.GetIsolate(), worldType(info.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8::Object>::Cast(jsValue)) : 0);
ScriptState* currentState = ScriptState::current();
if (!currentState)
return;
ScriptState& state = *currentState;
imp->setWithScriptStateAttributeRaises(&state, WTF::getPtr(cppValue));
if (state.hadException())
throwError(state.exception(), info.GetIsolate());
}
static void withScriptStateAttributeRaisesAttributeSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
TestObjV8Internal::withScriptStateAttributeRaisesAttributeSetter(name, jsValue, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void withExecutionContextAttributeRaisesAttributeGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
ExceptionState es(info.GetIsolate());
ExecutionContext* scriptContext = getExecutionContext();
RefPtr<TestObj> jsValue = imp->withExecutionContextAttributeRaises(scriptContext, es);
if (UNLIKELY(es.throwIfNeeded()))
return;
v8SetReturnValueFast(info, jsValue.release(), imp);
}
static void withExecutionContextAttributeRaisesAttributeGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::withExecutionContextAttributeRaisesAttributeGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void withExecutionContextAttributeRaisesAttributeSetter(v8::Local<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
V8TRYCATCH_VOID(TestObj*, cppValue, V8TestObject::HasInstance(jsValue, info.GetIsolate(), worldType(info.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8::Object>::Cast(jsValue)) : 0);
ExecutionContext* scriptContext = getExecutionContext();
imp->setWithExecutionContextAttributeRaises(scriptContext, WTF::getPtr(cppValue));
}
static void withExecutionContextAttributeRaisesAttributeSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
TestObjV8Internal::withExecutionContextAttributeRaisesAttributeSetter(name, jsValue, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void withExecutionContextAndScriptStateAttributeAttributeGetter(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;
ExecutionContext* scriptContext = getExecutionContext();
v8SetReturnValueFast(info, imp->withExecutionContextAndScriptStateAttribute(&state, scriptContext), imp);
}
static void withExecutionContextAndScriptStateAttributeAttributeGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::withExecutionContextAndScriptStateAttributeAttributeGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void withExecutionContextAndScriptStateAttributeAttributeSetter(v8::Local<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
V8TRYCATCH_VOID(TestObj*, cppValue, V8TestObject::HasInstance(jsValue, info.GetIsolate(), worldType(info.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8::Object>::Cast(jsValue)) : 0);
ScriptState* currentState = ScriptState::current();
if (!currentState)
return;
ScriptState& state = *currentState;
ExecutionContext* scriptContext = getExecutionContext();
imp->setWithExecutionContextAndScriptStateAttribute(&state, scriptContext, WTF::getPtr(cppValue));
if (state.hadException())
throwError(state.exception(), info.GetIsolate());
}
static void withExecutionContextAndScriptStateAttributeAttributeSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
TestObjV8Internal::withExecutionContextAndScriptStateAttributeAttributeSetter(name, jsValue, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void withExecutionContextAndScriptStateAttributeRaisesAttributeGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
ExceptionState es(info.GetIsolate());
ScriptState* currentState = ScriptState::current();
if (!currentState)
return v8Undefined();
ScriptState& state = *currentState;
ExecutionContext* scriptContext = getExecutionContext();
RefPtr<TestObj> jsValue = imp->withExecutionContextAndScriptStateAttributeRaises(&state, scriptContext, es);
if (UNLIKELY(es.throwIfNeeded()))
return;
if (state.hadException()) {
throwError(state.exception(), info.GetIsolate());
return;
}
v8SetReturnValueFast(info, jsValue.release(), imp);
}
static void withExecutionContextAndScriptStateAttributeRaisesAttributeGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::withExecutionContextAndScriptStateAttributeRaisesAttributeGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void withExecutionContextAndScriptStateAttributeRaisesAttributeSetter(v8::Local<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
V8TRYCATCH_VOID(TestObj*, cppValue, V8TestObject::HasInstance(jsValue, info.GetIsolate(), worldType(info.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8::Object>::Cast(jsValue)) : 0);
ScriptState* currentState = ScriptState::current();
if (!currentState)
return;
ScriptState& state = *currentState;
ExecutionContext* scriptContext = getExecutionContext();
imp->setWithExecutionContextAndScriptStateAttributeRaises(&state, scriptContext, WTF::getPtr(cppValue));
if (state.hadException())
throwError(state.exception(), info.GetIsolate());
}
static void withExecutionContextAndScriptStateAttributeRaisesAttributeSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
TestObjV8Internal::withExecutionContextAndScriptStateAttributeRaisesAttributeSetter(name, jsValue, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void withExecutionContextAndScriptStateWithSpacesAttributeAttributeGetter(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;
ExecutionContext* scriptContext = getExecutionContext();
v8SetReturnValueFast(info, imp->withExecutionContextAndScriptStateWithSpacesAttribute(&state, scriptContext), imp);
}
static void withExecutionContextAndScriptStateWithSpacesAttributeAttributeGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::withExecutionContextAndScriptStateWithSpacesAttributeAttributeGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void withExecutionContextAndScriptStateWithSpacesAttributeAttributeSetter(v8::Local<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
V8TRYCATCH_VOID(TestObj*, cppValue, V8TestObject::HasInstance(jsValue, info.GetIsolate(), worldType(info.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8::Object>::Cast(jsValue)) : 0);
ScriptState* currentState = ScriptState::current();
if (!currentState)
return;
ScriptState& state = *currentState;
ExecutionContext* scriptContext = getExecutionContext();
imp->setWithExecutionContextAndScriptStateWithSpacesAttribute(&state, scriptContext, WTF::getPtr(cppValue));
if (state.hadException())
throwError(state.exception(), info.GetIsolate());
}
static void withExecutionContextAndScriptStateWithSpacesAttributeAttributeSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
TestObjV8Internal::withExecutionContextAndScriptStateWithSpacesAttributeAttributeSetter(name, jsValue, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void enforcedRangeByteAttrAttributeGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
v8SetReturnValueInt(info, imp->enforcedRangeByteAttr());
}
static void enforcedRangeByteAttrAttributeGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::enforcedRangeByteAttrAttributeGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void enforcedRangeByteAttrAttributeSetter(v8::Local<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
V8TRYCATCH_WITH_TYPECHECK_VOID(int, cppValue, toInt8(jsValue, EnforceRange, ok), info.GetIsolate());
imp->setEnforcedRangeByteAttr(cppValue);
}
static void enforcedRangeByteAttrAttributeSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
TestObjV8Internal::enforcedRangeByteAttrAttributeSetter(name, jsValue, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void enforcedRangeOctetAttrAttributeGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
v8SetReturnValueUnsigned(info, imp->enforcedRangeOctetAttr());
}
static void enforcedRangeOctetAttrAttributeGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::enforcedRangeOctetAttrAttributeGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void enforcedRangeOctetAttrAttributeSetter(v8::Local<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
V8TRYCATCH_WITH_TYPECHECK_VOID(unsigned, cppValue, toUInt8(jsValue, EnforceRange, ok), info.GetIsolate());
imp->setEnforcedRangeOctetAttr(cppValue);
}
static void enforcedRangeOctetAttrAttributeSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
TestObjV8Internal::enforcedRangeOctetAttrAttributeSetter(name, jsValue, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void enforcedRangeLongAttrAttributeGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
v8SetReturnValueInt(info, imp->enforcedRangeLongAttr());
}
static void enforcedRangeLongAttrAttributeGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::enforcedRangeLongAttrAttributeGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void enforcedRangeLongAttrAttributeSetter(v8::Local<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
V8TRYCATCH_WITH_TYPECHECK_VOID(int, cppValue, toInt32(jsValue, EnforceRange, ok), info.GetIsolate());
imp->setEnforcedRangeLongAttr(cppValue);
}
static void enforcedRangeLongAttrAttributeSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
TestObjV8Internal::enforcedRangeLongAttrAttributeSetter(name, jsValue, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void enforcedRangeUnsignedLongAttrAttributeGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
v8SetReturnValueUnsigned(info, imp->enforcedRangeUnsignedLongAttr());
}
static void enforcedRangeUnsignedLongAttrAttributeGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::enforcedRangeUnsignedLongAttrAttributeGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void enforcedRangeUnsignedLongAttrAttributeSetter(v8::Local<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
V8TRYCATCH_WITH_TYPECHECK_VOID(unsigned, cppValue, toUInt32(jsValue, EnforceRange, ok), info.GetIsolate());
imp->setEnforcedRangeUnsignedLongAttr(cppValue);
}
static void enforcedRangeUnsignedLongAttrAttributeSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
TestObjV8Internal::enforcedRangeUnsignedLongAttrAttributeSetter(name, jsValue, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void enforcedRangeLongLongAttrAttributeGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
v8SetReturnValue(info, static_cast<double>(imp->enforcedRangeLongLongAttr()));
}
static void enforcedRangeLongLongAttrAttributeGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::enforcedRangeLongLongAttrAttributeGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void enforcedRangeLongLongAttrAttributeSetter(v8::Local<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
V8TRYCATCH_WITH_TYPECHECK_VOID(long long, cppValue, toInt64(jsValue, EnforceRange, ok), info.GetIsolate());
imp->setEnforcedRangeLongLongAttr(cppValue);
}
static void enforcedRangeLongLongAttrAttributeSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
TestObjV8Internal::enforcedRangeLongLongAttrAttributeSetter(name, jsValue, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void enforcedRangeUnsignedLongLongAttrAttributeGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
v8SetReturnValue(info, static_cast<double>(imp->enforcedRangeUnsignedLongLongAttr()));
}
static void enforcedRangeUnsignedLongLongAttrAttributeGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::enforcedRangeUnsignedLongLongAttrAttributeGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void enforcedRangeUnsignedLongLongAttrAttributeSetter(v8::Local<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
V8TRYCATCH_WITH_TYPECHECK_VOID(unsigned long long, cppValue, toUInt64(jsValue, EnforceRange, ok), info.GetIsolate());
imp->setEnforcedRangeUnsignedLongLongAttr(cppValue);
}
static void enforcedRangeUnsignedLongLongAttrAttributeSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
TestObjV8Internal::enforcedRangeUnsignedLongLongAttrAttributeSetter(name, jsValue, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
#if ENABLE(Condition1)
static void conditionalAttr1AttributeGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
v8SetReturnValueInt(info, imp->conditionalAttr1());
}
#endif // ENABLE(Condition1)
#if ENABLE(Condition1)
static void conditionalAttr1AttributeGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::conditionalAttr1AttributeGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
#endif // ENABLE(Condition1)
#if ENABLE(Condition1)
static void conditionalAttr1AttributeSetter(v8::Local<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue));
imp->setConditionalAttr1(cppValue);
}
#endif // ENABLE(Condition1)
#if ENABLE(Condition1)
static void conditionalAttr1AttributeSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
TestObjV8Internal::conditionalAttr1AttributeSetter(name, jsValue, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
#endif // ENABLE(Condition1)
#if ENABLE(Condition1) && ENABLE(Condition2)
static void conditionalAttr2AttributeGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
v8SetReturnValueInt(info, imp->conditionalAttr2());
}
#endif // ENABLE(Condition1) && ENABLE(Condition2)
#if ENABLE(Condition1) && ENABLE(Condition2)
static void conditionalAttr2AttributeGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::conditionalAttr2AttributeGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
#endif // ENABLE(Condition1) && ENABLE(Condition2)
#if ENABLE(Condition1) && ENABLE(Condition2)
static void conditionalAttr2AttributeSetter(v8::Local<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue));
imp->setConditionalAttr2(cppValue);
}
#endif // ENABLE(Condition1) && ENABLE(Condition2)
#if ENABLE(Condition1) && ENABLE(Condition2)
static void conditionalAttr2AttributeSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
TestObjV8Internal::conditionalAttr2AttributeSetter(name, jsValue, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
#endif // ENABLE(Condition1) && ENABLE(Condition2)
#if ENABLE(Condition1) || ENABLE(Condition2)
static void conditionalAttr3AttributeGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
v8SetReturnValueInt(info, imp->conditionalAttr3());
}
#endif // ENABLE(Condition1) || ENABLE(Condition2)
#if ENABLE(Condition1) || ENABLE(Condition2)
static void conditionalAttr3AttributeGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::conditionalAttr3AttributeGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
#endif // ENABLE(Condition1) || ENABLE(Condition2)
#if ENABLE(Condition1) || ENABLE(Condition2)
static void conditionalAttr3AttributeSetter(v8::Local<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue));
imp->setConditionalAttr3(cppValue);
}
#endif // ENABLE(Condition1) || ENABLE(Condition2)
#if ENABLE(Condition1) || ENABLE(Condition2)
static void conditionalAttr3AttributeSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
TestObjV8Internal::conditionalAttr3AttributeSetter(name, jsValue, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
#endif // ENABLE(Condition1) || ENABLE(Condition2)
static void cachedAttribute1AttributeGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
v8SetReturnValue(info, imp->cachedAttribute1().v8Value());
}
static void cachedAttribute1AttributeGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::cachedAttribute1AttributeGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void cachedAttribute2AttributeGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
v8SetReturnValue(info, imp->cachedAttribute2().v8Value());
}
static void cachedAttribute2AttributeGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::cachedAttribute2AttributeGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void anyAttributeAttributeGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
v8SetReturnValue(info, imp->anyAttribute().v8Value());
}
static void anyAttributeAttributeGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::anyAttributeAttributeGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void anyAttributeAttributeSetter(v8::Local<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
V8TRYCATCH_VOID(ScriptValue, cppValue, ScriptValue(jsValue, info.GetIsolate()));
imp->setAnyAttribute(cppValue);
}
static void anyAttributeAttributeSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
TestObjV8Internal::anyAttributeAttributeSetter(name, jsValue, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void callbackFunctionAttributeAttributeGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
v8SetReturnValue(info, imp->callbackFunctionAttribute().v8Value());
}
static void callbackFunctionAttributeAttributeGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::callbackFunctionAttributeAttributeGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void callbackFunctionAttributeAttributeSetter(v8::Local<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
V8TRYCATCH_VOID(ScriptValue, cppValue, ScriptValue(jsValue, info.GetIsolate()));
imp->setCallbackFunctionAttribute(cppValue);
}
static void callbackFunctionAttributeAttributeSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
TestObjV8Internal::callbackFunctionAttributeAttributeSetter(name, jsValue, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void enabledAtRuntimeAttrAttributeGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
v8SetReturnValueInt(info, imp->enabledAtRuntimeAttr());
}
static void enabledAtRuntimeAttrAttributeGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::enabledAtRuntimeAttrAttributeGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void enabledAtRuntimeAttrAttributeSetter(v8::Local<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue));
imp->setEnabledAtRuntimeAttr(cppValue);
}
static void enabledAtRuntimeAttrAttributeSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
TestObjV8Internal::enabledAtRuntimeAttrAttributeSetter(name, jsValue, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void enabledPerContextAttrAttributeGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
v8SetReturnValueInt(info, imp->enabledPerContextAttr());
}
static void enabledPerContextAttrAttributeGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::enabledPerContextAttrAttributeGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void enabledPerContextAttrAttributeSetter(v8::Local<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue));
imp->setEnabledPerContextAttr(cppValue);
}
static void enabledPerContextAttrAttributeSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
TestObjV8Internal::enabledPerContextAttrAttributeSetter(name, jsValue, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void floatArrayAttributeGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
v8SetReturnValue(info, v8Array(imp->floatArray(), info.GetIsolate()));
}
static void floatArrayAttributeGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::floatArrayAttributeGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void floatArrayAttributeSetter(v8::Local<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
V8TRYCATCH_VOID(Vector<float>, cppValue, toNativeArray<float>(jsValue, 0, info.GetIsolate()));
imp->setFloatArray(cppValue);
}
static void floatArrayAttributeSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
TestObjV8Internal::floatArrayAttributeSetter(name, jsValue, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void doubleArrayAttributeGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
v8SetReturnValue(info, v8Array(imp->doubleArray(), info.GetIsolate()));
}
static void doubleArrayAttributeGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::doubleArrayAttributeGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void doubleArrayAttributeSetter(v8::Local<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
V8TRYCATCH_VOID(Vector<double>, cppValue, toNativeArray<double>(jsValue, 0, info.GetIsolate()));
imp->setDoubleArray(cppValue);
}
static void doubleArrayAttributeSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
TestObjV8Internal::doubleArrayAttributeSetter(name, jsValue, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void messagePortArrayAttributeGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
v8SetReturnValue(info, v8Array(imp->messagePortArray(), info.GetIsolate()));
}
static void messagePortArrayAttributeGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::messagePortArrayAttributeGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void messagePortArrayAttributeSetter(v8::Local<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
V8TRYCATCH_VOID(Vector<RefPtr<MessagePort> >, cppValue, (toRefPtrNativeArray<MessagePort, V8MessagePort>(jsValue, 0, info.GetIsolate())));
imp->setMessagePortArray(cppValue);
}
static void messagePortArrayAttributeSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
TestObjV8Internal::messagePortArrayAttributeSetter(name, jsValue, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void contentDocumentAttributeGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
ExceptionState es(info.GetIsolate());
if (!BindingSecurity::shouldAllowAccessToNode(imp->contentDocument(), es)) {
v8SetReturnValueNull(info);
es.throwIfNeeded();
return;
}
v8SetReturnValueFast(info, imp->contentDocument(), imp);
}
static void contentDocumentAttributeGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::contentDocumentAttributeGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void mutablePointAttributeGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
v8SetReturnValueFast(info, WTF::getPtr(SVGStaticPropertyTearOff<TestObj, SVGPoint>::create(imp, imp->mutablePoint(), &TestObj::updateMutablePoint)), imp);
}
static void mutablePointAttributeGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::mutablePointAttributeGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void mutablePointAttributeSetter(v8::Local<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
V8TRYCATCH_VOID(RefPtr<SVGPropertyTearOff<SVGPoint> >, cppValue, V8SVGPoint::HasInstance(jsValue, info.GetIsolate(), worldType(info.GetIsolate())) ? V8SVGPoint::toNative(v8::Handle<v8::Object>::Cast(jsValue)) : 0);
if (!WTF::getPtr(cppValue)) {
throwUninformativeAndGenericTypeError(info.GetIsolate());
return;
}
imp->setMutablePoint(WTF::getPtr(cppValue)->propertyReference());
}
static void mutablePointAttributeSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
TestObjV8Internal::mutablePointAttributeSetter(name, jsValue, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void immutablePointAttributeGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
v8SetReturnValueFast(info, WTF::getPtr(SVGPropertyTearOff<SVGPoint>::create(imp->immutablePoint())), imp);
}
static void immutablePointAttributeGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::immutablePointAttributeGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void immutablePointAttributeSetter(v8::Local<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
V8TRYCATCH_VOID(RefPtr<SVGPropertyTearOff<SVGPoint> >, cppValue, V8SVGPoint::HasInstance(jsValue, info.GetIsolate(), worldType(info.GetIsolate())) ? V8SVGPoint::toNative(v8::Handle<v8::Object>::Cast(jsValue)) : 0);
if (!WTF::getPtr(cppValue)) {
throwUninformativeAndGenericTypeError(info.GetIsolate());
return;
}
imp->setImmutablePoint(WTF::getPtr(cppValue)->propertyReference());
}
static void immutablePointAttributeSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
TestObjV8Internal::immutablePointAttributeSetter(name, jsValue, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void strawberryAttributeGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
v8SetReturnValueInt(info, imp->blueberry());
}
static void strawberryAttributeGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::strawberryAttributeGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void strawberryAttributeSetter(v8::Local<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue));
imp->setBlueberry(cppValue);
}
static void strawberryAttributeSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
TestObjV8Internal::strawberryAttributeSetter(name, jsValue, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void strictFloatAttributeGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
v8SetReturnValue(info, imp->strictFloat());
}
static void strictFloatAttributeGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::strictFloatAttributeGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void strictFloatAttributeSetter(v8::Local<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
V8TRYCATCH_VOID(float, cppValue, static_cast<float>(jsValue->NumberValue()));
imp->setStrictFloat(cppValue);
}
static void strictFloatAttributeSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
TestObjV8Internal::strictFloatAttributeSetter(name, jsValue, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void replaceableAttributeAttributeGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
v8SetReturnValueInt(info, imp->replaceableAttribute());
}
static void replaceableAttributeAttributeGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::replaceableAttributeAttributeGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void nullableDoubleAttributeAttributeGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
bool isNull = false;
double jsValue = imp->nullableDoubleAttribute(isNull);
if (isNull) {
v8SetReturnValueNull(info);
return;
}
v8SetReturnValue(info, jsValue);
}
static void nullableDoubleAttributeAttributeGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::nullableDoubleAttributeAttributeGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void nullableLongAttributeAttributeGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
bool isNull = false;
int jsValue = imp->nullableLongAttribute(isNull);
if (isNull) {
v8SetReturnValueNull(info);
return;
}
v8SetReturnValueInt(info, jsValue);
}
static void nullableLongAttributeAttributeGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::nullableLongAttributeAttributeGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void nullableBooleanAttributeAttributeGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
bool isNull = false;
bool jsValue = imp->nullableBooleanAttribute(isNull);
if (isNull) {
v8SetReturnValueNull(info);
return;
}
v8SetReturnValueBool(info, jsValue);
}
static void nullableBooleanAttributeAttributeGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::nullableBooleanAttributeAttributeGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void nullableStringAttributeAttributeGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
bool isNull = false;
String jsValue = imp->nullableStringAttribute(isNull);
if (isNull) {
v8SetReturnValueNull(info);
return;
}
v8SetReturnValueString(info, jsValue, info.GetIsolate());
}
static void nullableStringAttributeAttributeGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::nullableStringAttributeAttributeGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void nullableLongSettableAttributeAttributeGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
bool isNull = false;
int jsValue = imp->nullableLongSettableAttribute(isNull);
if (isNull) {
v8SetReturnValueNull(info);
return;
}
v8SetReturnValueInt(info, jsValue);
}
static void nullableLongSettableAttributeAttributeGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::nullableLongSettableAttributeAttributeGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void nullableLongSettableAttributeAttributeSetter(v8::Local<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue));
imp->setNullableLongSettableAttribute(cppValue);
}
static void nullableLongSettableAttributeAttributeSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
TestObjV8Internal::nullableLongSettableAttributeAttributeSetter(name, jsValue, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void nullableStringValueAttributeGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
ExceptionState es(info.GetIsolate());
bool isNull = false;
int jsValue = imp->nullableStringValue(isNull, es);
if (isNull) {
v8SetReturnValueNull(info);
return;
}
if (UNLIKELY(es.throwIfNeeded()))
return;
v8SetReturnValueInt(info, jsValue);
}
static void nullableStringValueAttributeGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::nullableStringValueAttributeGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void nullableStringValueAttributeSetter(v8::Local<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
V8TRYCATCH_VOID(int, cppValue, toInt32(jsValue));
imp->setNullableStringValue(cppValue);
}
static void nullableStringValueAttributeSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
TestObjV8Internal::nullableStringValueAttributeSetter(name, jsValue, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void perWorldReadOnlyAttributeAttributeGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
RefPtr<TestObj> result = imp->perWorldReadOnlyAttribute();
if (result && DOMDataStore::setReturnValueFromWrapper<V8TestObject>(info.GetReturnValue(), result.get()))
return;
v8::Handle<v8::Value> wrapper = toV8(result.get(), info.Holder(), info.GetIsolate());
if (!wrapper.IsEmpty()) {
V8HiddenPropertyName::setNamedHiddenReference(info.Holder(), "perWorldReadOnlyAttribute", wrapper);
v8SetReturnValue(info, wrapper);
}
}
static void perWorldReadOnlyAttributeAttributeGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::perWorldReadOnlyAttributeAttributeGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void perWorldReadOnlyAttributeAttributeGetterForMainWorld(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
RefPtr<TestObj> result = imp->perWorldReadOnlyAttribute();
if (result && DOMDataStore::setReturnValueFromWrapperForMainWorld<V8TestObject>(info.GetReturnValue(), result.get()))
return;
v8::Handle<v8::Value> wrapper = toV8(result.get(), info.Holder(), info.GetIsolate());
if (!wrapper.IsEmpty()) {
V8HiddenPropertyName::setNamedHiddenReference(info.Holder(), "perWorldReadOnlyAttribute", wrapper);
v8SetReturnValue(info, wrapper);
}
}
static void perWorldReadOnlyAttributeAttributeGetterCallbackForMainWorld(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::perWorldReadOnlyAttributeAttributeGetterForMainWorld(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void perWorldAttributeAttributeGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
v8SetReturnValueFast(info, imp->perWorldAttribute(), imp);
}
static void perWorldAttributeAttributeGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::perWorldAttributeAttributeGetter(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void perWorldAttributeAttributeSetter(v8::Local<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
V8TRYCATCH_VOID(TestObj*, cppValue, V8TestObject::HasInstance(jsValue, info.GetIsolate(), worldType(info.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8::Object>::Cast(jsValue)) : 0);
imp->setPerWorldAttribute(WTF::getPtr(cppValue));
}
static void perWorldAttributeAttributeSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
TestObjV8Internal::perWorldAttributeAttributeSetter(name, jsValue, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void perWorldAttributeAttributeGetterForMainWorld(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
v8SetReturnValueForMainWorld(info, imp->perWorldAttribute());
}
static void perWorldAttributeAttributeGetterCallbackForMainWorld(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
TestObjV8Internal::perWorldAttributeAttributeGetterForMainWorld(name, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}
static void perWorldAttributeAttributeSetterForMainWorld(v8::Local<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
V8TRYCATCH_VOID(TestObj*, cppValue, V8TestObject::HasInstance(jsValue, info.GetIsolate(), worldType(info.GetIsolate())) ? V8TestObject::toNative(v8::Handle<v8::Object>::Cast(jsValue)) : 0);
imp->setPerWorldAttribute(WTF::getPtr(cppValue));
}
static void perWorldAttributeAttributeSetterCallbackForMainWorld(v8::Local<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
TestObjV8Internal::perWorldAttributeAttributeSetterForMainWorld(name, jsValue, info);
TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
}