blob: 92e391f7009d0206052e354099c80d55aa923978 [file] [log] [blame]
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// This file has been auto-generated by code_generator_v8.py. DO NOT MODIFY!
#include "V8TestObject.h"
#include "bindings/core/v8/BindingSecurity.h"
#include "bindings/core/v8/Dictionary.h"
#include "bindings/core/v8/ExceptionState.h"
#include "bindings/core/v8/PrivateScriptRunner.h"
#include "bindings/core/v8/ScriptCallStack.h"
#include "bindings/core/v8/ScriptPromise.h"
#include "bindings/core/v8/ScriptState.h"
#include "bindings/core/v8/ScriptValue.h"
#include "bindings/core/v8/SerializedScriptValue.h"
#include "bindings/core/v8/SerializedScriptValueFactory.h"
#include "bindings/core/v8/Transferables.h"
#include "bindings/core/v8/UnionTypesCore.h"
#include "bindings/core/v8/V8AbstractEventListener.h"
#include "bindings/core/v8/V8ArrayBuffer.h"
#include "bindings/core/v8/V8ArrayBufferView.h"
#include "bindings/core/v8/V8Attr.h"
#include "bindings/core/v8/V8DOMActivityLogger.h"
#include "bindings/core/v8/V8DOMConfiguration.h"
#include "bindings/core/v8/V8Document.h"
#include "bindings/core/v8/V8DocumentFragment.h"
#include "bindings/core/v8/V8DocumentType.h"
#include "bindings/core/v8/V8Element.h"
#include "bindings/core/v8/V8EventListenerList.h"
#include "bindings/core/v8/V8EventTarget.h"
#include "bindings/core/v8/V8Float32Array.h"
#include "bindings/core/v8/V8HTMLCollection.h"
#include "bindings/core/v8/V8HTMLElement.h"
#include "bindings/core/v8/V8HiddenValue.h"
#include "bindings/core/v8/V8Int32Array.h"
#include "bindings/core/v8/V8Iterator.h"
#include "bindings/core/v8/V8MessagePort.h"
#include "bindings/core/v8/V8Node.h"
#include "bindings/core/v8/V8NodeFilter.h"
#include "bindings/core/v8/V8ObjectConstructor.h"
#include "bindings/core/v8/V8ShadowRoot.h"
#include "bindings/core/v8/V8TestCallbackInterface.h"
#include "bindings/core/v8/V8TestDictionary.h"
#include "bindings/core/v8/V8TestInterface.h"
#include "bindings/core/v8/V8TestInterfaceEmpty.h"
#include "bindings/core/v8/V8TestInterfaceGarbageCollected.h"
#include "bindings/core/v8/V8TestNode.h"
#include "bindings/core/v8/V8TestObject.h"
#include "bindings/core/v8/V8Uint8Array.h"
#include "bindings/core/v8/V8Window.h"
#include "bindings/core/v8/V8XPathNSResolver.h"
#include "core/HTMLNames.h"
#include "core/dom/ClassCollection.h"
#include "core/dom/Document.h"
#include "core/dom/FlexibleArrayBufferView.h"
#include "core/dom/TagCollection.h"
#include "core/dom/custom/CustomElementProcessingStack.h"
#include "core/frame/Deprecation.h"
#include "core/frame/LocalFrame.h"
#include "core/frame/UseCounter.h"
#include "core/html/HTMLCollection.h"
#include "core/html/HTMLDataListOptionsCollection.h"
#include "core/html/HTMLFormControlsCollection.h"
#include "core/html/HTMLTableRowsCollection.h"
#include "core/inspector/ConsoleMessage.h"
#include "core/inspector/ScriptArguments.h"
#include "core/origin_trials/OriginTrials.h"
#include "platform/RuntimeEnabledFeatures.h"
#include "platform/ScriptForbiddenScope.h"
#include "wtf/GetPtr.h"
#include "wtf/RefPtr.h"
namespace blink {
// Suppress warning: global constructors, because struct WrapperTypeInfo is trivial
// and does not depend on another global objects.
#if defined(COMPONENT_BUILD) && defined(WIN32) && COMPILER(CLANG)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wglobal-constructors"
#endif
const WrapperTypeInfo V8TestObject::wrapperTypeInfo = { gin::kEmbedderBlink, V8TestObject::domTemplate, V8TestObject::trace, 0, 0, V8TestObject::preparePrototypeAndInterfaceObject, V8TestObject::installConditionallyEnabledProperties, "TestObject", 0, WrapperTypeInfo::WrapperTypeObjectPrototype, WrapperTypeInfo::ObjectClassId, WrapperTypeInfo::NotInheritFromEventTarget, WrapperTypeInfo::Independent };
#if defined(COMPONENT_BUILD) && defined(WIN32) && COMPILER(CLANG)
#pragma clang diagnostic pop
#endif
// This static member must be declared by DEFINE_WRAPPERTYPEINFO in TestObject.h.
// For details, see the comment of DEFINE_WRAPPERTYPEINFO in
// bindings/core/v8/ScriptWrappable.h.
const WrapperTypeInfo& TestObject::s_wrapperTypeInfo = V8TestObject::wrapperTypeInfo;
namespace TestObjectV8Internal {
static void DEPRECATED_CONSTANTConstantGetterCallback(v8::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Value>& info)
{
Deprecation::countDeprecationIfNotPrivateScript(info.GetIsolate(), currentExecutionContext(info.GetIsolate()), UseCounter::Constant);
v8SetReturnValueInt(info, 1);
}
static void MEASURED_CONSTANTConstantGetterCallback(v8::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Value>& info)
{
UseCounter::countIfNotPrivateScript(info.GetIsolate(), currentExecutionContext(info.GetIsolate()), UseCounter::Constant);
v8SetReturnValueInt(info, 1);
}
static void FEATURE1_ORIGIN_TRIAL_ENABLED_CONST1ConstantGetterCallback(v8::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Value>& info)
{
ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate());
String errorMessage;
if (!OriginTrials::featureName1Enabled(executionContext, errorMessage)) {
v8SetReturnValue(info, v8::Undefined(info.GetIsolate()));
if (!errorMessage.isEmpty()) {
toDocument(executionContext)->addConsoleMessage(ConsoleMessage::create(JSMessageSource, ErrorMessageLevel, errorMessage));
}
return;
}
v8SetReturnValueInt(info, 1);
}
static void FEATURE1_ORIGIN_TRIAL_ENABLED_CONST2ConstantGetterCallback(v8::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Value>& info)
{
ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate());
String errorMessage;
if (!OriginTrials::featureName1Enabled(executionContext, errorMessage)) {
v8SetReturnValue(info, v8::Undefined(info.GetIsolate()));
if (!errorMessage.isEmpty()) {
toDocument(executionContext)->addConsoleMessage(ConsoleMessage::create(JSMessageSource, ErrorMessageLevel, errorMessage));
}
return;
}
v8SetReturnValueInt(info, 2);
}
static void FEATURE2_ORIGIN_TRIAL_ENABLED_CONST1ConstantGetterCallback(v8::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Value>& info)
{
ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate());
String errorMessage;
if (!OriginTrials::featureName2Enabled(executionContext, errorMessage)) {
v8SetReturnValue(info, v8::Undefined(info.GetIsolate()));
if (!errorMessage.isEmpty()) {
toDocument(executionContext)->addConsoleMessage(ConsoleMessage::create(JSMessageSource, ErrorMessageLevel, errorMessage));
}
return;
}
v8SetReturnValueInt(info, 3);
}
static void FEATURE2_ORIGIN_TRIAL_ENABLED_CONST2ConstantGetterCallback(v8::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Value>& info)
{
ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate());
String errorMessage;
if (!OriginTrials::featureName2Enabled(executionContext, errorMessage)) {
v8SetReturnValue(info, v8::Undefined(info.GetIsolate()));
if (!errorMessage.isEmpty()) {
toDocument(executionContext)->addConsoleMessage(ConsoleMessage::create(JSMessageSource, ErrorMessageLevel, errorMessage));
}
return;
}
v8SetReturnValueInt(info, 4);
}
static void FEATURE3_ORIGIN_TRIAL_ENABLED_CONST1ConstantGetterCallback(v8::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Value>& info)
{
ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate());
String errorMessage;
if (!OriginTrials::featureName3Enabled(executionContext, errorMessage)) {
v8SetReturnValue(info, v8::Undefined(info.GetIsolate()));
if (!errorMessage.isEmpty()) {
toDocument(executionContext)->addConsoleMessage(ConsoleMessage::create(JSMessageSource, ErrorMessageLevel, errorMessage));
}
return;
}
v8SetReturnValueInt(info, 5);
}
static void stringifierAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
TestObject* impl = V8TestObject::toImpl(holder);
v8SetReturnValueString(info, impl->stringifierAttribute(), info.GetIsolate());
}
static void stringifierAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TestObjectV8Internal::stringifierAttributeAttributeGetter(info);
}
static void stringifierAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
TestObject* impl = V8TestObject::toImpl(holder);
V8StringResource<> cppValue = v8Value;
if (!cppValue.prepare())
return;
impl->setStringifierAttribute(cppValue);
}
static void stringifierAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Value> v8Value = info[0];
TestObjectV8Internal::stringifierAttributeAttributeSetter(v8Value, info);
}
static void readonlyStringAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
TestObject* impl = V8TestObject::toImpl(holder);
v8SetReturnValueString(info, impl->readonlyStringAttribute(), info.GetIsolate());
}
static void readonlyStringAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TestObjectV8Internal::readonlyStringAttributeAttributeGetter(info);
}
static void readonlyTestInterfaceEmptyAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
TestObject* impl = V8TestObject::toImpl(holder);
TestInterfaceEmpty* cppValue(WTF::getPtr(impl->readonlyTestInterfaceEmptyAttribute()));
if (cppValue && DOMDataStore::setReturnValue(info.GetReturnValue(), cppValue))
return;
v8::Local<v8::Value> v8Value(toV8(cppValue, holder, info.GetIsolate()));
if (!v8Value.IsEmpty()) {
V8HiddenValue::setHiddenValue(ScriptState::current(info.GetIsolate()), holder, v8AtomicString(info.GetIsolate(), "readonlyTestInterfaceEmptyAttribute"), v8Value);
v8SetReturnValue(info, v8Value);
}
}
static void readonlyTestInterfaceEmptyAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TestObjectV8Internal::readonlyTestInterfaceEmptyAttributeAttributeGetter(info);
}
static void readonlyLongAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
TestObject* impl = V8TestObject::toImpl(holder);
v8SetReturnValueInt(info, impl->readonlyLongAttribute());
}
static void readonlyLongAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TestObjectV8Internal::readonlyLongAttributeAttributeGetter(info);
}
static void dateAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
TestObject* impl = V8TestObject::toImpl(holder);
v8SetReturnValue(info, v8DateOrNaN(info.GetIsolate(), impl->dateAttribute()));
}
static void dateAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TestObjectV8Internal::dateAttributeAttributeGetter(info);
}
static void dateAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
TestObject* impl = V8TestObject::toImpl(holder);
double cppValue = toCoreDate(info.GetIsolate(), v8Value);
impl->setDateAttribute(cppValue);
}
static void dateAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Value> v8Value = info[0];
TestObjectV8Internal::dateAttributeAttributeSetter(v8Value, info);
}
static void stringAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
TestObject* impl = V8TestObject::toImpl(holder);
v8SetReturnValueString(info, impl->stringAttribute(), info.GetIsolate());
}
static void stringAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TestObjectV8Internal::stringAttributeAttributeGetter(info);
}
static void stringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
TestObject* impl = V8TestObject::toImpl(holder);
V8StringResource<> cppValue = v8Value;
if (!cppValue.prepare())
return;
impl->setStringAttribute(cppValue);
}
static void stringAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Value> v8Value = info[0];
TestObjectV8Internal::stringAttributeAttributeSetter(v8Value, info);
}
static void byteStringAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
TestObject* impl = V8TestObject::toImpl(holder);
v8SetReturnValueString(info, impl->byteStringAttribute(), info.GetIsolate());
}
static void byteStringAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TestObjectV8Internal::byteStringAttributeAttributeGetter(info);
}
static void byteStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
ExceptionState exceptionState(ExceptionState::SetterContext, "byteStringAttribute", "TestObject", holder, info.GetIsolate());
TestObject* impl = V8TestObject::toImpl(holder);
V8StringResource<> cppValue = toByteString(info.GetIsolate(), v8Value, exceptionState);
if (exceptionState.throwIfNeeded())
return;
impl->setByteStringAttribute(cppValue);
}
static void byteStringAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Value> v8Value = info[0];
TestObjectV8Internal::byteStringAttributeAttributeSetter(v8Value, info);
}
static void usvStringAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
TestObject* impl = V8TestObject::toImpl(holder);
v8SetReturnValueString(info, impl->usvStringAttribute(), info.GetIsolate());
}
static void usvStringAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TestObjectV8Internal::usvStringAttributeAttributeGetter(info);
}
static void usvStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
ExceptionState exceptionState(ExceptionState::SetterContext, "usvStringAttribute", "TestObject", holder, info.GetIsolate());
TestObject* impl = V8TestObject::toImpl(holder);
V8StringResource<> cppValue = toUSVString(info.GetIsolate(), v8Value, exceptionState);
if (exceptionState.throwIfNeeded())
return;
impl->setUsvStringAttribute(cppValue);
}
static void usvStringAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Value> v8Value = info[0];
TestObjectV8Internal::usvStringAttributeAttributeSetter(v8Value, info);
}
static void domTimeStampAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
TestObject* impl = V8TestObject::toImpl(holder);
v8SetReturnValue(info, static_cast<double>(impl->domTimeStampAttribute()));
}
static void domTimeStampAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TestObjectV8Internal::domTimeStampAttributeAttributeGetter(info);
}
static void domTimeStampAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
ExceptionState exceptionState(ExceptionState::SetterContext, "domTimeStampAttribute", "TestObject", holder, info.GetIsolate());
TestObject* impl = V8TestObject::toImpl(holder);
unsigned long long cppValue = toUInt64(info.GetIsolate(), v8Value, NormalConversion, exceptionState);
if (exceptionState.throwIfNeeded())
return;
impl->setDomTimeStampAttribute(cppValue);
}
static void domTimeStampAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Value> v8Value = info[0];
TestObjectV8Internal::domTimeStampAttributeAttributeSetter(v8Value, info);
}
static void booleanAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
TestObject* impl = V8TestObject::toImpl(holder);
v8SetReturnValueBool(info, impl->booleanAttribute());
}
static void booleanAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TestObjectV8Internal::booleanAttributeAttributeGetter(info);
}
static void booleanAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
ExceptionState exceptionState(ExceptionState::SetterContext, "booleanAttribute", "TestObject", holder, info.GetIsolate());
TestObject* impl = V8TestObject::toImpl(holder);
bool cppValue = toBoolean(info.GetIsolate(), v8Value, exceptionState);
if (exceptionState.throwIfNeeded())
return;
impl->setBooleanAttribute(cppValue);
}
static void booleanAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Value> v8Value = info[0];
TestObjectV8Internal::booleanAttributeAttributeSetter(v8Value, info);
}
static void byteAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
TestObject* impl = V8TestObject::toImpl(holder);
v8SetReturnValueInt(info, impl->byteAttribute());
}
static void byteAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TestObjectV8Internal::byteAttributeAttributeGetter(info);
}
static void byteAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
ExceptionState exceptionState(ExceptionState::SetterContext, "byteAttribute", "TestObject", holder, info.GetIsolate());
TestObject* impl = V8TestObject::toImpl(holder);
int cppValue = toInt8(info.GetIsolate(), v8Value, NormalConversion, exceptionState);
if (exceptionState.throwIfNeeded())
return;
impl->setByteAttribute(cppValue);
}
static void byteAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Value> v8Value = info[0];
TestObjectV8Internal::byteAttributeAttributeSetter(v8Value, info);
}
static void doubleAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
TestObject* impl = V8TestObject::toImpl(holder);
v8SetReturnValue(info, impl->doubleAttribute());
}
static void doubleAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TestObjectV8Internal::doubleAttributeAttributeGetter(info);
}
static void doubleAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
ExceptionState exceptionState(ExceptionState::SetterContext, "doubleAttribute", "TestObject", holder, info.GetIsolate());
TestObject* impl = V8TestObject::toImpl(holder);
double cppValue = toRestrictedDouble(info.GetIsolate(), v8Value, exceptionState);
if (exceptionState.throwIfNeeded())
return;
impl->setDoubleAttribute(cppValue);
}
static void doubleAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Value> v8Value = info[0];
TestObjectV8Internal::doubleAttributeAttributeSetter(v8Value, info);
}
static void floatAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
TestObject* impl = V8TestObject::toImpl(holder);
v8SetReturnValue(info, impl->floatAttribute());
}
static void floatAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TestObjectV8Internal::floatAttributeAttributeGetter(info);
}
static void floatAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
ExceptionState exceptionState(ExceptionState::SetterContext, "floatAttribute", "TestObject", holder, info.GetIsolate());
TestObject* impl = V8TestObject::toImpl(holder);
float cppValue = toRestrictedFloat(info.GetIsolate(), v8Value, exceptionState);
if (exceptionState.throwIfNeeded())
return;
impl->setFloatAttribute(cppValue);
}
static void floatAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Value> v8Value = info[0];
TestObjectV8Internal::floatAttributeAttributeSetter(v8Value, info);
}
static void longAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
TestObject* impl = V8TestObject::toImpl(holder);
v8SetReturnValueInt(info, impl->longAttribute());
}
static void longAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TestObjectV8Internal::longAttributeAttributeGetter(info);
}
static void longAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
ExceptionState exceptionState(ExceptionState::SetterContext, "longAttribute", "TestObject", holder, info.GetIsolate());
TestObject* impl = V8TestObject::toImpl(holder);
int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, exceptionState);
if (exceptionState.throwIfNeeded())
return;
impl->setLongAttribute(cppValue);
}
static void longAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Value> v8Value = info[0];
TestObjectV8Internal::longAttributeAttributeSetter(v8Value, info);
}
static void longLongAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
TestObject* impl = V8TestObject::toImpl(holder);
v8SetReturnValue(info, static_cast<double>(impl->longLongAttribute()));
}
static void longLongAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TestObjectV8Internal::longLongAttributeAttributeGetter(info);
}
static void longLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
ExceptionState exceptionState(ExceptionState::SetterContext, "longLongAttribute", "TestObject", holder, info.GetIsolate());
TestObject* impl = V8TestObject::toImpl(holder);
long long cppValue = toInt64(info.GetIsolate(), v8Value, NormalConversion, exceptionState);
if (exceptionState.throwIfNeeded())
return;
impl->setLongLongAttribute(cppValue);
}
static void longLongAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Value> v8Value = info[0];
TestObjectV8Internal::longLongAttributeAttributeSetter(v8Value, info);
}
static void octetAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
TestObject* impl = V8TestObject::toImpl(holder);
v8SetReturnValueUnsigned(info, impl->octetAttribute());
}
static void octetAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TestObjectV8Internal::octetAttributeAttributeGetter(info);
}
static void octetAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
ExceptionState exceptionState(ExceptionState::SetterContext, "octetAttribute", "TestObject", holder, info.GetIsolate());
TestObject* impl = V8TestObject::toImpl(holder);
unsigned cppValue = toUInt8(info.GetIsolate(), v8Value, NormalConversion, exceptionState);
if (exceptionState.throwIfNeeded())
return;
impl->setOctetAttribute(cppValue);
}
static void octetAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Value> v8Value = info[0];
TestObjectV8Internal::octetAttributeAttributeSetter(v8Value, info);
}
static void shortAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
TestObject* impl = V8TestObject::toImpl(holder);
v8SetReturnValueInt(info, impl->shortAttribute());
}
static void shortAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TestObjectV8Internal::shortAttributeAttributeGetter(info);
}
static void shortAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
ExceptionState exceptionState(ExceptionState::SetterContext, "shortAttribute", "TestObject", holder, info.GetIsolate());
TestObject* impl = V8TestObject::toImpl(holder);
int cppValue = toInt16(info.GetIsolate(), v8Value, NormalConversion, exceptionState);
if (exceptionState.throwIfNeeded())
return;
impl->setShortAttribute(cppValue);
}
static void shortAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Value> v8Value = info[0];
TestObjectV8Internal::shortAttributeAttributeSetter(v8Value, info);
}
static void unrestrictedDoubleAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
TestObject* impl = V8TestObject::toImpl(holder);
v8SetReturnValue(info, impl->unrestrictedDoubleAttribute());
}
static void unrestrictedDoubleAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TestObjectV8Internal::unrestrictedDoubleAttributeAttributeGetter(info);
}
static void unrestrictedDoubleAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
ExceptionState exceptionState(ExceptionState::SetterContext, "unrestrictedDoubleAttribute", "TestObject", holder, info.GetIsolate());
TestObject* impl = V8TestObject::toImpl(holder);
double cppValue = toDouble(info.GetIsolate(), v8Value, exceptionState);
if (exceptionState.throwIfNeeded())
return;
impl->setUnrestrictedDoubleAttribute(cppValue);
}
static void unrestrictedDoubleAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Value> v8Value = info[0];
TestObjectV8Internal::unrestrictedDoubleAttributeAttributeSetter(v8Value, info);
}
static void unrestrictedFloatAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
TestObject* impl = V8TestObject::toImpl(holder);
v8SetReturnValue(info, impl->unrestrictedFloatAttribute());
}
static void unrestrictedFloatAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TestObjectV8Internal::unrestrictedFloatAttributeAttributeGetter(info);
}
static void unrestrictedFloatAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
ExceptionState exceptionState(ExceptionState::SetterContext, "unrestrictedFloatAttribute", "TestObject", holder, info.GetIsolate());
TestObject* impl = V8TestObject::toImpl(holder);
float cppValue = toFloat(info.GetIsolate(), v8Value, exceptionState);
if (exceptionState.throwIfNeeded())
return;
impl->setUnrestrictedFloatAttribute(cppValue);
}
static void unrestrictedFloatAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Value> v8Value = info[0];
TestObjectV8Internal::unrestrictedFloatAttributeAttributeSetter(v8Value, info);
}
static void unsignedLongAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
TestObject* impl = V8TestObject::toImpl(holder);
v8SetReturnValueUnsigned(info, impl->unsignedLongAttribute());
}
static void unsignedLongAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TestObjectV8Internal::unsignedLongAttributeAttributeGetter(info);
}
static void unsignedLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
ExceptionState exceptionState(ExceptionState::SetterContext, "unsignedLongAttribute", "TestObject", holder, info.GetIsolate());
TestObject* impl = V8TestObject::toImpl(holder);
unsigned cppValue = toUInt32(info.GetIsolate(), v8Value, NormalConversion, exceptionState);
if (exceptionState.throwIfNeeded())
return;
impl->setUnsignedLongAttribute(cppValue);
}
static void unsignedLongAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Value> v8Value = info[0];
TestObjectV8Internal::unsignedLongAttributeAttributeSetter(v8Value, info);
}
static void unsignedLongLongAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
TestObject* impl = V8TestObject::toImpl(holder);
v8SetReturnValue(info, static_cast<double>(impl->unsignedLongLongAttribute()));
}
static void unsignedLongLongAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TestObjectV8Internal::unsignedLongLongAttributeAttributeGetter(info);
}
static void unsignedLongLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
ExceptionState exceptionState(ExceptionState::SetterContext, "unsignedLongLongAttribute", "TestObject", holder, info.GetIsolate());
TestObject* impl = V8TestObject::toImpl(holder);
unsigned long long cppValue = toUInt64(info.GetIsolate(), v8Value, NormalConversion, exceptionState);
if (exceptionState.throwIfNeeded())
return;
impl->setUnsignedLongLongAttribute(cppValue);
}
static void unsignedLongLongAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Value> v8Value = info[0];
TestObjectV8Internal::unsignedLongLongAttributeAttributeSetter(v8Value, info);
}
static void unsignedShortAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
TestObject* impl = V8TestObject::toImpl(holder);
v8SetReturnValueUnsigned(info, impl->unsignedShortAttribute());
}
static void unsignedShortAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TestObjectV8Internal::unsignedShortAttributeAttributeGetter(info);
}
static void unsignedShortAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
ExceptionState exceptionState(ExceptionState::SetterContext, "unsignedShortAttribute", "TestObject", holder, info.GetIsolate());
TestObject* impl = V8TestObject::toImpl(holder);
unsigned cppValue = toUInt16(info.GetIsolate(), v8Value, NormalConversion, exceptionState);
if (exceptionState.throwIfNeeded())
return;
impl->setUnsignedShortAttribute(cppValue);
}
static void unsignedShortAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Value> v8Value = info[0];
TestObjectV8Internal::unsignedShortAttributeAttributeSetter(v8Value, info);
}
static void testInterfaceEmptyAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
TestObject* impl = V8TestObject::toImpl(holder);
v8SetReturnValueFast(info, WTF::getPtr(impl->testInterfaceEmptyAttribute()), impl);
}
static void testInterfaceEmptyAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TestObjectV8Internal::testInterfaceEmptyAttributeAttributeGetter(info);
}
static void testInterfaceEmptyAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
ExceptionState exceptionState(ExceptionState::SetterContext, "testInterfaceEmptyAttribute", "TestObject", holder, info.GetIsolate());
TestObject* impl = V8TestObject::toImpl(holder);
TestInterfaceEmpty* cppValue = V8TestInterfaceEmpty::toImplWithTypeCheck(info.GetIsolate(), v8Value);
if (!cppValue) {
exceptionState.throwTypeError("The provided value is not of type 'TestInterfaceEmpty'.");
exceptionState.throwIfNeeded();
return;
}
impl->setTestInterfaceEmptyAttribute(cppValue);
}
static void testInterfaceEmptyAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Value> v8Value = info[0];
TestObjectV8Internal::testInterfaceEmptyAttributeAttributeSetter(v8Value, info);
}
static void testObjectAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
TestObject* impl = V8TestObject::toImpl(holder);
v8SetReturnValueFast(info, WTF::getPtr(impl->testObjectAttribute()), impl);
}
static void testObjectAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TestObjectV8Internal::testObjectAttributeAttributeGetter(info);
}
static void testObjectAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
ExceptionState exceptionState(ExceptionState::SetterContext, "testObjectAttribute", "TestObject", holder, info.GetIsolate());
TestObject* impl = V8TestObject::toImpl(holder);
TestObject* cppValue = V8TestObject::toImplWithTypeCheck(info.GetIsolate(), v8Value);
if (!cppValue) {
exceptionState.throwTypeError("The provided value is not of type 'TestObject'.");
exceptionState.throwIfNeeded();
return;
}
impl->setTestObjectAttribute(cppValue);
}
static void testObjectAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Value> v8Value = info[0];
TestObjectV8Internal::testObjectAttributeAttributeSetter(v8Value, info);
}
static void voidCallbackFunctionAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
TestObject* impl = V8TestObject::toImpl(holder);
v8SetReturnValue(info, impl->voidCallbackFunctionAttribute().v8Value());
}
static void voidCallbackFunctionAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TestObjectV8Internal::voidCallbackFunctionAttributeAttributeGetter(info);
}
static void voidCallbackFunctionAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
TestObject* impl = V8TestObject::toImpl(holder);
ScriptValue cppValue = ScriptValue(ScriptState::current(info.GetIsolate()), v8Value);
impl->setVoidCallbackFunctionAttribute(cppValue);
}
static void voidCallbackFunctionAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Value> v8Value = info[0];
TestObjectV8Internal::voidCallbackFunctionAttributeAttributeSetter(v8Value, info);
}
static void anyCallbackFunctionOptionalAnyArgAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
TestObject* impl = V8TestObject::toImpl(holder);
v8SetReturnValue(info, impl->anyCallbackFunctionOptionalAnyArgAttribute().v8Value());
}
static void anyCallbackFunctionOptionalAnyArgAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TestObjectV8Internal::anyCallbackFunctionOptionalAnyArgAttributeAttributeGetter(info);
}
static void anyCallbackFunctionOptionalAnyArgAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
TestObject* impl = V8TestObject::toImpl(holder);
ScriptValue cppValue = ScriptValue(ScriptState::current(info.GetIsolate()), v8Value);
impl->setAnyCallbackFunctionOptionalAnyArgAttribute(cppValue);
}
static void anyCallbackFunctionOptionalAnyArgAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Value> v8Value = info[0];
TestObjectV8Internal::anyCallbackFunctionOptionalAnyArgAttributeAttributeSetter(v8Value, info);
}
static void cssAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
TestObject* impl = V8TestObject::toImpl(holder);
v8SetReturnValueInt(info, impl->cssAttribute());
}
static void cssAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TestObjectV8Internal::cssAttributeAttributeGetter(info);
}
static void cssAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
ExceptionState exceptionState(ExceptionState::SetterContext, "cssAttribute", "TestObject", holder, info.GetIsolate());
TestObject* impl = V8TestObject::toImpl(holder);
int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, exceptionState);
if (exceptionState.throwIfNeeded())
return;
impl->setCSSAttribute(cppValue);
}
static void cssAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Value> v8Value = info[0];
TestObjectV8Internal::cssAttributeAttributeSetter(v8Value, info);
}
static void imeAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
TestObject* impl = V8TestObject::toImpl(holder);
v8SetReturnValueInt(info, impl->imeAttribute());
}
static void imeAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TestObjectV8Internal::imeAttributeAttributeGetter(info);
}
static void imeAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
ExceptionState exceptionState(ExceptionState::SetterContext, "imeAttribute", "TestObject", holder, info.GetIsolate());
TestObject* impl = V8TestObject::toImpl(holder);
int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, exceptionState);
if (exceptionState.throwIfNeeded())
return;
impl->setIMEAttribute(cppValue);
}
static void imeAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Value> v8Value = info[0];
TestObjectV8Internal::imeAttributeAttributeSetter(v8Value, info);
}
static void svgAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
TestObject* impl = V8TestObject::toImpl(holder);
v8SetReturnValueInt(info, impl->svgAttribute());
}
static void svgAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TestObjectV8Internal::svgAttributeAttributeGetter(info);
}
static void svgAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
ExceptionState exceptionState(ExceptionState::SetterContext, "svgAttribute", "TestObject", holder, info.GetIsolate());
TestObject* impl = V8TestObject::toImpl(holder);
int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, exceptionState);
if (exceptionState.throwIfNeeded())
return;
impl->setSVGAttribute(cppValue);
}
static void svgAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Value> v8Value = info[0];
TestObjectV8Internal::svgAttributeAttributeSetter(v8Value, info);
}
static void xmlAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
TestObject* impl = V8TestObject::toImpl(holder);
v8SetReturnValueInt(info, impl->xmlAttribute());
}
static void xmlAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TestObjectV8Internal::xmlAttributeAttributeGetter(info);
}
static void xmlAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
ExceptionState exceptionState(ExceptionState::SetterContext, "xmlAttribute", "TestObject", holder, info.GetIsolate());
TestObject* impl = V8TestObject::toImpl(holder);
int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, exceptionState);
if (exceptionState.throwIfNeeded())
return;
impl->setXMLAttribute(cppValue);
}
static void xmlAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Value> v8Value = info[0];
TestObjectV8Internal::xmlAttributeAttributeSetter(v8Value, info);
}
static void nodeFilterAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
TestObject* impl = V8TestObject::toImpl(holder);
v8SetReturnValueFast(info, WTF::getPtr(impl->nodeFilterAttribute()), impl);
}
static void nodeFilterAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TestObjectV8Internal::nodeFilterAttributeAttributeGetter(info);
}
static void nodeFilterAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
TestObject* impl = V8TestObject::toImpl(holder);
NodeFilter* cppValue = toNodeFilter(v8Value, info.Holder(), ScriptState::current(info.GetIsolate()));
impl->setNodeFilterAttribute(cppValue);
}
static void nodeFilterAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Value> v8Value = info[0];
TestObjectV8Internal::nodeFilterAttributeAttributeSetter(v8Value, info);
}
static void serializedScriptValueAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
TestObject* impl = V8TestObject::toImpl(holder);
v8SetReturnValue(info, WTF::getPtr(impl->serializedScriptValueAttribute()) ? WTF::getPtr(impl->serializedScriptValueAttribute())->deserialize() : v8::Local<v8::Value>(v8::Null(info.GetIsolate())));
}
static void serializedScriptValueAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TestObjectV8Internal::serializedScriptValueAttributeAttributeGetter(info);
}
static void serializedScriptValueAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
ExceptionState exceptionState(ExceptionState::SetterContext, "serializedScriptValueAttribute", "TestObject", holder, info.GetIsolate());
TestObject* impl = V8TestObject::toImpl(holder);
RefPtr<SerializedScriptValue> cppValue = SerializedScriptValueFactory::instance().create(info.GetIsolate(), v8Value, nullptr, exceptionState);
if (exceptionState.throwIfNeeded())
return;
impl->setSerializedScriptValueAttribute(cppValue);
}
static void serializedScriptValueAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Value> v8Value = info[0];
TestObjectV8Internal::serializedScriptValueAttributeAttributeSetter(v8Value, info);
}
static void anyAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
TestObject* impl = V8TestObject::toImpl(holder);
v8SetReturnValue(info, impl->anyAttribute().v8Value());
}
static void anyAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TestObjectV8Internal::anyAttributeAttributeGetter(info);
}
static void anyAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
TestObject* impl = V8TestObject::toImpl(holder);
ScriptValue cppValue = ScriptValue(ScriptState::current(info.GetIsolate()), v8Value);
impl->setAnyAttribute(cppValue);
}
static void anyAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Value> v8Value = info[0];
TestObjectV8Internal::anyAttributeAttributeSetter(v8Value, info);
}
static void promiseAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
TestObject* impl = V8TestObject::toImpl(holder);
v8SetReturnValue(info, impl->promiseAttribute().v8Value());
}
static void promiseAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TestObjectV8Internal::promiseAttributeAttributeGetter(info);
}
static void promiseAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
TestObject* impl = V8TestObject::toImpl(holder);
ScriptPromise cppValue = ScriptPromise::cast(ScriptState::current(info.GetIsolate()), v8Value);
impl->setPromiseAttribute(cppValue);
}
static void promiseAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Value> v8Value = info[0];
TestObjectV8Internal::promiseAttributeAttributeSetter(v8Value, info);
}
static void windowAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
TestObject* impl = V8TestObject::toImpl(holder);
v8SetReturnValueFast(info, WTF::getPtr(impl->windowAttribute()), impl);
}
static void windowAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TestObjectV8Internal::windowAttributeAttributeGetter(info);
}
static void windowAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
ExceptionState exceptionState(ExceptionState::SetterContext, "windowAttribute", "TestObject", holder, info.GetIsolate());
TestObject* impl = V8TestObject::toImpl(holder);
DOMWindow* cppValue = toDOMWindow(info.GetIsolate(), v8Value);
if (!cppValue) {
exceptionState.throwTypeError("The provided value is not of type 'Window'.");
exceptionState.throwIfNeeded();
return;
}
impl->setWindowAttribute(cppValue);
}
static void windowAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Value> v8Value = info[0];
TestObjectV8Internal::windowAttributeAttributeSetter(v8Value, info);
}
static void documentAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
TestObject* impl = V8TestObject::toImpl(holder);
v8SetReturnValueFast(info, WTF::getPtr(impl->documentAttribute()), impl);
}
static void documentAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TestObjectV8Internal::documentAttributeAttributeGetter(info);
}
static void documentAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
ExceptionState exceptionState(ExceptionState::SetterContext, "documentAttribute", "TestObject", holder, info.GetIsolate());
TestObject* impl = V8TestObject::toImpl(holder);
Document* cppValue = V8Document::toImplWithTypeCheck(info.GetIsolate(), v8Value);
if (!cppValue) {
exceptionState.throwTypeError("The provided value is not of type 'Document'.");
exceptionState.throwIfNeeded();
return;
}
impl->setDocumentAttribute(cppValue);
}
static void documentAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Value> v8Value = info[0];
TestObjectV8Internal::documentAttributeAttributeSetter(v8Value, info);
}
static void documentFragmentAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
TestObject* impl = V8TestObject::toImpl(holder);
v8SetReturnValueFast(info, WTF::getPtr(impl->documentFragmentAttribute()), impl);
}
static void documentFragmentAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TestObjectV8Internal::documentFragmentAttributeAttributeGetter(info);
}
static void documentFragmentAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
ExceptionState exceptionState(ExceptionState::SetterContext, "documentFragmentAttribute", "TestObject", holder, info.GetIsolate());
TestObject* impl = V8TestObject::toImpl(holder);
DocumentFragment* cppValue = V8DocumentFragment::toImplWithTypeCheck(info.GetIsolate(), v8Value);
if (!cppValue) {
exceptionState.throwTypeError("The provided value is not of type 'DocumentFragment'.");
exceptionState.throwIfNeeded();
return;
}
impl->setDocumentFragmentAttribute(cppValue);
}
static void documentFragmentAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Value> v8Value = info[0];
TestObjectV8Internal::documentFragmentAttributeAttributeSetter(v8Value, info);
}
static void documentTypeAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
TestObject* impl = V8TestObject::toImpl(holder);
v8SetReturnValueFast(info, WTF::getPtr(impl->documentTypeAttribute()), impl);
}
static void documentTypeAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TestObjectV8Internal::documentTypeAttributeAttributeGetter(info);
}
static void documentTypeAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
ExceptionState exceptionState(ExceptionState::SetterContext, "documentTypeAttribute", "TestObject", holder, info.GetIsolate());
TestObject* impl = V8TestObject::toImpl(holder);
DocumentType* cppValue = V8DocumentType::toImplWithTypeCheck(info.GetIsolate(), v8Value);
if (!cppValue) {
exceptionState.throwTypeError("The provided value is not of type 'DocumentType'.");
exceptionState.throwIfNeeded();
return;
}
impl->setDocumentTypeAttribute(cppValue);
}
static void documentTypeAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Value> v8Value = info[0];
TestObjectV8Internal::documentTypeAttributeAttributeSetter(v8Value, info);
}
static void elementAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
TestObject* impl = V8TestObject::toImpl(holder);
v8SetReturnValueFast(info, WTF::getPtr(impl->elementAttribute()), impl);
}
static void elementAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TestObjectV8Internal::elementAttributeAttributeGetter(info);
}
static void elementAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
ExceptionState exceptionState(ExceptionState::SetterContext, "elementAttribute", "TestObject", holder, info.GetIsolate());
TestObject* impl = V8TestObject::toImpl(holder);
Element* cppValue = V8Element::toImplWithTypeCheck(info.GetIsolate(), v8Value);
if (!cppValue) {
exceptionState.throwTypeError("The provided value is not of type 'Element'.");
exceptionState.throwIfNeeded();
return;
}
impl->setElementAttribute(cppValue);
}
static void elementAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Value> v8Value = info[0];
TestObjectV8Internal::elementAttributeAttributeSetter(v8Value, info);
}
static void nodeAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
TestObject* impl = V8TestObject::toImpl(holder);
v8SetReturnValueFast(info, WTF::getPtr(impl->nodeAttribute()), impl);
}
static void nodeAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TestObjectV8Internal::nodeAttributeAttributeGetter(info);
}
static void nodeAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
ExceptionState exceptionState(ExceptionState::SetterContext, "nodeAttribute", "TestObject", holder, info.GetIsolate());
TestObject* impl = V8TestObject::toImpl(holder);
Node* cppValue = V8Node::toImplWithTypeCheck(info.GetIsolate(), v8Value);
if (!cppValue) {
exceptionState.throwTypeError("The provided value is not of type 'Node'.");
exceptionState.throwIfNeeded();
return;
}
impl->setNodeAttribute(cppValue);
}
static void nodeAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Value> v8Value = info[0];
TestObjectV8Internal::nodeAttributeAttributeSetter(v8Value, info);
}
static void shadowRootAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
TestObject* impl = V8TestObject::toImpl(holder);
v8SetReturnValueFast(info, WTF::getPtr(impl->shadowRootAttribute()), impl);
}
static void shadowRootAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TestObjectV8Internal::shadowRootAttributeAttributeGetter(info);
}
static void shadowRootAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
ExceptionState exceptionState(ExceptionState::SetterContext, "shadowRootAttribute", "TestObject", holder, info.GetIsolate());
TestObject* impl = V8TestObject::toImpl(holder);
ShadowRoot* cppValue = V8ShadowRoot::toImplWithTypeCheck(info.GetIsolate(), v8Value);
if (!cppValue) {
exceptionState.throwTypeError("The provided value is not of type 'ShadowRoot'.");
exceptionState.throwIfNeeded();
return;
}
impl->setShadowRootAttribute(cppValue);
}
static void shadowRootAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Value> v8Value = info[0];
TestObjectV8Internal::shadowRootAttributeAttributeSetter(v8Value, info);
}
static void arrayBufferAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
TestObject* impl = V8TestObject::toImpl(holder);
v8SetReturnValueFast(info, WTF::getPtr(impl->arrayBufferAttribute()), impl);
}
static void arrayBufferAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TestObjectV8Internal::arrayBufferAttributeAttributeGetter(info);
}
static void arrayBufferAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
ExceptionState exceptionState(ExceptionState::SetterContext, "arrayBufferAttribute", "TestObject", holder, info.GetIsolate());
TestObject* impl = V8TestObject::toImpl(holder);
TestArrayBuffer* cppValue = v8Value->IsArrayBuffer() ? V8ArrayBuffer::toImpl(v8::Local<v8::ArrayBuffer>::Cast(v8Value)) : 0;
if (!cppValue) {
exceptionState.throwTypeError("The provided value is not of type 'ArrayBuffer'.");
exceptionState.throwIfNeeded();
return;
}
impl->setArrayBufferAttribute(cppValue);
}
static void arrayBufferAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Value> v8Value = info[0];
TestObjectV8Internal::arrayBufferAttributeAttributeSetter(v8Value, info);
}
static void float32ArrayAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
TestObject* impl = V8TestObject::toImpl(holder);
v8SetReturnValueFast(info, WTF::getPtr(impl->float32ArrayAttribute()), impl);
}
static void float32ArrayAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TestObjectV8Internal::float32ArrayAttributeAttributeGetter(info);
}
static void float32ArrayAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
ExceptionState exceptionState(ExceptionState::SetterContext, "float32ArrayAttribute", "TestObject", holder, info.GetIsolate());
TestObject* impl = V8TestObject::toImpl(holder);
DOMFloat32Array* cppValue = v8Value->IsFloat32Array() ? V8Float32Array::toImpl(v8::Local<v8::Float32Array>::Cast(v8Value)) : 0;
if (!cppValue) {
exceptionState.throwTypeError("The provided value is not of type 'Float32Array'.");
exceptionState.throwIfNeeded();
return;
}
impl->setFloat32ArrayAttribute(cppValue);
}
static void float32ArrayAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Value> v8Value = info[0];
TestObjectV8Internal::float32ArrayAttributeAttributeSetter(v8Value, info);
}
static void uint8ArrayAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
TestObject* impl = V8TestObject::toImpl(holder);
v8SetReturnValueFast(info, WTF::getPtr(impl->uint8ArrayAttribute()), impl);
}
static void uint8ArrayAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TestObjectV8Internal::uint8ArrayAttributeAttributeGetter(info);
}
static void uint8ArrayAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
ExceptionState exceptionState(ExceptionState::SetterContext, "uint8ArrayAttribute", "TestObject", holder, info.GetIsolate());
TestObject* impl = V8TestObject::toImpl(holder);
DOMUint8Array* cppValue = v8Value->IsUint8Array() ? V8Uint8Array::toImpl(v8::Local<v8::Uint8Array>::Cast(v8Value)) : 0;
if (!cppValue) {
exceptionState.throwTypeError("The provided value is not of type 'Uint8Array'.");
exceptionState.throwIfNeeded();
return;
}
impl->setUint8ArrayAttribute(cppValue);
}
static void uint8ArrayAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Value> v8Value = info[0];
TestObjectV8Internal::uint8ArrayAttributeAttributeSetter(v8Value, info);
}
static void selfAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
TestObject* impl = V8TestObject::toImpl(holder);
v8SetReturnValueFast(info, WTF::getPtr(impl->self()), impl);
}
static void selfAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TestObjectV8Internal::selfAttributeGetter(info);
}
static void readonlyEventTargetAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
TestObject* impl = V8TestObject::toImpl(holder);
v8SetReturnValueFast(info, WTF::getPtr(impl->readonlyEventTargetAttribute()), impl);
}
static void readonlyEventTargetAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TestObjectV8Internal::readonlyEventTargetAttributeAttributeGetter(info);
}
static void readonlyEventTargetOrNullAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
TestObject* impl = V8TestObject::toImpl(holder);
v8SetReturnValueFast(info, WTF::getPtr(impl->readonlyEventTargetOrNullAttribute()), impl);
}
static void readonlyEventTargetOrNullAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TestObjectV8Internal::readonlyEventTargetOrNullAttributeAttributeGetter(info);
}
static void readonlyWindowAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
TestObject* impl = V8TestObject::toImpl(holder);
v8SetReturnValueFast(info, WTF::getPtr(impl->readonlyWindowAttribute()), impl);
}
static void readonlyWindowAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TestObjectV8Internal::readonlyWindowAttributeAttributeGetter(info);
}
static void htmlCollectionAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
TestObject* impl = V8TestObject::toImpl(holder);
v8SetReturnValueFast(info, WTF::getPtr(impl->htmlCollectionAttribute()), impl);
}
static void htmlCollectionAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TestObjectV8Internal::htmlCollectionAttributeAttributeGetter(info);
}
static void htmlElementAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
TestObject* impl = V8TestObject::toImpl(holder);
v8SetReturnValueFast(info, WTF::getPtr(impl->htmlElementAttribute()), impl);
}
static void htmlElementAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TestObjectV8Internal::htmlElementAttributeAttributeGetter(info);
}
static void stringArrayAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
TestObject* impl = V8TestObject::toImpl(holder);
v8SetReturnValue(info, toV8(impl->stringArrayAttribute(), info.Holder(), info.GetIsolate()));
}
static void stringArrayAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TestObjectV8Internal::stringArrayAttributeAttributeGetter(info);
}
static void stringArrayAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
ExceptionState exceptionState(ExceptionState::SetterContext, "stringArrayAttribute", "TestObject", holder, info.GetIsolate());
TestObject* impl = V8TestObject::toImpl(holder);
Vector<String> cppValue = toImplArray<Vector<String>>(v8Value, 0, info.GetIsolate(), exceptionState);
if (exceptionState.throwIfNeeded())
return;
impl->setStringArrayAttribute(cppValue);
}
static void stringArrayAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Value> v8Value = info[0];
TestObjectV8Internal::stringArrayAttributeAttributeSetter(v8Value, info);
}
static void testInterfaceEmptyArrayAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
TestObject* impl = V8TestObject::toImpl(holder);
v8SetReturnValue(info, toV8(impl->testInterfaceEmptyArrayAttribute(), info.Holder(), info.GetIsolate()));
}
static void testInterfaceEmptyArrayAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TestObjectV8Internal::testInterfaceEmptyArrayAttributeAttributeGetter(info);
}
static void testInterfaceEmptyArrayAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
ExceptionState exceptionState(ExceptionState::SetterContext, "testInterfaceEmptyArrayAttribute", "TestObject", holder, info.GetIsolate());
TestObject* impl = V8TestObject::toImpl(holder);
HeapVector<Member<TestInterfaceEmpty>> cppValue = (toMemberNativeArray<TestInterfaceEmpty>(v8Value, 0, info.GetIsolate(), exceptionState));
if (exceptionState.throwIfNeeded())
return;
impl->setTestInterfaceEmptyArrayAttribute(cppValue);
}
static void testInterfaceEmptyArrayAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Value> v8Value = info[0];
TestObjectV8Internal::testInterfaceEmptyArrayAttributeAttributeSetter(v8Value, info);
}
static void floatArrayAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
TestObject* impl = V8TestObject::toImpl(holder);
v8SetReturnValue(info, toV8(impl->floatArrayAttribute(), info.Holder(), info.GetIsolate()));
}
static void floatArrayAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TestObjectV8Internal::floatArrayAttributeAttributeGetter(info);
}
static void floatArrayAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
ExceptionState exceptionState(ExceptionState::SetterContext, "floatArrayAttribute", "TestObject", holder, info.GetIsolate());
TestObject* impl = V8TestObject::toImpl(holder);
Vector<float> cppValue = toImplArray<Vector<float>>(v8Value, 0, info.GetIsolate(), exceptionState);
if (exceptionState.throwIfNeeded())
return;
impl->setFloatArrayAttribute(cppValue);
}
static void floatArrayAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Value> v8Value = info[0];
TestObjectV8Internal::floatArrayAttributeAttributeSetter(v8Value, info);
}
static void stringFrozenArrayAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
TestObject* impl = V8TestObject::toImpl(holder);
v8SetReturnValue(info, freezeV8Object(toV8(impl->stringFrozenArrayAttribute(), info.Holder(), info.GetIsolate()), info.GetIsolate()));
}
static void stringFrozenArrayAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TestObjectV8Internal::stringFrozenArrayAttributeAttributeGetter(info);
}
static void stringFrozenArrayAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
ExceptionState exceptionState(ExceptionState::SetterContext, "stringFrozenArrayAttribute", "TestObject", holder, info.GetIsolate());
TestObject* impl = V8TestObject::toImpl(holder);
Vector<String> cppValue = toImplArray<Vector<String>>(v8Value, 0, info.GetIsolate(), exceptionState);
if (exceptionState.throwIfNeeded())
return;
impl->setStringFrozenArrayAttribute(cppValue);
}
static void stringFrozenArrayAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Value> v8Value = info[0];
TestObjectV8Internal::stringFrozenArrayAttributeAttributeSetter(v8Value, info);
}
static void testInterfaceEmptyFrozenArrayAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
TestObject* impl = V8TestObject::toImpl(holder);
v8SetReturnValue(info, freezeV8Object(toV8(impl->testInterfaceEmptyFrozenArrayAttribute(), info.Holder(), info.GetIsolate()), info.GetIsolate()));
}
static void testInterfaceEmptyFrozenArrayAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TestObjectV8Internal::testInterfaceEmptyFrozenArrayAttributeAttributeGetter(info);
}
static void testInterfaceEmptyFrozenArrayAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
ExceptionState exceptionState(ExceptionState::SetterContext, "testInterfaceEmptyFrozenArrayAttribute", "TestObject", holder, info.GetIsolate());
TestObject* impl = V8TestObject::toImpl(holder);
HeapVector<Member<TestInterfaceEmpty>> cppValue = (toMemberNativeArray<TestInterfaceEmpty>(v8Value, 0, info.GetIsolate(), exceptionState));
if (exceptionState.throwIfNeeded())
return;
impl->setTestInterfaceEmptyFrozenArrayAttribute(cppValue);
}
static void testInterfaceEmptyFrozenArrayAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Value> v8Value = info[0];
TestObjectV8Internal::testInterfaceEmptyFrozenArrayAttributeAttributeSetter(v8Value, info);
}
static void stringOrNullAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
TestObject* impl = V8TestObject::toImpl(holder);
v8SetReturnValueStringOrNull(info, impl->stringOrNullAttribute(), info.GetIsolate());
}
static void stringOrNullAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TestObjectV8Internal::stringOrNullAttributeAttributeGetter(info);
}
static void stringOrNullAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
TestObject* impl = V8TestObject::toImpl(holder);
V8StringResource<TreatNullAndUndefinedAsNullString> cppValue = v8Value;
if (!cppValue.prepare())
return;
impl->setStringOrNullAttribute(cppValue);
}
static void stringOrNullAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Value> v8Value = info[0];
TestObjectV8Internal::stringOrNullAttributeAttributeSetter(v8Value, info);
}
static void longOrNullAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
TestObject* impl = V8TestObject::toImpl(holder);
bool isNull = false;
int cppValue(impl->longOrNullAttribute(isNull));
if (isNull) {
v8SetReturnValueNull(info);
return;
}
v8SetReturnValueInt(info, cppValue);
}
static void longOrNullAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TestObjectV8Internal::longOrNullAttributeAttributeGetter(info);
}
static void longOrNullAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
ExceptionState exceptionState(ExceptionState::SetterContext, "longOrNullAttribute", "TestObject", holder, info.GetIsolate());
TestObject* impl = V8TestObject::toImpl(holder);
int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, exceptionState);
if (exceptionState.throwIfNeeded())
return;
impl->setLongOrNullAttribute(cppValue);
}
static void longOrNullAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Value> v8Value = info[0];
TestObjectV8Internal::longOrNullAttributeAttributeSetter(v8Value, info);
}
static void testInterfaceOrNullAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
TestObject* impl = V8TestObject::toImpl(holder);
v8SetReturnValueFast(info, WTF::getPtr(impl->testInterfaceOrNullAttribute()), impl);
}
static void testInterfaceOrNullAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TestObjectV8Internal::testInterfaceOrNullAttributeAttributeGetter(info);
}
static void testInterfaceOrNullAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
ExceptionState exceptionState(ExceptionState::SetterContext, "testInterfaceOrNullAttribute", "TestObject", holder, info.GetIsolate());
TestObject* impl = V8TestObject::toImpl(holder);
TestInterfaceImplementation* cppValue = V8TestInterface::toImplWithTypeCheck(info.GetIsolate(), v8Value);
if (!cppValue && !isUndefinedOrNull(v8Value)) {
exceptionState.throwTypeError("The provided value is not of type 'TestInterface'.");
exceptionState.throwIfNeeded();
return;
}
impl->setTestInterfaceOrNullAttribute(cppValue);
}
static void testInterfaceOrNullAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Value> v8Value = info[0];
TestObjectV8Internal::testInterfaceOrNullAttributeAttributeSetter(v8Value, info);
}
static void testEnumAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
TestObject* impl = V8TestObject::toImpl(holder);
v8SetReturnValueString(info, impl->testEnumAttribute(), info.GetIsolate());
}
static void testEnumAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TestObjectV8Internal::testEnumAttributeAttributeGetter(info);
}
static void testEnumAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
ExceptionState exceptionState(ExceptionState::SetterContext, "testEnumAttribute", "TestObject", holder, info.GetIsolate());
TestObject* impl = V8TestObject::toImpl(holder);
V8StringResource<> cppValue = v8Value;
if (!cppValue.prepare())
return;
const char* validValues[] = {
"",
"EnumValue1",
"EnumValue2",
"EnumValue3",
};
if (!isValidEnum(cppValue, validValues, WTF_ARRAY_LENGTH(validValues), "TestEnum", exceptionState)) {
currentExecutionContext(info.GetIsolate())->addConsoleMessage(ConsoleMessage::create(JSMessageSource, WarningMessageLevel, exceptionState.message()));
return;
}
impl->setTestEnumAttribute(cppValue);
}
static void testEnumAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Value> v8Value = info[0];
TestObjectV8Internal::testEnumAttributeAttributeSetter(v8Value, info);
}
static void testEnumOrNullAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
TestObject* impl = V8TestObject::toImpl(holder);
v8SetReturnValueStringOrNull(info, impl->testEnumOrNullAttribute(), info.GetIsolate());
}
static void testEnumOrNullAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TestObjectV8Internal::testEnumOrNullAttributeAttributeGetter(info);
}
static void testEnumOrNullAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
ExceptionState exceptionState(ExceptionState::SetterContext, "testEnumOrNullAttribute", "TestObject", holder, info.GetIsolate());
TestObject* impl = V8TestObject::toImpl(holder);
V8StringResource<TreatNullAndUndefinedAsNullString> cppValue = v8Value;
if (!cppValue.prepare())
return;
const char* validValues[] = {
"",
"EnumValue1",
"EnumValue2",
"EnumValue3",
};
if (!isValidEnum(cppValue, validValues, WTF_ARRAY_LENGTH(validValues), "TestEnum", exceptionState)) {
currentExecutionContext(info.GetIsolate())->addConsoleMessage(ConsoleMessage::create(JSMessageSource, WarningMessageLevel, exceptionState.message()));
return;
}
impl->setTestEnumOrNullAttribute(cppValue);
}
static void testEnumOrNullAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Value> v8Value = info[0];
TestObjectV8Internal::testEnumOrNullAttributeAttributeSetter(v8Value, info);
}
static void staticStringAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8SetReturnValueString(info, TestObject::staticStringAttribute(), info.GetIsolate());
}
static void staticStringAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TestObjectV8Internal::staticStringAttributeAttributeGetter(info);
}
static void staticStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
{
V8StringResource<> cppValue = v8Value;
if (!cppValue.prepare())
return;
TestObject::setStaticStringAttribute(cppValue);
}
static void staticStringAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Value> v8Value = info[0];
TestObjectV8Internal::staticStringAttributeAttributeSetter(v8Value, info);
}
static void staticLongAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8SetReturnValueInt(info, TestObject::staticLongAttribute());
}
static void staticLongAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TestObjectV8Internal::staticLongAttributeAttributeGetter(info);
}
static void staticLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
ExceptionState exceptionState(ExceptionState::SetterContext, "staticLongAttribute", "TestObject", holder, info.GetIsolate());
int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, exceptionState);
if (exceptionState.throwIfNeeded())
return;
TestObject::setStaticLongAttribute(cppValue);
}
static void staticLongAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Value> v8Value = info[0];
TestObjectV8Internal::staticLongAttributeAttributeSetter(v8Value, info);
}
static void eventHandlerAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
TestObject* impl = V8TestObject::toImpl(holder);
EventListener* cppValue(WTF::getPtr(impl->eventHandlerAttribute()));
v8SetReturnValue(info, cppValue ? v8::Local<v8::Value>(V8AbstractEventListener::cast(cppValue)->getListenerObject(impl->getExecutionContext())) : v8::Local<v8::Value>(v8::Null(info.GetIsolate())));
}
static void eventHandlerAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TestObjectV8Internal::eventHandlerAttributeAttributeGetter(info);
}
static void eventHandlerAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
TestObject* impl = V8TestObject::toImpl(holder);
moveEventListenerToNewWrapper(info.GetIsolate(), holder, impl->eventHandlerAttribute(), v8Value, V8TestObject::eventListenerCacheIndex);
impl->setEventHandlerAttribute(V8EventListenerList::getEventListener(ScriptState::current(info.GetIsolate()), v8Value, true, ListenerFindOrCreate));
}
static void eventHandlerAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Value> v8Value = info[0];
TestObjectV8Internal::eventHandlerAttributeAttributeSetter(v8Value, info);
}
static void doubleOrStringAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
TestObject* impl = V8TestObject::toImpl(holder);
DoubleOrString result;
impl->doubleOrStringAttribute(result);
v8SetReturnValue(info, result);
}
static void doubleOrStringAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TestObjectV8Internal::doubleOrStringAttributeAttributeGetter(info);
}
static void doubleOrStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
ExceptionState exceptionState(ExceptionState::SetterContext, "doubleOrStringAttribute", "TestObject", holder, info.GetIsolate());
TestObject* impl = V8TestObject::toImpl(holder);
DoubleOrString cppValue;
V8DoubleOrString::toImpl(info.GetIsolate(), v8Value, cppValue, UnionTypeConversionMode::NotNullable, exceptionState);
if (exceptionState.throwIfNeeded())
return;
impl->setDoubleOrStringAttribute(cppValue);
}
static void doubleOrStringAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Value> v8Value = info[0];
TestObjectV8Internal::doubleOrStringAttributeAttributeSetter(v8Value, info);
}
static void doubleOrStringOrNullAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
TestObject* impl = V8TestObject::toImpl(holder);
DoubleOrString result;
impl->doubleOrStringOrNullAttribute(result);
v8SetReturnValue(info, result);
}
static void doubleOrStringOrNullAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TestObjectV8Internal::doubleOrStringOrNullAttributeAttributeGetter(info);
}
static void doubleOrStringOrNullAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
ExceptionState exceptionState(ExceptionState::SetterContext, "doubleOrStringOrNullAttribute", "TestObject", holder, info.GetIsolate());
TestObject* impl = V8TestObject::toImpl(holder);
DoubleOrString cppValue;
V8DoubleOrString::toImpl(info.GetIsolate(), v8Value, cppValue, UnionTypeConversionMode::Nullable, exceptionState);
if (exceptionState.throwIfNeeded())
return;
impl->setDoubleOrStringOrNullAttribute(cppValue);
}
static void doubleOrStringOrNullAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Value> v8Value = info[0];
TestObjectV8Internal::doubleOrStringOrNullAttributeAttributeSetter(v8Value, info);
}
static void doubleOrNullStringAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
TestObject* impl = V8TestObject::toImpl(holder);
DoubleOrString result;
impl->doubleOrNullStringAttribute(result);
v8SetReturnValue(info, result);
}
static void doubleOrNullStringAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TestObjectV8Internal::doubleOrNullStringAttributeAttributeGetter(info);
}
static void doubleOrNullStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
ExceptionState exceptionState(ExceptionState::SetterContext, "doubleOrNullStringAttribute", "TestObject", holder, info.GetIsolate());
TestObject* impl = V8TestObject::toImpl(holder);
DoubleOrString cppValue;
V8DoubleOrNullOrString::toImpl(info.GetIsolate(), v8Value, cppValue, UnionTypeConversionMode::Nullable, exceptionState);
if (exceptionState.throwIfNeeded())
return;
impl->setDoubleOrNullStringAttribute(cppValue);
}
static void doubleOrNullStringAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Value> v8Value = info[0];
TestObjectV8Internal::doubleOrNullStringAttributeAttributeSetter(v8Value, info);
}
static void stringOrStringSequenceAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
TestObject* impl = V8TestObject::toImpl(holder);
StringOrStringSequence result;
impl->stringOrStringSequenceAttribute(result);
v8SetReturnValue(info, result);
}
static void stringOrStringSequenceAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TestObjectV8Internal::stringOrStringSequenceAttributeAttributeGetter(info);
}
static void stringOrStringSequenceAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
ExceptionState exceptionState(ExceptionState::SetterContext, "stringOrStringSequenceAttribute", "TestObject", holder, info.GetIsolate());
TestObject* impl = V8TestObject::toImpl(holder);
StringOrStringSequence cppValue;
V8StringOrStringSequence::toImpl(info.GetIsolate(), v8Value, cppValue, UnionTypeConversionMode::NotNullable, exceptionState);
if (exceptionState.throwIfNeeded())
return;
impl->setStringOrStringSequenceAttribute(cppValue);
}
static void stringOrStringSequenceAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Value> v8Value = info[0];
TestObjectV8Internal::stringOrStringSequenceAttributeAttributeSetter(v8Value, info);
}
static void testEnumOrDoubleAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
TestObject* impl = V8TestObject::toImpl(holder);
TestEnumOrDouble result;
impl->testEnumOrDoubleAttribute(result);
v8SetReturnValue(info, result);
}
static void testEnumOrDoubleAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TestObjectV8Internal::testEnumOrDoubleAttributeAttributeGetter(info);
}
static void testEnumOrDoubleAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
ExceptionState exceptionState(ExceptionState::SetterContext, "testEnumOrDoubleAttribute", "TestObject", holder, info.GetIsolate());
TestObject* impl = V8TestObject::toImpl(holder);
TestEnumOrDouble cppValue;
V8TestEnumOrDouble::toImpl(info.GetIsolate(), v8Value, cppValue, UnionTypeConversionMode::NotNullable, exceptionState);
if (exceptionState.throwIfNeeded())
return;
impl->setTestEnumOrDoubleAttribute(cppValue);
}
static void testEnumOrDoubleAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Value> v8Value = info[0];
TestObjectV8Internal::testEnumOrDoubleAttributeAttributeSetter(v8Value, info);
}
static void unrestrictedDoubleOrStringAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
TestObject* impl = V8TestObject::toImpl(holder);
UnrestrictedDoubleOrString result;
impl->unrestrictedDoubleOrStringAttribute(result);
v8SetReturnValue(info, result);
}
static void unrestrictedDoubleOrStringAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TestObjectV8Internal::unrestrictedDoubleOrStringAttributeAttributeGetter(info);
}
static void unrestrictedDoubleOrStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
ExceptionState exceptionState(ExceptionState::SetterContext, "unrestrictedDoubleOrStringAttribute", "TestObject", holder, info.GetIsolate());
TestObject* impl = V8TestObject::toImpl(holder);
UnrestrictedDoubleOrString cppValue;
V8UnrestrictedDoubleOrString::toImpl(info.GetIsolate(), v8Value, cppValue, UnionTypeConversionMode::NotNullable, exceptionState);
if (exceptionState.throwIfNeeded())
return;
impl->setUnrestrictedDoubleOrStringAttribute(cppValue);
}
static void unrestrictedDoubleOrStringAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Value> v8Value = info[0];
TestObjectV8Internal::unrestrictedDoubleOrStringAttributeAttributeSetter(v8Value, info);
}
static void activityLoggingAccessForAllWorldsLongAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
TestObject* impl = V8TestObject::toImpl(holder);
v8SetReturnValueInt(info, impl->activityLoggingAccessForAllWorldsLongAttribute());
}
static void activityLoggingAccessForAllWorldsLongAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentContext());
V8PerContextData* contextData = scriptState->perContextData();
if (contextData && contextData->activityLogger())
contextData->activityLogger()->logGetter("TestObject.activityLoggingAccessForAllWorldsLongAttribute");
TestObjectV8Internal::activityLoggingAccessForAllWorldsLongAttributeAttributeGetter(info);
}
static void activityLoggingAccessForAllWorldsLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggingAccessForAllWorldsLongAttribute", "TestObject", holder, info.GetIsolate());
TestObject* impl = V8TestObject::toImpl(holder);
int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, exceptionState);
if (exceptionState.throwIfNeeded())
return;
impl->setActivityLoggingAccessForAllWorldsLongAttribute(cppValue);
}
static void activityLoggingAccessForAllWorldsLongAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Value> v8Value = info[0];
ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentContext());
V8PerContextData* contextData = scriptState->perContextData();
if (contextData && contextData->activityLogger()) {
contextData->activityLogger()->logSetter("TestObject.activityLoggingAccessForAllWorldsLongAttribute", v8Value);
}
TestObjectV8Internal::activityLoggingAccessForAllWorldsLongAttributeAttributeSetter(v8Value, info);
}
static void activityLoggingGetterForAllWorldsLongAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
TestObject* impl = V8TestObject::toImpl(holder);
v8SetReturnValueInt(info, impl->activityLoggingGetterForAllWorldsLongAttribute());
}
static void activityLoggingGetterForAllWorldsLongAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentContext());
V8PerContextData* contextData = scriptState->perContextData();
if (contextData && contextData->activityLogger())
contextData->activityLogger()->logGetter("TestObject.activityLoggingGetterForAllWorldsLongAttribute");
TestObjectV8Internal::activityLoggingGetterForAllWorldsLongAttributeAttributeGetter(info);
}
static void activityLoggingGetterForAllWorldsLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggingGetterForAllWorldsLongAttribute", "TestObject", holder, info.GetIsolate());
TestObject* impl = V8TestObject::toImpl(holder);
int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, exceptionState);
if (exceptionState.throwIfNeeded())
return;
impl->setActivityLoggingGetterForAllWorldsLongAttribute(cppValue);
}
static void activityLoggingGetterForAllWorldsLongAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Value> v8Value = info[0];
TestObjectV8Internal::activityLoggingGetterForAllWorldsLongAttributeAttributeSetter(v8Value, info);
}
static void activityLoggingSetterForAllWorldsLongAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
TestObject* impl = V8TestObject::toImpl(holder);
v8SetReturnValueInt(info, impl->activityLoggingSetterForAllWorldsLongAttribute());
}
static void activityLoggingSetterForAllWorldsLongAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TestObjectV8Internal::activityLoggingSetterForAllWorldsLongAttributeAttributeGetter(info);
}
static void activityLoggingSetterForAllWorldsLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggingSetterForAllWorldsLongAttribute", "TestObject", holder, info.GetIsolate());
TestObject* impl = V8TestObject::toImpl(holder);
int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, exceptionState);
if (exceptionState.throwIfNeeded())
return;
impl->setActivityLoggingSetterForAllWorldsLongAttribute(cppValue);
}
static void activityLoggingSetterForAllWorldsLongAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Value> v8Value = info[0];
ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentContext());
V8PerContextData* contextData = scriptState->perContextData();
if (contextData && contextData->activityLogger()) {
contextData->activityLogger()->logSetter("TestObject.activityLoggingSetterForAllWorldsLongAttribute", v8Value);
}
TestObjectV8Internal::activityLoggingSetterForAllWorldsLongAttributeAttributeSetter(v8Value, info);
}
static void cachedAttributeAnyAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
v8::Local<v8::String> propertyName = v8AtomicString(info.GetIsolate(), "cachedAttributeAnyAttribute");
TestObject* impl = V8TestObject::toImpl(holder);
if (!impl->isValueDirty()) {
v8::Local<v8::Value> v8Value = V8HiddenValue::getHiddenValue(ScriptState::current(info.GetIsolate()), holder, propertyName);
if (!v8Value.IsEmpty() && !v8Value->IsUndefined()) {
v8SetReturnValue(info, v8Value);
return;
}
}
ScriptValue cppValue(impl->cachedAttributeAnyAttribute());
v8::Local<v8::Value> v8Value(cppValue.v8Value());
V8HiddenValue::setHiddenValue(ScriptState::current(info.GetIsolate()), holder, propertyName, v8Value);
v8SetReturnValue(info, v8Value);
}
static void cachedAttributeAnyAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TestObjectV8Internal::cachedAttributeAnyAttributeAttributeGetter(info);
}
static void cachedAttributeAnyAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
TestObject* impl = V8TestObject::toImpl(holder);
ScriptValue cppValue = ScriptValue(ScriptState::current(info.GetIsolate()), v8Value);
impl->setCachedAttributeAnyAttribute(cppValue);
V8HiddenValue::deleteHiddenValue(ScriptState::current(info.GetIsolate()), holder, v8AtomicString(info.GetIsolate(), "cachedAttributeAnyAttribute")); // Invalidate the cached value.
}
static void cachedAttributeAnyAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Value> v8Value = info[0];
TestObjectV8Internal::cachedAttributeAnyAttributeAttributeSetter(v8Value, info);
}
static void cachedArrayAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
v8::Local<v8::String> propertyName = v8AtomicString(info.GetIsolate(), "cachedArrayAttribute");
TestObject* impl = V8TestObject::toImpl(holder);
if (!impl->isArrayDirty()) {
v8::Local<v8::Value> v8Value = V8HiddenValue::getHiddenValue(ScriptState::current(info.GetIsolate()), holder, propertyName);
if (!v8Value.IsEmpty() && !v8Value->IsUndefined()) {
v8SetReturnValue(info, v8Value);
return;
}
}
Vector<String> cppValue(impl->cachedArrayAttribute());
v8::Local<v8::Value> v8Value(toV8(cppValue, holder, info.GetIsolate()));
V8HiddenValue::setHiddenValue(ScriptState::current(info.GetIsolate()), holder, propertyName, v8Value);
v8SetReturnValue(info, v8Value);
}
static void cachedArrayAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TestObjectV8Internal::cachedArrayAttributeAttributeGetter(info);
}
static void cachedArrayAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
ExceptionState exceptionState(ExceptionState::SetterContext, "cachedArrayAttribute", "TestObject", holder, info.GetIsolate());
TestObject* impl = V8TestObject::toImpl(holder);
Vector<String> cppValue = toImplArray<Vector<String>>(v8Value, 0, info.GetIsolate(), exceptionState);
if (exceptionState.throwIfNeeded())
return;
impl->setCachedArrayAttribute(cppValue);
V8HiddenValue::deleteHiddenValue(ScriptState::current(info.GetIsolate()), holder, v8AtomicString(info.GetIsolate(), "cachedArrayAttribute")); // Invalidate the cached value.
}