| // 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. |
| } |
| |
| static void cachedArrayAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Value> v8Value = info[0]; |
| TestObjectV8Internal::cachedArrayAttributeAttributeSetter(v8Value, info); |
| } |
| |
| static void cachedStringOrNoneAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Object> holder = info.Holder(); |
| v8::Local<v8::String> propertyName = v8AtomicString(info.GetIsolate(), "cachedStringOrNoneAttribute"); |
| TestObject* impl = V8TestObject::toImpl(holder); |
| if (!impl->isStringDirty()) { |
| v8::Local<v8::Value> v8Value = V8HiddenValue::getHiddenValue(ScriptState::current(info.GetIsolate()), holder, propertyName); |
| if (!v8Value.IsEmpty() && !v8Value->IsUndefined()) { |
| v8SetReturnValue(info, v8Value); |
| return; |
| } |
| } |
| String cppValue(impl->cachedStringOrNoneAttribute()); |
| v8::Local<v8::Value> v8Value(cppValue.isNull() ? v8::Local<v8::Value>(v8::Null(info.GetIsolate())) : v8String(info.GetIsolate(), cppValue)); |
| V8HiddenValue::setHiddenValue(ScriptState::current(info.GetIsolate()), holder, propertyName, v8Value); |
| v8SetReturnValue(info, v8Value); |
| } |
| |
| static void cachedStringOrNoneAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::cachedStringOrNoneAttributeAttributeGetter(info); |
| } |
| |
| static void cachedStringOrNoneAttributeAttributeSetter(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->setCachedStringOrNoneAttribute(cppValue); |
| V8HiddenValue::deleteHiddenValue(ScriptState::current(info.GetIsolate()), holder, v8AtomicString(info.GetIsolate(), "cachedStringOrNoneAttribute")); // Invalidate the cached value. |
| } |
| |
| static void cachedStringOrNoneAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Value> v8Value = info[0]; |
| TestObjectV8Internal::cachedStringOrNoneAttributeAttributeSetter(v8Value, info); |
| } |
| |
| static void callWithExecutionContextAnyAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Object> holder = info.Holder(); |
| TestObject* impl = V8TestObject::toImpl(holder); |
| ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate()); |
| v8SetReturnValue(info, impl->callWithExecutionContextAnyAttribute(executionContext).v8Value()); |
| } |
| |
| static void callWithExecutionContextAnyAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::callWithExecutionContextAnyAttributeAttributeGetter(info); |
| } |
| |
| static void callWithExecutionContextAnyAttributeAttributeSetter(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); |
| ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate()); |
| impl->setCallWithExecutionContextAnyAttribute(executionContext, cppValue); |
| } |
| |
| static void callWithExecutionContextAnyAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Value> v8Value = info[0]; |
| TestObjectV8Internal::callWithExecutionContextAnyAttributeAttributeSetter(v8Value, info); |
| } |
| |
| static void callWithScriptStateAnyAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Object> holder = info.Holder(); |
| TestObject* impl = V8TestObject::toImpl(holder); |
| ScriptState* scriptState = ScriptState::current(info.GetIsolate()); |
| v8SetReturnValue(info, impl->callWithScriptStateAnyAttribute(scriptState).v8Value()); |
| } |
| |
| static void callWithScriptStateAnyAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::callWithScriptStateAnyAttributeAttributeGetter(info); |
| } |
| |
| static void callWithScriptStateAnyAttributeAttributeSetter(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); |
| ScriptState* scriptState = ScriptState::current(info.GetIsolate()); |
| impl->setCallWithScriptStateAnyAttribute(scriptState, cppValue); |
| } |
| |
| static void callWithScriptStateAnyAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Value> v8Value = info[0]; |
| TestObjectV8Internal::callWithScriptStateAnyAttributeAttributeSetter(v8Value, info); |
| } |
| |
| static void callWithExecutionContextAndScriptStateAnyAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Object> holder = info.Holder(); |
| TestObject* impl = V8TestObject::toImpl(holder); |
| ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate()); |
| ScriptState* scriptState = ScriptState::current(info.GetIsolate()); |
| v8SetReturnValue(info, impl->callWithExecutionContextAndScriptStateAnyAttribute(scriptState, executionContext).v8Value()); |
| } |
| |
| static void callWithExecutionContextAndScriptStateAnyAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::callWithExecutionContextAndScriptStateAnyAttributeAttributeGetter(info); |
| } |
| |
| static void callWithExecutionContextAndScriptStateAnyAttributeAttributeSetter(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); |
| ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate()); |
| ScriptState* scriptState = ScriptState::current(info.GetIsolate()); |
| impl->setCallWithExecutionContextAndScriptStateAnyAttribute(scriptState, executionContext, cppValue); |
| } |
| |
| static void callWithExecutionContextAndScriptStateAnyAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Value> v8Value = info[0]; |
| TestObjectV8Internal::callWithExecutionContextAndScriptStateAnyAttributeAttributeSetter(v8Value, info); |
| } |
| |
| static void checkSecurityForNodeReadonlyDocumentAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Object> holder = info.Holder(); |
| TestObject* impl = V8TestObject::toImpl(holder); |
| ExceptionState exceptionState(ExceptionState::GetterContext, "checkSecurityForNodeReadonlyDocumentAttribute", "TestObject", holder, info.GetIsolate()); |
| if (!BindingSecurity::shouldAllowAccessTo(info.GetIsolate(), callingDOMWindow(info.GetIsolate()), WTF::getPtr(impl->checkSecurityForNodeReadonlyDocumentAttribute()), exceptionState)) { |
| v8SetReturnValueNull(info); |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| v8SetReturnValueFast(info, WTF::getPtr(impl->checkSecurityForNodeReadonlyDocumentAttribute()), impl); |
| } |
| |
| static void checkSecurityForNodeReadonlyDocumentAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::checkSecurityForNodeReadonlyDocumentAttributeAttributeGetter(info); |
| } |
| |
| static void testInterfaceEmptyConstructorAttributeConstructorGetterCallback(v8::Local<v8::Name> property, const v8::PropertyCallbackInfo<v8::Value>& info) |
| { |
| Deprecation::countDeprecationIfNotPrivateScript(info.GetIsolate(), currentExecutionContext(info.GetIsolate()), UseCounter::deprecatedTestInterfaceEmptyConstructorAttribute); |
| v8ConstructorAttributeGetter(property, info); |
| } |
| |
| static void measureAsFeatureNameTestInterfaceEmptyConstructorAttributeConstructorGetterCallback(v8::Local<v8::Name> property, const v8::PropertyCallbackInfo<v8::Value>& info) |
| { |
| UseCounter::countIfNotPrivateScript(info.GetIsolate(), currentExecutionContext(info.GetIsolate()), UseCounter::FeatureName); |
| v8ConstructorAttributeGetter(property, info); |
| } |
| |
| static void customObjectAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| V8TestObject::customObjectAttributeAttributeGetterCustom(info); |
| } |
| |
| static void customObjectAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Value> v8Value = info[0]; |
| V8TestObject::customObjectAttributeAttributeSetterCustom(v8Value, info); |
| } |
| |
| static void customGetterLongAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| V8TestObject::customGetterLongAttributeAttributeGetterCustom(info); |
| } |
| |
| static void customGetterLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Object> holder = info.Holder(); |
| ExceptionState exceptionState(ExceptionState::SetterContext, "customGetterLongAttribute", "TestObject", holder, info.GetIsolate()); |
| TestObject* impl = V8TestObject::toImpl(holder); |
| int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| impl->setCustomGetterLongAttribute(cppValue); |
| } |
| |
| static void customGetterLongAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Value> v8Value = info[0]; |
| TestObjectV8Internal::customGetterLongAttributeAttributeSetter(v8Value, info); |
| } |
| |
| static void customGetterReadonlyObjectAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| V8TestObject::customGetterReadonlyObjectAttributeAttributeGetterCustom(info); |
| } |
| |
| static void customSetterLongAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Object> holder = info.Holder(); |
| TestObject* impl = V8TestObject::toImpl(holder); |
| v8SetReturnValueInt(info, impl->customSetterLongAttribute()); |
| } |
| |
| static void customSetterLongAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::customSetterLongAttributeAttributeGetter(info); |
| } |
| |
| static void customSetterLongAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Value> v8Value = info[0]; |
| V8TestObject::customSetterLongAttributeAttributeSetterCustom(v8Value, info); |
| } |
| |
| static void customElementsCallbacksReadonlyLongAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Object> holder = info.Holder(); |
| TestObject* impl = V8TestObject::toImpl(holder); |
| v8SetReturnValueInt(info, impl->customElementsCallbacksReadonlyLongAttribute()); |
| } |
| |
| static void customElementsCallbacksReadonlyLongAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::customElementsCallbacksReadonlyLongAttributeAttributeGetter(info); |
| } |
| |
| static void deprecatedLongAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Object> holder = info.Holder(); |
| TestObject* impl = V8TestObject::toImpl(holder); |
| v8SetReturnValueInt(info, impl->deprecatedLongAttribute()); |
| } |
| |
| static void deprecatedLongAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| Deprecation::countDeprecationIfNotPrivateScript(info.GetIsolate(), currentExecutionContext(info.GetIsolate()), UseCounter::LongAttribute); |
| TestObjectV8Internal::deprecatedLongAttributeAttributeGetter(info); |
| } |
| |
| static void deprecatedLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Object> holder = info.Holder(); |
| ExceptionState exceptionState(ExceptionState::SetterContext, "deprecatedLongAttribute", "TestObject", holder, info.GetIsolate()); |
| TestObject* impl = V8TestObject::toImpl(holder); |
| int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| impl->setDeprecatedLongAttribute(cppValue); |
| } |
| |
| static void deprecatedLongAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Value> v8Value = info[0]; |
| Deprecation::countDeprecationIfNotPrivateScript(info.GetIsolate(), currentExecutionContext(info.GetIsolate()), UseCounter::LongAttribute); |
| TestObjectV8Internal::deprecatedLongAttributeAttributeSetter(v8Value, info); |
| } |
| |
| static void enforceRangeLongAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Object> holder = info.Holder(); |
| TestObject* impl = V8TestObject::toImpl(holder); |
| v8SetReturnValueInt(info, impl->enforceRangeLongAttribute()); |
| } |
| |
| static void enforceRangeLongAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::enforceRangeLongAttributeAttributeGetter(info); |
| } |
| |
| static void enforceRangeLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Object> holder = info.Holder(); |
| ExceptionState exceptionState(ExceptionState::SetterContext, "enforceRangeLongAttribute", "TestObject", holder, info.GetIsolate()); |
| TestObject* impl = V8TestObject::toImpl(holder); |
| int cppValue = toInt32(info.GetIsolate(), v8Value, EnforceRange, exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| impl->setEnforceRangeLongAttribute(cppValue); |
| } |
| |
| static void enforceRangeLongAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Value> v8Value = info[0]; |
| TestObjectV8Internal::enforceRangeLongAttributeAttributeSetter(v8Value, info); |
| } |
| |
| static void implementedAsLongAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Object> holder = info.Holder(); |
| TestObject* impl = V8TestObject::toImpl(holder); |
| v8SetReturnValueInt(info, impl->implementedAsName()); |
| } |
| |
| static void implementedAsLongAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::implementedAsLongAttributeAttributeGetter(info); |
| } |
| |
| static void implementedAsLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Object> holder = info.Holder(); |
| ExceptionState exceptionState(ExceptionState::SetterContext, "implementedAsLongAttribute", "TestObject", holder, info.GetIsolate()); |
| TestObject* impl = V8TestObject::toImpl(holder); |
| int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| impl->setImplementedAsName(cppValue); |
| } |
| |
| static void implementedAsLongAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Value> v8Value = info[0]; |
| TestObjectV8Internal::implementedAsLongAttributeAttributeSetter(v8Value, info); |
| } |
| |
| static void customImplementedAsLongAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| V8TestObject::customImplementedAsLongAttributeAttributeGetterCustom(info); |
| } |
| |
| static void customImplementedAsLongAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Value> v8Value = info[0]; |
| V8TestObject::customImplementedAsLongAttributeAttributeSetterCustom(v8Value, info); |
| } |
| |
| static void customGetterImplementedAsLongAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| V8TestObject::customGetterImplementedAsLongAttributeAttributeGetterCustom(info); |
| } |
| |
| static void customGetterImplementedAsLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Object> holder = info.Holder(); |
| ExceptionState exceptionState(ExceptionState::SetterContext, "customGetterImplementedAsLongAttribute", "TestObject", holder, info.GetIsolate()); |
| TestObject* impl = V8TestObject::toImpl(holder); |
| int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| impl->setImplementedAsNameWithCustomGetter(cppValue); |
| } |
| |
| static void customGetterImplementedAsLongAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Value> v8Value = info[0]; |
| TestObjectV8Internal::customGetterImplementedAsLongAttributeAttributeSetter(v8Value, info); |
| } |
| |
| static void customSetterImplementedAsLongAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Object> holder = info.Holder(); |
| TestObject* impl = V8TestObject::toImpl(holder); |
| v8SetReturnValueInt(info, impl->implementedAsNameWithCustomGetter()); |
| } |
| |
| static void customSetterImplementedAsLongAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::customSetterImplementedAsLongAttributeAttributeGetter(info); |
| } |
| |
| static void customSetterImplementedAsLongAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Value> v8Value = info[0]; |
| V8TestObject::customSetterImplementedAsLongAttributeAttributeSetterCustom(v8Value, info); |
| } |
| |
| static void measureAsLongAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Object> holder = info.Holder(); |
| TestObject* impl = V8TestObject::toImpl(holder); |
| v8SetReturnValueInt(info, impl->measureAsLongAttribute()); |
| } |
| |
| static void measureAsLongAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| UseCounter::countIfNotPrivateScript(info.GetIsolate(), currentExecutionContext(info.GetIsolate()), UseCounter::TestFeature); |
| TestObjectV8Internal::measureAsLongAttributeAttributeGetter(info); |
| } |
| |
| static void measureAsLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Object> holder = info.Holder(); |
| ExceptionState exceptionState(ExceptionState::SetterContext, "measureAsLongAttribute", "TestObject", holder, info.GetIsolate()); |
| TestObject* impl = V8TestObject::toImpl(holder); |
| int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| impl->setMeasureAsLongAttribute(cppValue); |
| } |
| |
| static void measureAsLongAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Value> v8Value = info[0]; |
| UseCounter::countIfNotPrivateScript(info.GetIsolate(), currentExecutionContext(info.GetIsolate()), UseCounter::TestFeature); |
| TestObjectV8Internal::measureAsLongAttributeAttributeSetter(v8Value, info); |
| } |
| |
| static void notEnumerableLongAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Object> holder = info.Holder(); |
| TestObject* impl = V8TestObject::toImpl(holder); |
| v8SetReturnValueInt(info, impl->notEnumerableLongAttribute()); |
| } |
| |
| static void notEnumerableLongAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::notEnumerableLongAttributeAttributeGetter(info); |
| } |
| |
| static void notEnumerableLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Object> holder = info.Holder(); |
| ExceptionState exceptionState(ExceptionState::SetterContext, "notEnumerableLongAttribute", "TestObject", holder, info.GetIsolate()); |
| TestObject* impl = V8TestObject::toImpl(holder); |
| int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| impl->setNotEnumerableLongAttribute(cppValue); |
| } |
| |
| static void notEnumerableLongAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Value> v8Value = info[0]; |
| TestObjectV8Internal::notEnumerableLongAttributeAttributeSetter(v8Value, info); |
| } |
| |
| static void originTrialEnabledLongAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate()); |
| String errorMessage; |
| if (!OriginTrials::featureNameEnabled(executionContext, errorMessage)) { |
| v8SetReturnValue(info, v8::Undefined(info.GetIsolate())); |
| if (!errorMessage.isEmpty()) { |
| toDocument(executionContext)->addConsoleMessage(ConsoleMessage::create(JSMessageSource, ErrorMessageLevel, errorMessage)); |
| } |
| return; |
| } |
| v8::Local<v8::Object> holder = info.Holder(); |
| TestObject* impl = V8TestObject::toImpl(holder); |
| v8SetReturnValueInt(info, impl->originTrialEnabledLongAttribute()); |
| } |
| |
| static void originTrialEnabledLongAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate()); |
| String errorMessage; |
| if (!OriginTrials::featureNameEnabled(executionContext, errorMessage)) { |
| v8SetReturnValue(info, v8::Undefined(info.GetIsolate())); |
| if (!errorMessage.isEmpty()) { |
| toDocument(executionContext)->addConsoleMessage(ConsoleMessage::create(JSMessageSource, ErrorMessageLevel, errorMessage)); |
| } |
| return; |
| } |
| TestObjectV8Internal::originTrialEnabledLongAttributeAttributeGetter(info); |
| } |
| |
| static void originTrialEnabledLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Object> holder = info.Holder(); |
| ExceptionState exceptionState(ExceptionState::SetterContext, "originTrialEnabledLongAttribute", "TestObject", holder, info.GetIsolate()); |
| TestObject* impl = V8TestObject::toImpl(holder); |
| int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| impl->setOriginTrialEnabledLongAttribute(cppValue); |
| } |
| |
| static void originTrialEnabledLongAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Value> v8Value = info[0]; |
| TestObjectV8Internal::originTrialEnabledLongAttributeAttributeSetter(v8Value, info); |
| } |
| |
| static void perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Object> holder = info.Holder(); |
| TestObject* impl = V8TestObject::toImpl(holder); |
| TestInterfaceEmpty* cppValue(WTF::getPtr(impl->perWorldBindingsReadonlyTestInterfaceEmptyAttribute())); |
| 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(), "perWorldBindingsReadonlyTestInterfaceEmptyAttribute"), v8Value); |
| v8SetReturnValue(info, v8Value); |
| } |
| } |
| |
| static void perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetter(info); |
| } |
| |
| static void perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetterForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Object> holder = info.Holder(); |
| TestObject* impl = V8TestObject::toImpl(holder); |
| TestInterfaceEmpty* cppValue(WTF::getPtr(impl->perWorldBindingsReadonlyTestInterfaceEmptyAttribute())); |
| if (cppValue && DOMDataStore::setReturnValueForMainWorld(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(), "perWorldBindingsReadonlyTestInterfaceEmptyAttribute"), v8Value); |
| v8SetReturnValue(info, v8Value); |
| } |
| } |
| |
| static void perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetterCallbackForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetterForMainWorld(info); |
| } |
| |
| static void activityLoggingAccessPerWorldBindingsLongAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Object> holder = info.Holder(); |
| TestObject* impl = V8TestObject::toImpl(holder); |
| v8SetReturnValueInt(info, impl->activityLoggingAccessPerWorldBindingsLongAttribute()); |
| } |
| |
| static void activityLoggingAccessPerWorldBindingsLongAttributeAttributeGetterCallback(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.activityLoggingAccessPerWorldBindingsLongAttribute"); |
| TestObjectV8Internal::activityLoggingAccessPerWorldBindingsLongAttributeAttributeGetter(info); |
| } |
| |
| static void activityLoggingAccessPerWorldBindingsLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Object> holder = info.Holder(); |
| ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggingAccessPerWorldBindingsLongAttribute", "TestObject", holder, info.GetIsolate()); |
| TestObject* impl = V8TestObject::toImpl(holder); |
| int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| impl->setActivityLoggingAccessPerWorldBindingsLongAttribute(cppValue); |
| } |
| |
| static void activityLoggingAccessPerWorldBindingsLongAttributeAttributeSetterCallback(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.activityLoggingAccessPerWorldBindingsLongAttribute", v8Value); |
| } |
| TestObjectV8Internal::activityLoggingAccessPerWorldBindingsLongAttributeAttributeSetter(v8Value, info); |
| } |
| |
| static void activityLoggingAccessPerWorldBindingsLongAttributeAttributeGetterForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Object> holder = info.Holder(); |
| TestObject* impl = V8TestObject::toImpl(holder); |
| v8SetReturnValueInt(info, impl->activityLoggingAccessPerWorldBindingsLongAttribute()); |
| } |
| |
| static void activityLoggingAccessPerWorldBindingsLongAttributeAttributeGetterCallbackForMainWorld(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.activityLoggingAccessPerWorldBindingsLongAttribute"); |
| TestObjectV8Internal::activityLoggingAccessPerWorldBindingsLongAttributeAttributeGetterForMainWorld(info); |
| } |
| |
| static void activityLoggingAccessPerWorldBindingsLongAttributeAttributeSetterForMainWorld(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Object> holder = info.Holder(); |
| ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggingAccessPerWorldBindingsLongAttribute", "TestObject", holder, info.GetIsolate()); |
| TestObject* impl = V8TestObject::toImpl(holder); |
| int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| impl->setActivityLoggingAccessPerWorldBindingsLongAttribute(cppValue); |
| } |
| |
| static void activityLoggingAccessPerWorldBindingsLongAttributeAttributeSetterCallbackForMainWorld(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.activityLoggingAccessPerWorldBindingsLongAttribute", v8Value); |
| } |
| TestObjectV8Internal::activityLoggingAccessPerWorldBindingsLongAttributeAttributeSetterForMainWorld(v8Value, info); |
| } |
| |
| static void activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Object> holder = info.Holder(); |
| TestObject* impl = V8TestObject::toImpl(holder); |
| v8SetReturnValueInt(info, impl->activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttribute()); |
| } |
| |
| static void activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeAttributeGetterCallback(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.activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttribute"); |
| TestObjectV8Internal::activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeAttributeGetter(info); |
| } |
| |
| static void activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Object> holder = info.Holder(); |
| ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttribute", "TestObject", holder, info.GetIsolate()); |
| TestObject* impl = V8TestObject::toImpl(holder); |
| int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| impl->setActivityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttribute(cppValue); |
| } |
| |
| static void activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeAttributeSetterCallback(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.activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttribute", v8Value); |
| } |
| TestObjectV8Internal::activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeAttributeSetter(v8Value, info); |
| } |
| |
| static void activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeAttributeGetterForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Object> holder = info.Holder(); |
| TestObject* impl = V8TestObject::toImpl(holder); |
| v8SetReturnValueInt(info, impl->activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttribute()); |
| } |
| |
| static void activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeAttributeGetterCallbackForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeAttributeGetterForMainWorld(info); |
| } |
| |
| static void activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeAttributeSetterForMainWorld(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Object> holder = info.Holder(); |
| ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttribute", "TestObject", holder, info.GetIsolate()); |
| TestObject* impl = V8TestObject::toImpl(holder); |
| int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| impl->setActivityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttribute(cppValue); |
| } |
| |
| static void activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeAttributeSetterCallbackForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Value> v8Value = info[0]; |
| TestObjectV8Internal::activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeAttributeSetterForMainWorld(v8Value, info); |
| } |
| |
| static void activityLoggingGetterPerWorldBindingsLongAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Object> holder = info.Holder(); |
| TestObject* impl = V8TestObject::toImpl(holder); |
| v8SetReturnValueInt(info, impl->activityLoggingGetterPerWorldBindingsLongAttribute()); |
| } |
| |
| static void activityLoggingGetterPerWorldBindingsLongAttributeAttributeGetterCallback(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.activityLoggingGetterPerWorldBindingsLongAttribute"); |
| TestObjectV8Internal::activityLoggingGetterPerWorldBindingsLongAttributeAttributeGetter(info); |
| } |
| |
| static void activityLoggingGetterPerWorldBindingsLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Object> holder = info.Holder(); |
| ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggingGetterPerWorldBindingsLongAttribute", "TestObject", holder, info.GetIsolate()); |
| TestObject* impl = V8TestObject::toImpl(holder); |
| int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| impl->setActivityLoggingGetterPerWorldBindingsLongAttribute(cppValue); |
| } |
| |
| static void activityLoggingGetterPerWorldBindingsLongAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Value> v8Value = info[0]; |
| TestObjectV8Internal::activityLoggingGetterPerWorldBindingsLongAttributeAttributeSetter(v8Value, info); |
| } |
| |
| static void activityLoggingGetterPerWorldBindingsLongAttributeAttributeGetterForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Object> holder = info.Holder(); |
| TestObject* impl = V8TestObject::toImpl(holder); |
| v8SetReturnValueInt(info, impl->activityLoggingGetterPerWorldBindingsLongAttribute()); |
| } |
| |
| static void activityLoggingGetterPerWorldBindingsLongAttributeAttributeGetterCallbackForMainWorld(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.activityLoggingGetterPerWorldBindingsLongAttribute"); |
| TestObjectV8Internal::activityLoggingGetterPerWorldBindingsLongAttributeAttributeGetterForMainWorld(info); |
| } |
| |
| static void activityLoggingGetterPerWorldBindingsLongAttributeAttributeSetterForMainWorld(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Object> holder = info.Holder(); |
| ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggingGetterPerWorldBindingsLongAttribute", "TestObject", holder, info.GetIsolate()); |
| TestObject* impl = V8TestObject::toImpl(holder); |
| int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| impl->setActivityLoggingGetterPerWorldBindingsLongAttribute(cppValue); |
| } |
| |
| static void activityLoggingGetterPerWorldBindingsLongAttributeAttributeSetterCallbackForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Value> v8Value = info[0]; |
| TestObjectV8Internal::activityLoggingGetterPerWorldBindingsLongAttributeAttributeSetterForMainWorld(v8Value, info); |
| } |
| |
| static void activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Object> holder = info.Holder(); |
| TestObject* impl = V8TestObject::toImpl(holder); |
| v8SetReturnValueInt(info, impl->activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttribute()); |
| } |
| |
| static void activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeAttributeGetterCallback(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.activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttribute"); |
| TestObjectV8Internal::activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeAttributeGetter(info); |
| } |
| |
| static void activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Object> holder = info.Holder(); |
| ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttribute", "TestObject", holder, info.GetIsolate()); |
| TestObject* impl = V8TestObject::toImpl(holder); |
| int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| impl->setActivityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttribute(cppValue); |
| } |
| |
| static void activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Value> v8Value = info[0]; |
| TestObjectV8Internal::activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeAttributeSetter(v8Value, info); |
| } |
| |
| static void activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeAttributeGetterForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Object> holder = info.Holder(); |
| TestObject* impl = V8TestObject::toImpl(holder); |
| v8SetReturnValueInt(info, impl->activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttribute()); |
| } |
| |
| static void activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeAttributeGetterCallbackForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeAttributeGetterForMainWorld(info); |
| } |
| |
| static void activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeAttributeSetterForMainWorld(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Object> holder = info.Holder(); |
| ExceptionState exceptionState(ExceptionState::SetterContext, "activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttribute", "TestObject", holder, info.GetIsolate()); |
| TestObject* impl = V8TestObject::toImpl(holder); |
| int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| impl->setActivityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttribute(cppValue); |
| } |
| |
| static void activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeAttributeSetterCallbackForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Value> v8Value = info[0]; |
| TestObjectV8Internal::activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeAttributeSetterForMainWorld(v8Value, info); |
| } |
| |
| static void locationAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Object> holder = info.Holder(); |
| TestObject* impl = V8TestObject::toImpl(holder); |
| v8SetReturnValueFast(info, WTF::getPtr(impl->location()), impl); |
| } |
| |
| static void locationAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::locationAttributeGetter(info); |
| } |
| |
| static void locationAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Object> holder = info.Holder(); |
| TestObject* proxyImpl = V8TestObject::toImpl(holder); |
| TestNode* impl = WTF::getPtr(proxyImpl->location()); |
| if (!impl) |
| return; |
| V8StringResource<> cppValue = v8Value; |
| if (!cppValue.prepare()) |
| return; |
| impl->setHref(cppValue); |
| } |
| |
| static void locationAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Value> v8Value = info[0]; |
| TestObjectV8Internal::locationAttributeSetter(v8Value, info); |
| } |
| |
| static void locationWithExceptionAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Object> holder = info.Holder(); |
| TestObject* impl = V8TestObject::toImpl(holder); |
| v8SetReturnValueFast(info, WTF::getPtr(impl->locationWithException()), impl); |
| } |
| |
| static void locationWithExceptionAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::locationWithExceptionAttributeGetter(info); |
| } |
| |
| static void locationWithExceptionAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Object> holder = info.Holder(); |
| ExceptionState exceptionState(ExceptionState::SetterContext, "locationWithException", "TestObject", holder, info.GetIsolate()); |
| TestObject* proxyImpl = V8TestObject::toImpl(holder); |
| TestNode* impl = WTF::getPtr(proxyImpl->locationWithException()); |
| if (!impl) |
| return; |
| V8StringResource<> cppValue = v8Value; |
| if (!cppValue.prepare()) |
| return; |
| impl->setHrefThrows(cppValue, exceptionState); |
| exceptionState.throwIfNeeded(); |
| } |
| |
| static void locationWithExceptionAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Value> v8Value = info[0]; |
| TestObjectV8Internal::locationWithExceptionAttributeSetter(v8Value, info); |
| } |
| |
| static void locationWithCallWithAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Object> holder = info.Holder(); |
| TestObject* impl = V8TestObject::toImpl(holder); |
| v8SetReturnValueFast(info, WTF::getPtr(impl->locationWithCallWith()), impl); |
| } |
| |
| static void locationWithCallWithAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::locationWithCallWithAttributeGetter(info); |
| } |
| |
| static void locationWithCallWithAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Object> holder = info.Holder(); |
| TestObject* proxyImpl = V8TestObject::toImpl(holder); |
| TestNode* impl = WTF::getPtr(proxyImpl->locationWithCallWith()); |
| if (!impl) |
| return; |
| V8StringResource<> cppValue = v8Value; |
| if (!cppValue.prepare()) |
| return; |
| ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate()); |
| impl->setHrefCallWith(executionContext, currentDOMWindow(info.GetIsolate()), enteredDOMWindow(info.GetIsolate()), cppValue); |
| } |
| |
| static void locationWithCallWithAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Value> v8Value = info[0]; |
| TestObjectV8Internal::locationWithCallWithAttributeSetter(v8Value, info); |
| } |
| |
| static void locationByteStringAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Object> holder = info.Holder(); |
| TestObject* impl = V8TestObject::toImpl(holder); |
| v8SetReturnValueFast(info, WTF::getPtr(impl->locationByteString()), impl); |
| } |
| |
| static void locationByteStringAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::locationByteStringAttributeGetter(info); |
| } |
| |
| static void locationByteStringAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Object> holder = info.Holder(); |
| ExceptionState exceptionState(ExceptionState::SetterContext, "locationByteString", "TestObject", holder, info.GetIsolate()); |
| TestObject* proxyImpl = V8TestObject::toImpl(holder); |
| TestNode* impl = WTF::getPtr(proxyImpl->locationByteString()); |
| if (!impl) |
| return; |
| V8StringResource<> cppValue = toByteString(info.GetIsolate(), v8Value, exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| impl->setHrefByteString(cppValue); |
| } |
| |
| static void locationByteStringAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Value> v8Value = info[0]; |
| TestObjectV8Internal::locationByteStringAttributeSetter(v8Value, info); |
| } |
| |
| static void locationWithPerWorldBindingsAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Object> holder = info.Holder(); |
| TestObject* impl = V8TestObject::toImpl(holder); |
| v8SetReturnValueFast(info, WTF::getPtr(impl->locationWithPerWorldBindings()), impl); |
| } |
| |
| static void locationWithPerWorldBindingsAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::locationWithPerWorldBindingsAttributeGetter(info); |
| } |
| |
| static void locationWithPerWorldBindingsAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Object> holder = info.Holder(); |
| TestObject* proxyImpl = V8TestObject::toImpl(holder); |
| TestNode* impl = WTF::getPtr(proxyImpl->locationWithPerWorldBindings()); |
| if (!impl) |
| return; |
| V8StringResource<> cppValue = v8Value; |
| if (!cppValue.prepare()) |
| return; |
| impl->setHref(cppValue); |
| } |
| |
| static void locationWithPerWorldBindingsAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Value> v8Value = info[0]; |
| TestObjectV8Internal::locationWithPerWorldBindingsAttributeSetter(v8Value, info); |
| } |
| |
| static void locationWithPerWorldBindingsAttributeGetterForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Object> holder = info.Holder(); |
| TestObject* impl = V8TestObject::toImpl(holder); |
| v8SetReturnValueForMainWorld(info, WTF::getPtr(impl->locationWithPerWorldBindings())); |
| } |
| |
| static void locationWithPerWorldBindingsAttributeGetterCallbackForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::locationWithPerWorldBindingsAttributeGetterForMainWorld(info); |
| } |
| |
| static void locationWithPerWorldBindingsAttributeSetterForMainWorld(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Object> holder = info.Holder(); |
| TestObject* proxyImpl = V8TestObject::toImpl(holder); |
| TestNode* impl = WTF::getPtr(proxyImpl->locationWithPerWorldBindings()); |
| if (!impl) |
| return; |
| V8StringResource<> cppValue = v8Value; |
| if (!cppValue.prepare()) |
| return; |
| impl->setHref(cppValue); |
| } |
| |
| static void locationWithPerWorldBindingsAttributeSetterCallbackForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Value> v8Value = info[0]; |
| TestObjectV8Internal::locationWithPerWorldBindingsAttributeSetterForMainWorld(v8Value, info); |
| } |
| |
| static void locationLegacyInterfaceTypeCheckingAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Object> holder = info.Holder(); |
| TestObject* impl = V8TestObject::toImpl(holder); |
| v8SetReturnValueFast(info, WTF::getPtr(impl->locationLegacyInterfaceTypeChecking()), impl); |
| } |
| |
| static void locationLegacyInterfaceTypeCheckingAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::locationLegacyInterfaceTypeCheckingAttributeGetter(info); |
| } |
| |
| static void locationLegacyInterfaceTypeCheckingAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Object> holder = info.Holder(); |
| TestObject* proxyImpl = V8TestObject::toImpl(holder); |
| TestNode* impl = WTF::getPtr(proxyImpl->locationLegacyInterfaceTypeChecking()); |
| if (!impl) |
| return; |
| V8StringResource<> cppValue = v8Value; |
| if (!cppValue.prepare()) |
| return; |
| impl->setHref(cppValue); |
| } |
| |
| static void locationLegacyInterfaceTypeCheckingAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Value> v8Value = info[0]; |
| TestObjectV8Internal::locationLegacyInterfaceTypeCheckingAttributeSetter(v8Value, info); |
| } |
| |
| static void locationGarbageCollectedAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Object> holder = info.Holder(); |
| TestObject* impl = V8TestObject::toImpl(holder); |
| TestInterfaceGarbageCollected* cppValue(WTF::getPtr(impl->locationGarbageCollected())); |
| 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(), "locationGarbageCollected"), v8Value); |
| v8SetReturnValue(info, v8Value); |
| } |
| } |
| |
| static void locationGarbageCollectedAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::locationGarbageCollectedAttributeGetter(info); |
| } |
| |
| static void locationGarbageCollectedAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Object> holder = info.Holder(); |
| ExceptionState exceptionState(ExceptionState::SetterContext, "locationGarbageCollected", "TestObject", holder, info.GetIsolate()); |
| TestObject* proxyImpl = V8TestObject::toImpl(holder); |
| TestInterfaceGarbageCollected* impl = WTF::getPtr(proxyImpl->locationGarbageCollected()); |
| if (!impl) |
| return; |
| TestInterfaceGarbageCollected* cppValue = V8TestInterfaceGarbageCollected::toImplWithTypeCheck(info.GetIsolate(), v8Value); |
| if (!cppValue) { |
| exceptionState.throwTypeError("The provided value is not of type 'TestInterfaceGarbageCollected'."); |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| impl->setAttr1(cppValue); |
| } |
| |
| static void locationGarbageCollectedAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Value> v8Value = info[0]; |
| TestObjectV8Internal::locationGarbageCollectedAttributeSetter(v8Value, info); |
| } |
| |
| static void raisesExceptionLongAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Object> holder = info.Holder(); |
| TestObject* impl = V8TestObject::toImpl(holder); |
| ExceptionState exceptionState(ExceptionState::GetterContext, "raisesExceptionLongAttribute", "TestObject", holder, info.GetIsolate()); |
| int cppValue(impl->raisesExceptionLongAttribute(exceptionState)); |
| if (UNLIKELY(exceptionState.throwIfNeeded())) |
| return; |
| v8SetReturnValueInt(info, cppValue); |
| } |
| |
| static void raisesExceptionLongAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::raisesExceptionLongAttributeAttributeGetter(info); |
| } |
| |
| static void raisesExceptionLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Object> holder = info.Holder(); |
| ExceptionState exceptionState(ExceptionState::SetterContext, "raisesExceptionLongAttribute", "TestObject", holder, info.GetIsolate()); |
| TestObject* impl = V8TestObject::toImpl(holder); |
| int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| impl->setRaisesExceptionLongAttribute(cppValue, exceptionState); |
| exceptionState.throwIfNeeded(); |
| } |
| |
| static void raisesExceptionLongAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Value> v8Value = info[0]; |
| TestObjectV8Internal::raisesExceptionLongAttributeAttributeSetter(v8Value, info); |
| } |
| |
| static void raisesExceptionGetterLongAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Object> holder = info.Holder(); |
| TestObject* impl = V8TestObject::toImpl(holder); |
| ExceptionState exceptionState(ExceptionState::GetterContext, "raisesExceptionGetterLongAttribute", "TestObject", holder, info.GetIsolate()); |
| int cppValue(impl->raisesExceptionGetterLongAttribute(exceptionState)); |
| if (UNLIKELY(exceptionState.throwIfNeeded())) |
| return; |
| v8SetReturnValueInt(info, cppValue); |
| } |
| |
| static void raisesExceptionGetterLongAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::raisesExceptionGetterLongAttributeAttributeGetter(info); |
| } |
| |
| static void raisesExceptionGetterLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Object> holder = info.Holder(); |
| ExceptionState exceptionState(ExceptionState::SetterContext, "raisesExceptionGetterLongAttribute", "TestObject", holder, info.GetIsolate()); |
| TestObject* impl = V8TestObject::toImpl(holder); |
| int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| impl->setRaisesExceptionGetterLongAttribute(cppValue); |
| } |
| |
| static void raisesExceptionGetterLongAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Value> v8Value = info[0]; |
| TestObjectV8Internal::raisesExceptionGetterLongAttributeAttributeSetter(v8Value, info); |
| } |
| |
| static void setterRaisesExceptionLongAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Object> holder = info.Holder(); |
| TestObject* impl = V8TestObject::toImpl(holder); |
| v8SetReturnValueInt(info, impl->setterRaisesExceptionLongAttribute()); |
| } |
| |
| static void setterRaisesExceptionLongAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::setterRaisesExceptionLongAttributeAttributeGetter(info); |
| } |
| |
| static void setterRaisesExceptionLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Object> holder = info.Holder(); |
| ExceptionState exceptionState(ExceptionState::SetterContext, "setterRaisesExceptionLongAttribute", "TestObject", holder, info.GetIsolate()); |
| TestObject* impl = V8TestObject::toImpl(holder); |
| int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| impl->setSetterRaisesExceptionLongAttribute(cppValue, exceptionState); |
| exceptionState.throwIfNeeded(); |
| } |
| |
| static void setterRaisesExceptionLongAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Value> v8Value = info[0]; |
| TestObjectV8Internal::setterRaisesExceptionLongAttributeAttributeSetter(v8Value, info); |
| } |
| |
| static void raisesExceptionTestInterfaceEmptyAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Object> holder = info.Holder(); |
| TestObject* impl = V8TestObject::toImpl(holder); |
| ExceptionState exceptionState(ExceptionState::GetterContext, "raisesExceptionTestInterfaceEmptyAttribute", "TestObject", holder, info.GetIsolate()); |
| TestInterfaceEmpty* cppValue(impl->raisesExceptionTestInterfaceEmptyAttribute(exceptionState)); |
| if (UNLIKELY(exceptionState.throwIfNeeded())) |
| return; |
| v8SetReturnValueFast(info, cppValue, impl); |
| } |
| |
| static void raisesExceptionTestInterfaceEmptyAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::raisesExceptionTestInterfaceEmptyAttributeAttributeGetter(info); |
| } |
| |
| static void raisesExceptionTestInterfaceEmptyAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Object> holder = info.Holder(); |
| ExceptionState exceptionState(ExceptionState::SetterContext, "raisesExceptionTestInterfaceEmptyAttribute", "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->setRaisesExceptionTestInterfaceEmptyAttribute(cppValue, exceptionState); |
| exceptionState.throwIfNeeded(); |
| } |
| |
| static void raisesExceptionTestInterfaceEmptyAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Value> v8Value = info[0]; |
| TestObjectV8Internal::raisesExceptionTestInterfaceEmptyAttributeAttributeSetter(v8Value, info); |
| } |
| |
| static void cachedAttributeRaisesExceptionGetterAnyAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Object> holder = info.Holder(); |
| v8::Local<v8::String> propertyName = v8AtomicString(info.GetIsolate(), "cachedAttributeRaisesExceptionGetterAnyAttribute"); |
| 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; |
| } |
| } |
| ExceptionState exceptionState(ExceptionState::GetterContext, "cachedAttributeRaisesExceptionGetterAnyAttribute", "TestObject", holder, info.GetIsolate()); |
| ScriptValue cppValue(impl->cachedAttributeRaisesExceptionGetterAnyAttribute(exceptionState)); |
| if (UNLIKELY(exceptionState.throwIfNeeded())) |
| return; |
| v8::Local<v8::Value> v8Value(cppValue.v8Value()); |
| V8HiddenValue::setHiddenValue(ScriptState::current(info.GetIsolate()), holder, propertyName, v8Value); |
| v8SetReturnValue(info, v8Value); |
| } |
| |
| static void cachedAttributeRaisesExceptionGetterAnyAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::cachedAttributeRaisesExceptionGetterAnyAttributeAttributeGetter(info); |
| } |
| |
| static void cachedAttributeRaisesExceptionGetterAnyAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Object> holder = info.Holder(); |
| ExceptionState exceptionState(ExceptionState::SetterContext, "cachedAttributeRaisesExceptionGetterAnyAttribute", "TestObject", holder, info.GetIsolate()); |
| TestObject* impl = V8TestObject::toImpl(holder); |
| ScriptValue cppValue = ScriptValue(ScriptState::current(info.GetIsolate()), v8Value); |
| impl->setCachedAttributeRaisesExceptionGetterAnyAttribute(cppValue, exceptionState); |
| exceptionState.throwIfNeeded(); |
| V8HiddenValue::deleteHiddenValue(ScriptState::current(info.GetIsolate()), holder, v8AtomicString(info.GetIsolate(), "cachedAttributeRaisesExceptionGetterAnyAttribute")); // Invalidate the cached value. |
| } |
| |
| static void cachedAttributeRaisesExceptionGetterAnyAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Value> v8Value = info[0]; |
| TestObjectV8Internal::cachedAttributeRaisesExceptionGetterAnyAttributeAttributeSetter(v8Value, info); |
| } |
| |
| static void reflectTestInterfaceAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Object> holder = info.Holder(); |
| TestObject* impl = V8TestObject::toImpl(holder); |
| v8SetReturnValueFast(info, impl->fastGetAttribute(HTMLNames::reflecttestinterfaceattributeAttr), impl); |
| } |
| |
| static void reflectTestInterfaceAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::reflectTestInterfaceAttributeAttributeGetter(info); |
| } |
| |
| static void reflectTestInterfaceAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Object> holder = info.Holder(); |
| ExceptionState exceptionState(ExceptionState::SetterContext, "reflectTestInterfaceAttribute", "TestObject", holder, info.GetIsolate()); |
| TestObject* impl = V8TestObject::toImpl(holder); |
| TestInterfaceImplementation* cppValue = V8TestInterface::toImplWithTypeCheck(info.GetIsolate(), v8Value); |
| if (!cppValue) { |
| exceptionState.throwTypeError("The provided value is not of type 'TestInterface'."); |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
| impl->setAttribute(HTMLNames::reflecttestinterfaceattributeAttr, cppValue); |
| } |
| |
| static void reflectTestInterfaceAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Value> v8Value = info[0]; |
| CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
| TestObjectV8Internal::reflectTestInterfaceAttributeAttributeSetter(v8Value, info); |
| } |
| |
| static void reflectReflectedNameAttributeTestAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Object> holder = info.Holder(); |
| TestObject* impl = V8TestObject::toImpl(holder); |
| v8SetReturnValueFast(info, impl->fastGetAttribute(HTMLNames::reflectedNameAttributeAttr), impl); |
| } |
| |
| static void reflectReflectedNameAttributeTestAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::reflectReflectedNameAttributeTestAttributeAttributeGetter(info); |
| } |
| |
| static void reflectReflectedNameAttributeTestAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Object> holder = info.Holder(); |
| ExceptionState exceptionState(ExceptionState::SetterContext, "reflectReflectedNameAttributeTestAttribute", "TestObject", holder, info.GetIsolate()); |
| TestObject* impl = V8TestObject::toImpl(holder); |
| TestInterfaceImplementation* cppValue = V8TestInterface::toImplWithTypeCheck(info.GetIsolate(), v8Value); |
| if (!cppValue) { |
| exceptionState.throwTypeError("The provided value is not of type 'TestInterface'."); |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
| impl->setAttribute(HTMLNames::reflectedNameAttributeAttr, cppValue); |
| } |
| |
| static void reflectReflectedNameAttributeTestAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Value> v8Value = info[0]; |
| CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
| TestObjectV8Internal::reflectReflectedNameAttributeTestAttributeAttributeSetter(v8Value, info); |
| } |
| |
| static void reflectBooleanAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Object> holder = info.Holder(); |
| TestObject* impl = V8TestObject::toImpl(holder); |
| v8SetReturnValueBool(info, impl->fastHasAttribute(HTMLNames::reflectbooleanattributeAttr)); |
| } |
| |
| static void reflectBooleanAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::reflectBooleanAttributeAttributeGetter(info); |
| } |
| |
| static void reflectBooleanAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Object> holder = info.Holder(); |
| ExceptionState exceptionState(ExceptionState::SetterContext, "reflectBooleanAttribute", "TestObject", holder, info.GetIsolate()); |
| TestObject* impl = V8TestObject::toImpl(holder); |
| bool cppValue = toBoolean(info.GetIsolate(), v8Value, exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
| impl->setBooleanAttribute(HTMLNames::reflectbooleanattributeAttr, cppValue); |
| } |
| |
| static void reflectBooleanAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Value> v8Value = info[0]; |
| CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
| TestObjectV8Internal::reflectBooleanAttributeAttributeSetter(v8Value, info); |
| } |
| |
| static void reflectLongAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Object> holder = info.Holder(); |
| TestObject* impl = V8TestObject::toImpl(holder); |
| v8SetReturnValueInt(info, impl->getIntegralAttribute(HTMLNames::reflectlongattributeAttr)); |
| } |
| |
| static void reflectLongAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::reflectLongAttributeAttributeGetter(info); |
| } |
| |
| static void reflectLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Object> holder = info.Holder(); |
| ExceptionState exceptionState(ExceptionState::SetterContext, "reflectLongAttribute", "TestObject", holder, info.GetIsolate()); |
| TestObject* impl = V8TestObject::toImpl(holder); |
| int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
| impl->setIntegralAttribute(HTMLNames::reflectlongattributeAttr, cppValue); |
| } |
| |
| static void reflectLongAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Value> v8Value = info[0]; |
| CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
| TestObjectV8Internal::reflectLongAttributeAttributeSetter(v8Value, info); |
| } |
| |
| static void reflectUnsignedShortAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Object> holder = info.Holder(); |
| TestObject* impl = V8TestObject::toImpl(holder); |
| v8SetReturnValueUnsigned(info, std::max(0, static_cast<int>(impl->fastGetAttribute(HTMLNames::reflectunsignedshortattributeAttr)))); |
| } |
| |
| static void reflectUnsignedShortAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::reflectUnsignedShortAttributeAttributeGetter(info); |
| } |
| |
| static void reflectUnsignedShortAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Object> holder = info.Holder(); |
| ExceptionState exceptionState(ExceptionState::SetterContext, "reflectUnsignedShortAttribute", "TestObject", holder, info.GetIsolate()); |
| TestObject* impl = V8TestObject::toImpl(holder); |
| unsigned cppValue = toUInt16(info.GetIsolate(), v8Value, NormalConversion, exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
| impl->setAttribute(HTMLNames::reflectunsignedshortattributeAttr, cppValue); |
| } |
| |
| static void reflectUnsignedShortAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Value> v8Value = info[0]; |
| CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
| TestObjectV8Internal::reflectUnsignedShortAttributeAttributeSetter(v8Value, info); |
| } |
| |
| static void reflectUnsignedLongAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Object> holder = info.Holder(); |
| TestObject* impl = V8TestObject::toImpl(holder); |
| v8SetReturnValueUnsigned(info, std::max(0, static_cast<int>(impl->getIntegralAttribute(HTMLNames::reflectunsignedlongattributeAttr)))); |
| } |
| |
| static void reflectUnsignedLongAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::reflectUnsignedLongAttributeAttributeGetter(info); |
| } |
| |
| static void reflectUnsignedLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Object> holder = info.Holder(); |
| ExceptionState exceptionState(ExceptionState::SetterContext, "reflectUnsignedLongAttribute", "TestObject", holder, info.GetIsolate()); |
| TestObject* impl = V8TestObject::toImpl(holder); |
| unsigned cppValue = toUInt32(info.GetIsolate(), v8Value, NormalConversion, exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
| impl->setUnsignedIntegralAttribute(HTMLNames::reflectunsignedlongattributeAttr, cppValue); |
| } |
| |
| static void reflectUnsignedLongAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Value> v8Value = info[0]; |
| CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
| TestObjectV8Internal::reflectUnsignedLongAttributeAttributeSetter(v8Value, info); |
| } |
| |
| static void idAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Object> holder = info.Holder(); |
| TestObject* impl = V8TestObject::toImpl(holder); |
| v8SetReturnValueString(info, impl->getIdAttribute(), info.GetIsolate()); |
| } |
| |
| static void idAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::idAttributeGetter(info); |
| } |
| |
| static void idAttributeSetter(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; |
| CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
| impl->setAttribute(HTMLNames::idAttr, cppValue); |
| } |
| |
| static void idAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Value> v8Value = info[0]; |
| CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
| TestObjectV8Internal::idAttributeSetter(v8Value, info); |
| } |
| |
| static void nameAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Object> holder = info.Holder(); |
| TestObject* impl = V8TestObject::toImpl(holder); |
| v8SetReturnValueString(info, impl->getNameAttribute(), info.GetIsolate()); |
| } |
| |
| static void nameAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::nameAttributeGetter(info); |
| } |
| |
| static void nameAttributeSetter(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; |
| CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
| impl->setAttribute(HTMLNames::nameAttr, cppValue); |
| } |
| |
| static void nameAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Value> v8Value = info[0]; |
| CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
| TestObjectV8Internal::nameAttributeSetter(v8Value, info); |
| } |
| |
| static void classAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Object> holder = info.Holder(); |
| TestObject* impl = V8TestObject::toImpl(holder); |
| v8SetReturnValueString(info, impl->getClassAttribute(), info.GetIsolate()); |
| } |
| |
| static void classAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::classAttributeGetter(info); |
| } |
| |
| static void classAttributeSetter(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; |
| CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
| impl->setAttribute(HTMLNames::classAttr, cppValue); |
| } |
| |
| static void classAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Value> v8Value = info[0]; |
| CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
| TestObjectV8Internal::classAttributeSetter(v8Value, info); |
| } |
| |
| static void reflectedIdAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Object> holder = info.Holder(); |
| TestObject* impl = V8TestObject::toImpl(holder); |
| v8SetReturnValueString(info, impl->getIdAttribute(), info.GetIsolate()); |
| } |
| |
| static void reflectedIdAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::reflectedIdAttributeGetter(info); |
| } |
| |
| static void reflectedIdAttributeSetter(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; |
| CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
| impl->setAttribute(HTMLNames::idAttr, cppValue); |
| } |
| |
| static void reflectedIdAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Value> v8Value = info[0]; |
| CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
| TestObjectV8Internal::reflectedIdAttributeSetter(v8Value, info); |
| } |
| |
| static void reflectedNameAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Object> holder = info.Holder(); |
| TestObject* impl = V8TestObject::toImpl(holder); |
| v8SetReturnValueString(info, impl->getNameAttribute(), info.GetIsolate()); |
| } |
| |
| static void reflectedNameAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::reflectedNameAttributeGetter(info); |
| } |
| |
| static void reflectedNameAttributeSetter(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; |
| CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
| impl->setAttribute(HTMLNames::nameAttr, cppValue); |
| } |
| |
| static void reflectedNameAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Value> v8Value = info[0]; |
| CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
| TestObjectV8Internal::reflectedNameAttributeSetter(v8Value, info); |
| } |
| |
| static void reflectedClassAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Object> holder = info.Holder(); |
| TestObject* impl = V8TestObject::toImpl(holder); |
| v8SetReturnValueString(info, impl->getClassAttribute(), info.GetIsolate()); |
| } |
| |
| static void reflectedClassAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::reflectedClassAttributeGetter(info); |
| } |
| |
| static void reflectedClassAttributeSetter(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; |
| CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
| impl->setAttribute(HTMLNames::classAttr, cppValue); |
| } |
| |
| static void reflectedClassAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Value> v8Value = info[0]; |
| CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
| TestObjectV8Internal::reflectedClassAttributeSetter(v8Value, info); |
| } |
| |
| static void limitedToOnlyOneAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Object> holder = info.Holder(); |
| TestObject* impl = V8TestObject::toImpl(holder); |
| String cppValue(impl->fastGetAttribute(HTMLNames::limitedtoonlyoneattributeAttr)); |
| if (cppValue.isEmpty()) { |
| ; |
| } else if (equalIgnoringCase(cppValue, "unique")) { |
| cppValue = "unique"; |
| } else { |
| cppValue = ""; |
| } |
| v8SetReturnValueString(info, cppValue, info.GetIsolate()); |
| } |
| |
| static void limitedToOnlyOneAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::limitedToOnlyOneAttributeAttributeGetter(info); |
| } |
| |
| static void limitedToOnlyOneAttributeAttributeSetter(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; |
| CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
| impl->setAttribute(HTMLNames::limitedtoonlyoneattributeAttr, cppValue); |
| } |
| |
| static void limitedToOnlyOneAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Value> v8Value = info[0]; |
| CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
| TestObjectV8Internal::limitedToOnlyOneAttributeAttributeSetter(v8Value, info); |
| } |
| |
| static void limitedToOnlyAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Object> holder = info.Holder(); |
| TestObject* impl = V8TestObject::toImpl(holder); |
| String cppValue(impl->fastGetAttribute(HTMLNames::limitedtoonlyattributeAttr)); |
| if (cppValue.isEmpty()) { |
| ; |
| } else if (equalIgnoringCase(cppValue, "Per")) { |
| cppValue = "Per"; |
| } else if (equalIgnoringCase(cppValue, "Paal")) { |
| cppValue = "Paal"; |
| } else if (equalIgnoringCase(cppValue, "Espen")) { |
| cppValue = "Espen"; |
| } else { |
| cppValue = ""; |
| } |
| v8SetReturnValueString(info, cppValue, info.GetIsolate()); |
| } |
| |
| static void limitedToOnlyAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::limitedToOnlyAttributeAttributeGetter(info); |
| } |
| |
| static void limitedToOnlyAttributeAttributeSetter(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; |
| CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
| impl->setAttribute(HTMLNames::limitedtoonlyattributeAttr, cppValue); |
| } |
| |
| static void limitedToOnlyAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Value> v8Value = info[0]; |
| CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
| TestObjectV8Internal::limitedToOnlyAttributeAttributeSetter(v8Value, info); |
| } |
| |
| static void limitedToOnlyOtherAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Object> holder = info.Holder(); |
| TestObject* impl = V8TestObject::toImpl(holder); |
| String cppValue(impl->fastGetAttribute(HTMLNames::otherAttr)); |
| if (cppValue.isEmpty()) { |
| ; |
| } else if (equalIgnoringCase(cppValue, "Value1")) { |
| cppValue = "Value1"; |
| } else if (equalIgnoringCase(cppValue, "Value2")) { |
| cppValue = "Value2"; |
| } else { |
| cppValue = ""; |
| } |
| v8SetReturnValueString(info, cppValue, info.GetIsolate()); |
| } |
| |
| static void limitedToOnlyOtherAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::limitedToOnlyOtherAttributeAttributeGetter(info); |
| } |
| |
| static void limitedToOnlyOtherAttributeAttributeSetter(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; |
| CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
| impl->setAttribute(HTMLNames::otherAttr, cppValue); |
| } |
| |
| static void limitedToOnlyOtherAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Value> v8Value = info[0]; |
| CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
| TestObjectV8Internal::limitedToOnlyOtherAttributeAttributeSetter(v8Value, info); |
| } |
| |
| static void limitedWithMissingDefaultAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Object> holder = info.Holder(); |
| TestObject* impl = V8TestObject::toImpl(holder); |
| String cppValue(impl->fastGetAttribute(HTMLNames::limitedwithmissingdefaultattributeAttr)); |
| if (cppValue.isEmpty()) { |
| cppValue = "rsa"; |
| } else if (equalIgnoringCase(cppValue, "rsa")) { |
| cppValue = "rsa"; |
| } else if (equalIgnoringCase(cppValue, "dsa")) { |
| cppValue = "dsa"; |
| } else { |
| cppValue = ""; |
| } |
| v8SetReturnValueString(info, cppValue, info.GetIsolate()); |
| } |
| |
| static void limitedWithMissingDefaultAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::limitedWithMissingDefaultAttributeAttributeGetter(info); |
| } |
| |
| static void limitedWithMissingDefaultAttributeAttributeSetter(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; |
| CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
| impl->setAttribute(HTMLNames::limitedwithmissingdefaultattributeAttr, cppValue); |
| } |
| |
| static void limitedWithMissingDefaultAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Value> v8Value = info[0]; |
| CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
| TestObjectV8Internal::limitedWithMissingDefaultAttributeAttributeSetter(v8Value, info); |
| } |
| |
| static void limitedWithInvalidMissingDefaultAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Object> holder = info.Holder(); |
| TestObject* impl = V8TestObject::toImpl(holder); |
| String cppValue(impl->fastGetAttribute(HTMLNames::limitedwithinvalidmissingdefaultattributeAttr)); |
| if (cppValue.isEmpty()) { |
| cppValue = "auto"; |
| } else if (equalIgnoringCase(cppValue, "ltr")) { |
| cppValue = "ltr"; |
| } else if (equalIgnoringCase(cppValue, "rtl")) { |
| cppValue = "rtl"; |
| } else if (equalIgnoringCase(cppValue, "auto")) { |
| cppValue = "auto"; |
| } else { |
| cppValue = "ltr"; |
| } |
| v8SetReturnValueString(info, cppValue, info.GetIsolate()); |
| } |
| |
| static void limitedWithInvalidMissingDefaultAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::limitedWithInvalidMissingDefaultAttributeAttributeGetter(info); |
| } |
| |
| static void limitedWithInvalidMissingDefaultAttributeAttributeSetter(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; |
| CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
| impl->setAttribute(HTMLNames::limitedwithinvalidmissingdefaultattributeAttr, cppValue); |
| } |
| |
| static void limitedWithInvalidMissingDefaultAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Value> v8Value = info[0]; |
| CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
| TestObjectV8Internal::limitedWithInvalidMissingDefaultAttributeAttributeSetter(v8Value, info); |
| } |
| |
| static void corsSettingAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Object> holder = info.Holder(); |
| TestObject* impl = V8TestObject::toImpl(holder); |
| String cppValue(impl->fastGetAttribute(HTMLNames::corssettingattributeAttr)); |
| if (cppValue.isNull()) { |
| ; |
| } else if (cppValue.isEmpty()) { |
| cppValue = "anonymous"; |
| } else if (equalIgnoringCase(cppValue, "anonymous")) { |
| cppValue = "anonymous"; |
| } else if (equalIgnoringCase(cppValue, "use-credentials")) { |
| cppValue = "use-credentials"; |
| } else { |
| cppValue = "anonymous"; |
| } |
| v8SetReturnValueString(info, cppValue, info.GetIsolate()); |
| } |
| |
| static void corsSettingAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::corsSettingAttributeAttributeGetter(info); |
| } |
| |
| static void limitedWithEmptyMissingInvalidAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Object> holder = info.Holder(); |
| TestObject* impl = V8TestObject::toImpl(holder); |
| String cppValue(impl->fastGetAttribute(HTMLNames::limitedwithemptymissinginvalidattributeAttr)); |
| if (cppValue.isNull()) { |
| cppValue = "missing"; |
| } else if (cppValue.isEmpty()) { |
| cppValue = "empty"; |
| } else if (equalIgnoringCase(cppValue, "empty")) { |
| cppValue = "empty"; |
| } else if (equalIgnoringCase(cppValue, "missing")) { |
| cppValue = "missing"; |
| } else if (equalIgnoringCase(cppValue, "invalid")) { |
| cppValue = "invalid"; |
| } else if (equalIgnoringCase(cppValue, "a-normal")) { |
| cppValue = "a-normal"; |
| } else { |
| cppValue = "invalid"; |
| } |
| v8SetReturnValueString(info, cppValue, info.GetIsolate()); |
| } |
| |
| static void limitedWithEmptyMissingInvalidAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::limitedWithEmptyMissingInvalidAttributeAttributeGetter(info); |
| } |
| |
| static void replaceableReadonlyLongAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Object> holder = info.Holder(); |
| TestObject* impl = V8TestObject::toImpl(holder); |
| v8SetReturnValueInt(info, impl->replaceableReadonlyLongAttribute()); |
| } |
| |
| static void replaceableReadonlyLongAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::replaceableReadonlyLongAttributeAttributeGetter(info); |
| } |
| |
| static void replaceableReadonlyLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::String> propertyName = v8AtomicString(info.GetIsolate(), "replaceableReadonlyLongAttribute"); |
| v8CallBoolean(info.This()->CreateDataProperty(info.GetIsolate()->GetCurrentContext(), propertyName, v8Value)); |
| } |
| |
| static void replaceableReadonlyLongAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Value> v8Value = info[0]; |
| TestObjectV8Internal::replaceableReadonlyLongAttributeAttributeSetter(v8Value, info); |
| } |
| |
| static void locationPutForwardsAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Object> holder = info.Holder(); |
| TestObject* impl = V8TestObject::toImpl(holder); |
| v8SetReturnValueFast(info, WTF::getPtr(impl->locationPutForwards()), impl); |
| } |
| |
| static void locationPutForwardsAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::locationPutForwardsAttributeGetter(info); |
| } |
| |
| static void locationPutForwardsAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Object> holder = info.Holder(); |
| TestObject* proxyImpl = V8TestObject::toImpl(holder); |
| TestNode* impl = WTF::getPtr(proxyImpl->locationPutForwards()); |
| if (!impl) |
| return; |
| V8StringResource<> cppValue = v8Value; |
| if (!cppValue.prepare()) |
| return; |
| impl->setHref(cppValue); |
| } |
| |
| static void locationPutForwardsAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Value> v8Value = info[0]; |
| TestObjectV8Internal::locationPutForwardsAttributeSetter(v8Value, info); |
| } |
| |
| static void runtimeEnabledLongAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Object> holder = info.Holder(); |
| TestObject* impl = V8TestObject::toImpl(holder); |
| v8SetReturnValueInt(info, impl->runtimeEnabledLongAttribute()); |
| } |
| |
| static void runtimeEnabledLongAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::runtimeEnabledLongAttributeAttributeGetter(info); |
| } |
| |
| static void runtimeEnabledLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Object> holder = info.Holder(); |
| ExceptionState exceptionState(ExceptionState::SetterContext, "runtimeEnabledLongAttribute", "TestObject", holder, info.GetIsolate()); |
| TestObject* impl = V8TestObject::toImpl(holder); |
| int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| impl->setRuntimeEnabledLongAttribute(cppValue); |
| } |
| |
| static void runtimeEnabledLongAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Value> v8Value = info[0]; |
| TestObjectV8Internal::runtimeEnabledLongAttributeAttributeSetter(v8Value, info); |
| } |
| |
| static void setterCallWithCurrentWindowAndEnteredWindowStringAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Object> holder = info.Holder(); |
| TestObject* impl = V8TestObject::toImpl(holder); |
| v8SetReturnValueString(info, impl->setterCallWithCurrentWindowAndEnteredWindowStringAttribute(), info.GetIsolate()); |
| } |
| |
| static void setterCallWithCurrentWindowAndEnteredWindowStringAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::setterCallWithCurrentWindowAndEnteredWindowStringAttributeAttributeGetter(info); |
| } |
| |
| static void setterCallWithCurrentWindowAndEnteredWindowStringAttributeAttributeSetter(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->setSetterCallWithCurrentWindowAndEnteredWindowStringAttribute(currentDOMWindow(info.GetIsolate()), enteredDOMWindow(info.GetIsolate()), cppValue); |
| } |
| |
| static void setterCallWithCurrentWindowAndEnteredWindowStringAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Value> v8Value = info[0]; |
| TestObjectV8Internal::setterCallWithCurrentWindowAndEnteredWindowStringAttributeAttributeSetter(v8Value, info); |
| } |
| |
| static void setterCallWithExecutionContextStringAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Object> holder = info.Holder(); |
| TestObject* impl = V8TestObject::toImpl(holder); |
| v8SetReturnValueString(info, impl->setterCallWithExecutionContextStringAttribute(), info.GetIsolate()); |
| } |
| |
| static void setterCallWithExecutionContextStringAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::setterCallWithExecutionContextStringAttributeAttributeGetter(info); |
| } |
| |
| static void setterCallWithExecutionContextStringAttributeAttributeSetter(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; |
| ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate()); |
| impl->setSetterCallWithExecutionContextStringAttribute(executionContext, cppValue); |
| } |
| |
| static void setterCallWithExecutionContextStringAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Value> v8Value = info[0]; |
| TestObjectV8Internal::setterCallWithExecutionContextStringAttributeAttributeSetter(v8Value, info); |
| } |
| |
| static void treatNullAsEmptyStringStringAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Object> holder = info.Holder(); |
| TestObject* impl = V8TestObject::toImpl(holder); |
| v8SetReturnValueString(info, impl->treatNullAsEmptyStringStringAttribute(), info.GetIsolate()); |
| } |
| |
| static void treatNullAsEmptyStringStringAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::treatNullAsEmptyStringStringAttributeAttributeGetter(info); |
| } |
| |
| static void treatNullAsEmptyStringStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Object> holder = info.Holder(); |
| TestObject* impl = V8TestObject::toImpl(holder); |
| V8StringResource<TreatNullAsEmptyString> cppValue = v8Value; |
| if (!cppValue.prepare()) |
| return; |
| impl->setTreatNullAsEmptyStringStringAttribute(cppValue); |
| } |
| |
| static void treatNullAsEmptyStringStringAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Value> v8Value = info[0]; |
| TestObjectV8Internal::treatNullAsEmptyStringStringAttributeAttributeSetter(v8Value, info); |
| } |
| |
| static void treatNullAsNullStringStringAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Object> holder = info.Holder(); |
| TestObject* impl = V8TestObject::toImpl(holder); |
| v8SetReturnValueString(info, impl->treatNullAsNullStringStringAttribute(), info.GetIsolate()); |
| } |
| |
| static void treatNullAsNullStringStringAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::treatNullAsNullStringStringAttributeAttributeGetter(info); |
| } |
| |
| static void treatNullAsNullStringStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Object> holder = info.Holder(); |
| TestObject* impl = V8TestObject::toImpl(holder); |
| V8StringResource<TreatNullAsNullString> cppValue = v8Value; |
| if (!cppValue.prepare()) |
| return; |
| impl->setTreatNullAsNullStringStringAttribute(cppValue); |
| } |
| |
| static void treatNullAsNullStringStringAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Value> v8Value = info[0]; |
| TestObjectV8Internal::treatNullAsNullStringStringAttributeAttributeSetter(v8Value, info); |
| } |
| |
| static void legacyInterfaceTypeCheckingFloatAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Object> holder = info.Holder(); |
| TestObject* impl = V8TestObject::toImpl(holder); |
| v8SetReturnValue(info, impl->legacyInterfaceTypeCheckingFloatAttribute()); |
| } |
| |
| static void legacyInterfaceTypeCheckingFloatAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::legacyInterfaceTypeCheckingFloatAttributeAttributeGetter(info); |
| } |
| |
| static void legacyInterfaceTypeCheckingFloatAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Object> holder = info.Holder(); |
| ExceptionState exceptionState(ExceptionState::SetterContext, "legacyInterfaceTypeCheckingFloatAttribute", "TestObject", holder, info.GetIsolate()); |
| TestObject* impl = V8TestObject::toImpl(holder); |
| float cppValue = toRestrictedFloat(info.GetIsolate(), v8Value, exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| impl->setLegacyInterfaceTypeCheckingFloatAttribute(cppValue); |
| } |
| |
| static void legacyInterfaceTypeCheckingFloatAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Value> v8Value = info[0]; |
| TestObjectV8Internal::legacyInterfaceTypeCheckingFloatAttributeAttributeSetter(v8Value, info); |
| } |
| |
| static void legacyInterfaceTypeCheckingTestInterfaceAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Object> holder = info.Holder(); |
| TestObject* impl = V8TestObject::toImpl(holder); |
| v8SetReturnValueFast(info, WTF::getPtr(impl->legacyInterfaceTypeCheckingTestInterfaceAttribute()), impl); |
| } |
| |
| static void legacyInterfaceTypeCheckingTestInterfaceAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::legacyInterfaceTypeCheckingTestInterfaceAttributeAttributeGetter(info); |
| } |
| |
| static void legacyInterfaceTypeCheckingTestInterfaceAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Object> holder = info.Holder(); |
| TestObject* impl = V8TestObject::toImpl(holder); |
| TestInterfaceImplementation* cppValue = V8TestInterface::toImplWithTypeCheck(info.GetIsolate(), v8Value); |
| impl->setLegacyInterfaceTypeCheckingTestInterfaceAttribute(cppValue); |
| } |
| |
| static void legacyInterfaceTypeCheckingTestInterfaceAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Value> v8Value = info[0]; |
| TestObjectV8Internal::legacyInterfaceTypeCheckingTestInterfaceAttributeAttributeSetter(v8Value, info); |
| } |
| |
| static void legacyInterfaceTypeCheckingTestInterfaceOrNullAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Object> holder = info.Holder(); |
| TestObject* impl = V8TestObject::toImpl(holder); |
| v8SetReturnValueFast(info, WTF::getPtr(impl->legacyInterfaceTypeCheckingTestInterfaceOrNullAttribute()), impl); |
| } |
| |
| static void legacyInterfaceTypeCheckingTestInterfaceOrNullAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::legacyInterfaceTypeCheckingTestInterfaceOrNullAttributeAttributeGetter(info); |
| } |
| |
| static void legacyInterfaceTypeCheckingTestInterfaceOrNullAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Object> holder = info.Holder(); |
| TestObject* impl = V8TestObject::toImpl(holder); |
| TestInterfaceImplementation* cppValue = V8TestInterface::toImplWithTypeCheck(info.GetIsolate(), v8Value); |
| impl->setLegacyInterfaceTypeCheckingTestInterfaceOrNullAttribute(cppValue); |
| } |
| |
| static void legacyInterfaceTypeCheckingTestInterfaceOrNullAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Value> v8Value = info[0]; |
| TestObjectV8Internal::legacyInterfaceTypeCheckingTestInterfaceOrNullAttributeAttributeSetter(v8Value, info); |
| } |
| |
| static void urlStringAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Object> holder = info.Holder(); |
| TestObject* impl = V8TestObject::toImpl(holder); |
| v8SetReturnValueString(info, impl->getURLAttribute(HTMLNames::urlstringattributeAttr), info.GetIsolate()); |
| } |
| |
| static void urlStringAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::urlStringAttributeAttributeGetter(info); |
| } |
| |
| static void urlStringAttributeAttributeSetter(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; |
| CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
| impl->setAttribute(HTMLNames::urlstringattributeAttr, cppValue); |
| } |
| |
| static void urlStringAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Value> v8Value = info[0]; |
| CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
| TestObjectV8Internal::urlStringAttributeAttributeSetter(v8Value, info); |
| } |
| |
| static void urlStringAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Object> holder = info.Holder(); |
| TestObject* impl = V8TestObject::toImpl(holder); |
| v8SetReturnValueString(info, impl->getURLAttribute(HTMLNames::reflectUrlAttributeAttr), info.GetIsolate()); |
| } |
| |
| static void urlStringAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::urlStringAttributeAttributeGetter(info); |
| } |
| |
| static void urlStringAttributeAttributeSetter(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; |
| CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
| impl->setAttribute(HTMLNames::reflectUrlAttributeAttr, cppValue); |
| } |
| |
| static void urlStringAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Value> v8Value = info[0]; |
| CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
| TestObjectV8Internal::urlStringAttributeAttributeSetter(v8Value, info); |
| } |
| |
| static void unforgeableLongAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Object> holder = info.Holder(); |
| TestObject* impl = V8TestObject::toImpl(holder); |
| v8SetReturnValueInt(info, impl->unforgeableLongAttribute()); |
| } |
| |
| static void unforgeableLongAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::unforgeableLongAttributeAttributeGetter(info); |
| } |
| |
| static void unforgeableLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Object> holder = info.Holder(); |
| ExceptionState exceptionState(ExceptionState::SetterContext, "unforgeableLongAttribute", "TestObject", holder, info.GetIsolate()); |
| TestObject* impl = V8TestObject::toImpl(holder); |
| int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| impl->setUnforgeableLongAttribute(cppValue); |
| } |
| |
| static void unforgeableLongAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Value> v8Value = info[0]; |
| TestObjectV8Internal::unforgeableLongAttributeAttributeSetter(v8Value, info); |
| } |
| |
| static void measuredLongAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Object> holder = info.Holder(); |
| TestObject* impl = V8TestObject::toImpl(holder); |
| v8SetReturnValueInt(info, impl->measuredLongAttribute()); |
| } |
| |
| static void measuredLongAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| UseCounter::countIfNotPrivateScript(info.GetIsolate(), currentExecutionContext(info.GetIsolate()), UseCounter::V8TestObject_MeasuredLongAttribute_AttributeGetter); |
| TestObjectV8Internal::measuredLongAttributeAttributeGetter(info); |
| } |
| |
| static void measuredLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Object> holder = info.Holder(); |
| ExceptionState exceptionState(ExceptionState::SetterContext, "measuredLongAttribute", "TestObject", holder, info.GetIsolate()); |
| TestObject* impl = V8TestObject::toImpl(holder); |
| int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| impl->setMeasuredLongAttribute(cppValue); |
| } |
| |
| static void measuredLongAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Value> v8Value = info[0]; |
| UseCounter::countIfNotPrivateScript(info.GetIsolate(), currentExecutionContext(info.GetIsolate()), UseCounter::V8TestObject_MeasuredLongAttribute_AttributeSetter); |
| TestObjectV8Internal::measuredLongAttributeAttributeSetter(v8Value, info); |
| } |
| |
| static void sameObjectAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Object> holder = info.Holder(); |
| TestObject* impl = V8TestObject::toImpl(holder); |
| v8SetReturnValueFast(info, WTF::getPtr(impl->sameObjectAttribute()), impl); |
| } |
| |
| static void sameObjectAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::sameObjectAttributeAttributeGetter(info); |
| } |
| |
| static void sameObjectAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Object> holder = info.Holder(); |
| ExceptionState exceptionState(ExceptionState::SetterContext, "sameObjectAttribute", "TestObject", holder, info.GetIsolate()); |
| TestObject* impl = V8TestObject::toImpl(holder); |
| TestInterfaceImplementation* cppValue = V8TestInterface::toImplWithTypeCheck(info.GetIsolate(), v8Value); |
| if (!cppValue) { |
| exceptionState.throwTypeError("The provided value is not of type 'TestInterface'."); |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| impl->setSameObjectAttribute(cppValue); |
| } |
| |
| static void sameObjectAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Value> v8Value = info[0]; |
| TestObjectV8Internal::sameObjectAttributeAttributeSetter(v8Value, info); |
| } |
| |
| static void unscopeableLongAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Object> holder = info.Holder(); |
| TestObject* impl = V8TestObject::toImpl(holder); |
| v8SetReturnValueInt(info, impl->unscopeableLongAttribute()); |
| } |
| |
| static void unscopeableLongAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::unscopeableLongAttributeAttributeGetter(info); |
| } |
| |
| static void unscopeableLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Object> holder = info.Holder(); |
| ExceptionState exceptionState(ExceptionState::SetterContext, "unscopeableLongAttribute", "TestObject", holder, info.GetIsolate()); |
| TestObject* impl = V8TestObject::toImpl(holder); |
| int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| impl->setUnscopeableLongAttribute(cppValue); |
| } |
| |
| static void unscopeableLongAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Value> v8Value = info[0]; |
| TestObjectV8Internal::unscopeableLongAttributeAttributeSetter(v8Value, info); |
| } |
| |
| static void unscopeableOriginTrialEnabledLongAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate()); |
| String errorMessage; |
| if (!OriginTrials::featureNameEnabled(executionContext, errorMessage)) { |
| v8SetReturnValue(info, v8::Undefined(info.GetIsolate())); |
| if (!errorMessage.isEmpty()) { |
| toDocument(executionContext)->addConsoleMessage(ConsoleMessage::create(JSMessageSource, ErrorMessageLevel, errorMessage)); |
| } |
| return; |
| } |
| v8::Local<v8::Object> holder = info.Holder(); |
| TestObject* impl = V8TestObject::toImpl(holder); |
| v8SetReturnValueInt(info, impl->unscopeableOriginTrialEnabledLongAttribute()); |
| } |
| |
| static void unscopeableOriginTrialEnabledLongAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate()); |
| String errorMessage; |
| if (!OriginTrials::featureNameEnabled(executionContext, errorMessage)) { |
| v8SetReturnValue(info, v8::Undefined(info.GetIsolate())); |
| if (!errorMessage.isEmpty()) { |
| toDocument(executionContext)->addConsoleMessage(ConsoleMessage::create(JSMessageSource, ErrorMessageLevel, errorMessage)); |
| } |
| return; |
| } |
| TestObjectV8Internal::unscopeableOriginTrialEnabledLongAttributeAttributeGetter(info); |
| } |
| |
| static void unscopeableOriginTrialEnabledLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Object> holder = info.Holder(); |
| ExceptionState exceptionState(ExceptionState::SetterContext, "unscopeableOriginTrialEnabledLongAttribute", "TestObject", holder, info.GetIsolate()); |
| TestObject* impl = V8TestObject::toImpl(holder); |
| int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| impl->setUnscopeableOriginTrialEnabledLongAttribute(cppValue); |
| } |
| |
| static void unscopeableOriginTrialEnabledLongAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Value> v8Value = info[0]; |
| TestObjectV8Internal::unscopeableOriginTrialEnabledLongAttributeAttributeSetter(v8Value, info); |
| } |
| |
| static void unscopeableRuntimeEnabledLongAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Object> holder = info.Holder(); |
| TestObject* impl = V8TestObject::toImpl(holder); |
| v8SetReturnValueInt(info, impl->unscopeableRuntimeEnabledLongAttribute()); |
| } |
| |
| static void unscopeableRuntimeEnabledLongAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::unscopeableRuntimeEnabledLongAttributeAttributeGetter(info); |
| } |
| |
| static void unscopeableRuntimeEnabledLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Object> holder = info.Holder(); |
| ExceptionState exceptionState(ExceptionState::SetterContext, "unscopeableRuntimeEnabledLongAttribute", "TestObject", holder, info.GetIsolate()); |
| TestObject* impl = V8TestObject::toImpl(holder); |
| int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| impl->setUnscopeableRuntimeEnabledLongAttribute(cppValue); |
| } |
| |
| static void unscopeableRuntimeEnabledLongAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Value> v8Value = info[0]; |
| TestObjectV8Internal::unscopeableRuntimeEnabledLongAttributeAttributeSetter(v8Value, info); |
| } |
| |
| static void testInterfaceAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Object> holder = info.Holder(); |
| TestObject* impl = V8TestObject::toImpl(holder); |
| v8SetReturnValueFast(info, WTF::getPtr(impl->testInterfaceAttribute()), impl); |
| } |
| |
| static void testInterfaceAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::testInterfaceAttributeAttributeGetter(info); |
| } |
| |
| static void testInterfaceAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Object> holder = info.Holder(); |
| ExceptionState exceptionState(ExceptionState::SetterContext, "testInterfaceAttribute", "TestObject", holder, info.GetIsolate()); |
| TestObject* impl = V8TestObject::toImpl(holder); |
| TestInterfaceImplementation* cppValue = V8TestInterface::toImplWithTypeCheck(info.GetIsolate(), v8Value); |
| if (!cppValue) { |
| exceptionState.throwTypeError("The provided value is not of type 'TestInterface'."); |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| impl->setTestInterfaceAttribute(cppValue); |
| } |
| |
| static void testInterfaceAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Value> v8Value = info[0]; |
| TestObjectV8Internal::testInterfaceAttributeAttributeSetter(v8Value, info); |
| } |
| |
| static void testInterfaceGarbageCollectedAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Object> holder = info.Holder(); |
| TestObject* impl = V8TestObject::toImpl(holder); |
| v8SetReturnValueFast(info, WTF::getPtr(impl->testInterfaceGarbageCollectedAttribute()), impl); |
| } |
| |
| static void testInterfaceGarbageCollectedAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::testInterfaceGarbageCollectedAttributeAttributeGetter(info); |
| } |
| |
| static void testInterfaceGarbageCollectedAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Object> holder = info.Holder(); |
| ExceptionState exceptionState(ExceptionState::SetterContext, "testInterfaceGarbageCollectedAttribute", "TestObject", holder, info.GetIsolate()); |
| TestObject* impl = V8TestObject::toImpl(holder); |
| TestInterfaceGarbageCollected* cppValue = V8TestInterfaceGarbageCollected::toImplWithTypeCheck(info.GetIsolate(), v8Value); |
| if (!cppValue) { |
| exceptionState.throwTypeError("The provided value is not of type 'TestInterfaceGarbageCollected'."); |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| impl->setTestInterfaceGarbageCollectedAttribute(cppValue); |
| } |
| |
| static void testInterfaceGarbageCollectedAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Value> v8Value = info[0]; |
| TestObjectV8Internal::testInterfaceGarbageCollectedAttributeAttributeSetter(v8Value, info); |
| } |
| |
| static void testInterfaceGarbageCollectedOrNullAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Object> holder = info.Holder(); |
| TestObject* impl = V8TestObject::toImpl(holder); |
| v8SetReturnValueFast(info, WTF::getPtr(impl->testInterfaceGarbageCollectedOrNullAttribute()), impl); |
| } |
| |
| static void testInterfaceGarbageCollectedOrNullAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::testInterfaceGarbageCollectedOrNullAttributeAttributeGetter(info); |
| } |
| |
| static void testInterfaceGarbageCollectedOrNullAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Object> holder = info.Holder(); |
| ExceptionState exceptionState(ExceptionState::SetterContext, "testInterfaceGarbageCollectedOrNullAttribute", "TestObject", holder, info.GetIsolate()); |
| TestObject* impl = V8TestObject::toImpl(holder); |
| TestInterfaceGarbageCollected* cppValue = V8TestInterfaceGarbageCollected::toImplWithTypeCheck(info.GetIsolate(), v8Value); |
| if (!cppValue && !isUndefinedOrNull(v8Value)) { |
| exceptionState.throwTypeError("The provided value is not of type 'TestInterfaceGarbageCollected'."); |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| impl->setTestInterfaceGarbageCollectedOrNullAttribute(cppValue); |
| } |
| |
| static void testInterfaceGarbageCollectedOrNullAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Value> v8Value = info[0]; |
| TestObjectV8Internal::testInterfaceGarbageCollectedOrNullAttributeAttributeSetter(v8Value, info); |
| } |
| |
| static void readonlyShortAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Object> holder = info.Holder(); |
| TestObject* impl = V8TestObject::toImpl(holder); |
| int result = 0; |
| if (!V8TestObject::PrivateScript::readonlyShortAttributeAttributeGetter(toLocalFrame(toFrameIfNotDetached(info.GetIsolate()->GetCurrentContext())), impl, &result)) |
| return; |
| v8SetReturnValueInt(info, result); |
| } |
| |
| static void readonlyShortAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::readonlyShortAttributeAttributeGetter(info); |
| } |
| |
| static void shortAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Object> holder = info.Holder(); |
| TestObject* impl = V8TestObject::toImpl(holder); |
| int result = 0; |
| if (!V8TestObject::PrivateScript::shortAttributeAttributeGetter(toLocalFrame(toFrameIfNotDetached(info.GetIsolate()->GetCurrentContext())), impl, &result)) |
| return; |
| v8SetReturnValueInt(info, result); |
| } |
| |
| 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; |
| V8TestObject::PrivateScript::shortAttributeAttributeSetter(toLocalFrame(toFrameIfNotDetached(info.GetIsolate()->GetCurrentContext())), impl, cppValue); |
| } |
| |
| static void shortAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Value> v8Value = info[0]; |
| TestObjectV8Internal::shortAttributeAttributeSetter(v8Value, info); |
| } |
| |
| static void stringAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Object> holder = info.Holder(); |
| TestObject* impl = V8TestObject::toImpl(holder); |
| String result; |
| if (!V8TestObject::PrivateScript::stringAttributeAttributeGetter(toLocalFrame(toFrameIfNotDetached(info.GetIsolate()->GetCurrentContext())), impl, &result)) |
| return; |
| v8SetReturnValueString(info, result, 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; |
| V8TestObject::PrivateScript::stringAttributeAttributeSetter(toLocalFrame(toFrameIfNotDetached(info.GetIsolate()->GetCurrentContext())), impl, cppValue); |
| } |
| |
| static void stringAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Value> v8Value = info[0]; |
| TestObjectV8Internal::stringAttributeAttributeSetter(v8Value, info); |
| } |
| |
| static void nodeAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Object> holder = info.Holder(); |
| TestObject* impl = V8TestObject::toImpl(holder); |
| Node* result = nullptr; |
| if (!V8TestObject::PrivateScript::nodeAttributeAttributeGetter(toLocalFrame(toFrameIfNotDetached(info.GetIsolate()->GetCurrentContext())), impl, &result)) |
| return; |
| v8SetReturnValueFast(info, result, 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; |
| } |
| V8TestObject::PrivateScript::nodeAttributeAttributeSetter(toLocalFrame(toFrameIfNotDetached(info.GetIsolate()->GetCurrentContext())), impl, cppValue); |
| } |
| |
| static void nodeAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Value> v8Value = info[0]; |
| TestObjectV8Internal::nodeAttributeAttributeSetter(v8Value, info); |
| } |
| |
| static void attributeImplementedInCPPForPrivateScriptOnlyAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Object> holder = info.Holder(); |
| TestObject* impl = V8TestObject::toImpl(holder); |
| v8SetReturnValueString(info, impl->attributeImplementedInCPPForPrivateScriptOnly(), info.GetIsolate()); |
| } |
| |
| static void attributeImplementedInCPPForPrivateScriptOnlyAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::attributeImplementedInCPPForPrivateScriptOnlyAttributeGetter(info); |
| } |
| |
| static void attributeImplementedInCPPForPrivateScriptOnlyAttributeSetter(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->setAttributeImplementedInCPPForPrivateScriptOnly(cppValue); |
| } |
| |
| static void attributeImplementedInCPPForPrivateScriptOnlyAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Value> v8Value = info[0]; |
| TestObjectV8Internal::attributeImplementedInCPPForPrivateScriptOnlyAttributeSetter(v8Value, info); |
| } |
| |
| static void enumForPrivateScriptAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Object> holder = info.Holder(); |
| TestObject* impl = V8TestObject::toImpl(holder); |
| String result; |
| if (!V8TestObject::PrivateScript::enumForPrivateScriptAttributeGetter(toLocalFrame(toFrameIfNotDetached(info.GetIsolate()->GetCurrentContext())), impl, &result)) |
| return; |
| v8SetReturnValueString(info, result, info.GetIsolate()); |
| } |
| |
| static void enumForPrivateScriptAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::enumForPrivateScriptAttributeGetter(info); |
| } |
| |
| static void enumForPrivateScriptAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Object> holder = info.Holder(); |
| ExceptionState exceptionState(ExceptionState::SetterContext, "enumForPrivateScript", "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; |
| } |
| V8TestObject::PrivateScript::enumForPrivateScriptAttributeSetter(toLocalFrame(toFrameIfNotDetached(info.GetIsolate()->GetCurrentContext())), impl, cppValue); |
| } |
| |
| static void enumForPrivateScriptAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| v8::Local<v8::Value> v8Value = info[0]; |
| TestObjectV8Internal::enumForPrivateScriptAttributeSetter(v8Value, info); |
| } |
| |
| static void unscopeableVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| impl->unscopeableVoidMethod(); |
| } |
| |
| static void unscopeableVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::unscopeableVoidMethodMethod(info); |
| } |
| |
| static void unscopeableRuntimeEnabledVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| impl->unscopeableRuntimeEnabledVoidMethod(); |
| } |
| |
| static void unscopeableRuntimeEnabledVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::unscopeableRuntimeEnabledVoidMethodMethod(info); |
| } |
| |
| static void voidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| impl->voidMethod(); |
| } |
| |
| static void voidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::voidMethodMethod(info); |
| } |
| |
| static void staticVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObject::staticVoidMethod(); |
| } |
| |
| static void staticVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::staticVoidMethodMethod(info); |
| } |
| |
| static void dateMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| v8SetReturnValue(info, v8DateOrNaN(info.GetIsolate(), impl->dateMethod())); |
| } |
| |
| static void dateMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::dateMethodMethod(info); |
| } |
| |
| static void stringMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| v8SetReturnValueString(info, impl->stringMethod(), info.GetIsolate()); |
| } |
| |
| static void stringMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::stringMethodMethod(info); |
| } |
| |
| static void byteStringMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| v8SetReturnValueString(info, impl->byteStringMethod(), info.GetIsolate()); |
| } |
| |
| static void byteStringMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::byteStringMethodMethod(info); |
| } |
| |
| static void usvStringMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| v8SetReturnValueString(info, impl->usvStringMethod(), info.GetIsolate()); |
| } |
| |
| static void usvStringMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::usvStringMethodMethod(info); |
| } |
| |
| static void readonlyDOMTimeStampMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| v8SetReturnValue(info, static_cast<double>(impl->readonlyDOMTimeStampMethod())); |
| } |
| |
| static void readonlyDOMTimeStampMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::readonlyDOMTimeStampMethodMethod(info); |
| } |
| |
| static void booleanMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| v8SetReturnValueBool(info, impl->booleanMethod()); |
| } |
| |
| static void booleanMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::booleanMethodMethod(info); |
| } |
| |
| static void byteMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| v8SetReturnValueInt(info, impl->byteMethod()); |
| } |
| |
| static void byteMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::byteMethodMethod(info); |
| } |
| |
| static void doubleMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| v8SetReturnValue(info, impl->doubleMethod()); |
| } |
| |
| static void doubleMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::doubleMethodMethod(info); |
| } |
| |
| static void floatMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| v8SetReturnValue(info, impl->floatMethod()); |
| } |
| |
| static void floatMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::floatMethodMethod(info); |
| } |
| |
| static void longMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| v8SetReturnValueInt(info, impl->longMethod()); |
| } |
| |
| static void longMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::longMethodMethod(info); |
| } |
| |
| static void longLongMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| v8SetReturnValue(info, static_cast<double>(impl->longLongMethod())); |
| } |
| |
| static void longLongMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::longLongMethodMethod(info); |
| } |
| |
| static void octetMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| v8SetReturnValueUnsigned(info, impl->octetMethod()); |
| } |
| |
| static void octetMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::octetMethodMethod(info); |
| } |
| |
| static void shortMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| v8SetReturnValueInt(info, impl->shortMethod()); |
| } |
| |
| static void shortMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::shortMethodMethod(info); |
| } |
| |
| static void unsignedLongMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| v8SetReturnValueUnsigned(info, impl->unsignedLongMethod()); |
| } |
| |
| static void unsignedLongMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::unsignedLongMethodMethod(info); |
| } |
| |
| static void unsignedLongLongMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| v8SetReturnValue(info, static_cast<double>(impl->unsignedLongLongMethod())); |
| } |
| |
| static void unsignedLongLongMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::unsignedLongLongMethodMethod(info); |
| } |
| |
| static void unsignedShortMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| v8SetReturnValueUnsigned(info, impl->unsignedShortMethod()); |
| } |
| |
| static void unsignedShortMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::unsignedShortMethodMethod(info); |
| } |
| |
| static void voidMethodDateArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| if (UNLIKELY(info.Length() < 1)) { |
| V8ThrowException::throwException(createMinimumArityTypeErrorForMethod(info.GetIsolate(), "voidMethodDateArg", "TestObject", 1, info.Length()), info.GetIsolate()); |
| return; |
| } |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| double dateArg; |
| { |
| dateArg = toCoreDate(info.GetIsolate(), info[0]); |
| } |
| impl->voidMethodDateArg(dateArg); |
| } |
| |
| static void voidMethodDateArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::voidMethodDateArgMethod(info); |
| } |
| |
| static void voidMethodStringArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| if (UNLIKELY(info.Length() < 1)) { |
| V8ThrowException::throwException(createMinimumArityTypeErrorForMethod(info.GetIsolate(), "voidMethodStringArg", "TestObject", 1, info.Length()), info.GetIsolate()); |
| return; |
| } |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| V8StringResource<> stringArg; |
| { |
| stringArg = info[0]; |
| if (!stringArg.prepare()) |
| return; |
| } |
| impl->voidMethodStringArg(stringArg); |
| } |
| |
| static void voidMethodStringArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::voidMethodStringArgMethod(info); |
| } |
| |
| static void voidMethodByteStringArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodByteStringArg", "TestObject", info.Holder(), info.GetIsolate()); |
| if (UNLIKELY(info.Length() < 1)) { |
| setMinimumArityTypeError(exceptionState, 1, info.Length()); |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| V8StringResource<> stringArg; |
| { |
| stringArg = toByteString(info.GetIsolate(), info[0], exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| } |
| impl->voidMethodByteStringArg(stringArg); |
| } |
| |
| static void voidMethodByteStringArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::voidMethodByteStringArgMethod(info); |
| } |
| |
| static void voidMethodUSVStringArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodUSVStringArg", "TestObject", info.Holder(), info.GetIsolate()); |
| if (UNLIKELY(info.Length() < 1)) { |
| setMinimumArityTypeError(exceptionState, 1, info.Length()); |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| V8StringResource<> usvStringArg; |
| { |
| usvStringArg = toUSVString(info.GetIsolate(), info[0], exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| } |
| impl->voidMethodUSVStringArg(usvStringArg); |
| } |
| |
| static void voidMethodUSVStringArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::voidMethodUSVStringArgMethod(info); |
| } |
| |
| static void voidMethodDOMTimeStampArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodDOMTimeStampArg", "TestObject", info.Holder(), info.GetIsolate()); |
| if (UNLIKELY(info.Length() < 1)) { |
| setMinimumArityTypeError(exceptionState, 1, info.Length()); |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| unsigned long long domTimeStampArg; |
| { |
| domTimeStampArg = toUInt64(info.GetIsolate(), info[0], NormalConversion, exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| } |
| impl->voidMethodDOMTimeStampArg(domTimeStampArg); |
| } |
| |
| static void voidMethodDOMTimeStampArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::voidMethodDOMTimeStampArgMethod(info); |
| } |
| |
| static void voidMethodBooleanArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodBooleanArg", "TestObject", info.Holder(), info.GetIsolate()); |
| if (UNLIKELY(info.Length() < 1)) { |
| setMinimumArityTypeError(exceptionState, 1, info.Length()); |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| bool booleanArg; |
| { |
| booleanArg = toBoolean(info.GetIsolate(), info[0], exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| } |
| impl->voidMethodBooleanArg(booleanArg); |
| } |
| |
| static void voidMethodBooleanArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::voidMethodBooleanArgMethod(info); |
| } |
| |
| static void voidMethodByteArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodByteArg", "TestObject", info.Holder(), info.GetIsolate()); |
| if (UNLIKELY(info.Length() < 1)) { |
| setMinimumArityTypeError(exceptionState, 1, info.Length()); |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| int byteArg; |
| { |
| byteArg = toInt8(info.GetIsolate(), info[0], NormalConversion, exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| } |
| impl->voidMethodByteArg(byteArg); |
| } |
| |
| static void voidMethodByteArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::voidMethodByteArgMethod(info); |
| } |
| |
| static void voidMethodDoubleArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodDoubleArg", "TestObject", info.Holder(), info.GetIsolate()); |
| if (UNLIKELY(info.Length() < 1)) { |
| setMinimumArityTypeError(exceptionState, 1, info.Length()); |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| double doubleArg; |
| { |
| doubleArg = toRestrictedDouble(info.GetIsolate(), info[0], exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| } |
| impl->voidMethodDoubleArg(doubleArg); |
| } |
| |
| static void voidMethodDoubleArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::voidMethodDoubleArgMethod(info); |
| } |
| |
| static void voidMethodFloatArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodFloatArg", "TestObject", info.Holder(), info.GetIsolate()); |
| if (UNLIKELY(info.Length() < 1)) { |
| setMinimumArityTypeError(exceptionState, 1, info.Length()); |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| float floatArg; |
| { |
| floatArg = toRestrictedFloat(info.GetIsolate(), info[0], exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| } |
| impl->voidMethodFloatArg(floatArg); |
| } |
| |
| static void voidMethodFloatArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::voidMethodFloatArgMethod(info); |
| } |
| |
| static void voidMethodLongArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodLongArg", "TestObject", info.Holder(), info.GetIsolate()); |
| if (UNLIKELY(info.Length() < 1)) { |
| setMinimumArityTypeError(exceptionState, 1, info.Length()); |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| int longArg; |
| { |
| longArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| } |
| impl->voidMethodLongArg(longArg); |
| } |
| |
| static void voidMethodLongArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::voidMethodLongArgMethod(info); |
| } |
| |
| static void voidMethodLongLongArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodLongLongArg", "TestObject", info.Holder(), info.GetIsolate()); |
| if (UNLIKELY(info.Length() < 1)) { |
| setMinimumArityTypeError(exceptionState, 1, info.Length()); |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| long long longLongArg; |
| { |
| longLongArg = toInt64(info.GetIsolate(), info[0], NormalConversion, exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| } |
| impl->voidMethodLongLongArg(longLongArg); |
| } |
| |
| static void voidMethodLongLongArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::voidMethodLongLongArgMethod(info); |
| } |
| |
| static void voidMethodOctetArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodOctetArg", "TestObject", info.Holder(), info.GetIsolate()); |
| if (UNLIKELY(info.Length() < 1)) { |
| setMinimumArityTypeError(exceptionState, 1, info.Length()); |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| unsigned octetArg; |
| { |
| octetArg = toUInt8(info.GetIsolate(), info[0], NormalConversion, exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| } |
| impl->voidMethodOctetArg(octetArg); |
| } |
| |
| static void voidMethodOctetArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::voidMethodOctetArgMethod(info); |
| } |
| |
| static void voidMethodShortArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodShortArg", "TestObject", info.Holder(), info.GetIsolate()); |
| if (UNLIKELY(info.Length() < 1)) { |
| setMinimumArityTypeError(exceptionState, 1, info.Length()); |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| int shortArg; |
| { |
| shortArg = toInt16(info.GetIsolate(), info[0], NormalConversion, exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| } |
| impl->voidMethodShortArg(shortArg); |
| } |
| |
| static void voidMethodShortArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::voidMethodShortArgMethod(info); |
| } |
| |
| static void voidMethodUnsignedLongArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodUnsignedLongArg", "TestObject", info.Holder(), info.GetIsolate()); |
| if (UNLIKELY(info.Length() < 1)) { |
| setMinimumArityTypeError(exceptionState, 1, info.Length()); |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| unsigned unsignedLongArg; |
| { |
| unsignedLongArg = toUInt32(info.GetIsolate(), info[0], NormalConversion, exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| } |
| impl->voidMethodUnsignedLongArg(unsignedLongArg); |
| } |
| |
| static void voidMethodUnsignedLongArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::voidMethodUnsignedLongArgMethod(info); |
| } |
| |
| static void voidMethodUnsignedLongLongArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodUnsignedLongLongArg", "TestObject", info.Holder(), info.GetIsolate()); |
| if (UNLIKELY(info.Length() < 1)) { |
| setMinimumArityTypeError(exceptionState, 1, info.Length()); |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| unsigned long long unsignedLongLongArg; |
| { |
| unsignedLongLongArg = toUInt64(info.GetIsolate(), info[0], NormalConversion, exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| } |
| impl->voidMethodUnsignedLongLongArg(unsignedLongLongArg); |
| } |
| |
| static void voidMethodUnsignedLongLongArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::voidMethodUnsignedLongLongArgMethod(info); |
| } |
| |
| static void voidMethodUnsignedShortArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodUnsignedShortArg", "TestObject", info.Holder(), info.GetIsolate()); |
| if (UNLIKELY(info.Length() < 1)) { |
| setMinimumArityTypeError(exceptionState, 1, info.Length()); |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| unsigned unsignedShortArg; |
| { |
| unsignedShortArg = toUInt16(info.GetIsolate(), info[0], NormalConversion, exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| } |
| impl->voidMethodUnsignedShortArg(unsignedShortArg); |
| } |
| |
| static void voidMethodUnsignedShortArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::voidMethodUnsignedShortArgMethod(info); |
| } |
| |
| static void testInterfaceEmptyMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| v8SetReturnValue(info, impl->testInterfaceEmptyMethod()); |
| } |
| |
| static void testInterfaceEmptyMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::testInterfaceEmptyMethodMethod(info); |
| } |
| |
| static void voidMethodTestInterfaceEmptyArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| if (UNLIKELY(info.Length() < 1)) { |
| V8ThrowException::throwException(createMinimumArityTypeErrorForMethod(info.GetIsolate(), "voidMethodTestInterfaceEmptyArg", "TestObject", 1, info.Length()), info.GetIsolate()); |
| return; |
| } |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| TestInterfaceEmpty* testInterfaceEmptyArg; |
| { |
| testInterfaceEmptyArg = V8TestInterfaceEmpty::toImplWithTypeCheck(info.GetIsolate(), info[0]); |
| if (!testInterfaceEmptyArg) { |
| V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("voidMethodTestInterfaceEmptyArg", "TestObject", "parameter 1 is not of type 'TestInterfaceEmpty'.")); |
| return; |
| } |
| } |
| impl->voidMethodTestInterfaceEmptyArg(testInterfaceEmptyArg); |
| } |
| |
| static void voidMethodTestInterfaceEmptyArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::voidMethodTestInterfaceEmptyArgMethod(info); |
| } |
| |
| static void voidMethodLongArgTestInterfaceEmptyArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodLongArgTestInterfaceEmptyArg", "TestObject", info.Holder(), info.GetIsolate()); |
| if (UNLIKELY(info.Length() < 2)) { |
| setMinimumArityTypeError(exceptionState, 2, info.Length()); |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| int longArg; |
| TestInterfaceEmpty* testInterfaceEmptyArg; |
| { |
| longArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| testInterfaceEmptyArg = V8TestInterfaceEmpty::toImplWithTypeCheck(info.GetIsolate(), info[1]); |
| if (!testInterfaceEmptyArg) { |
| exceptionState.throwTypeError("parameter 2 is not of type 'TestInterfaceEmpty'."); |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| } |
| impl->voidMethodLongArgTestInterfaceEmptyArg(longArg, testInterfaceEmptyArg); |
| } |
| |
| static void voidMethodLongArgTestInterfaceEmptyArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::voidMethodLongArgTestInterfaceEmptyArgMethod(info); |
| } |
| |
| static void voidCallbackFunctionMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| v8SetReturnValue(info, impl->voidCallbackFunctionMethod().v8Value()); |
| } |
| |
| static void voidCallbackFunctionMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::voidCallbackFunctionMethodMethod(info); |
| } |
| |
| static void anyCallbackFunctionOptionalAnyArgMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| v8SetReturnValue(info, impl->anyCallbackFunctionOptionalAnyArgMethod().v8Value()); |
| } |
| |
| static void anyCallbackFunctionOptionalAnyArgMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::anyCallbackFunctionOptionalAnyArgMethodMethod(info); |
| } |
| |
| static void voidMethodVoidCallbackFunctionArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| if (UNLIKELY(info.Length() < 1)) { |
| V8ThrowException::throwException(createMinimumArityTypeErrorForMethod(info.GetIsolate(), "voidMethodVoidCallbackFunctionArg", "TestObject", 1, info.Length()), info.GetIsolate()); |
| return; |
| } |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| ScriptValue voidCallbackFunctionArg; |
| { |
| if (!info[0]->IsFunction()) { |
| V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("voidMethodVoidCallbackFunctionArg", "TestObject", "The callback provided as parameter 1 is not a function.")); |
| return; |
| } |
| voidCallbackFunctionArg = ScriptValue(ScriptState::current(info.GetIsolate()), info[0]); |
| } |
| impl->voidMethodVoidCallbackFunctionArg(voidCallbackFunctionArg); |
| } |
| |
| static void voidMethodVoidCallbackFunctionArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::voidMethodVoidCallbackFunctionArgMethod(info); |
| } |
| |
| static void voidMethodOptionalVoidCallbackFunctionArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| ScriptValue voidCallbackFunctionArg; |
| { |
| int numArgsPassed = info.Length(); |
| while (numArgsPassed > 0) { |
| if (!info[numArgsPassed - 1]->IsUndefined()) |
| break; |
| --numArgsPassed; |
| } |
| if (UNLIKELY(numArgsPassed <= 0)) { |
| impl->voidMethodOptionalVoidCallbackFunctionArg(); |
| return; |
| } |
| if (!info[0]->IsFunction()) { |
| V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("voidMethodOptionalVoidCallbackFunctionArg", "TestObject", "The callback provided as parameter 1 is not a function.")); |
| return; |
| } |
| voidCallbackFunctionArg = ScriptValue(ScriptState::current(info.GetIsolate()), info[0]); |
| } |
| impl->voidMethodOptionalVoidCallbackFunctionArg(voidCallbackFunctionArg); |
| } |
| |
| static void voidMethodOptionalVoidCallbackFunctionArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::voidMethodOptionalVoidCallbackFunctionArgMethod(info); |
| } |
| |
| static void voidMethodNullableVoidCallbackFunctionArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| if (UNLIKELY(info.Length() < 1)) { |
| V8ThrowException::throwException(createMinimumArityTypeErrorForMethod(info.GetIsolate(), "voidMethodNullableVoidCallbackFunctionArg", "TestObject", 1, info.Length()), info.GetIsolate()); |
| return; |
| } |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| ScriptValue voidCallbackFunctionArg; |
| { |
| if (!info[0]->IsFunction() && !info[0]->IsNull()) { |
| V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("voidMethodNullableVoidCallbackFunctionArg", "TestObject", "The callback provided as parameter 1 is not a function.")); |
| return; |
| } |
| voidCallbackFunctionArg = ScriptValue(ScriptState::current(info.GetIsolate()), info[0]); |
| } |
| impl->voidMethodNullableVoidCallbackFunctionArg(voidCallbackFunctionArg); |
| } |
| |
| static void voidMethodNullableVoidCallbackFunctionArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::voidMethodNullableVoidCallbackFunctionArgMethod(info); |
| } |
| |
| static void voidMethodAnyCallbackFunctionOptionalAnyArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| if (UNLIKELY(info.Length() < 1)) { |
| V8ThrowException::throwException(createMinimumArityTypeErrorForMethod(info.GetIsolate(), "voidMethodAnyCallbackFunctionOptionalAnyArg", "TestObject", 1, info.Length()), info.GetIsolate()); |
| return; |
| } |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| ScriptValue anyCallbackFunctionOptionalAnyArgArg; |
| { |
| if (!info[0]->IsFunction()) { |
| V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("voidMethodAnyCallbackFunctionOptionalAnyArg", "TestObject", "The callback provided as parameter 1 is not a function.")); |
| return; |
| } |
| anyCallbackFunctionOptionalAnyArgArg = ScriptValue(ScriptState::current(info.GetIsolate()), info[0]); |
| } |
| impl->voidMethodAnyCallbackFunctionOptionalAnyArg(anyCallbackFunctionOptionalAnyArgArg); |
| } |
| |
| static void voidMethodAnyCallbackFunctionOptionalAnyArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::voidMethodAnyCallbackFunctionOptionalAnyArgMethod(info); |
| } |
| |
| static void anyMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| v8SetReturnValue(info, impl->anyMethod().v8Value()); |
| } |
| |
| static void anyMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::anyMethodMethod(info); |
| } |
| |
| static void voidMethodEventTargetArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| if (UNLIKELY(info.Length() < 1)) { |
| V8ThrowException::throwException(createMinimumArityTypeErrorForMethod(info.GetIsolate(), "voidMethodEventTargetArg", "TestObject", 1, info.Length()), info.GetIsolate()); |
| return; |
| } |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| EventTarget* eventTargetArg; |
| { |
| eventTargetArg = toEventTarget(info.GetIsolate(), info[0]); |
| if (!eventTargetArg) { |
| V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("voidMethodEventTargetArg", "TestObject", "parameter 1 is not of type 'EventTarget'.")); |
| return; |
| } |
| } |
| impl->voidMethodEventTargetArg(eventTargetArg); |
| } |
| |
| static void voidMethodEventTargetArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::voidMethodEventTargetArgMethod(info); |
| } |
| |
| static void voidMethodAnyArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| if (UNLIKELY(info.Length() < 1)) { |
| V8ThrowException::throwException(createMinimumArityTypeErrorForMethod(info.GetIsolate(), "voidMethodAnyArg", "TestObject", 1, info.Length()), info.GetIsolate()); |
| return; |
| } |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| ScriptValue anyArg; |
| { |
| anyArg = ScriptValue(ScriptState::current(info.GetIsolate()), info[0]); |
| } |
| impl->voidMethodAnyArg(anyArg); |
| } |
| |
| static void voidMethodAnyArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::voidMethodAnyArgMethod(info); |
| } |
| |
| static void voidMethodAttrArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| if (UNLIKELY(info.Length() < 1)) { |
| V8ThrowException::throwException(createMinimumArityTypeErrorForMethod(info.GetIsolate(), "voidMethodAttrArg", "TestObject", 1, info.Length()), info.GetIsolate()); |
| return; |
| } |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| Attr* attrArg; |
| { |
| attrArg = V8Attr::toImplWithTypeCheck(info.GetIsolate(), info[0]); |
| if (!attrArg) { |
| V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("voidMethodAttrArg", "TestObject", "parameter 1 is not of type 'Attr'.")); |
| return; |
| } |
| } |
| impl->voidMethodAttrArg(attrArg); |
| } |
| |
| static void voidMethodAttrArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::voidMethodAttrArgMethod(info); |
| } |
| |
| static void voidMethodDocumentArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| if (UNLIKELY(info.Length() < 1)) { |
| V8ThrowException::throwException(createMinimumArityTypeErrorForMethod(info.GetIsolate(), "voidMethodDocumentArg", "TestObject", 1, info.Length()), info.GetIsolate()); |
| return; |
| } |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| Document* documentArg; |
| { |
| documentArg = V8Document::toImplWithTypeCheck(info.GetIsolate(), info[0]); |
| if (!documentArg) { |
| V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("voidMethodDocumentArg", "TestObject", "parameter 1 is not of type 'Document'.")); |
| return; |
| } |
| } |
| impl->voidMethodDocumentArg(documentArg); |
| } |
| |
| static void voidMethodDocumentArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::voidMethodDocumentArgMethod(info); |
| } |
| |
| static void voidMethodDocumentTypeArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| if (UNLIKELY(info.Length() < 1)) { |
| V8ThrowException::throwException(createMinimumArityTypeErrorForMethod(info.GetIsolate(), "voidMethodDocumentTypeArg", "TestObject", 1, info.Length()), info.GetIsolate()); |
| return; |
| } |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| DocumentType* documentTypeArg; |
| { |
| documentTypeArg = V8DocumentType::toImplWithTypeCheck(info.GetIsolate(), info[0]); |
| if (!documentTypeArg) { |
| V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("voidMethodDocumentTypeArg", "TestObject", "parameter 1 is not of type 'DocumentType'.")); |
| return; |
| } |
| } |
| impl->voidMethodDocumentTypeArg(documentTypeArg); |
| } |
| |
| static void voidMethodDocumentTypeArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::voidMethodDocumentTypeArgMethod(info); |
| } |
| |
| static void voidMethodElementArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| if (UNLIKELY(info.Length() < 1)) { |
| V8ThrowException::throwException(createMinimumArityTypeErrorForMethod(info.GetIsolate(), "voidMethodElementArg", "TestObject", 1, info.Length()), info.GetIsolate()); |
| return; |
| } |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| Element* elementArg; |
| { |
| elementArg = V8Element::toImplWithTypeCheck(info.GetIsolate(), info[0]); |
| if (!elementArg) { |
| V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("voidMethodElementArg", "TestObject", "parameter 1 is not of type 'Element'.")); |
| return; |
| } |
| } |
| impl->voidMethodElementArg(elementArg); |
| } |
| |
| static void voidMethodElementArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::voidMethodElementArgMethod(info); |
| } |
| |
| static void voidMethodNodeArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| if (UNLIKELY(info.Length() < 1)) { |
| V8ThrowException::throwException(createMinimumArityTypeErrorForMethod(info.GetIsolate(), "voidMethodNodeArg", "TestObject", 1, info.Length()), info.GetIsolate()); |
| return; |
| } |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| Node* nodeArg; |
| { |
| nodeArg = V8Node::toImplWithTypeCheck(info.GetIsolate(), info[0]); |
| if (!nodeArg) { |
| V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("voidMethodNodeArg", "TestObject", "parameter 1 is not of type 'Node'.")); |
| return; |
| } |
| } |
| impl->voidMethodNodeArg(nodeArg); |
| } |
| |
| static void voidMethodNodeArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::voidMethodNodeArgMethod(info); |
| } |
| |
| static void arrayBufferMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| v8SetReturnValue(info, impl->arrayBufferMethod()); |
| } |
| |
| static void arrayBufferMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::arrayBufferMethodMethod(info); |
| } |
| |
| static void arrayBufferViewMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| v8SetReturnValue(info, impl->arrayBufferViewMethod()); |
| } |
| |
| static void arrayBufferViewMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::arrayBufferViewMethodMethod(info); |
| } |
| |
| static void float32ArrayMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| v8SetReturnValue(info, impl->float32ArrayMethod()); |
| } |
| |
| static void float32ArrayMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::float32ArrayMethodMethod(info); |
| } |
| |
| static void int32ArrayMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| v8SetReturnValue(info, impl->int32ArrayMethod()); |
| } |
| |
| static void int32ArrayMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::int32ArrayMethodMethod(info); |
| } |
| |
| static void uint8ArrayMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| v8SetReturnValue(info, impl->uint8ArrayMethod()); |
| } |
| |
| static void uint8ArrayMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::uint8ArrayMethodMethod(info); |
| } |
| |
| static void voidMethodArrayBufferArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| if (UNLIKELY(info.Length() < 1)) { |
| V8ThrowException::throwException(createMinimumArityTypeErrorForMethod(info.GetIsolate(), "voidMethodArrayBufferArg", "TestObject", 1, info.Length()), info.GetIsolate()); |
| return; |
| } |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| TestArrayBuffer* arrayBufferArg; |
| { |
| arrayBufferArg = info[0]->IsArrayBuffer() ? V8ArrayBuffer::toImpl(v8::Local<v8::ArrayBuffer>::Cast(info[0])) : 0; |
| if (!arrayBufferArg) { |
| V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("voidMethodArrayBufferArg", "TestObject", "parameter 1 is not of type 'ArrayBuffer'.")); |
| return; |
| } |
| } |
| impl->voidMethodArrayBufferArg(arrayBufferArg); |
| } |
| |
| static void voidMethodArrayBufferArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::voidMethodArrayBufferArgMethod(info); |
| } |
| |
| static void voidMethodArrayBufferOrNullArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| if (UNLIKELY(info.Length() < 1)) { |
| V8ThrowException::throwException(createMinimumArityTypeErrorForMethod(info.GetIsolate(), "voidMethodArrayBufferOrNullArg", "TestObject", 1, info.Length()), info.GetIsolate()); |
| return; |
| } |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| TestArrayBuffer* arrayBufferArg; |
| { |
| arrayBufferArg = info[0]->IsArrayBuffer() ? V8ArrayBuffer::toImpl(v8::Local<v8::ArrayBuffer>::Cast(info[0])) : 0; |
| if (!arrayBufferArg && !isUndefinedOrNull(info[0])) { |
| V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("voidMethodArrayBufferOrNullArg", "TestObject", "parameter 1 is not of type 'ArrayBuffer'.")); |
| return; |
| } |
| } |
| impl->voidMethodArrayBufferOrNullArg(arrayBufferArg); |
| } |
| |
| static void voidMethodArrayBufferOrNullArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::voidMethodArrayBufferOrNullArgMethod(info); |
| } |
| |
| static void voidMethodArrayBufferViewArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| if (UNLIKELY(info.Length() < 1)) { |
| V8ThrowException::throwException(createMinimumArityTypeErrorForMethod(info.GetIsolate(), "voidMethodArrayBufferViewArg", "TestObject", 1, info.Length()), info.GetIsolate()); |
| return; |
| } |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| TestArrayBufferView* arrayBufferViewArg; |
| { |
| arrayBufferViewArg = info[0]->IsArrayBufferView() ? V8ArrayBufferView::toImpl(v8::Local<v8::ArrayBufferView>::Cast(info[0])) : 0; |
| if (!arrayBufferViewArg) { |
| V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("voidMethodArrayBufferViewArg", "TestObject", "parameter 1 is not of type 'ArrayBufferView'.")); |
| return; |
| } |
| } |
| impl->voidMethodArrayBufferViewArg(arrayBufferViewArg); |
| } |
| |
| static void voidMethodArrayBufferViewArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::voidMethodArrayBufferViewArgMethod(info); |
| } |
| |
| static void voidMethodFlexibleArrayBufferViewArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| if (UNLIKELY(info.Length() < 1)) { |
| V8ThrowException::throwException(createMinimumArityTypeErrorForMethod(info.GetIsolate(), "voidMethodFlexibleArrayBufferViewArg", "TestObject", 1, info.Length()), info.GetIsolate()); |
| return; |
| } |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| FlexibleArrayBufferView arrayBufferViewArg; |
| { |
| toFlexibleArrayBufferView(info.GetIsolate(), info[0], arrayBufferViewArg, allocateFlexibleArrayBufferViewStorage(info[0])); |
| if (!arrayBufferViewArg) { |
| V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("voidMethodFlexibleArrayBufferViewArg", "TestObject", "parameter 1 is not of type 'ArrayBufferView'.")); |
| return; |
| } |
| } |
| impl->voidMethodFlexibleArrayBufferViewArg(arrayBufferViewArg); |
| } |
| |
| static void voidMethodFlexibleArrayBufferViewArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::voidMethodFlexibleArrayBufferViewArgMethod(info); |
| } |
| |
| static void voidMethodFlexibleArrayBufferViewTypedArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| if (UNLIKELY(info.Length() < 1)) { |
| V8ThrowException::throwException(createMinimumArityTypeErrorForMethod(info.GetIsolate(), "voidMethodFlexibleArrayBufferViewTypedArg", "TestObject", 1, info.Length()), info.GetIsolate()); |
| return; |
| } |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| FlexibleFloat32ArrayView typedArrayBufferViewArg; |
| { |
| toFlexibleArrayBufferView(info.GetIsolate(), info[0], typedArrayBufferViewArg, allocateFlexibleArrayBufferViewStorage(info[0])); |
| if (!typedArrayBufferViewArg) { |
| V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("voidMethodFlexibleArrayBufferViewTypedArg", "TestObject", "parameter 1 is not of type 'Float32Array'.")); |
| return; |
| } |
| } |
| impl->voidMethodFlexibleArrayBufferViewTypedArg(typedArrayBufferViewArg); |
| } |
| |
| static void voidMethodFlexibleArrayBufferViewTypedArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::voidMethodFlexibleArrayBufferViewTypedArgMethod(info); |
| } |
| |
| static void voidMethodFloat32ArrayArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| if (UNLIKELY(info.Length() < 1)) { |
| V8ThrowException::throwException(createMinimumArityTypeErrorForMethod(info.GetIsolate(), "voidMethodFloat32ArrayArg", "TestObject", 1, info.Length()), info.GetIsolate()); |
| return; |
| } |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| DOMFloat32Array* float32ArrayArg; |
| { |
| float32ArrayArg = info[0]->IsFloat32Array() ? V8Float32Array::toImpl(v8::Local<v8::Float32Array>::Cast(info[0])) : 0; |
| if (!float32ArrayArg) { |
| V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("voidMethodFloat32ArrayArg", "TestObject", "parameter 1 is not of type 'Float32Array'.")); |
| return; |
| } |
| } |
| impl->voidMethodFloat32ArrayArg(float32ArrayArg); |
| } |
| |
| static void voidMethodFloat32ArrayArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::voidMethodFloat32ArrayArgMethod(info); |
| } |
| |
| static void voidMethodInt32ArrayArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| if (UNLIKELY(info.Length() < 1)) { |
| V8ThrowException::throwException(createMinimumArityTypeErrorForMethod(info.GetIsolate(), "voidMethodInt32ArrayArg", "TestObject", 1, info.Length()), info.GetIsolate()); |
| return; |
| } |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| DOMInt32Array* int32ArrayArg; |
| { |
| int32ArrayArg = info[0]->IsInt32Array() ? V8Int32Array::toImpl(v8::Local<v8::Int32Array>::Cast(info[0])) : 0; |
| if (!int32ArrayArg) { |
| V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("voidMethodInt32ArrayArg", "TestObject", "parameter 1 is not of type 'Int32Array'.")); |
| return; |
| } |
| } |
| impl->voidMethodInt32ArrayArg(int32ArrayArg); |
| } |
| |
| static void voidMethodInt32ArrayArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::voidMethodInt32ArrayArgMethod(info); |
| } |
| |
| static void voidMethodUint8ArrayArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| if (UNLIKELY(info.Length() < 1)) { |
| V8ThrowException::throwException(createMinimumArityTypeErrorForMethod(info.GetIsolate(), "voidMethodUint8ArrayArg", "TestObject", 1, info.Length()), info.GetIsolate()); |
| return; |
| } |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| DOMUint8Array* uint8ArrayArg; |
| { |
| uint8ArrayArg = info[0]->IsUint8Array() ? V8Uint8Array::toImpl(v8::Local<v8::Uint8Array>::Cast(info[0])) : 0; |
| if (!uint8ArrayArg) { |
| V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("voidMethodUint8ArrayArg", "TestObject", "parameter 1 is not of type 'Uint8Array'.")); |
| return; |
| } |
| } |
| impl->voidMethodUint8ArrayArg(uint8ArrayArg); |
| } |
| |
| static void voidMethodUint8ArrayArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::voidMethodUint8ArrayArgMethod(info); |
| } |
| |
| static void longArrayMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| v8SetReturnValue(info, toV8(impl->longArrayMethod(), info.Holder(), info.GetIsolate())); |
| } |
| |
| static void longArrayMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::longArrayMethodMethod(info); |
| } |
| |
| static void stringArrayMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| v8SetReturnValue(info, toV8(impl->stringArrayMethod(), info.Holder(), info.GetIsolate())); |
| } |
| |
| static void stringArrayMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::stringArrayMethodMethod(info); |
| } |
| |
| static void testInterfaceEmptyArrayMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| v8SetReturnValue(info, toV8(impl->testInterfaceEmptyArrayMethod(), info.Holder(), info.GetIsolate())); |
| } |
| |
| static void testInterfaceEmptyArrayMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::testInterfaceEmptyArrayMethodMethod(info); |
| } |
| |
| static void voidMethodArrayLongArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodArrayLongArg", "TestObject", info.Holder(), info.GetIsolate()); |
| if (UNLIKELY(info.Length() < 1)) { |
| setMinimumArityTypeError(exceptionState, 1, info.Length()); |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| Vector<int> arrayLongArg; |
| { |
| arrayLongArg = toImplArray<Vector<int>>(info[0], 1, info.GetIsolate(), exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| } |
| impl->voidMethodArrayLongArg(arrayLongArg); |
| } |
| |
| static void voidMethodArrayLongArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::voidMethodArrayLongArgMethod(info); |
| } |
| |
| static void voidMethodArrayStringArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodArrayStringArg", "TestObject", info.Holder(), info.GetIsolate()); |
| if (UNLIKELY(info.Length() < 1)) { |
| setMinimumArityTypeError(exceptionState, 1, info.Length()); |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| Vector<String> arrayStringArg; |
| { |
| arrayStringArg = toImplArray<Vector<String>>(info[0], 1, info.GetIsolate(), exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| } |
| impl->voidMethodArrayStringArg(arrayStringArg); |
| } |
| |
| static void voidMethodArrayStringArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::voidMethodArrayStringArgMethod(info); |
| } |
| |
| static void voidMethodArrayTestInterfaceEmptyArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodArrayTestInterfaceEmptyArg", "TestObject", info.Holder(), info.GetIsolate()); |
| if (UNLIKELY(info.Length() < 1)) { |
| setMinimumArityTypeError(exceptionState, 1, info.Length()); |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| HeapVector<Member<TestInterfaceEmpty>> arrayTestInterfaceEmptyArg; |
| { |
| arrayTestInterfaceEmptyArg = (toMemberNativeArray<TestInterfaceEmpty>(info[0], 1, info.GetIsolate(), exceptionState)); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| } |
| impl->voidMethodArrayTestInterfaceEmptyArg(arrayTestInterfaceEmptyArg); |
| } |
| |
| static void voidMethodArrayTestInterfaceEmptyArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::voidMethodArrayTestInterfaceEmptyArgMethod(info); |
| } |
| |
| static void voidMethodNullableArrayLongArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodNullableArrayLongArg", "TestObject", info.Holder(), info.GetIsolate()); |
| if (UNLIKELY(info.Length() < 1)) { |
| setMinimumArityTypeError(exceptionState, 1, info.Length()); |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| Nullable<Vector<int>> arrayLongArg; |
| { |
| if (!isUndefinedOrNull(info[0])) { |
| arrayLongArg = toImplArray<Vector<int>>(info[0], 1, info.GetIsolate(), exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| } |
| } |
| impl->voidMethodNullableArrayLongArg(arrayLongArg); |
| } |
| |
| static void voidMethodNullableArrayLongArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::voidMethodNullableArrayLongArgMethod(info); |
| } |
| |
| static void longSequenceMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| v8SetReturnValue(info, toV8(impl->longSequenceMethod(), info.Holder(), info.GetIsolate())); |
| } |
| |
| static void longSequenceMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::longSequenceMethodMethod(info); |
| } |
| |
| static void stringSequenceMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| v8SetReturnValue(info, toV8(impl->stringSequenceMethod(), info.Holder(), info.GetIsolate())); |
| } |
| |
| static void stringSequenceMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::stringSequenceMethodMethod(info); |
| } |
| |
| static void testInterfaceEmptySequenceMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| v8SetReturnValue(info, toV8(impl->testInterfaceEmptySequenceMethod(), info.Holder(), info.GetIsolate())); |
| } |
| |
| static void testInterfaceEmptySequenceMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::testInterfaceEmptySequenceMethodMethod(info); |
| } |
| |
| static void voidMethodSequenceLongArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodSequenceLongArg", "TestObject", info.Holder(), info.GetIsolate()); |
| if (UNLIKELY(info.Length() < 1)) { |
| setMinimumArityTypeError(exceptionState, 1, info.Length()); |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| Vector<int> longSequenceArg; |
| { |
| longSequenceArg = toImplArray<Vector<int>>(info[0], 1, info.GetIsolate(), exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| } |
| impl->voidMethodSequenceLongArg(longSequenceArg); |
| } |
| |
| static void voidMethodSequenceLongArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::voidMethodSequenceLongArgMethod(info); |
| } |
| |
| static void voidMethodSequenceStringArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodSequenceStringArg", "TestObject", info.Holder(), info.GetIsolate()); |
| if (UNLIKELY(info.Length() < 1)) { |
| setMinimumArityTypeError(exceptionState, 1, info.Length()); |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| Vector<String> stringSequenceArg; |
| { |
| stringSequenceArg = toImplArray<Vector<String>>(info[0], 1, info.GetIsolate(), exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| } |
| impl->voidMethodSequenceStringArg(stringSequenceArg); |
| } |
| |
| static void voidMethodSequenceStringArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::voidMethodSequenceStringArgMethod(info); |
| } |
| |
| static void voidMethodSequenceTestInterfaceEmptyArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodSequenceTestInterfaceEmptyArg", "TestObject", info.Holder(), info.GetIsolate()); |
| if (UNLIKELY(info.Length() < 1)) { |
| setMinimumArityTypeError(exceptionState, 1, info.Length()); |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| HeapVector<Member<TestInterfaceEmpty>> testInterfaceEmptySequenceArg; |
| { |
| testInterfaceEmptySequenceArg = (toMemberNativeArray<TestInterfaceEmpty>(info[0], 1, info.GetIsolate(), exceptionState)); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| } |
| impl->voidMethodSequenceTestInterfaceEmptyArg(testInterfaceEmptySequenceArg); |
| } |
| |
| static void voidMethodSequenceTestInterfaceEmptyArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::voidMethodSequenceTestInterfaceEmptyArgMethod(info); |
| } |
| |
| static void voidMethodSequenceSequenceDOMStringArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodSequenceSequenceDOMStringArg", "TestObject", info.Holder(), info.GetIsolate()); |
| if (UNLIKELY(info.Length() < 1)) { |
| setMinimumArityTypeError(exceptionState, 1, info.Length()); |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| Vector<Vector<String>> stringSequenceSequenceArg; |
| { |
| stringSequenceSequenceArg = toImplArray<Vector<Vector<String>>>(info[0], 1, info.GetIsolate(), exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| } |
| impl->voidMethodSequenceSequenceDOMStringArg(stringSequenceSequenceArg); |
| } |
| |
| static void voidMethodSequenceSequenceDOMStringArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::voidMethodSequenceSequenceDOMStringArgMethod(info); |
| } |
| |
| static void voidMethodNullableSequenceLongArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodNullableSequenceLongArg", "TestObject", info.Holder(), info.GetIsolate()); |
| if (UNLIKELY(info.Length() < 1)) { |
| setMinimumArityTypeError(exceptionState, 1, info.Length()); |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| Nullable<Vector<int>> longSequenceArg; |
| { |
| if (!isUndefinedOrNull(info[0])) { |
| longSequenceArg = toImplArray<Vector<int>>(info[0], 1, info.GetIsolate(), exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| } |
| } |
| impl->voidMethodNullableSequenceLongArg(longSequenceArg); |
| } |
| |
| static void voidMethodNullableSequenceLongArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::voidMethodNullableSequenceLongArgMethod(info); |
| } |
| |
| static void longFrozenArrayMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| v8SetReturnValue(info, freezeV8Object(toV8(impl->longFrozenArrayMethod(), info.Holder(), info.GetIsolate()), info.GetIsolate())); |
| } |
| |
| static void longFrozenArrayMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::longFrozenArrayMethodMethod(info); |
| } |
| |
| static void voidMethodStringFrozenArrayMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodStringFrozenArrayMethod", "TestObject", info.Holder(), info.GetIsolate()); |
| if (UNLIKELY(info.Length() < 1)) { |
| setMinimumArityTypeError(exceptionState, 1, info.Length()); |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| Vector<String> stringFrozenArrayArg; |
| { |
| stringFrozenArrayArg = toImplArray<Vector<String>>(info[0], 1, info.GetIsolate(), exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| } |
| impl->voidMethodStringFrozenArrayMethod(stringFrozenArrayArg); |
| } |
| |
| static void voidMethodStringFrozenArrayMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::voidMethodStringFrozenArrayMethodMethod(info); |
| } |
| |
| static void voidMethodTestInterfaceEmptyFrozenArrayMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodTestInterfaceEmptyFrozenArrayMethod", "TestObject", info.Holder(), info.GetIsolate()); |
| if (UNLIKELY(info.Length() < 1)) { |
| setMinimumArityTypeError(exceptionState, 1, info.Length()); |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| HeapVector<Member<TestInterfaceEmpty>> testInterfaceEmptyFrozenArrayArg; |
| { |
| testInterfaceEmptyFrozenArrayArg = (toMemberNativeArray<TestInterfaceEmpty>(info[0], 1, info.GetIsolate(), exceptionState)); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| } |
| impl->voidMethodTestInterfaceEmptyFrozenArrayMethod(testInterfaceEmptyFrozenArrayArg); |
| } |
| |
| static void voidMethodTestInterfaceEmptyFrozenArrayMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::voidMethodTestInterfaceEmptyFrozenArrayMethodMethod(info); |
| } |
| |
| static void nullableLongMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| Nullable<int> result = impl->nullableLongMethod(); |
| if (result.isNull()) |
| v8SetReturnValueNull(info); |
| else |
| v8SetReturnValueInt(info, result.get()); |
| } |
| |
| static void nullableLongMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::nullableLongMethodMethod(info); |
| } |
| |
| static void nullableStringMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| v8SetReturnValueStringOrNull(info, impl->nullableStringMethod(), info.GetIsolate()); |
| } |
| |
| static void nullableStringMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::nullableStringMethodMethod(info); |
| } |
| |
| static void nullableTestInterfaceMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| v8SetReturnValue(info, impl->nullableTestInterfaceMethod()); |
| } |
| |
| static void nullableTestInterfaceMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::nullableTestInterfaceMethodMethod(info); |
| } |
| |
| static void nullableLongSequenceMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| Nullable<Vector<int>> result = impl->nullableLongSequenceMethod(); |
| if (result.isNull()) |
| v8SetReturnValueNull(info); |
| else |
| v8SetReturnValue(info, toV8(result.get(), info.Holder(), info.GetIsolate())); |
| } |
| |
| static void nullableLongSequenceMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::nullableLongSequenceMethodMethod(info); |
| } |
| |
| static void testInterfaceGarbageCollectedOrDOMStringMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| TestInterfaceGarbageCollectedOrString result; |
| impl->testInterfaceGarbageCollectedOrDOMStringMethod(result); |
| v8SetReturnValue(info, result); |
| } |
| |
| static void testInterfaceGarbageCollectedOrDOMStringMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::testInterfaceGarbageCollectedOrDOMStringMethodMethod(info); |
| } |
| |
| static void booleanOrDOMStringOrUnrestrictedDoubleMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| BooleanOrStringOrUnrestrictedDouble result; |
| impl->booleanOrDOMStringOrUnrestrictedDoubleMethod(result); |
| v8SetReturnValue(info, result); |
| } |
| |
| static void booleanOrDOMStringOrUnrestrictedDoubleMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::booleanOrDOMStringOrUnrestrictedDoubleMethodMethod(info); |
| } |
| |
| static void testInterfaceOrLongMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| TestInterfaceOrLong result; |
| impl->testInterfaceOrLongMethod(result); |
| v8SetReturnValue(info, result); |
| } |
| |
| static void testInterfaceOrLongMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::testInterfaceOrLongMethodMethod(info); |
| } |
| |
| static void voidMethodDoubleOrDOMStringArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodDoubleOrDOMStringArg", "TestObject", info.Holder(), info.GetIsolate()); |
| if (UNLIKELY(info.Length() < 1)) { |
| setMinimumArityTypeError(exceptionState, 1, info.Length()); |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| DoubleOrString arg; |
| { |
| V8DoubleOrString::toImpl(info.GetIsolate(), info[0], arg, UnionTypeConversionMode::NotNullable, exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| } |
| impl->voidMethodDoubleOrDOMStringArg(arg); |
| } |
| |
| static void voidMethodDoubleOrDOMStringArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::voidMethodDoubleOrDOMStringArgMethod(info); |
| } |
| |
| static void voidMethodDoubleOrDOMStringOrNullArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodDoubleOrDOMStringOrNullArg", "TestObject", info.Holder(), info.GetIsolate()); |
| if (UNLIKELY(info.Length() < 1)) { |
| setMinimumArityTypeError(exceptionState, 1, info.Length()); |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| DoubleOrString arg; |
| { |
| V8DoubleOrString::toImpl(info.GetIsolate(), info[0], arg, UnionTypeConversionMode::Nullable, exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| } |
| impl->voidMethodDoubleOrDOMStringOrNullArg(arg); |
| } |
| |
| static void voidMethodDoubleOrDOMStringOrNullArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::voidMethodDoubleOrDOMStringOrNullArgMethod(info); |
| } |
| |
| static void voidMethodDoubleOrNullOrDOMStringArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodDoubleOrNullOrDOMStringArg", "TestObject", info.Holder(), info.GetIsolate()); |
| if (UNLIKELY(info.Length() < 1)) { |
| setMinimumArityTypeError(exceptionState, 1, info.Length()); |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| DoubleOrString arg; |
| { |
| V8DoubleOrNullOrString::toImpl(info.GetIsolate(), info[0], arg, UnionTypeConversionMode::Nullable, exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| } |
| impl->voidMethodDoubleOrNullOrDOMStringArg(arg); |
| } |
| |
| static void voidMethodDoubleOrNullOrDOMStringArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::voidMethodDoubleOrNullOrDOMStringArgMethod(info); |
| } |
| |
| static void voidMethodDOMStringOrArrayBufferOrArrayBufferViewArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodDOMStringOrArrayBufferOrArrayBufferViewArg", "TestObject", info.Holder(), info.GetIsolate()); |
| if (UNLIKELY(info.Length() < 1)) { |
| setMinimumArityTypeError(exceptionState, 1, info.Length()); |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| StringOrArrayBufferOrArrayBufferView arg; |
| { |
| V8StringOrArrayBufferOrArrayBufferView::toImpl(info.GetIsolate(), info[0], arg, UnionTypeConversionMode::NotNullable, exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| } |
| impl->voidMethodDOMStringOrArrayBufferOrArrayBufferViewArg(arg); |
| } |
| |
| static void voidMethodDOMStringOrArrayBufferOrArrayBufferViewArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::voidMethodDOMStringOrArrayBufferOrArrayBufferViewArgMethod(info); |
| } |
| |
| static void voidMethodArrayBufferOrArrayBufferViewOrDictionaryArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodArrayBufferOrArrayBufferViewOrDictionaryArg", "TestObject", info.Holder(), info.GetIsolate()); |
| if (UNLIKELY(info.Length() < 1)) { |
| setMinimumArityTypeError(exceptionState, 1, info.Length()); |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| ArrayBufferOrArrayBufferViewOrDictionary arg; |
| { |
| V8ArrayBufferOrArrayBufferViewOrDictionary::toImpl(info.GetIsolate(), info[0], arg, UnionTypeConversionMode::NotNullable, exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| } |
| impl->voidMethodArrayBufferOrArrayBufferViewOrDictionaryArg(arg); |
| } |
| |
| static void voidMethodArrayBufferOrArrayBufferViewOrDictionaryArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::voidMethodArrayBufferOrArrayBufferViewOrDictionaryArgMethod(info); |
| } |
| |
| static void voidMethodArrayOfDoubleOrDOMStringArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodArrayOfDoubleOrDOMStringArg", "TestObject", info.Holder(), info.GetIsolate()); |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| HeapVector<DoubleOrString> arg; |
| { |
| arg = toImplArguments<HeapVector<DoubleOrString>>(info, 0, exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| } |
| impl->voidMethodArrayOfDoubleOrDOMStringArg(arg); |
| } |
| |
| static void voidMethodArrayOfDoubleOrDOMStringArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::voidMethodArrayOfDoubleOrDOMStringArgMethod(info); |
| } |
| |
| static void voidMethodTestInterfaceEmptyOrNullArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| if (UNLIKELY(info.Length() < 1)) { |
| V8ThrowException::throwException(createMinimumArityTypeErrorForMethod(info.GetIsolate(), "voidMethodTestInterfaceEmptyOrNullArg", "TestObject", 1, info.Length()), info.GetIsolate()); |
| return; |
| } |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| TestInterfaceEmpty* nullableTestInterfaceEmptyArg; |
| { |
| nullableTestInterfaceEmptyArg = V8TestInterfaceEmpty::toImplWithTypeCheck(info.GetIsolate(), info[0]); |
| if (!nullableTestInterfaceEmptyArg && !isUndefinedOrNull(info[0])) { |
| V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("voidMethodTestInterfaceEmptyOrNullArg", "TestObject", "parameter 1 is not of type 'TestInterfaceEmpty'.")); |
| return; |
| } |
| } |
| impl->voidMethodTestInterfaceEmptyOrNullArg(nullableTestInterfaceEmptyArg); |
| } |
| |
| static void voidMethodTestInterfaceEmptyOrNullArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::voidMethodTestInterfaceEmptyOrNullArgMethod(info); |
| } |
| |
| static void voidMethodTestCallbackInterfaceArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| if (UNLIKELY(info.Length() < 1)) { |
| V8ThrowException::throwException(createMinimumArityTypeErrorForMethod(info.GetIsolate(), "voidMethodTestCallbackInterfaceArg", "TestObject", 1, info.Length()), info.GetIsolate()); |
| return; |
| } |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| TestCallbackInterface* testCallbackInterfaceArg; |
| { |
| if (info.Length() <= 0 || !info[0]->IsFunction()) { |
| V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("voidMethodTestCallbackInterfaceArg", "TestObject", "The callback provided as parameter 1 is not a function.")); |
| return; |
| } |
| testCallbackInterfaceArg = V8TestCallbackInterface::create(v8::Local<v8::Function>::Cast(info[0]), ScriptState::current(info.GetIsolate())); |
| } |
| impl->voidMethodTestCallbackInterfaceArg(testCallbackInterfaceArg); |
| } |
| |
| static void voidMethodTestCallbackInterfaceArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::voidMethodTestCallbackInterfaceArgMethod(info); |
| } |
| |
| static void voidMethodOptionalTestCallbackInterfaceArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| TestCallbackInterface* optionalTestCallbackInterfaceArg; |
| { |
| if (!isUndefinedOrNull(info[0])) { |
| if (!info[0]->IsFunction()) { |
| V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("voidMethodOptionalTestCallbackInterfaceArg", "TestObject", "The callback provided as parameter 1 is not a function.")); |
| return; |
| } |
| optionalTestCallbackInterfaceArg = V8TestCallbackInterface::create(v8::Local<v8::Function>::Cast(info[0]), ScriptState::current(info.GetIsolate())); |
| } else { |
| optionalTestCallbackInterfaceArg = nullptr; |
| } |
| } |
| impl->voidMethodOptionalTestCallbackInterfaceArg(optionalTestCallbackInterfaceArg); |
| } |
| |
| static void voidMethodOptionalTestCallbackInterfaceArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::voidMethodOptionalTestCallbackInterfaceArgMethod(info); |
| } |
| |
| static void voidMethodTestCallbackInterfaceOrNullArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| if (UNLIKELY(info.Length() < 1)) { |
| V8ThrowException::throwException(createMinimumArityTypeErrorForMethod(info.GetIsolate(), "voidMethodTestCallbackInterfaceOrNullArg", "TestObject", 1, info.Length()), info.GetIsolate()); |
| return; |
| } |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| TestCallbackInterface* testCallbackInterfaceArg; |
| { |
| if (info.Length() <= 0 || !(info[0]->IsFunction() || info[0]->IsNull())) { |
| V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("voidMethodTestCallbackInterfaceOrNullArg", "TestObject", "The callback provided as parameter 1 is not a function.")); |
| return; |
| } |
| testCallbackInterfaceArg = info[0]->IsNull() ? nullptr : V8TestCallbackInterface::create(v8::Local<v8::Function>::Cast(info[0]), ScriptState::current(info.GetIsolate())); |
| } |
| impl->voidMethodTestCallbackInterfaceOrNullArg(testCallbackInterfaceArg); |
| } |
| |
| static void voidMethodTestCallbackInterfaceOrNullArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::voidMethodTestCallbackInterfaceOrNullArgMethod(info); |
| } |
| |
| static void testEnumMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| v8SetReturnValueString(info, impl->testEnumMethod(), info.GetIsolate()); |
| } |
| |
| static void testEnumMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::testEnumMethodMethod(info); |
| } |
| |
| static void voidMethodTestEnumArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodTestEnumArg", "TestObject", info.Holder(), info.GetIsolate()); |
| if (UNLIKELY(info.Length() < 1)) { |
| setMinimumArityTypeError(exceptionState, 1, info.Length()); |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| V8StringResource<> testEnumTypeArg; |
| { |
| testEnumTypeArg = info[0]; |
| if (!testEnumTypeArg.prepare()) |
| return; |
| const char* validValues[] = { |
| "", |
| "EnumValue1", |
| "EnumValue2", |
| "EnumValue3", |
| }; |
| if (!isValidEnum(testEnumTypeArg, validValues, WTF_ARRAY_LENGTH(validValues), "TestEnum", exceptionState)) { |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| } |
| impl->voidMethodTestEnumArg(testEnumTypeArg); |
| } |
| |
| static void voidMethodTestEnumArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::voidMethodTestEnumArgMethod(info); |
| } |
| |
| static void dictionaryMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| v8SetReturnValue(info, impl->dictionaryMethod()); |
| } |
| |
| static void dictionaryMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::dictionaryMethodMethod(info); |
| } |
| |
| static void testDictionaryMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| TestDictionary result; |
| impl->testDictionaryMethod(result); |
| v8SetReturnValue(info, result); |
| } |
| |
| static void testDictionaryMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::testDictionaryMethodMethod(info); |
| } |
| |
| static void nullableTestDictionaryMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| Nullable<TestDictionary> result; |
| impl->nullableTestDictionaryMethod(result); |
| if (result.isNull()) |
| v8SetReturnValueNull(info); |
| else |
| v8SetReturnValue(info, result.get()); |
| } |
| |
| static void nullableTestDictionaryMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::nullableTestDictionaryMethodMethod(info); |
| } |
| |
| static void passPermissiveDictionaryMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "passPermissiveDictionaryMethod", "TestObject", info.Holder(), info.GetIsolate()); |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| TestDictionary arg; |
| { |
| V8TestDictionary::toImpl(info.GetIsolate(), info[0], arg, exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| } |
| impl->passPermissiveDictionaryMethod(arg); |
| } |
| |
| static void passPermissiveDictionaryMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::passPermissiveDictionaryMethodMethod(info); |
| } |
| |
| static void nodeFilterMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| v8SetReturnValue(info, impl->nodeFilterMethod()); |
| } |
| |
| static void nodeFilterMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::nodeFilterMethodMethod(info); |
| } |
| |
| static void promiseMethodMethodPromise(const v8::FunctionCallbackInfo<v8::Value>& info, ExceptionState& exceptionState) |
| { |
| if (UNLIKELY(info.Length() < 3)) { |
| setMinimumArityTypeError(exceptionState, 3, info.Length()); |
| return; |
| } |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| int arg1; |
| Dictionary arg2; |
| V8StringResource<> arg3; |
| Vector<String> variadic; |
| { |
| arg1 = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionState); |
| if (exceptionState.hadException()) |
| return; |
| if (!isUndefinedOrNull(info[1]) && !info[1]->IsObject()) { |
| exceptionState.throwTypeError("parameter 2 ('arg2') is not an object."); |
| return; |
| } |
| arg2 = Dictionary(info[1], info.GetIsolate(), exceptionState); |
| if (exceptionState.hadException()) |
| return; |
| arg3 = info[2]; |
| if (!arg3.prepare(exceptionState)) |
| return; |
| variadic = toImplArguments<Vector<String>>(info, 3, exceptionState); |
| if (exceptionState.hadException()) |
| return; |
| } |
| v8SetReturnValue(info, impl->promiseMethod(arg1, arg2, arg3, variadic).v8Value()); |
| } |
| |
| static void promiseMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "promiseMethod", "TestObject", info.Holder(), info.GetIsolate()); |
| promiseMethodMethodPromise(info, exceptionState); |
| if (exceptionState.hadException()) |
| v8SetReturnValue(info, exceptionState.reject(ScriptState::current(info.GetIsolate())).v8Value()); |
| } |
| |
| static void promiseMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::promiseMethodMethod(info); |
| } |
| |
| static void promiseMethodWithoutExceptionStateMethodPromise(const v8::FunctionCallbackInfo<v8::Value>& info, ExceptionState& exceptionState) |
| { |
| if (UNLIKELY(info.Length() < 1)) { |
| setMinimumArityTypeError(exceptionState, 1, info.Length()); |
| return; |
| } |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| Dictionary arg1; |
| { |
| if (!isUndefinedOrNull(info[0]) && !info[0]->IsObject()) { |
| exceptionState.throwTypeError("parameter 1 ('arg1') is not an object."); |
| return; |
| } |
| arg1 = Dictionary(info[0], info.GetIsolate(), exceptionState); |
| if (exceptionState.hadException()) |
| return; |
| } |
| v8SetReturnValue(info, impl->promiseMethodWithoutExceptionState(arg1).v8Value()); |
| } |
| |
| static void promiseMethodWithoutExceptionStateMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "promiseMethodWithoutExceptionState", "TestObject", info.Holder(), info.GetIsolate()); |
| promiseMethodWithoutExceptionStateMethodPromise(info, exceptionState); |
| if (exceptionState.hadException()) |
| v8SetReturnValue(info, exceptionState.reject(ScriptState::current(info.GetIsolate())).v8Value()); |
| } |
| |
| static void promiseMethodWithoutExceptionStateMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::promiseMethodWithoutExceptionStateMethod(info); |
| } |
| |
| static void serializedScriptValueMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| v8SetReturnValue(info, impl->serializedScriptValueMethod() ? impl->serializedScriptValueMethod()->deserialize() : v8::Local<v8::Value>(v8::Null(info.GetIsolate()))); |
| } |
| |
| static void serializedScriptValueMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::serializedScriptValueMethodMethod(info); |
| } |
| |
| static void xPathNSResolverMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| v8SetReturnValue(info, impl->xPathNSResolverMethod()); |
| } |
| |
| static void xPathNSResolverMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::xPathNSResolverMethodMethod(info); |
| } |
| |
| static void voidMethodDictionaryArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodDictionaryArg", "TestObject", info.Holder(), info.GetIsolate()); |
| if (UNLIKELY(info.Length() < 1)) { |
| setMinimumArityTypeError(exceptionState, 1, info.Length()); |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| Dictionary dictionaryArg; |
| { |
| if (!isUndefinedOrNull(info[0]) && !info[0]->IsObject()) { |
| exceptionState.throwTypeError("parameter 1 ('dictionaryArg') is not an object."); |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| dictionaryArg = Dictionary(info[0], info.GetIsolate(), exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| } |
| impl->voidMethodDictionaryArg(dictionaryArg); |
| } |
| |
| static void voidMethodDictionaryArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::voidMethodDictionaryArgMethod(info); |
| } |
| |
| static void voidMethodNodeFilterArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| if (UNLIKELY(info.Length() < 1)) { |
| V8ThrowException::throwException(createMinimumArityTypeErrorForMethod(info.GetIsolate(), "voidMethodNodeFilterArg", "TestObject", 1, info.Length()), info.GetIsolate()); |
| return; |
| } |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| NodeFilter* nodeFilterArg; |
| { |
| nodeFilterArg = toNodeFilter(info[0], info.Holder(), ScriptState::current(info.GetIsolate())); |
| } |
| impl->voidMethodNodeFilterArg(nodeFilterArg); |
| } |
| |
| static void voidMethodNodeFilterArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::voidMethodNodeFilterArgMethod(info); |
| } |
| |
| static void voidMethodPromiseArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| if (UNLIKELY(info.Length() < 1)) { |
| V8ThrowException::throwException(createMinimumArityTypeErrorForMethod(info.GetIsolate(), "voidMethodPromiseArg", "TestObject", 1, info.Length()), info.GetIsolate()); |
| return; |
| } |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| ScriptPromise promiseArg; |
| { |
| promiseArg = ScriptPromise::cast(ScriptState::current(info.GetIsolate()), info[0]); |
| if (!promiseArg.isUndefinedOrNull() && !promiseArg.isObject()) { |
| V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("voidMethodPromiseArg", "TestObject", "parameter 1 ('promiseArg') is not an object.")); |
| return; |
| } |
| } |
| impl->voidMethodPromiseArg(promiseArg); |
| } |
| |
| static void voidMethodPromiseArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::voidMethodPromiseArgMethod(info); |
| } |
| |
| static void voidMethodSerializedScriptValueArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodSerializedScriptValueArg", "TestObject", info.Holder(), info.GetIsolate()); |
| if (UNLIKELY(info.Length() < 1)) { |
| setMinimumArityTypeError(exceptionState, 1, info.Length()); |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| RefPtr<SerializedScriptValue> serializedScriptValueArg; |
| { |
| serializedScriptValueArg = SerializedScriptValueFactory::instance().create(info.GetIsolate(), info[0], nullptr, exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| } |
| impl->voidMethodSerializedScriptValueArg(serializedScriptValueArg); |
| } |
| |
| static void voidMethodSerializedScriptValueArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::voidMethodSerializedScriptValueArgMethod(info); |
| } |
| |
| static void voidMethodXPathNSResolverArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| if (UNLIKELY(info.Length() < 1)) { |
| V8ThrowException::throwException(createMinimumArityTypeErrorForMethod(info.GetIsolate(), "voidMethodXPathNSResolverArg", "TestObject", 1, info.Length()), info.GetIsolate()); |
| return; |
| } |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| XPathNSResolver* xPathNSResolverArg; |
| { |
| xPathNSResolverArg = toXPathNSResolver(ScriptState::current(info.GetIsolate()), info[0]); |
| if (!xPathNSResolverArg) { |
| V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("voidMethodXPathNSResolverArg", "TestObject", "parameter 1 is not of type 'XPathNSResolver'.")); |
| return; |
| } |
| } |
| impl->voidMethodXPathNSResolverArg(xPathNSResolverArg); |
| } |
| |
| static void voidMethodXPathNSResolverArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::voidMethodXPathNSResolverArgMethod(info); |
| } |
| |
| static void voidMethodDictionarySequenceArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodDictionarySequenceArg", "TestObject", info.Holder(), info.GetIsolate()); |
| if (UNLIKELY(info.Length() < 1)) { |
| setMinimumArityTypeError(exceptionState, 1, info.Length()); |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| Vector<Dictionary> dictionarySequenceArg; |
| { |
| dictionarySequenceArg = toImplArray<Vector<Dictionary>>(info[0], 1, info.GetIsolate(), exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| } |
| impl->voidMethodDictionarySequenceArg(dictionarySequenceArg); |
| } |
| |
| static void voidMethodDictionarySequenceArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::voidMethodDictionarySequenceArgMethod(info); |
| } |
| |
| static void voidMethodStringArgLongArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodStringArgLongArg", "TestObject", info.Holder(), info.GetIsolate()); |
| if (UNLIKELY(info.Length() < 2)) { |
| setMinimumArityTypeError(exceptionState, 2, info.Length()); |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| V8StringResource<> stringArg; |
| int longArg; |
| { |
| stringArg = info[0]; |
| if (!stringArg.prepare()) |
| return; |
| longArg = toInt32(info.GetIsolate(), info[1], NormalConversion, exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| } |
| impl->voidMethodStringArgLongArg(stringArg, longArg); |
| } |
| |
| static void voidMethodStringArgLongArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::voidMethodStringArgLongArgMethod(info); |
| } |
| |
| static void voidMethodOptionalStringArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| V8StringResource<> optionalStringArg; |
| { |
| int numArgsPassed = info.Length(); |
| while (numArgsPassed > 0) { |
| if (!info[numArgsPassed - 1]->IsUndefined()) |
| break; |
| --numArgsPassed; |
| } |
| if (UNLIKELY(numArgsPassed <= 0)) { |
| impl->voidMethodOptionalStringArg(); |
| return; |
| } |
| optionalStringArg = info[0]; |
| if (!optionalStringArg.prepare()) |
| return; |
| } |
| impl->voidMethodOptionalStringArg(optionalStringArg); |
| } |
| |
| static void voidMethodOptionalStringArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::voidMethodOptionalStringArgMethod(info); |
| } |
| |
| static void voidMethodOptionalTestInterfaceEmptyArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| TestInterfaceEmpty* optionalTestInterfaceEmptyArg; |
| { |
| int numArgsPassed = info.Length(); |
| while (numArgsPassed > 0) { |
| if (!info[numArgsPassed - 1]->IsUndefined()) |
| break; |
| --numArgsPassed; |
| } |
| if (UNLIKELY(numArgsPassed <= 0)) { |
| impl->voidMethodOptionalTestInterfaceEmptyArg(); |
| return; |
| } |
| optionalTestInterfaceEmptyArg = V8TestInterfaceEmpty::toImplWithTypeCheck(info.GetIsolate(), info[0]); |
| if (!optionalTestInterfaceEmptyArg) { |
| V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("voidMethodOptionalTestInterfaceEmptyArg", "TestObject", "parameter 1 is not of type 'TestInterfaceEmpty'.")); |
| return; |
| } |
| } |
| impl->voidMethodOptionalTestInterfaceEmptyArg(optionalTestInterfaceEmptyArg); |
| } |
| |
| static void voidMethodOptionalTestInterfaceEmptyArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::voidMethodOptionalTestInterfaceEmptyArgMethod(info); |
| } |
| |
| static void voidMethodOptionalLongArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodOptionalLongArg", "TestObject", info.Holder(), info.GetIsolate()); |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| int optionalLongArg; |
| { |
| int numArgsPassed = info.Length(); |
| while (numArgsPassed > 0) { |
| if (!info[numArgsPassed - 1]->IsUndefined()) |
| break; |
| --numArgsPassed; |
| } |
| if (UNLIKELY(numArgsPassed <= 0)) { |
| impl->voidMethodOptionalLongArg(); |
| return; |
| } |
| optionalLongArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| } |
| impl->voidMethodOptionalLongArg(optionalLongArg); |
| } |
| |
| static void voidMethodOptionalLongArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::voidMethodOptionalLongArgMethod(info); |
| } |
| |
| static void stringMethodOptionalLongArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "stringMethodOptionalLongArg", "TestObject", info.Holder(), info.GetIsolate()); |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| int optionalLongArg; |
| { |
| int numArgsPassed = info.Length(); |
| while (numArgsPassed > 0) { |
| if (!info[numArgsPassed - 1]->IsUndefined()) |
| break; |
| --numArgsPassed; |
| } |
| if (UNLIKELY(numArgsPassed <= 0)) { |
| v8SetReturnValueString(info, impl->stringMethodOptionalLongArg(), info.GetIsolate()); |
| return; |
| } |
| optionalLongArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| } |
| v8SetReturnValueString(info, impl->stringMethodOptionalLongArg(optionalLongArg), info.GetIsolate()); |
| } |
| |
| static void stringMethodOptionalLongArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::stringMethodOptionalLongArgMethod(info); |
| } |
| |
| static void testInterfaceEmptyMethodOptionalLongArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "testInterfaceEmptyMethodOptionalLongArg", "TestObject", info.Holder(), info.GetIsolate()); |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| int optionalLongArg; |
| { |
| int numArgsPassed = info.Length(); |
| while (numArgsPassed > 0) { |
| if (!info[numArgsPassed - 1]->IsUndefined()) |
| break; |
| --numArgsPassed; |
| } |
| if (UNLIKELY(numArgsPassed <= 0)) { |
| v8SetReturnValue(info, impl->testInterfaceEmptyMethodOptionalLongArg()); |
| return; |
| } |
| optionalLongArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| } |
| v8SetReturnValue(info, impl->testInterfaceEmptyMethodOptionalLongArg(optionalLongArg)); |
| } |
| |
| static void testInterfaceEmptyMethodOptionalLongArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::testInterfaceEmptyMethodOptionalLongArgMethod(info); |
| } |
| |
| static void longMethodOptionalLongArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "longMethodOptionalLongArg", "TestObject", info.Holder(), info.GetIsolate()); |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| int optionalLongArg; |
| { |
| int numArgsPassed = info.Length(); |
| while (numArgsPassed > 0) { |
| if (!info[numArgsPassed - 1]->IsUndefined()) |
| break; |
| --numArgsPassed; |
| } |
| if (UNLIKELY(numArgsPassed <= 0)) { |
| v8SetReturnValueInt(info, impl->longMethodOptionalLongArg()); |
| return; |
| } |
| optionalLongArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| } |
| v8SetReturnValueInt(info, impl->longMethodOptionalLongArg(optionalLongArg)); |
| } |
| |
| static void longMethodOptionalLongArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::longMethodOptionalLongArgMethod(info); |
| } |
| |
| static void voidMethodLongArgOptionalLongArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodLongArgOptionalLongArg", "TestObject", info.Holder(), info.GetIsolate()); |
| if (UNLIKELY(info.Length() < 1)) { |
| setMinimumArityTypeError(exceptionState, 1, info.Length()); |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| int longArg; |
| int optionalLongArg; |
| { |
| int numArgsPassed = info.Length(); |
| while (numArgsPassed > 0) { |
| if (!info[numArgsPassed - 1]->IsUndefined()) |
| break; |
| --numArgsPassed; |
| } |
| longArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| if (UNLIKELY(numArgsPassed <= 1)) { |
| impl->voidMethodLongArgOptionalLongArg(longArg); |
| return; |
| } |
| optionalLongArg = toInt32(info.GetIsolate(), info[1], NormalConversion, exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| } |
| impl->voidMethodLongArgOptionalLongArg(longArg, optionalLongArg); |
| } |
| |
| static void voidMethodLongArgOptionalLongArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::voidMethodLongArgOptionalLongArgMethod(info); |
| } |
| |
| static void voidMethodLongArgOptionalLongArgOptionalLongArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodLongArgOptionalLongArgOptionalLongArg", "TestObject", info.Holder(), info.GetIsolate()); |
| if (UNLIKELY(info.Length() < 1)) { |
| setMinimumArityTypeError(exceptionState, 1, info.Length()); |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| int longArg; |
| int optionalLongArg1; |
| int optionalLongArg2; |
| { |
| int numArgsPassed = info.Length(); |
| while (numArgsPassed > 0) { |
| if (!info[numArgsPassed - 1]->IsUndefined()) |
| break; |
| --numArgsPassed; |
| } |
| longArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| if (UNLIKELY(numArgsPassed <= 1)) { |
| impl->voidMethodLongArgOptionalLongArgOptionalLongArg(longArg); |
| return; |
| } |
| optionalLongArg1 = toInt32(info.GetIsolate(), info[1], NormalConversion, exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| if (UNLIKELY(numArgsPassed <= 2)) { |
| impl->voidMethodLongArgOptionalLongArgOptionalLongArg(longArg, optionalLongArg1); |
| return; |
| } |
| optionalLongArg2 = toInt32(info.GetIsolate(), info[2], NormalConversion, exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| } |
| impl->voidMethodLongArgOptionalLongArgOptionalLongArg(longArg, optionalLongArg1, optionalLongArg2); |
| } |
| |
| static void voidMethodLongArgOptionalLongArgOptionalLongArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::voidMethodLongArgOptionalLongArgOptionalLongArgMethod(info); |
| } |
| |
| static void voidMethodLongArgOptionalTestInterfaceEmptyArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodLongArgOptionalTestInterfaceEmptyArg", "TestObject", info.Holder(), info.GetIsolate()); |
| if (UNLIKELY(info.Length() < 1)) { |
| setMinimumArityTypeError(exceptionState, 1, info.Length()); |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| int longArg; |
| TestInterfaceEmpty* optionalTestInterfaceEmpty; |
| { |
| int numArgsPassed = info.Length(); |
| while (numArgsPassed > 0) { |
| if (!info[numArgsPassed - 1]->IsUndefined()) |
| break; |
| --numArgsPassed; |
| } |
| longArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| if (UNLIKELY(numArgsPassed <= 1)) { |
| impl->voidMethodLongArgOptionalTestInterfaceEmptyArg(longArg); |
| return; |
| } |
| optionalTestInterfaceEmpty = V8TestInterfaceEmpty::toImplWithTypeCheck(info.GetIsolate(), info[1]); |
| if (!optionalTestInterfaceEmpty) { |
| exceptionState.throwTypeError("parameter 2 is not of type 'TestInterfaceEmpty'."); |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| } |
| impl->voidMethodLongArgOptionalTestInterfaceEmptyArg(longArg, optionalTestInterfaceEmpty); |
| } |
| |
| static void voidMethodLongArgOptionalTestInterfaceEmptyArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::voidMethodLongArgOptionalTestInterfaceEmptyArgMethod(info); |
| } |
| |
| static void voidMethodTestInterfaceEmptyArgOptionalLongArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodTestInterfaceEmptyArgOptionalLongArg", "TestObject", info.Holder(), info.GetIsolate()); |
| if (UNLIKELY(info.Length() < 1)) { |
| setMinimumArityTypeError(exceptionState, 1, info.Length()); |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| TestInterfaceEmpty* optionalTestInterfaceEmpty; |
| int longArg; |
| { |
| int numArgsPassed = info.Length(); |
| while (numArgsPassed > 0) { |
| if (!info[numArgsPassed - 1]->IsUndefined()) |
| break; |
| --numArgsPassed; |
| } |
| optionalTestInterfaceEmpty = V8TestInterfaceEmpty::toImplWithTypeCheck(info.GetIsolate(), info[0]); |
| if (!optionalTestInterfaceEmpty) { |
| exceptionState.throwTypeError("parameter 1 is not of type 'TestInterfaceEmpty'."); |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| if (UNLIKELY(numArgsPassed <= 1)) { |
| impl->voidMethodTestInterfaceEmptyArgOptionalLongArg(optionalTestInterfaceEmpty); |
| return; |
| } |
| longArg = toInt32(info.GetIsolate(), info[1], NormalConversion, exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| } |
| impl->voidMethodTestInterfaceEmptyArgOptionalLongArg(optionalTestInterfaceEmpty, longArg); |
| } |
| |
| static void voidMethodTestInterfaceEmptyArgOptionalLongArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::voidMethodTestInterfaceEmptyArgOptionalLongArgMethod(info); |
| } |
| |
| static void voidMethodOptionalDictionaryArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodOptionalDictionaryArg", "TestObject", info.Holder(), info.GetIsolate()); |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| Dictionary optionalDictionaryArg; |
| { |
| if (!isUndefinedOrNull(info[0]) && !info[0]->IsObject()) { |
| exceptionState.throwTypeError("parameter 1 ('optionalDictionaryArg') is not an object."); |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| optionalDictionaryArg = Dictionary(info[0], info.GetIsolate(), exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| } |
| impl->voidMethodOptionalDictionaryArg(optionalDictionaryArg); |
| } |
| |
| static void voidMethodOptionalDictionaryArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::voidMethodOptionalDictionaryArgMethod(info); |
| } |
| |
| static void voidMethodDefaultByteStringArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodDefaultByteStringArg", "TestObject", info.Holder(), info.GetIsolate()); |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| V8StringResource<> defaultByteStringArg; |
| { |
| if (!info[0]->IsUndefined()) { |
| defaultByteStringArg = toByteString(info.GetIsolate(), info[0], exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| } else { |
| defaultByteStringArg = String("foo"); |
| } |
| } |
| impl->voidMethodDefaultByteStringArg(defaultByteStringArg); |
| } |
| |
| static void voidMethodDefaultByteStringArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::voidMethodDefaultByteStringArgMethod(info); |
| } |
| |
| static void voidMethodDefaultStringArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| V8StringResource<> defaultStringArg; |
| { |
| if (!info[0]->IsUndefined()) { |
| defaultStringArg = info[0]; |
| if (!defaultStringArg.prepare()) |
| return; |
| } else { |
| defaultStringArg = String("foo"); |
| } |
| } |
| impl->voidMethodDefaultStringArg(defaultStringArg); |
| } |
| |
| static void voidMethodDefaultStringArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::voidMethodDefaultStringArgMethod(info); |
| } |
| |
| static void voidMethodDefaultIntegerArgsMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodDefaultIntegerArgs", "TestObject", info.Holder(), info.GetIsolate()); |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| int defaultLongArg; |
| long long defaultLongLongArg; |
| unsigned defaultUnsignedArg; |
| { |
| if (!info[0]->IsUndefined()) { |
| defaultLongArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| } else { |
| defaultLongArg = 10; |
| } |
| if (!info[1]->IsUndefined()) { |
| defaultLongLongArg = toInt64(info.GetIsolate(), info[1], NormalConversion, exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| } else { |
| defaultLongLongArg = -10; |
| } |
| if (!info[2]->IsUndefined()) { |
| defaultUnsignedArg = toUInt32(info.GetIsolate(), info[2], NormalConversion, exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| } else { |
| defaultUnsignedArg = 4294967295u; |
| } |
| } |
| impl->voidMethodDefaultIntegerArgs(defaultLongArg, defaultLongLongArg, defaultUnsignedArg); |
| } |
| |
| static void voidMethodDefaultIntegerArgsMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::voidMethodDefaultIntegerArgsMethod(info); |
| } |
| |
| static void voidMethodDefaultDoubleArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodDefaultDoubleArg", "TestObject", info.Holder(), info.GetIsolate()); |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| double defaultDoubleArg; |
| { |
| if (!info[0]->IsUndefined()) { |
| defaultDoubleArg = toRestrictedDouble(info.GetIsolate(), info[0], exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| } else { |
| defaultDoubleArg = 0.5; |
| } |
| } |
| impl->voidMethodDefaultDoubleArg(defaultDoubleArg); |
| } |
| |
| static void voidMethodDefaultDoubleArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::voidMethodDefaultDoubleArgMethod(info); |
| } |
| |
| static void voidMethodDefaultTrueBooleanArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodDefaultTrueBooleanArg", "TestObject", info.Holder(), info.GetIsolate()); |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| bool defaultBooleanArg; |
| { |
| if (!info[0]->IsUndefined()) { |
| defaultBooleanArg = toBoolean(info.GetIsolate(), info[0], exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| } else { |
| defaultBooleanArg = true; |
| } |
| } |
| impl->voidMethodDefaultTrueBooleanArg(defaultBooleanArg); |
| } |
| |
| static void voidMethodDefaultTrueBooleanArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::voidMethodDefaultTrueBooleanArgMethod(info); |
| } |
| |
| static void voidMethodDefaultFalseBooleanArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodDefaultFalseBooleanArg", "TestObject", info.Holder(), info.GetIsolate()); |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| bool defaultBooleanArg; |
| { |
| if (!info[0]->IsUndefined()) { |
| defaultBooleanArg = toBoolean(info.GetIsolate(), info[0], exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| } else { |
| defaultBooleanArg = false; |
| } |
| } |
| impl->voidMethodDefaultFalseBooleanArg(defaultBooleanArg); |
| } |
| |
| static void voidMethodDefaultFalseBooleanArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::voidMethodDefaultFalseBooleanArgMethod(info); |
| } |
| |
| static void voidMethodDefaultNullableByteStringArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodDefaultNullableByteStringArg", "TestObject", info.Holder(), info.GetIsolate()); |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| V8StringResource<TreatNullAndUndefinedAsNullString> defaultStringArg; |
| { |
| if (!info[0]->IsUndefined()) { |
| defaultStringArg = toByteString(info.GetIsolate(), info[0], exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| } else { |
| defaultStringArg = nullptr; |
| } |
| } |
| impl->voidMethodDefaultNullableByteStringArg(defaultStringArg); |
| } |
| |
| static void voidMethodDefaultNullableByteStringArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::voidMethodDefaultNullableByteStringArgMethod(info); |
| } |
| |
| static void voidMethodDefaultNullableStringArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| V8StringResource<TreatNullAndUndefinedAsNullString> defaultStringArg; |
| { |
| if (!info[0]->IsUndefined()) { |
| defaultStringArg = info[0]; |
| if (!defaultStringArg.prepare()) |
| return; |
| } else { |
| defaultStringArg = nullptr; |
| } |
| } |
| impl->voidMethodDefaultNullableStringArg(defaultStringArg); |
| } |
| |
| static void voidMethodDefaultNullableStringArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::voidMethodDefaultNullableStringArgMethod(info); |
| } |
| |
| static void voidMethodDefaultNullableTestInterfaceArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| TestInterfaceImplementation* defaultTestInterfaceArg; |
| { |
| if (!info[0]->IsUndefined()) { |
| defaultTestInterfaceArg = V8TestInterface::toImplWithTypeCheck(info.GetIsolate(), info[0]); |
| if (!defaultTestInterfaceArg && !isUndefinedOrNull(info[0])) { |
| V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("voidMethodDefaultNullableTestInterfaceArg", "TestObject", "parameter 1 is not of type 'TestInterface'.")); |
| return; |
| } |
| } else { |
| defaultTestInterfaceArg = nullptr; |
| } |
| } |
| impl->voidMethodDefaultNullableTestInterfaceArg(defaultTestInterfaceArg); |
| } |
| |
| static void voidMethodDefaultNullableTestInterfaceArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::voidMethodDefaultNullableTestInterfaceArgMethod(info); |
| } |
| |
| static void voidMethodDefaultDoubleOrStringArgsMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodDefaultDoubleOrStringArgs", "TestObject", info.Holder(), info.GetIsolate()); |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| DoubleOrString defaultLongArg; |
| DoubleOrString defaultStringArg; |
| DoubleOrString defaultNullArg; |
| { |
| if (!info[0]->IsUndefined()) { |
| V8DoubleOrString::toImpl(info.GetIsolate(), info[0], defaultLongArg, UnionTypeConversionMode::NotNullable, exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| } else { |
| defaultLongArg.setDouble(10); |
| } |
| if (!info[1]->IsUndefined()) { |
| V8DoubleOrStringOrNull::toImpl(info.GetIsolate(), info[1], defaultStringArg, UnionTypeConversionMode::Nullable, exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| } else { |
| defaultStringArg.setString(String("foo")); |
| } |
| if (!info[2]->IsUndefined()) { |
| V8DoubleOrString::toImpl(info.GetIsolate(), info[2], defaultNullArg, UnionTypeConversionMode::Nullable, exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| } else { |
| /* null default value */; |
| } |
| } |
| impl->voidMethodDefaultDoubleOrStringArgs(defaultLongArg, defaultStringArg, defaultNullArg); |
| } |
| |
| static void voidMethodDefaultDoubleOrStringArgsMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::voidMethodDefaultDoubleOrStringArgsMethod(info); |
| } |
| |
| static void voidMethodDefaultStringSequenceArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodDefaultStringSequenceArg", "TestObject", info.Holder(), info.GetIsolate()); |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| Vector<String> defaultStringSequenceArg; |
| { |
| if (!info[0]->IsUndefined()) { |
| defaultStringSequenceArg = toImplArray<Vector<String>>(info[0], 1, info.GetIsolate(), exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| } else { |
| /* Nothing to do */; |
| } |
| } |
| impl->voidMethodDefaultStringSequenceArg(defaultStringSequenceArg); |
| } |
| |
| static void voidMethodDefaultStringSequenceArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::voidMethodDefaultStringSequenceArgMethod(info); |
| } |
| |
| static void voidMethodVariadicStringArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodVariadicStringArg", "TestObject", info.Holder(), info.GetIsolate()); |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| Vector<String> variadicStringArgs; |
| { |
| variadicStringArgs = toImplArguments<Vector<String>>(info, 0, exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| } |
| impl->voidMethodVariadicStringArg(variadicStringArgs); |
| } |
| |
| static void voidMethodVariadicStringArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::voidMethodVariadicStringArgMethod(info); |
| } |
| |
| static void voidMethodStringArgVariadicStringArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodStringArgVariadicStringArg", "TestObject", info.Holder(), info.GetIsolate()); |
| if (UNLIKELY(info.Length() < 1)) { |
| setMinimumArityTypeError(exceptionState, 1, info.Length()); |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| V8StringResource<> stringArg; |
| Vector<String> variadicStringArgs; |
| { |
| stringArg = info[0]; |
| if (!stringArg.prepare()) |
| return; |
| variadicStringArgs = toImplArguments<Vector<String>>(info, 1, exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| } |
| impl->voidMethodStringArgVariadicStringArg(stringArg, variadicStringArgs); |
| } |
| |
| static void voidMethodStringArgVariadicStringArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::voidMethodStringArgVariadicStringArgMethod(info); |
| } |
| |
| static void voidMethodVariadicTestInterfaceEmptyArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodVariadicTestInterfaceEmptyArg", "TestObject", info.Holder(), info.GetIsolate()); |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| HeapVector<Member<TestInterfaceEmpty>> variadicTestInterfaceEmptyArgs; |
| { |
| for (int i = 0; i < info.Length(); ++i) { |
| if (!V8TestInterfaceEmpty::hasInstance(info[i], info.GetIsolate())) { |
| exceptionState.throwTypeError("parameter 1 is not of type 'TestInterfaceEmpty'."); |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| variadicTestInterfaceEmptyArgs.append(V8TestInterfaceEmpty::toImpl(v8::Local<v8::Object>::Cast(info[i]))); |
| } |
| } |
| impl->voidMethodVariadicTestInterfaceEmptyArg(variadicTestInterfaceEmptyArgs); |
| } |
| |
| static void voidMethodVariadicTestInterfaceEmptyArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::voidMethodVariadicTestInterfaceEmptyArgMethod(info); |
| } |
| |
| static void voidMethodTestInterfaceEmptyArgVariadicTestInterfaceEmptyArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodTestInterfaceEmptyArgVariadicTestInterfaceEmptyArg", "TestObject", info.Holder(), info.GetIsolate()); |
| if (UNLIKELY(info.Length() < 1)) { |
| setMinimumArityTypeError(exceptionState, 1, info.Length()); |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| TestInterfaceEmpty* testInterfaceEmptyArg; |
| HeapVector<Member<TestInterfaceEmpty>> variadicTestInterfaceEmptyArgs; |
| { |
| testInterfaceEmptyArg = V8TestInterfaceEmpty::toImplWithTypeCheck(info.GetIsolate(), info[0]); |
| if (!testInterfaceEmptyArg) { |
| exceptionState.throwTypeError("parameter 1 is not of type 'TestInterfaceEmpty'."); |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| for (int i = 1; i < info.Length(); ++i) { |
| if (!V8TestInterfaceEmpty::hasInstance(info[i], info.GetIsolate())) { |
| exceptionState.throwTypeError("parameter 2 is not of type 'TestInterfaceEmpty'."); |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| variadicTestInterfaceEmptyArgs.append(V8TestInterfaceEmpty::toImpl(v8::Local<v8::Object>::Cast(info[i]))); |
| } |
| } |
| impl->voidMethodTestInterfaceEmptyArgVariadicTestInterfaceEmptyArg(testInterfaceEmptyArg, variadicTestInterfaceEmptyArgs); |
| } |
| |
| static void voidMethodTestInterfaceEmptyArgVariadicTestInterfaceEmptyArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::voidMethodTestInterfaceEmptyArgVariadicTestInterfaceEmptyArgMethod(info); |
| } |
| |
| static void voidMethodVariadicTestInterfaceGarbageCollectedArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodVariadicTestInterfaceGarbageCollectedArg", "TestObject", info.Holder(), info.GetIsolate()); |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| HeapVector<Member<TestInterfaceGarbageCollected>> variadicTestInterfaceGarbageCollectedArg; |
| { |
| for (int i = 0; i < info.Length(); ++i) { |
| if (!V8TestInterfaceGarbageCollected::hasInstance(info[i], info.GetIsolate())) { |
| exceptionState.throwTypeError("parameter 1 is not of type 'TestInterfaceGarbageCollected'."); |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| variadicTestInterfaceGarbageCollectedArg.append(V8TestInterfaceGarbageCollected::toImpl(v8::Local<v8::Object>::Cast(info[i]))); |
| } |
| } |
| impl->voidMethodVariadicTestInterfaceGarbageCollectedArg(variadicTestInterfaceGarbageCollectedArg); |
| } |
| |
| static void voidMethodVariadicTestInterfaceGarbageCollectedArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::voidMethodVariadicTestInterfaceGarbageCollectedArgMethod(info); |
| } |
| |
| static void overloadedMethodA1Method(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedMethodA", "TestObject", info.Holder(), info.GetIsolate()); |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| int longArg; |
| { |
| longArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| } |
| impl->overloadedMethodA(longArg); |
| } |
| |
| static void overloadedMethodA2Method(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedMethodA", "TestObject", info.Holder(), info.GetIsolate()); |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| int longArg1; |
| int longArg2; |
| { |
| longArg1 = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| longArg2 = toInt32(info.GetIsolate(), info[1], NormalConversion, exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| } |
| impl->overloadedMethodA(longArg1, longArg2); |
| } |
| |
| static void overloadedMethodAMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedMethodA", "TestObject", info.Holder(), info.GetIsolate()); |
| switch (std::min(2, info.Length())) { |
| case 1: |
| if (true) { |
| overloadedMethodA1Method(info); |
| return; |
| } |
| break; |
| case 2: |
| if (true) { |
| overloadedMethodA2Method(info); |
| return; |
| } |
| break; |
| default: |
| break; |
| } |
| if (info.Length() < 1) { |
| exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, info.Length())); |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| exceptionState.throwTypeError("No function was found that matched the signature provided."); |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| |
| static void overloadedMethodAMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::overloadedMethodAMethod(info); |
| } |
| |
| static void overloadedMethodB1Method(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedMethodB", "TestObject", info.Holder(), info.GetIsolate()); |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| int longArg; |
| { |
| longArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| } |
| impl->overloadedMethodB(longArg); |
| } |
| |
| static void overloadedMethodB2Method(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedMethodB", "TestObject", info.Holder(), info.GetIsolate()); |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| V8StringResource<> stringArg; |
| int longArg; |
| { |
| int numArgsPassed = info.Length(); |
| while (numArgsPassed > 0) { |
| if (!info[numArgsPassed - 1]->IsUndefined()) |
| break; |
| --numArgsPassed; |
| } |
| stringArg = info[0]; |
| if (!stringArg.prepare()) |
| return; |
| if (UNLIKELY(numArgsPassed <= 1)) { |
| impl->overloadedMethodB(stringArg); |
| return; |
| } |
| longArg = toInt32(info.GetIsolate(), info[1], NormalConversion, exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| } |
| impl->overloadedMethodB(stringArg, longArg); |
| } |
| |
| static void overloadedMethodBMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedMethodB", "TestObject", info.Holder(), info.GetIsolate()); |
| switch (std::min(2, info.Length())) { |
| case 1: |
| if (info[0]->IsNumber()) { |
| overloadedMethodB1Method(info); |
| return; |
| } |
| if (true) { |
| overloadedMethodB2Method(info); |
| return; |
| } |
| if (true) { |
| overloadedMethodB1Method(info); |
| return; |
| } |
| break; |
| case 2: |
| if (true) { |
| overloadedMethodB2Method(info); |
| return; |
| } |
| break; |
| default: |
| break; |
| } |
| if (info.Length() < 1) { |
| exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, info.Length())); |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| exceptionState.throwTypeError("No function was found that matched the signature provided."); |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| |
| static void overloadedMethodBMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::overloadedMethodBMethod(info); |
| } |
| |
| static void overloadedMethodC1Method(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedMethodC", "TestObject", info.Holder(), info.GetIsolate()); |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| int longArg; |
| { |
| longArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| } |
| impl->overloadedMethodC(longArg); |
| } |
| |
| static void overloadedMethodC2Method(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| TestInterfaceEmpty* testInterfaceEmptyArg; |
| { |
| testInterfaceEmptyArg = V8TestInterfaceEmpty::toImplWithTypeCheck(info.GetIsolate(), info[0]); |
| if (!testInterfaceEmptyArg) { |
| V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("overloadedMethodC", "TestObject", "parameter 1 is not of type 'TestInterfaceEmpty'.")); |
| return; |
| } |
| } |
| impl->overloadedMethodC(testInterfaceEmptyArg); |
| } |
| |
| static void overloadedMethodCMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedMethodC", "TestObject", info.Holder(), info.GetIsolate()); |
| switch (std::min(1, info.Length())) { |
| case 1: |
| if (V8TestInterfaceEmpty::hasInstance(info[0], info.GetIsolate())) { |
| overloadedMethodC2Method(info); |
| return; |
| } |
| if (true) { |
| overloadedMethodC1Method(info); |
| return; |
| } |
| break; |
| default: |
| break; |
| } |
| if (info.Length() < 1) { |
| exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, info.Length())); |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| exceptionState.throwTypeError("No function was found that matched the signature provided."); |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| |
| static void overloadedMethodCMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::overloadedMethodCMethod(info); |
| } |
| |
| static void overloadedMethodD1Method(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedMethodD", "TestObject", info.Holder(), info.GetIsolate()); |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| int longArg; |
| { |
| longArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| } |
| impl->overloadedMethodD(longArg); |
| } |
| |
| static void overloadedMethodD2Method(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedMethodD", "TestObject", info.Holder(), info.GetIsolate()); |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| Vector<int> longArrayArg; |
| { |
| longArrayArg = toImplArray<Vector<int>>(info[0], 1, info.GetIsolate(), exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| } |
| impl->overloadedMethodD(longArrayArg); |
| } |
| |
| static void overloadedMethodDMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedMethodD", "TestObject", info.Holder(), info.GetIsolate()); |
| switch (std::min(1, info.Length())) { |
| case 1: |
| if (info[0]->IsArray()) { |
| overloadedMethodD2Method(info); |
| return; |
| } |
| if (true) { |
| overloadedMethodD1Method(info); |
| return; |
| } |
| break; |
| default: |
| break; |
| } |
| if (info.Length() < 1) { |
| exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, info.Length())); |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| exceptionState.throwTypeError("No function was found that matched the signature provided."); |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| |
| static void overloadedMethodDMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::overloadedMethodDMethod(info); |
| } |
| |
| static void overloadedMethodE1Method(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedMethodE", "TestObject", info.Holder(), info.GetIsolate()); |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| int longArg; |
| { |
| longArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| } |
| impl->overloadedMethodE(longArg); |
| } |
| |
| static void overloadedMethodE2Method(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| TestInterfaceEmpty* testInterfaceEmptyOrNullArg; |
| { |
| testInterfaceEmptyOrNullArg = V8TestInterfaceEmpty::toImplWithTypeCheck(info.GetIsolate(), info[0]); |
| if (!testInterfaceEmptyOrNullArg && !isUndefinedOrNull(info[0])) { |
| V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("overloadedMethodE", "TestObject", "parameter 1 is not of type 'TestInterfaceEmpty'.")); |
| return; |
| } |
| } |
| impl->overloadedMethodE(testInterfaceEmptyOrNullArg); |
| } |
| |
| static void overloadedMethodEMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedMethodE", "TestObject", info.Holder(), info.GetIsolate()); |
| switch (std::min(1, info.Length())) { |
| case 1: |
| if (isUndefinedOrNull(info[0])) { |
| overloadedMethodE2Method(info); |
| return; |
| } |
| if (V8TestInterfaceEmpty::hasInstance(info[0], info.GetIsolate())) { |
| overloadedMethodE2Method(info); |
| return; |
| } |
| if (true) { |
| overloadedMethodE1Method(info); |
| return; |
| } |
| break; |
| default: |
| break; |
| } |
| if (info.Length() < 1) { |
| exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, info.Length())); |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| exceptionState.throwTypeError("No function was found that matched the signature provided."); |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| |
| static void overloadedMethodEMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::overloadedMethodEMethod(info); |
| } |
| |
| static void overloadedMethodF1Method(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| V8StringResource<> stringArg; |
| { |
| int numArgsPassed = info.Length(); |
| while (numArgsPassed > 0) { |
| if (!info[numArgsPassed - 1]->IsUndefined()) |
| break; |
| --numArgsPassed; |
| } |
| if (UNLIKELY(numArgsPassed <= 0)) { |
| impl->overloadedMethodF(); |
| return; |
| } |
| stringArg = info[0]; |
| if (!stringArg.prepare()) |
| return; |
| } |
| impl->overloadedMethodF(stringArg); |
| } |
| |
| static void overloadedMethodF2Method(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedMethodF", "TestObject", info.Holder(), info.GetIsolate()); |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| double doubleArg; |
| { |
| doubleArg = toRestrictedDouble(info.GetIsolate(), info[0], exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| } |
| impl->overloadedMethodF(doubleArg); |
| } |
| |
| static void overloadedMethodFMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedMethodF", "TestObject", info.Holder(), info.GetIsolate()); |
| switch (std::min(1, info.Length())) { |
| case 0: |
| if (true) { |
| overloadedMethodF1Method(info); |
| return; |
| } |
| break; |
| case 1: |
| if (info[0]->IsUndefined()) { |
| overloadedMethodF1Method(info); |
| return; |
| } |
| if (info[0]->IsNumber()) { |
| overloadedMethodF2Method(info); |
| return; |
| } |
| if (true) { |
| overloadedMethodF1Method(info); |
| return; |
| } |
| if (true) { |
| overloadedMethodF2Method(info); |
| return; |
| } |
| break; |
| default: |
| break; |
| } |
| exceptionState.throwTypeError("No function was found that matched the signature provided."); |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| |
| static void overloadedMethodFMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::overloadedMethodFMethod(info); |
| } |
| |
| static void overloadedMethodG1Method(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedMethodG", "TestObject", info.Holder(), info.GetIsolate()); |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| int longArg; |
| { |
| longArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| } |
| impl->overloadedMethodG(longArg); |
| } |
| |
| static void overloadedMethodG2Method(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| TestInterfaceEmpty* testInterfaceEmptyOrNullArg; |
| { |
| if (!info[0]->IsUndefined()) { |
| testInterfaceEmptyOrNullArg = V8TestInterfaceEmpty::toImplWithTypeCheck(info.GetIsolate(), info[0]); |
| if (!testInterfaceEmptyOrNullArg && !isUndefinedOrNull(info[0])) { |
| V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("overloadedMethodG", "TestObject", "parameter 1 is not of type 'TestInterfaceEmpty'.")); |
| return; |
| } |
| } else { |
| testInterfaceEmptyOrNullArg = nullptr; |
| } |
| } |
| impl->overloadedMethodG(testInterfaceEmptyOrNullArg); |
| } |
| |
| static void overloadedMethodGMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedMethodG", "TestObject", info.Holder(), info.GetIsolate()); |
| switch (std::min(1, info.Length())) { |
| case 0: |
| if (true) { |
| overloadedMethodG2Method(info); |
| return; |
| } |
| break; |
| case 1: |
| if (info[0]->IsUndefined()) { |
| overloadedMethodG2Method(info); |
| return; |
| } |
| if (isUndefinedOrNull(info[0])) { |
| overloadedMethodG2Method(info); |
| return; |
| } |
| if (V8TestInterfaceEmpty::hasInstance(info[0], info.GetIsolate())) { |
| overloadedMethodG2Method(info); |
| return; |
| } |
| if (true) { |
| overloadedMethodG1Method(info); |
| return; |
| } |
| break; |
| default: |
| break; |
| } |
| exceptionState.throwTypeError("No function was found that matched the signature provided."); |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| |
| static void overloadedMethodGMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::overloadedMethodGMethod(info); |
| } |
| |
| static void overloadedMethodH1Method(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| TestInterfaceImplementation* testInterfaceArg; |
| { |
| testInterfaceArg = V8TestInterface::toImplWithTypeCheck(info.GetIsolate(), info[0]); |
| if (!testInterfaceArg) { |
| V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("overloadedMethodH", "TestObject", "parameter 1 is not of type 'TestInterface'.")); |
| return; |
| } |
| } |
| impl->overloadedMethodH(testInterfaceArg); |
| } |
| |
| static void overloadedMethodH2Method(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| TestInterfaceEmpty* testInterfaceEmptyArg; |
| { |
| testInterfaceEmptyArg = V8TestInterfaceEmpty::toImplWithTypeCheck(info.GetIsolate(), info[0]); |
| if (!testInterfaceEmptyArg) { |
| V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("overloadedMethodH", "TestObject", "parameter 1 is not of type 'TestInterfaceEmpty'.")); |
| return; |
| } |
| } |
| impl->overloadedMethodH(testInterfaceEmptyArg); |
| } |
| |
| static void overloadedMethodHMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedMethodH", "TestObject", info.Holder(), info.GetIsolate()); |
| switch (std::min(1, info.Length())) { |
| case 1: |
| if (V8TestInterface::hasInstance(info[0], info.GetIsolate())) { |
| overloadedMethodH1Method(info); |
| return; |
| } |
| if (V8TestInterfaceEmpty::hasInstance(info[0], info.GetIsolate())) { |
| overloadedMethodH2Method(info); |
| return; |
| } |
| break; |
| default: |
| break; |
| } |
| if (info.Length() < 1) { |
| exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, info.Length())); |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| exceptionState.throwTypeError("No function was found that matched the signature provided."); |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| |
| static void overloadedMethodHMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::overloadedMethodHMethod(info); |
| } |
| |
| static void overloadedMethodI1Method(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| V8StringResource<> stringArg; |
| { |
| stringArg = info[0]; |
| if (!stringArg.prepare()) |
| return; |
| } |
| impl->overloadedMethodI(stringArg); |
| } |
| |
| static void overloadedMethodI2Method(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedMethodI", "TestObject", info.Holder(), info.GetIsolate()); |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| double doubleArg; |
| { |
| doubleArg = toRestrictedDouble(info.GetIsolate(), info[0], exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| } |
| impl->overloadedMethodI(doubleArg); |
| } |
| |
| static void overloadedMethodIMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedMethodI", "TestObject", info.Holder(), info.GetIsolate()); |
| switch (std::min(1, info.Length())) { |
| case 1: |
| if (info[0]->IsNumber()) { |
| overloadedMethodI2Method(info); |
| return; |
| } |
| if (true) { |
| overloadedMethodI1Method(info); |
| return; |
| } |
| if (true) { |
| overloadedMethodI2Method(info); |
| return; |
| } |
| break; |
| default: |
| break; |
| } |
| if (info.Length() < 1) { |
| exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, info.Length())); |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| exceptionState.throwTypeError("No function was found that matched the signature provided."); |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| |
| static void overloadedMethodIMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::overloadedMethodIMethod(info); |
| } |
| |
| static void overloadedMethodJ1Method(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| V8StringResource<> stringArg; |
| { |
| stringArg = info[0]; |
| if (!stringArg.prepare()) |
| return; |
| } |
| impl->overloadedMethodJ(stringArg); |
| } |
| |
| static void overloadedMethodJ2Method(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedMethodJ", "TestObject", info.Holder(), info.GetIsolate()); |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| TestDictionary testDictionaryArg; |
| { |
| if (!isUndefinedOrNull(info[0]) && !info[0]->IsObject()) { |
| exceptionState.throwTypeError("parameter 1 ('testDictionaryArg') is not an object."); |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| V8TestDictionary::toImpl(info.GetIsolate(), info[0], testDictionaryArg, exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| } |
| impl->overloadedMethodJ(testDictionaryArg); |
| } |
| |
| static void overloadedMethodJMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedMethodJ", "TestObject", info.Holder(), info.GetIsolate()); |
| switch (std::min(1, info.Length())) { |
| case 1: |
| if (info[0]->IsObject()) { |
| overloadedMethodJ2Method(info); |
| return; |
| } |
| if (true) { |
| overloadedMethodJ1Method(info); |
| return; |
| } |
| break; |
| default: |
| break; |
| } |
| if (info.Length() < 1) { |
| exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, info.Length())); |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| exceptionState.throwTypeError("No function was found that matched the signature provided."); |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| |
| static void overloadedMethodJMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::overloadedMethodJMethod(info); |
| } |
| |
| static void overloadedMethodK1Method(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| ScriptValue functionArg; |
| { |
| if (!info[0]->IsFunction()) { |
| V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("overloadedMethodK", "TestObject", "The callback provided as parameter 1 is not a function.")); |
| return; |
| } |
| functionArg = ScriptValue(ScriptState::current(info.GetIsolate()), info[0]); |
| } |
| impl->overloadedMethodK(functionArg); |
| } |
| |
| static void overloadedMethodK2Method(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| V8StringResource<> stringArg; |
| { |
| stringArg = info[0]; |
| if (!stringArg.prepare()) |
| return; |
| } |
| impl->overloadedMethodK(stringArg); |
| } |
| |
| static void overloadedMethodKMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedMethodK", "TestObject", info.Holder(), info.GetIsolate()); |
| switch (std::min(1, info.Length())) { |
| case 1: |
| if (info[0]->IsFunction()) { |
| overloadedMethodK1Method(info); |
| return; |
| } |
| if (true) { |
| overloadedMethodK2Method(info); |
| return; |
| } |
| break; |
| default: |
| break; |
| } |
| if (info.Length() < 1) { |
| exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, info.Length())); |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| exceptionState.throwTypeError("No function was found that matched the signature provided."); |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| |
| static void overloadedMethodKMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::overloadedMethodKMethod(info); |
| } |
| |
| static void overloadedMethodL1Method(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedMethodL", "TestObject", info.Holder(), info.GetIsolate()); |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| int longArg; |
| Vector<ScriptValue> restArgs; |
| { |
| longArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| restArgs = toImplArguments<Vector<ScriptValue>>(info, 1, exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| } |
| impl->overloadedMethodL(longArg, restArgs); |
| } |
| |
| static void overloadedMethodL2Method(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedMethodL", "TestObject", info.Holder(), info.GetIsolate()); |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| V8StringResource<> stringArg; |
| Vector<ScriptValue> restArgs; |
| { |
| stringArg = info[0]; |
| if (!stringArg.prepare()) |
| return; |
| restArgs = toImplArguments<Vector<ScriptValue>>(info, 1, exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| } |
| impl->overloadedMethodL(stringArg, restArgs); |
| } |
| |
| static void overloadedMethodLMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedMethodL", "TestObject", info.Holder(), info.GetIsolate()); |
| switch (std::min(2, info.Length())) { |
| case 1: |
| if (info[0]->IsNumber()) { |
| overloadedMethodL1Method(info); |
| return; |
| } |
| if (true) { |
| overloadedMethodL2Method(info); |
| return; |
| } |
| if (true) { |
| overloadedMethodL1Method(info); |
| return; |
| } |
| break; |
| case 2: |
| if (info[0]->IsNumber()) { |
| overloadedMethodL1Method(info); |
| return; |
| } |
| if (true) { |
| overloadedMethodL2Method(info); |
| return; |
| } |
| if (true) { |
| overloadedMethodL1Method(info); |
| return; |
| } |
| break; |
| default: |
| break; |
| } |
| if (info.Length() < 1) { |
| exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, info.Length())); |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| exceptionState.throwTypeError("No function was found that matched the signature provided."); |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| |
| static void overloadedMethodLMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::overloadedMethodLMethod(info); |
| } |
| |
| static void promiseOverloadMethod1Method(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| v8SetReturnValue(info, impl->promiseOverloadMethod().v8Value()); |
| } |
| |
| static void promiseOverloadMethod2MethodPromise(const v8::FunctionCallbackInfo<v8::Value>& info, ExceptionState& exceptionState) |
| { |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| DOMWindow* arg1; |
| double arg2; |
| { |
| arg1 = toDOMWindow(info.GetIsolate(), info[0]); |
| if (!arg1) { |
| exceptionState.throwTypeError("parameter 1 is not of type 'Window'."); |
| return; |
| } |
| arg2 = toRestrictedDouble(info.GetIsolate(), info[1], exceptionState); |
| if (exceptionState.hadException()) |
| return; |
| } |
| v8SetReturnValue(info, impl->promiseOverloadMethod(arg1, arg2).v8Value()); |
| } |
| |
| static void promiseOverloadMethod2Method(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "promiseOverloadMethod", "TestObject", info.Holder(), info.GetIsolate()); |
| promiseOverloadMethod2MethodPromise(info, exceptionState); |
| if (exceptionState.hadException()) |
| v8SetReturnValue(info, exceptionState.reject(ScriptState::current(info.GetIsolate())).v8Value()); |
| } |
| |
| static void promiseOverloadMethod3MethodPromise(const v8::FunctionCallbackInfo<v8::Value>& info, ExceptionState& exceptionState) |
| { |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| Document* arg1; |
| double arg2; |
| { |
| arg1 = V8Document::toImplWithTypeCheck(info.GetIsolate(), info[0]); |
| if (!arg1) { |
| exceptionState.throwTypeError("parameter 1 is not of type 'Document'."); |
| return; |
| } |
| arg2 = toRestrictedDouble(info.GetIsolate(), info[1], exceptionState); |
| if (exceptionState.hadException()) |
| return; |
| } |
| v8SetReturnValue(info, impl->promiseOverloadMethod(arg1, arg2).v8Value()); |
| } |
| |
| static void promiseOverloadMethod3Method(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "promiseOverloadMethod", "TestObject", info.Holder(), info.GetIsolate()); |
| promiseOverloadMethod3MethodPromise(info, exceptionState); |
| if (exceptionState.hadException()) |
| v8SetReturnValue(info, exceptionState.reject(ScriptState::current(info.GetIsolate())).v8Value()); |
| } |
| |
| static void promiseOverloadMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "promiseOverloadMethod", "TestObject", info.Holder(), info.GetIsolate()); |
| switch (std::min(2, info.Length())) { |
| case 0: |
| if (true) { |
| promiseOverloadMethod1Method(info); |
| return; |
| } |
| break; |
| case 2: |
| if (V8Window::hasInstance(info[0], info.GetIsolate())) { |
| promiseOverloadMethod2Method(info); |
| return; |
| } |
| if (V8Document::hasInstance(info[0], info.GetIsolate())) { |
| promiseOverloadMethod3Method(info); |
| return; |
| } |
| break; |
| default: |
| if (info.Length() >= 0) { |
| setArityTypeError(exceptionState, "[0, 2]", info.Length()); |
| v8SetReturnValue(info, exceptionState.reject(ScriptState::current(info.GetIsolate())).v8Value()); |
| return; |
| } |
| break; |
| } |
| exceptionState.throwTypeError("No function was found that matched the signature provided."); |
| v8SetReturnValue(info, exceptionState.reject(ScriptState::current(info.GetIsolate())).v8Value()); |
| return; |
| } |
| |
| static void promiseOverloadMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::promiseOverloadMethodMethod(info); |
| } |
| |
| static void overloadedPerWorldBindingsMethod1Method(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| impl->overloadedPerWorldBindingsMethod(); |
| } |
| |
| static void overloadedPerWorldBindingsMethod1MethodForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| impl->overloadedPerWorldBindingsMethod(); |
| } |
| |
| static void overloadedPerWorldBindingsMethod2Method(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedPerWorldBindingsMethod", "TestObject", info.Holder(), info.GetIsolate()); |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| int longArg; |
| { |
| longArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| } |
| impl->overloadedPerWorldBindingsMethod(longArg); |
| } |
| |
| static void overloadedPerWorldBindingsMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedPerWorldBindingsMethod", "TestObject", info.Holder(), info.GetIsolate()); |
| switch (std::min(1, info.Length())) { |
| case 0: |
| if (true) { |
| overloadedPerWorldBindingsMethod1Method(info); |
| return; |
| } |
| break; |
| case 1: |
| if (true) { |
| overloadedPerWorldBindingsMethod2Method(info); |
| return; |
| } |
| break; |
| default: |
| break; |
| } |
| exceptionState.throwTypeError("No function was found that matched the signature provided."); |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| |
| static void overloadedPerWorldBindingsMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::overloadedPerWorldBindingsMethodMethod(info); |
| } |
| |
| static void overloadedPerWorldBindingsMethod2MethodForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedPerWorldBindingsMethod", "TestObject", info.Holder(), info.GetIsolate()); |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| int longArg; |
| { |
| longArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| } |
| impl->overloadedPerWorldBindingsMethod(longArg); |
| } |
| |
| static void overloadedPerWorldBindingsMethodMethodForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedPerWorldBindingsMethod", "TestObject", info.Holder(), info.GetIsolate()); |
| switch (std::min(1, info.Length())) { |
| case 0: |
| if (true) { |
| overloadedPerWorldBindingsMethod1MethodForMainWorld(info); |
| return; |
| } |
| break; |
| case 1: |
| if (true) { |
| overloadedPerWorldBindingsMethod2MethodForMainWorld(info); |
| return; |
| } |
| break; |
| default: |
| break; |
| } |
| exceptionState.throwTypeError("No function was found that matched the signature provided."); |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| |
| static void overloadedPerWorldBindingsMethodMethodCallbackForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::overloadedPerWorldBindingsMethodMethodForMainWorld(info); |
| } |
| |
| static void overloadedStaticMethod1Method(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedStaticMethod", "TestObject", info.Holder(), info.GetIsolate()); |
| int longArg; |
| { |
| longArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| } |
| TestObject::overloadedStaticMethod(longArg); |
| } |
| |
| static void overloadedStaticMethod2Method(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedStaticMethod", "TestObject", info.Holder(), info.GetIsolate()); |
| int longArg1; |
| int longArg2; |
| { |
| longArg1 = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| longArg2 = toInt32(info.GetIsolate(), info[1], NormalConversion, exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| } |
| TestObject::overloadedStaticMethod(longArg1, longArg2); |
| } |
| |
| static void overloadedStaticMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedStaticMethod", "TestObject", info.Holder(), info.GetIsolate()); |
| switch (std::min(2, info.Length())) { |
| case 1: |
| if (true) { |
| overloadedStaticMethod1Method(info); |
| return; |
| } |
| break; |
| case 2: |
| if (true) { |
| overloadedStaticMethod2Method(info); |
| return; |
| } |
| break; |
| default: |
| break; |
| } |
| if (info.Length() < 1) { |
| exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, info.Length())); |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| exceptionState.throwTypeError("No function was found that matched the signature provided."); |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| |
| static void overloadedStaticMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::overloadedStaticMethodMethod(info); |
| } |
| |
| static void itemMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "item", "TestObject", info.Holder(), info.GetIsolate()); |
| if (UNLIKELY(info.Length() < 1)) { |
| setMinimumArityTypeError(exceptionState, 1, info.Length()); |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| unsigned index; |
| { |
| index = toUInt32(info.GetIsolate(), info[0], NormalConversion, exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| } |
| ScriptState* scriptState = ScriptState::current(info.GetIsolate()); |
| ScriptValue result = impl->item(scriptState, index); |
| v8SetReturnValue(info, result.v8Value()); |
| } |
| |
| static void itemMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::itemMethod(info); |
| } |
| |
| static void setItemMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "setItem", "TestObject", info.Holder(), info.GetIsolate()); |
| if (UNLIKELY(info.Length() < 2)) { |
| setMinimumArityTypeError(exceptionState, 2, info.Length()); |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| unsigned index; |
| V8StringResource<> value; |
| { |
| index = toUInt32(info.GetIsolate(), info[0], NormalConversion, exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| value = info[1]; |
| if (!value.prepare()) |
| return; |
| } |
| ScriptState* scriptState = ScriptState::current(info.GetIsolate()); |
| String result = impl->setItem(scriptState, index, value); |
| v8SetReturnValueString(info, result, info.GetIsolate()); |
| } |
| |
| static void setItemMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::setItemMethod(info); |
| } |
| |
| static void voidMethodClampUnsignedShortArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodClampUnsignedShortArg", "TestObject", info.Holder(), info.GetIsolate()); |
| if (UNLIKELY(info.Length() < 1)) { |
| setMinimumArityTypeError(exceptionState, 1, info.Length()); |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| unsigned clampUnsignedShortArg; |
| { |
| clampUnsignedShortArg = toUInt16(info.GetIsolate(), info[0], Clamp, exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| } |
| impl->voidMethodClampUnsignedShortArg(clampUnsignedShortArg); |
| } |
| |
| static void voidMethodClampUnsignedShortArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::voidMethodClampUnsignedShortArgMethod(info); |
| } |
| |
| static void voidMethodClampUnsignedLongArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodClampUnsignedLongArg", "TestObject", info.Holder(), info.GetIsolate()); |
| if (UNLIKELY(info.Length() < 1)) { |
| setMinimumArityTypeError(exceptionState, 1, info.Length()); |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| unsigned clampUnsignedLongArg; |
| { |
| clampUnsignedLongArg = toUInt32(info.GetIsolate(), info[0], Clamp, exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| } |
| impl->voidMethodClampUnsignedLongArg(clampUnsignedLongArg); |
| } |
| |
| static void voidMethodClampUnsignedLongArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::voidMethodClampUnsignedLongArgMethod(info); |
| } |
| |
| static void voidMethodDefaultUndefinedTestInterfaceEmptyArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| TestInterfaceEmpty* defaultUndefinedTestInterfaceEmptyArg; |
| { |
| defaultUndefinedTestInterfaceEmptyArg = V8TestInterfaceEmpty::toImplWithTypeCheck(info.GetIsolate(), info[0]); |
| if (!defaultUndefinedTestInterfaceEmptyArg) { |
| V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("voidMethodDefaultUndefinedTestInterfaceEmptyArg", "TestObject", "parameter 1 is not of type 'TestInterfaceEmpty'.")); |
| return; |
| } |
| } |
| impl->voidMethodDefaultUndefinedTestInterfaceEmptyArg(defaultUndefinedTestInterfaceEmptyArg); |
| } |
| |
| static void voidMethodDefaultUndefinedTestInterfaceEmptyArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::voidMethodDefaultUndefinedTestInterfaceEmptyArgMethod(info); |
| } |
| |
| static void voidMethodDefaultUndefinedLongArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodDefaultUndefinedLongArg", "TestObject", info.Holder(), info.GetIsolate()); |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| int defaultUndefinedLongArg; |
| { |
| defaultUndefinedLongArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| } |
| impl->voidMethodDefaultUndefinedLongArg(defaultUndefinedLongArg); |
| } |
| |
| static void voidMethodDefaultUndefinedLongArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::voidMethodDefaultUndefinedLongArgMethod(info); |
| } |
| |
| static void voidMethodDefaultUndefinedStringArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| V8StringResource<> defaultUndefinedStringArg; |
| { |
| defaultUndefinedStringArg = info[0]; |
| if (!defaultUndefinedStringArg.prepare()) |
| return; |
| } |
| impl->voidMethodDefaultUndefinedStringArg(defaultUndefinedStringArg); |
| } |
| |
| static void voidMethodDefaultUndefinedStringArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::voidMethodDefaultUndefinedStringArgMethod(info); |
| } |
| |
| static void voidMethodEnforceRangeLongArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodEnforceRangeLongArg", "TestObject", info.Holder(), info.GetIsolate()); |
| if (UNLIKELY(info.Length() < 1)) { |
| setMinimumArityTypeError(exceptionState, 1, info.Length()); |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| int enforceRangeLongArg; |
| { |
| enforceRangeLongArg = toInt32(info.GetIsolate(), info[0], EnforceRange, exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| } |
| impl->voidMethodEnforceRangeLongArg(enforceRangeLongArg); |
| } |
| |
| static void voidMethodEnforceRangeLongArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::voidMethodEnforceRangeLongArgMethod(info); |
| } |
| |
| static void voidMethodTreatNullAsEmptyStringStringArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| if (UNLIKELY(info.Length() < 1)) { |
| V8ThrowException::throwException(createMinimumArityTypeErrorForMethod(info.GetIsolate(), "voidMethodTreatNullAsEmptyStringStringArg", "TestObject", 1, info.Length()), info.GetIsolate()); |
| return; |
| } |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| V8StringResource<TreatNullAsEmptyString> treatNullAsEmptyStringStringArg; |
| { |
| treatNullAsEmptyStringStringArg = info[0]; |
| if (!treatNullAsEmptyStringStringArg.prepare()) |
| return; |
| } |
| impl->voidMethodTreatNullAsEmptyStringStringArg(treatNullAsEmptyStringStringArg); |
| } |
| |
| static void voidMethodTreatNullAsEmptyStringStringArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::voidMethodTreatNullAsEmptyStringStringArgMethod(info); |
| } |
| |
| static void voidMethodTreatNullAsNullStringStringArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| if (UNLIKELY(info.Length() < 1)) { |
| V8ThrowException::throwException(createMinimumArityTypeErrorForMethod(info.GetIsolate(), "voidMethodTreatNullAsNullStringStringArg", "TestObject", 1, info.Length()), info.GetIsolate()); |
| return; |
| } |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| V8StringResource<TreatNullAsNullString> treatNullAsNullStringStringArg; |
| { |
| treatNullAsNullStringStringArg = info[0]; |
| if (!treatNullAsNullStringStringArg.prepare()) |
| return; |
| } |
| impl->voidMethodTreatNullAsNullStringStringArg(treatNullAsNullStringStringArg); |
| } |
| |
| static void voidMethodTreatNullAsNullStringStringArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::voidMethodTreatNullAsNullStringStringArgMethod(info); |
| } |
| |
| static void voidMethodTreatNullAsNullStringTreatUndefinedAsNullStringStringArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| if (UNLIKELY(info.Length() < 1)) { |
| V8ThrowException::throwException(createMinimumArityTypeErrorForMethod(info.GetIsolate(), "voidMethodTreatNullAsNullStringTreatUndefinedAsNullStringStringArg", "TestObject", 1, info.Length()), info.GetIsolate()); |
| return; |
| } |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| V8StringResource<TreatNullAndUndefinedAsNullString> treatNullAsNullStringStringArg; |
| { |
| treatNullAsNullStringStringArg = info[0]; |
| if (!treatNullAsNullStringStringArg.prepare()) |
| return; |
| } |
| impl->voidMethodTreatNullAsNullStringTreatUndefinedAsNullStringStringArg(treatNullAsNullStringStringArg); |
| } |
| |
| static void voidMethodTreatNullAsNullStringTreatUndefinedAsNullStringStringArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::voidMethodTreatNullAsNullStringTreatUndefinedAsNullStringStringArgMethod(info); |
| } |
| |
| static void activityLoggingAccessForAllWorldsMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| impl->activityLoggingAccessForAllWorldsMethod(); |
| } |
| |
| static void activityLoggingAccessForAllWorldsMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentContext()); |
| V8PerContextData* contextData = scriptState->perContextData(); |
| if (contextData && contextData->activityLogger()) { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "activityLoggingAccessForAllWorldsMethod", "TestObject", info.Holder(), info.GetIsolate()); |
| Vector<v8::Local<v8::Value>> loggerArgs = toImplArguments<Vector<v8::Local<v8::Value>>>(info, 0, exceptionState); |
| contextData->activityLogger()->logMethod("TestObject.activityLoggingAccessForAllWorldsMethod", info.Length(), loggerArgs.data()); |
| } |
| TestObjectV8Internal::activityLoggingAccessForAllWorldsMethodMethod(info); |
| } |
| |
| static void callWithExecutionContextVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate()); |
| impl->callWithExecutionContextVoidMethod(executionContext); |
| } |
| |
| static void callWithExecutionContextVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::callWithExecutionContextVoidMethodMethod(info); |
| } |
| |
| static void callWithScriptStateVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| ScriptState* scriptState = ScriptState::current(info.GetIsolate()); |
| impl->callWithScriptStateVoidMethod(scriptState); |
| } |
| |
| static void callWithScriptStateVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::callWithScriptStateVoidMethodMethod(info); |
| } |
| |
| static void callWithScriptStateLongMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| ScriptState* scriptState = ScriptState::current(info.GetIsolate()); |
| int result = impl->callWithScriptStateLongMethod(scriptState); |
| v8SetReturnValueInt(info, result); |
| } |
| |
| static void callWithScriptStateLongMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::callWithScriptStateLongMethodMethod(info); |
| } |
| |
| static void callWithScriptStateExecutionContextVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| ScriptState* scriptState = ScriptState::current(info.GetIsolate()); |
| ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate()); |
| impl->callWithScriptStateExecutionContextVoidMethod(scriptState, executionContext); |
| } |
| |
| static void callWithScriptStateExecutionContextVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::callWithScriptStateExecutionContextVoidMethodMethod(info); |
| } |
| |
| static void callWithScriptStateScriptArgumentsVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| ScriptState* scriptState = ScriptState::current(info.GetIsolate()); |
| ScriptArguments* scriptArguments(ScriptArguments::create(scriptState, info, 0)); |
| impl->callWithScriptStateScriptArgumentsVoidMethod(scriptState, scriptArguments); |
| } |
| |
| static void callWithScriptStateScriptArgumentsVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::callWithScriptStateScriptArgumentsVoidMethodMethod(info); |
| } |
| |
| static void callWithScriptStateScriptArgumentsVoidMethodOptionalBooleanArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "callWithScriptStateScriptArgumentsVoidMethodOptionalBooleanArg", "TestObject", info.Holder(), info.GetIsolate()); |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| bool optionalBooleanArg; |
| { |
| int numArgsPassed = info.Length(); |
| while (numArgsPassed > 0) { |
| if (!info[numArgsPassed - 1]->IsUndefined()) |
| break; |
| --numArgsPassed; |
| } |
| if (UNLIKELY(numArgsPassed <= 0)) { |
| ScriptState* scriptState = ScriptState::current(info.GetIsolate()); |
| ScriptArguments* scriptArguments(ScriptArguments::create(scriptState, info, 1)); |
| impl->callWithScriptStateScriptArgumentsVoidMethodOptionalBooleanArg(scriptState, scriptArguments); |
| return; |
| } |
| optionalBooleanArg = toBoolean(info.GetIsolate(), info[0], exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| } |
| ScriptState* scriptState = ScriptState::current(info.GetIsolate()); |
| ScriptArguments* scriptArguments(ScriptArguments::create(scriptState, info, 1)); |
| impl->callWithScriptStateScriptArgumentsVoidMethodOptionalBooleanArg(scriptState, scriptArguments, optionalBooleanArg); |
| } |
| |
| static void callWithScriptStateScriptArgumentsVoidMethodOptionalBooleanArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::callWithScriptStateScriptArgumentsVoidMethodOptionalBooleanArgMethod(info); |
| } |
| |
| static void callWithCurrentWindowMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| impl->callWithCurrentWindow(currentDOMWindow(info.GetIsolate())); |
| } |
| |
| static void callWithCurrentWindowMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::callWithCurrentWindowMethod(info); |
| } |
| |
| static void callWithCurrentWindowScriptWindowMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| impl->callWithCurrentWindowScriptWindow(currentDOMWindow(info.GetIsolate()), enteredDOMWindow(info.GetIsolate())); |
| } |
| |
| static void callWithCurrentWindowScriptWindowMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::callWithCurrentWindowScriptWindowMethod(info); |
| } |
| |
| static void callWithThisValueMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| ScriptState* scriptState = ScriptState::current(info.GetIsolate()); |
| impl->callWithThisValue(ScriptValue(scriptState, info.This())); |
| } |
| |
| static void callWithThisValueMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::callWithThisValueMethod(info); |
| } |
| |
| static void checkSecurityForNodeVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| if (!BindingSecurity::shouldAllowAccessTo(info.GetIsolate(), callingDOMWindow(info.GetIsolate()), impl->checkSecurityForNodeVoidMethod(), exceptionState)) { |
| v8SetReturnValueNull(info); |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| impl->checkSecurityForNodeVoidMethod(); |
| } |
| |
| static void checkSecurityForNodeVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::checkSecurityForNodeVoidMethodMethod(info); |
| } |
| |
| static void customVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| V8TestObject::customVoidMethodMethodCustom(info); |
| } |
| |
| static void customCallPrologueVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| V8TestObject::customCallPrologueVoidMethodMethodPrologueCustom(info, impl); |
| impl->customCallPrologueVoidMethod(); |
| } |
| |
| static void customCallPrologueVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::customCallPrologueVoidMethodMethod(info); |
| } |
| |
| static void customCallEpilogueVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| impl->customCallEpilogueVoidMethod(); |
| V8TestObject::customCallEpilogueVoidMethodMethodEpilogueCustom(info, impl); |
| } |
| |
| static void customCallEpilogueVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::customCallEpilogueVoidMethodMethod(info); |
| } |
| |
| static void customElementCallbacksVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; |
| impl->customElementCallbacksVoidMethod(); |
| } |
| |
| static void customElementCallbacksVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::customElementCallbacksVoidMethodMethod(info); |
| } |
| |
| static void deprecatedVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| impl->deprecatedVoidMethod(); |
| } |
| |
| static void deprecatedVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| Deprecation::countDeprecationIfNotPrivateScript(info.GetIsolate(), currentExecutionContext(info.GetIsolate()), UseCounter::voidMethod); |
| TestObjectV8Internal::deprecatedVoidMethodMethod(info); |
| } |
| |
| static void implementedAsVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| impl->implementedAsMethodName(); |
| } |
| |
| static void implementedAsVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::implementedAsVoidMethodMethod(info); |
| } |
| |
| static void measureAsVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| impl->measureAsVoidMethod(); |
| } |
| |
| static void measureAsVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| UseCounter::countIfNotPrivateScript(info.GetIsolate(), currentExecutionContext(info.GetIsolate()), UseCounter::TestFeature); |
| TestObjectV8Internal::measureAsVoidMethodMethod(info); |
| } |
| |
| static void measureMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| impl->measureMethod(); |
| } |
| |
| static void measureMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| UseCounter::countIfNotPrivateScript(info.GetIsolate(), currentExecutionContext(info.GetIsolate()), UseCounter::V8TestObject_MeasureMethod_Method); |
| TestObjectV8Internal::measureMethodMethod(info); |
| } |
| |
| static void measureOverloadedMethod1Method(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| impl->measureOverloadedMethod(); |
| } |
| |
| static void measureOverloadedMethod2Method(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "measureOverloadedMethod", "TestObject", info.Holder(), info.GetIsolate()); |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| int arg; |
| { |
| arg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| } |
| impl->measureOverloadedMethod(arg); |
| } |
| |
| static void measureOverloadedMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "measureOverloadedMethod", "TestObject", info.Holder(), info.GetIsolate()); |
| switch (std::min(1, info.Length())) { |
| case 0: |
| if (true) { |
| UseCounter::countIfNotPrivateScript(info.GetIsolate(), currentExecutionContext(info.GetIsolate()), UseCounter::V8TestObject_MeasureOverloadedMethod_Method); |
| measureOverloadedMethod1Method(info); |
| return; |
| } |
| break; |
| case 1: |
| if (true) { |
| UseCounter::countIfNotPrivateScript(info.GetIsolate(), currentExecutionContext(info.GetIsolate()), UseCounter::V8TestObject_MeasureOverloadedMethod_Method); |
| measureOverloadedMethod2Method(info); |
| return; |
| } |
| break; |
| default: |
| break; |
| } |
| exceptionState.throwTypeError("No function was found that matched the signature provided."); |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| |
| static void measureOverloadedMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::measureOverloadedMethodMethod(info); |
| } |
| |
| static void DeprecateAsOverloadedMethod1Method(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| impl->DeprecateAsOverloadedMethod(); |
| } |
| |
| static void DeprecateAsOverloadedMethod2Method(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "DeprecateAsOverloadedMethod", "TestObject", info.Holder(), info.GetIsolate()); |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| int arg; |
| { |
| arg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| } |
| impl->DeprecateAsOverloadedMethod(arg); |
| } |
| |
| static void DeprecateAsOverloadedMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "DeprecateAsOverloadedMethod", "TestObject", info.Holder(), info.GetIsolate()); |
| switch (std::min(1, info.Length())) { |
| case 0: |
| if (true) { |
| Deprecation::countDeprecationIfNotPrivateScript(info.GetIsolate(), currentExecutionContext(info.GetIsolate()), UseCounter::TestFeatureA); |
| DeprecateAsOverloadedMethod1Method(info); |
| return; |
| } |
| break; |
| case 1: |
| if (true) { |
| Deprecation::countDeprecationIfNotPrivateScript(info.GetIsolate(), currentExecutionContext(info.GetIsolate()), UseCounter::TestFeatureB); |
| DeprecateAsOverloadedMethod2Method(info); |
| return; |
| } |
| break; |
| default: |
| break; |
| } |
| exceptionState.throwTypeError("No function was found that matched the signature provided."); |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| |
| static void DeprecateAsOverloadedMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::DeprecateAsOverloadedMethodMethod(info); |
| } |
| |
| static void DeprecateAsSameValueOverloadedMethod1Method(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| impl->DeprecateAsSameValueOverloadedMethod(); |
| } |
| |
| static void DeprecateAsSameValueOverloadedMethod2Method(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "DeprecateAsSameValueOverloadedMethod", "TestObject", info.Holder(), info.GetIsolate()); |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| int arg; |
| { |
| arg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| } |
| impl->DeprecateAsSameValueOverloadedMethod(arg); |
| } |
| |
| static void DeprecateAsSameValueOverloadedMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "DeprecateAsSameValueOverloadedMethod", "TestObject", info.Holder(), info.GetIsolate()); |
| Deprecation::countDeprecationIfNotPrivateScript(info.GetIsolate(), currentExecutionContext(info.GetIsolate()), UseCounter::TestFeature); |
| switch (std::min(1, info.Length())) { |
| case 0: |
| if (true) { |
| DeprecateAsSameValueOverloadedMethod1Method(info); |
| return; |
| } |
| break; |
| case 1: |
| if (true) { |
| DeprecateAsSameValueOverloadedMethod2Method(info); |
| return; |
| } |
| break; |
| default: |
| break; |
| } |
| exceptionState.throwTypeError("No function was found that matched the signature provided."); |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| |
| static void DeprecateAsSameValueOverloadedMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::DeprecateAsSameValueOverloadedMethodMethod(info); |
| } |
| |
| static void measureAsOverloadedMethod1Method(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| impl->measureAsOverloadedMethod(); |
| } |
| |
| static void measureAsOverloadedMethod2Method(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "measureAsOverloadedMethod", "TestObject", info.Holder(), info.GetIsolate()); |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| int arg; |
| { |
| arg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| } |
| impl->measureAsOverloadedMethod(arg); |
| } |
| |
| static void measureAsOverloadedMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "measureAsOverloadedMethod", "TestObject", info.Holder(), info.GetIsolate()); |
| switch (std::min(1, info.Length())) { |
| case 0: |
| if (true) { |
| UseCounter::countIfNotPrivateScript(info.GetIsolate(), currentExecutionContext(info.GetIsolate()), UseCounter::TestFeatureA); |
| measureAsOverloadedMethod1Method(info); |
| return; |
| } |
| break; |
| case 1: |
| if (true) { |
| UseCounter::countIfNotPrivateScript(info.GetIsolate(), currentExecutionContext(info.GetIsolate()), UseCounter::TestFeatureB); |
| measureAsOverloadedMethod2Method(info); |
| return; |
| } |
| break; |
| default: |
| break; |
| } |
| exceptionState.throwTypeError("No function was found that matched the signature provided."); |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| |
| static void measureAsOverloadedMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::measureAsOverloadedMethodMethod(info); |
| } |
| |
| static void measureAsSameValueOverloadedMethod1Method(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| impl->measureAsSameValueOverloadedMethod(); |
| } |
| |
| static void measureAsSameValueOverloadedMethod2Method(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "measureAsSameValueOverloadedMethod", "TestObject", info.Holder(), info.GetIsolate()); |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| int arg; |
| { |
| arg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| } |
| impl->measureAsSameValueOverloadedMethod(arg); |
| } |
| |
| static void measureAsSameValueOverloadedMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "measureAsSameValueOverloadedMethod", "TestObject", info.Holder(), info.GetIsolate()); |
| switch (std::min(1, info.Length())) { |
| case 0: |
| if (true) { |
| UseCounter::countIfNotPrivateScript(info.GetIsolate(), currentExecutionContext(info.GetIsolate()), UseCounter::TestFeature); |
| measureAsSameValueOverloadedMethod1Method(info); |
| return; |
| } |
| break; |
| case 1: |
| if (true) { |
| UseCounter::countIfNotPrivateScript(info.GetIsolate(), currentExecutionContext(info.GetIsolate()), UseCounter::TestFeature); |
| measureAsSameValueOverloadedMethod2Method(info); |
| return; |
| } |
| break; |
| default: |
| break; |
| } |
| exceptionState.throwTypeError("No function was found that matched the signature provided."); |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| |
| static void measureAsSameValueOverloadedMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::measureAsSameValueOverloadedMethodMethod(info); |
| } |
| |
| static void deprecateAsMeasureAsSameValueOverloadedMethod1Method(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| impl->deprecateAsMeasureAsSameValueOverloadedMethod(); |
| } |
| |
| static void deprecateAsMeasureAsSameValueOverloadedMethod2Method(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "deprecateAsMeasureAsSameValueOverloadedMethod", "TestObject", info.Holder(), info.GetIsolate()); |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| int arg; |
| { |
| arg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| } |
| impl->deprecateAsMeasureAsSameValueOverloadedMethod(arg); |
| } |
| |
| static void deprecateAsMeasureAsSameValueOverloadedMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "deprecateAsMeasureAsSameValueOverloadedMethod", "TestObject", info.Holder(), info.GetIsolate()); |
| switch (std::min(1, info.Length())) { |
| case 0: |
| if (true) { |
| UseCounter::countIfNotPrivateScript(info.GetIsolate(), currentExecutionContext(info.GetIsolate()), UseCounter::TestFeature); |
| Deprecation::countDeprecationIfNotPrivateScript(info.GetIsolate(), currentExecutionContext(info.GetIsolate()), UseCounter::TestFeatureA); |
| deprecateAsMeasureAsSameValueOverloadedMethod1Method(info); |
| return; |
| } |
| break; |
| case 1: |
| if (true) { |
| UseCounter::countIfNotPrivateScript(info.GetIsolate(), currentExecutionContext(info.GetIsolate()), UseCounter::TestFeature); |
| Deprecation::countDeprecationIfNotPrivateScript(info.GetIsolate(), currentExecutionContext(info.GetIsolate()), UseCounter::TestFeatureB); |
| deprecateAsMeasureAsSameValueOverloadedMethod2Method(info); |
| return; |
| } |
| break; |
| default: |
| break; |
| } |
| exceptionState.throwTypeError("No function was found that matched the signature provided."); |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| |
| static void deprecateAsMeasureAsSameValueOverloadedMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::deprecateAsMeasureAsSameValueOverloadedMethodMethod(info); |
| } |
| |
| static void deprecateAsSameValueMeasureAsOverloadedMethod1Method(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| impl->deprecateAsSameValueMeasureAsOverloadedMethod(); |
| } |
| |
| static void deprecateAsSameValueMeasureAsOverloadedMethod2Method(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "deprecateAsSameValueMeasureAsOverloadedMethod", "TestObject", info.Holder(), info.GetIsolate()); |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| int arg; |
| { |
| arg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| } |
| impl->deprecateAsSameValueMeasureAsOverloadedMethod(arg); |
| } |
| |
| static void deprecateAsSameValueMeasureAsOverloadedMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "deprecateAsSameValueMeasureAsOverloadedMethod", "TestObject", info.Holder(), info.GetIsolate()); |
| Deprecation::countDeprecationIfNotPrivateScript(info.GetIsolate(), currentExecutionContext(info.GetIsolate()), UseCounter::TestFeature); |
| switch (std::min(1, info.Length())) { |
| case 0: |
| if (true) { |
| UseCounter::countIfNotPrivateScript(info.GetIsolate(), currentExecutionContext(info.GetIsolate()), UseCounter::TestFeatureA); |
| deprecateAsSameValueMeasureAsOverloadedMethod1Method(info); |
| return; |
| } |
| break; |
| case 1: |
| if (true) { |
| UseCounter::countIfNotPrivateScript(info.GetIsolate(), currentExecutionContext(info.GetIsolate()), UseCounter::TestFeatureB); |
| deprecateAsSameValueMeasureAsOverloadedMethod2Method(info); |
| return; |
| } |
| break; |
| default: |
| break; |
| } |
| exceptionState.throwTypeError("No function was found that matched the signature provided."); |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| |
| static void deprecateAsSameValueMeasureAsOverloadedMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::deprecateAsSameValueMeasureAsOverloadedMethodMethod(info); |
| } |
| |
| static void deprecateAsSameValueMeasureAsSameValueOverloadedMethod1Method(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| impl->deprecateAsSameValueMeasureAsSameValueOverloadedMethod(); |
| } |
| |
| static void deprecateAsSameValueMeasureAsSameValueOverloadedMethod2Method(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "deprecateAsSameValueMeasureAsSameValueOverloadedMethod", "TestObject", info.Holder(), info.GetIsolate()); |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| int arg; |
| { |
| arg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| } |
| impl->deprecateAsSameValueMeasureAsSameValueOverloadedMethod(arg); |
| } |
| |
| static void deprecateAsSameValueMeasureAsSameValueOverloadedMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "deprecateAsSameValueMeasureAsSameValueOverloadedMethod", "TestObject", info.Holder(), info.GetIsolate()); |
| Deprecation::countDeprecationIfNotPrivateScript(info.GetIsolate(), currentExecutionContext(info.GetIsolate()), UseCounter::TestFeatureA); |
| switch (std::min(1, info.Length())) { |
| case 0: |
| if (true) { |
| UseCounter::countIfNotPrivateScript(info.GetIsolate(), currentExecutionContext(info.GetIsolate()), UseCounter::TestFeatureB); |
| deprecateAsSameValueMeasureAsSameValueOverloadedMethod1Method(info); |
| return; |
| } |
| break; |
| case 1: |
| if (true) { |
| UseCounter::countIfNotPrivateScript(info.GetIsolate(), currentExecutionContext(info.GetIsolate()), UseCounter::TestFeatureB); |
| deprecateAsSameValueMeasureAsSameValueOverloadedMethod2Method(info); |
| return; |
| } |
| break; |
| default: |
| break; |
| } |
| exceptionState.throwTypeError("No function was found that matched the signature provided."); |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| |
| static void deprecateAsSameValueMeasureAsSameValueOverloadedMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::deprecateAsSameValueMeasureAsSameValueOverloadedMethodMethod(info); |
| } |
| |
| static void notEnumerableVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| impl->notEnumerableVoidMethod(); |
| } |
| |
| static void notEnumerableVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::notEnumerableVoidMethodMethod(info); |
| } |
| |
| static void originTrialEnabledVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| impl->originTrialEnabledVoidMethod(); |
| } |
| |
| static void originTrialEnabledVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate()); |
| String errorMessage; |
| if (!OriginTrials::featureNameEnabled(executionContext, errorMessage)) { |
| v8SetReturnValue(info, v8::Undefined(info.GetIsolate())); |
| if (!errorMessage.isEmpty()) { |
| toDocument(executionContext)->addConsoleMessage(ConsoleMessage::create(JSMessageSource, ErrorMessageLevel, errorMessage)); |
| } |
| return; |
| } |
| TestObjectV8Internal::originTrialEnabledVoidMethodMethod(info); |
| } |
| |
| static void perWorldBindingsOriginTrialEnabledVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| impl->perWorldBindingsOriginTrialEnabledVoidMethod(); |
| } |
| |
| static void perWorldBindingsOriginTrialEnabledVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate()); |
| String errorMessage; |
| if (!OriginTrials::featureNameEnabled(executionContext, errorMessage)) { |
| v8SetReturnValue(info, v8::Undefined(info.GetIsolate())); |
| if (!errorMessage.isEmpty()) { |
| toDocument(executionContext)->addConsoleMessage(ConsoleMessage::create(JSMessageSource, ErrorMessageLevel, errorMessage)); |
| } |
| return; |
| } |
| TestObjectV8Internal::perWorldBindingsOriginTrialEnabledVoidMethodMethod(info); |
| } |
| |
| static void perWorldBindingsOriginTrialEnabledVoidMethodMethodForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| impl->perWorldBindingsOriginTrialEnabledVoidMethod(); |
| } |
| |
| static void perWorldBindingsOriginTrialEnabledVoidMethodMethodCallbackForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate()); |
| String errorMessage; |
| if (!OriginTrials::featureNameEnabled(executionContext, errorMessage)) { |
| v8SetReturnValue(info, v8::Undefined(info.GetIsolate())); |
| if (!errorMessage.isEmpty()) { |
| toDocument(executionContext)->addConsoleMessage(ConsoleMessage::create(JSMessageSource, ErrorMessageLevel, errorMessage)); |
| } |
| return; |
| } |
| TestObjectV8Internal::perWorldBindingsOriginTrialEnabledVoidMethodMethodForMainWorld(info); |
| } |
| |
| static void originTrialEnabledOverloadedVoidMethod1Method(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| V8StringResource<> stringArg; |
| { |
| stringArg = info[0]; |
| if (!stringArg.prepare()) |
| return; |
| } |
| impl->originTrialEnabledOverloadedVoidMethod(stringArg); |
| } |
| |
| static void originTrialEnabledOverloadedVoidMethod2Method(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "originTrialEnabledOverloadedVoidMethod", "TestObject", info.Holder(), info.GetIsolate()); |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| int longArg; |
| { |
| longArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| } |
| impl->originTrialEnabledOverloadedVoidMethod(longArg); |
| } |
| |
| static void originTrialEnabledOverloadedVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "originTrialEnabledOverloadedVoidMethod", "TestObject", info.Holder(), info.GetIsolate()); |
| switch (std::min(1, info.Length())) { |
| case 1: |
| if (info[0]->IsNumber()) { |
| originTrialEnabledOverloadedVoidMethod2Method(info); |
| return; |
| } |
| if (true) { |
| originTrialEnabledOverloadedVoidMethod1Method(info); |
| return; |
| } |
| if (true) { |
| originTrialEnabledOverloadedVoidMethod2Method(info); |
| return; |
| } |
| break; |
| default: |
| break; |
| } |
| if (info.Length() < 1) { |
| exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, info.Length())); |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| exceptionState.throwTypeError("No function was found that matched the signature provided."); |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| |
| static void originTrialEnabledOverloadedVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::originTrialEnabledOverloadedVoidMethodMethod(info); |
| } |
| |
| static void partiallyOriginTrialEnabledOverloadedVoidMethod1Method(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| V8StringResource<> stringArg; |
| { |
| stringArg = info[0]; |
| if (!stringArg.prepare()) |
| return; |
| } |
| impl->partiallyOriginTrialEnabledOverloadedVoidMethod(stringArg); |
| } |
| |
| static void partiallyOriginTrialEnabledOverloadedVoidMethod2Method(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| TestInterfaceImplementation* testInterfaceArg; |
| { |
| testInterfaceArg = V8TestInterface::toImplWithTypeCheck(info.GetIsolate(), info[0]); |
| if (!testInterfaceArg) { |
| V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("partiallyOriginTrialEnabledOverloadedVoidMethod", "TestObject", "parameter 1 is not of type 'TestInterface'.")); |
| return; |
| } |
| } |
| impl->partiallyOriginTrialEnabledOverloadedVoidMethod(testInterfaceArg); |
| } |
| |
| static void partiallyOriginTrialEnabledOverloadedVoidMethod3Method(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "partiallyOriginTrialEnabledOverloadedVoidMethod", "TestObject", info.Holder(), info.GetIsolate()); |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| int longArg; |
| V8StringResource<> stringArg; |
| { |
| longArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| stringArg = info[1]; |
| if (!stringArg.prepare()) |
| return; |
| } |
| impl->partiallyOriginTrialEnabledOverloadedVoidMethod(longArg, stringArg); |
| } |
| |
| static void partiallyOriginTrialEnabledOverloadedVoidMethod4Method(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "partiallyOriginTrialEnabledOverloadedVoidMethod", "TestObject", info.Holder(), info.GetIsolate()); |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| int longArg; |
| V8StringResource<> stringArg; |
| TestInterfaceImplementation* testInterfaceArg; |
| { |
| longArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| stringArg = info[1]; |
| if (!stringArg.prepare()) |
| return; |
| testInterfaceArg = V8TestInterface::toImplWithTypeCheck(info.GetIsolate(), info[2]); |
| if (!testInterfaceArg) { |
| exceptionState.throwTypeError("parameter 3 is not of type 'TestInterface'."); |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| } |
| impl->partiallyOriginTrialEnabledOverloadedVoidMethod(longArg, stringArg, testInterfaceArg); |
| } |
| |
| static void partiallyOriginTrialEnabledOverloadedVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "partiallyOriginTrialEnabledOverloadedVoidMethod", "TestObject", info.Holder(), info.GetIsolate()); |
| switch (std::min(3, info.Length())) { |
| case 1: |
| if (V8TestInterface::hasInstance(info[0], info.GetIsolate())) { |
| partiallyOriginTrialEnabledOverloadedVoidMethod2Method(info); |
| return; |
| } |
| if (true) { |
| partiallyOriginTrialEnabledOverloadedVoidMethod1Method(info); |
| return; |
| } |
| break; |
| case 2: |
| if (true) { |
| partiallyOriginTrialEnabledOverloadedVoidMethod3Method(info); |
| return; |
| } |
| break; |
| case 3: |
| if (true) { |
| partiallyOriginTrialEnabledOverloadedVoidMethod4Method(info); |
| return; |
| } |
| break; |
| default: |
| break; |
| } |
| if (info.Length() < 1) { |
| exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, info.Length())); |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| exceptionState.throwTypeError("No function was found that matched the signature provided."); |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| |
| static void partiallyOriginTrialEnabledOverloadedVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::partiallyOriginTrialEnabledOverloadedVoidMethodMethod(info); |
| } |
| |
| static void perWorldBindingsVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| impl->perWorldBindingsVoidMethod(); |
| } |
| |
| static void perWorldBindingsVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::perWorldBindingsVoidMethodMethod(info); |
| } |
| |
| static void perWorldBindingsVoidMethodMethodForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| impl->perWorldBindingsVoidMethod(); |
| } |
| |
| static void perWorldBindingsVoidMethodMethodCallbackForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::perWorldBindingsVoidMethodMethodForMainWorld(info); |
| } |
| |
| static void perWorldBindingsVoidMethodTestInterfaceEmptyArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| if (UNLIKELY(info.Length() < 1)) { |
| V8ThrowException::throwException(createMinimumArityTypeErrorForMethod(info.GetIsolate(), "perWorldBindingsVoidMethodTestInterfaceEmptyArg", "TestObject", 1, info.Length()), info.GetIsolate()); |
| return; |
| } |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| TestInterfaceEmpty* testInterfaceEmptyArg; |
| { |
| testInterfaceEmptyArg = V8TestInterfaceEmpty::toImplWithTypeCheck(info.GetIsolate(), info[0]); |
| if (!testInterfaceEmptyArg) { |
| V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("perWorldBindingsVoidMethodTestInterfaceEmptyArg", "TestObject", "parameter 1 is not of type 'TestInterfaceEmpty'.")); |
| return; |
| } |
| } |
| impl->perWorldBindingsVoidMethodTestInterfaceEmptyArg(testInterfaceEmptyArg); |
| } |
| |
| static void perWorldBindingsVoidMethodTestInterfaceEmptyArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::perWorldBindingsVoidMethodTestInterfaceEmptyArgMethod(info); |
| } |
| |
| static void perWorldBindingsVoidMethodTestInterfaceEmptyArgMethodForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| if (UNLIKELY(info.Length() < 1)) { |
| V8ThrowException::throwException(createMinimumArityTypeErrorForMethod(info.GetIsolate(), "perWorldBindingsVoidMethodTestInterfaceEmptyArg", "TestObject", 1, info.Length()), info.GetIsolate()); |
| return; |
| } |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| TestInterfaceEmpty* testInterfaceEmptyArg; |
| { |
| testInterfaceEmptyArg = V8TestInterfaceEmpty::toImplWithTypeCheck(info.GetIsolate(), info[0]); |
| if (!testInterfaceEmptyArg) { |
| V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("perWorldBindingsVoidMethodTestInterfaceEmptyArg", "TestObject", "parameter 1 is not of type 'TestInterfaceEmpty'.")); |
| return; |
| } |
| } |
| impl->perWorldBindingsVoidMethodTestInterfaceEmptyArg(testInterfaceEmptyArg); |
| } |
| |
| static void perWorldBindingsVoidMethodTestInterfaceEmptyArgMethodCallbackForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::perWorldBindingsVoidMethodTestInterfaceEmptyArgMethodForMainWorld(info); |
| } |
| |
| void postMessageImpl(const char* interfaceName, TestObject* instance, const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "postMessage", interfaceName, info.Holder(), info.GetIsolate()); |
| if (UNLIKELY(info.Length() < 1)) { |
| setMinimumArityTypeError(exceptionState, 1, info.Length()); |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| Transferables transferables; |
| if (info.Length() > 1) { |
| const int transferablesArgIndex = 1; |
| if (!SerializedScriptValue::extractTransferables(info.GetIsolate(), info[transferablesArgIndex], transferablesArgIndex, transferables, exceptionState)) { |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| } |
| RefPtr<SerializedScriptValue> message = SerializedScriptValueFactory::instance().create(info.GetIsolate(), info[0], &transferables, exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| // FIXME: Only pass context/exceptionState if instance really requires it. |
| ExecutionContext* context = currentExecutionContext(info.GetIsolate()); |
| instance->postMessage(context, message.release(), transferables.messagePorts, exceptionState); |
| exceptionState.throwIfNeeded(); |
| } |
| |
| static void postMessageMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| postMessageImpl("TestObject", V8TestObject::toImpl(info.Holder()), info); |
| } |
| |
| static void activityLoggingForAllWorldsPerWorldBindingsVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| impl->activityLoggingForAllWorldsPerWorldBindingsVoidMethod(); |
| } |
| |
| static void activityLoggingForAllWorldsPerWorldBindingsVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentContext()); |
| V8PerContextData* contextData = scriptState->perContextData(); |
| if (contextData && contextData->activityLogger()) { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "activityLoggingForAllWorldsPerWorldBindingsVoidMethod", "TestObject", info.Holder(), info.GetIsolate()); |
| Vector<v8::Local<v8::Value>> loggerArgs = toImplArguments<Vector<v8::Local<v8::Value>>>(info, 0, exceptionState); |
| contextData->activityLogger()->logMethod("TestObject.activityLoggingForAllWorldsPerWorldBindingsVoidMethod", info.Length(), loggerArgs.data()); |
| } |
| TestObjectV8Internal::activityLoggingForAllWorldsPerWorldBindingsVoidMethodMethod(info); |
| } |
| |
| static void activityLoggingForAllWorldsPerWorldBindingsVoidMethodMethodForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| impl->activityLoggingForAllWorldsPerWorldBindingsVoidMethod(); |
| } |
| |
| static void activityLoggingForAllWorldsPerWorldBindingsVoidMethodMethodCallbackForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentContext()); |
| V8PerContextData* contextData = scriptState->perContextData(); |
| if (contextData && contextData->activityLogger()) { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "activityLoggingForAllWorldsPerWorldBindingsVoidMethod", "TestObject", info.Holder(), info.GetIsolate()); |
| Vector<v8::Local<v8::Value>> loggerArgs = toImplArguments<Vector<v8::Local<v8::Value>>>(info, 0, exceptionState); |
| contextData->activityLogger()->logMethod("TestObject.activityLoggingForAllWorldsPerWorldBindingsVoidMethod", info.Length(), loggerArgs.data()); |
| } |
| TestObjectV8Internal::activityLoggingForAllWorldsPerWorldBindingsVoidMethodMethodForMainWorld(info); |
| } |
| |
| static void activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| impl->activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethod(); |
| } |
| |
| static void activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentContext()); |
| V8PerContextData* contextData = scriptState->perContextData(); |
| if (contextData && contextData->activityLogger()) { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethod", "TestObject", info.Holder(), info.GetIsolate()); |
| Vector<v8::Local<v8::Value>> loggerArgs = toImplArguments<Vector<v8::Local<v8::Value>>>(info, 0, exceptionState); |
| contextData->activityLogger()->logMethod("TestObject.activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethod", info.Length(), loggerArgs.data()); |
| } |
| TestObjectV8Internal::activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethodMethod(info); |
| } |
| |
| static void activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethodMethodForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| impl->activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethod(); |
| } |
| |
| static void activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethodMethodCallbackForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethodMethodForMainWorld(info); |
| } |
| |
| static void raisesExceptionVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "raisesExceptionVoidMethod", "TestObject", info.Holder(), info.GetIsolate()); |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| impl->raisesExceptionVoidMethod(exceptionState); |
| if (exceptionState.hadException()) { |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| } |
| |
| static void raisesExceptionVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::raisesExceptionVoidMethodMethod(info); |
| } |
| |
| static void raisesExceptionStringMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "raisesExceptionStringMethod", "TestObject", info.Holder(), info.GetIsolate()); |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| String result = impl->raisesExceptionStringMethod(exceptionState); |
| if (exceptionState.hadException()) { |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| v8SetReturnValueString(info, result, info.GetIsolate()); |
| } |
| |
| static void raisesExceptionStringMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::raisesExceptionStringMethodMethod(info); |
| } |
| |
| static void raisesExceptionVoidMethodOptionalLongArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "raisesExceptionVoidMethodOptionalLongArg", "TestObject", info.Holder(), info.GetIsolate()); |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| int optionalLongArg; |
| { |
| int numArgsPassed = info.Length(); |
| while (numArgsPassed > 0) { |
| if (!info[numArgsPassed - 1]->IsUndefined()) |
| break; |
| --numArgsPassed; |
| } |
| if (UNLIKELY(numArgsPassed <= 0)) { |
| impl->raisesExceptionVoidMethodOptionalLongArg(exceptionState); |
| if (exceptionState.hadException()) { |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| return; |
| } |
| optionalLongArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| } |
| impl->raisesExceptionVoidMethodOptionalLongArg(optionalLongArg, exceptionState); |
| if (exceptionState.hadException()) { |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| } |
| |
| static void raisesExceptionVoidMethodOptionalLongArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::raisesExceptionVoidMethodOptionalLongArgMethod(info); |
| } |
| |
| static void raisesExceptionVoidMethodTestCallbackInterfaceArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "raisesExceptionVoidMethodTestCallbackInterfaceArg", "TestObject", info.Holder(), info.GetIsolate()); |
| if (UNLIKELY(info.Length() < 1)) { |
| setMinimumArityTypeError(exceptionState, 1, info.Length()); |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| TestCallbackInterface* testCallbackInterfaceArg; |
| { |
| if (info.Length() <= 0 || !info[0]->IsFunction()) { |
| exceptionState.throwTypeError("The callback provided as parameter 1 is not a function."); |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| testCallbackInterfaceArg = V8TestCallbackInterface::create(v8::Local<v8::Function>::Cast(info[0]), ScriptState::current(info.GetIsolate())); |
| } |
| impl->raisesExceptionVoidMethodTestCallbackInterfaceArg(testCallbackInterfaceArg, exceptionState); |
| if (exceptionState.hadException()) { |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| } |
| |
| static void raisesExceptionVoidMethodTestCallbackInterfaceArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::raisesExceptionVoidMethodTestCallbackInterfaceArgMethod(info); |
| } |
| |
| static void raisesExceptionVoidMethodOptionalTestCallbackInterfaceArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "raisesExceptionVoidMethodOptionalTestCallbackInterfaceArg", "TestObject", info.Holder(), info.GetIsolate()); |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| TestCallbackInterface* optionalTestCallbackInterfaceArg; |
| { |
| if (!isUndefinedOrNull(info[0])) { |
| if (!info[0]->IsFunction()) { |
| exceptionState.throwTypeError("The callback provided as parameter 1 is not a function."); |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| optionalTestCallbackInterfaceArg = V8TestCallbackInterface::create(v8::Local<v8::Function>::Cast(info[0]), ScriptState::current(info.GetIsolate())); |
| } else { |
| optionalTestCallbackInterfaceArg = nullptr; |
| } |
| } |
| impl->raisesExceptionVoidMethodOptionalTestCallbackInterfaceArg(optionalTestCallbackInterfaceArg, exceptionState); |
| if (exceptionState.hadException()) { |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| } |
| |
| static void raisesExceptionVoidMethodOptionalTestCallbackInterfaceArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::raisesExceptionVoidMethodOptionalTestCallbackInterfaceArgMethod(info); |
| } |
| |
| static void raisesExceptionTestInterfaceEmptyVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "raisesExceptionTestInterfaceEmptyVoidMethod", "TestObject", info.Holder(), info.GetIsolate()); |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| TestInterfaceEmpty* result = impl->raisesExceptionTestInterfaceEmptyVoidMethod(exceptionState); |
| if (exceptionState.hadException()) { |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| v8SetReturnValue(info, result); |
| } |
| |
| static void raisesExceptionTestInterfaceEmptyVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::raisesExceptionTestInterfaceEmptyVoidMethodMethod(info); |
| } |
| |
| static void raisesExceptionXPathNSResolverVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "raisesExceptionXPathNSResolverVoidMethod", "TestObject", info.Holder(), info.GetIsolate()); |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| XPathNSResolver* result = impl->raisesExceptionXPathNSResolverVoidMethod(exceptionState); |
| if (exceptionState.hadException()) { |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| v8SetReturnValue(info, result); |
| } |
| |
| static void raisesExceptionXPathNSResolverVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::raisesExceptionXPathNSResolverVoidMethodMethod(info); |
| } |
| |
| static void callWithExecutionContextRaisesExceptionVoidMethodLongArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "callWithExecutionContextRaisesExceptionVoidMethodLongArg", "TestObject", info.Holder(), info.GetIsolate()); |
| if (UNLIKELY(info.Length() < 1)) { |
| setMinimumArityTypeError(exceptionState, 1, info.Length()); |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| int longArg; |
| { |
| longArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| } |
| ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate()); |
| impl->callWithExecutionContextRaisesExceptionVoidMethodLongArg(executionContext, longArg, exceptionState); |
| if (exceptionState.hadException()) { |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| } |
| |
| static void callWithExecutionContextRaisesExceptionVoidMethodLongArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::callWithExecutionContextRaisesExceptionVoidMethodLongArgMethod(info); |
| } |
| |
| static void runtimeEnabledVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| impl->runtimeEnabledVoidMethod(); |
| } |
| |
| static void runtimeEnabledVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::runtimeEnabledVoidMethodMethod(info); |
| } |
| |
| static void perWorldBindingsRuntimeEnabledVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| impl->perWorldBindingsRuntimeEnabledVoidMethod(); |
| } |
| |
| static void perWorldBindingsRuntimeEnabledVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::perWorldBindingsRuntimeEnabledVoidMethodMethod(info); |
| } |
| |
| static void perWorldBindingsRuntimeEnabledVoidMethodMethodForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| impl->perWorldBindingsRuntimeEnabledVoidMethod(); |
| } |
| |
| static void perWorldBindingsRuntimeEnabledVoidMethodMethodCallbackForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::perWorldBindingsRuntimeEnabledVoidMethodMethodForMainWorld(info); |
| } |
| |
| static void runtimeEnabledOverloadedVoidMethod1Method(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| V8StringResource<> stringArg; |
| { |
| stringArg = info[0]; |
| if (!stringArg.prepare()) |
| return; |
| } |
| impl->runtimeEnabledOverloadedVoidMethod(stringArg); |
| } |
| |
| static void runtimeEnabledOverloadedVoidMethod2Method(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "runtimeEnabledOverloadedVoidMethod", "TestObject", info.Holder(), info.GetIsolate()); |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| int longArg; |
| { |
| longArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| } |
| impl->runtimeEnabledOverloadedVoidMethod(longArg); |
| } |
| |
| static void runtimeEnabledOverloadedVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "runtimeEnabledOverloadedVoidMethod", "TestObject", info.Holder(), info.GetIsolate()); |
| switch (std::min(1, info.Length())) { |
| case 1: |
| if (info[0]->IsNumber()) { |
| runtimeEnabledOverloadedVoidMethod2Method(info); |
| return; |
| } |
| if (true) { |
| runtimeEnabledOverloadedVoidMethod1Method(info); |
| return; |
| } |
| if (true) { |
| runtimeEnabledOverloadedVoidMethod2Method(info); |
| return; |
| } |
| break; |
| default: |
| break; |
| } |
| if (info.Length() < 1) { |
| exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, info.Length())); |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| exceptionState.throwTypeError("No function was found that matched the signature provided."); |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| |
| static void runtimeEnabledOverloadedVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::runtimeEnabledOverloadedVoidMethodMethod(info); |
| } |
| |
| static void partiallyRuntimeEnabledOverloadedVoidMethod1Method(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| V8StringResource<> stringArg; |
| { |
| stringArg = info[0]; |
| if (!stringArg.prepare()) |
| return; |
| } |
| impl->partiallyRuntimeEnabledOverloadedVoidMethod(stringArg); |
| } |
| |
| static void partiallyRuntimeEnabledOverloadedVoidMethod2Method(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| TestInterfaceImplementation* testInterfaceArg; |
| { |
| testInterfaceArg = V8TestInterface::toImplWithTypeCheck(info.GetIsolate(), info[0]); |
| if (!testInterfaceArg) { |
| V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("partiallyRuntimeEnabledOverloadedVoidMethod", "TestObject", "parameter 1 is not of type 'TestInterface'.")); |
| return; |
| } |
| } |
| impl->partiallyRuntimeEnabledOverloadedVoidMethod(testInterfaceArg); |
| } |
| |
| static void partiallyRuntimeEnabledOverloadedVoidMethod3Method(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "partiallyRuntimeEnabledOverloadedVoidMethod", "TestObject", info.Holder(), info.GetIsolate()); |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| int longArg; |
| V8StringResource<> stringArg; |
| { |
| longArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| stringArg = info[1]; |
| if (!stringArg.prepare()) |
| return; |
| } |
| impl->partiallyRuntimeEnabledOverloadedVoidMethod(longArg, stringArg); |
| } |
| |
| static void partiallyRuntimeEnabledOverloadedVoidMethod4Method(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "partiallyRuntimeEnabledOverloadedVoidMethod", "TestObject", info.Holder(), info.GetIsolate()); |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| int longArg; |
| V8StringResource<> stringArg; |
| TestInterfaceImplementation* testInterfaceArg; |
| { |
| longArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| stringArg = info[1]; |
| if (!stringArg.prepare()) |
| return; |
| testInterfaceArg = V8TestInterface::toImplWithTypeCheck(info.GetIsolate(), info[2]); |
| if (!testInterfaceArg) { |
| exceptionState.throwTypeError("parameter 3 is not of type 'TestInterface'."); |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| } |
| impl->partiallyRuntimeEnabledOverloadedVoidMethod(longArg, stringArg, testInterfaceArg); |
| } |
| |
| static int partiallyRuntimeEnabledOverloadedVoidMethodMethodLength() |
| { |
| if (RuntimeEnabledFeatures::featureName1Enabled()) { |
| return 1; |
| } |
| if (RuntimeEnabledFeatures::featureName2Enabled()) { |
| return 1; |
| } |
| return 2; |
| } |
| |
| static int partiallyRuntimeEnabledOverloadedVoidMethodMethodMaxArg() |
| { |
| if (RuntimeEnabledFeatures::featureName3Enabled()) { |
| return 3; |
| } |
| return 2; |
| } |
| |
| static void partiallyRuntimeEnabledOverloadedVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "partiallyRuntimeEnabledOverloadedVoidMethod", "TestObject", info.Holder(), info.GetIsolate()); |
| switch (std::min(TestObjectV8Internal::partiallyRuntimeEnabledOverloadedVoidMethodMethodMaxArg(), info.Length())) { |
| case 1: |
| if (RuntimeEnabledFeatures::featureName2Enabled()) { |
| if (V8TestInterface::hasInstance(info[0], info.GetIsolate())) { |
| partiallyRuntimeEnabledOverloadedVoidMethod2Method(info); |
| return; |
| } |
| } |
| if (RuntimeEnabledFeatures::featureName1Enabled()) { |
| if (true) { |
| partiallyRuntimeEnabledOverloadedVoidMethod1Method(info); |
| return; |
| } |
| } |
| break; |
| case 2: |
| if (true) { |
| partiallyRuntimeEnabledOverloadedVoidMethod3Method(info); |
| return; |
| } |
| break; |
| case 3: |
| if (RuntimeEnabledFeatures::featureName3Enabled()) { |
| if (true) { |
| partiallyRuntimeEnabledOverloadedVoidMethod4Method(info); |
| return; |
| } |
| } |
| break; |
| default: |
| break; |
| } |
| if (info.Length() < TestObjectV8Internal::partiallyRuntimeEnabledOverloadedVoidMethodMethodLength()) { |
| exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(TestObjectV8Internal::partiallyRuntimeEnabledOverloadedVoidMethodMethodLength(), info.Length())); |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| exceptionState.throwTypeError("No function was found that matched the signature provided."); |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| |
| static void partiallyRuntimeEnabledOverloadedVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::partiallyRuntimeEnabledOverloadedVoidMethodMethod(info); |
| } |
| |
| static void legacyInterfaceTypeCheckingVoidMethodTestInterfaceEmptyArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| if (UNLIKELY(info.Length() < 1)) { |
| V8ThrowException::throwException(createMinimumArityTypeErrorForMethod(info.GetIsolate(), "legacyInterfaceTypeCheckingVoidMethodTestInterfaceEmptyArg", "TestObject", 1, info.Length()), info.GetIsolate()); |
| return; |
| } |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| TestInterfaceEmpty* testInterfaceEmptyArg; |
| { |
| testInterfaceEmptyArg = V8TestInterfaceEmpty::toImplWithTypeCheck(info.GetIsolate(), info[0]); |
| } |
| impl->legacyInterfaceTypeCheckingVoidMethodTestInterfaceEmptyArg(testInterfaceEmptyArg); |
| } |
| |
| static void legacyInterfaceTypeCheckingVoidMethodTestInterfaceEmptyArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::legacyInterfaceTypeCheckingVoidMethodTestInterfaceEmptyArgMethod(info); |
| } |
| |
| static void legacyInterfaceTypeCheckingVoidMethodTestInterfaceEmptyVariadicArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "legacyInterfaceTypeCheckingVoidMethodTestInterfaceEmptyVariadicArg", "TestObject", info.Holder(), info.GetIsolate()); |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| HeapVector<Member<TestInterfaceEmpty>> testInterfaceEmptyArg; |
| { |
| for (int i = 0; i < info.Length(); ++i) { |
| if (!V8TestInterfaceEmpty::hasInstance(info[i], info.GetIsolate())) { |
| exceptionState.throwTypeError("parameter 1 is not of type 'TestInterfaceEmpty'."); |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| testInterfaceEmptyArg.append(V8TestInterfaceEmpty::toImpl(v8::Local<v8::Object>::Cast(info[i]))); |
| } |
| } |
| impl->legacyInterfaceTypeCheckingVoidMethodTestInterfaceEmptyVariadicArg(testInterfaceEmptyArg); |
| } |
| |
| static void legacyInterfaceTypeCheckingVoidMethodTestInterfaceEmptyVariadicArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::legacyInterfaceTypeCheckingVoidMethodTestInterfaceEmptyVariadicArgMethod(info); |
| } |
| |
| static void useToImpl4ArgumentsCheckingIfPossibleWithOptionalArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| if (UNLIKELY(info.Length() < 1)) { |
| V8ThrowException::throwException(createMinimumArityTypeErrorForMethod(info.GetIsolate(), "useToImpl4ArgumentsCheckingIfPossibleWithOptionalArg", "TestObject", 1, info.Length()), info.GetIsolate()); |
| return; |
| } |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| Node* node1; |
| Node* node2; |
| { |
| int numArgsPassed = info.Length(); |
| while (numArgsPassed > 0) { |
| if (!info[numArgsPassed - 1]->IsUndefined()) |
| break; |
| --numArgsPassed; |
| } |
| node1 = V8Node::toImplWithTypeCheck(info.GetIsolate(), info[0]); |
| if (!node1) { |
| V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("useToImpl4ArgumentsCheckingIfPossibleWithOptionalArg", "TestObject", "parameter 1 is not of type 'Node'.")); |
| return; |
| } |
| if (UNLIKELY(numArgsPassed <= 1)) { |
| impl->useToImpl4ArgumentsCheckingIfPossibleWithOptionalArg(node1); |
| return; |
| } |
| node2 = V8Node::toImplWithTypeCheck(info.GetIsolate(), info[1]); |
| if (!node2) { |
| V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("useToImpl4ArgumentsCheckingIfPossibleWithOptionalArg", "TestObject", "parameter 2 is not of type 'Node'.")); |
| return; |
| } |
| } |
| impl->useToImpl4ArgumentsCheckingIfPossibleWithOptionalArg(node1, node2); |
| } |
| |
| static void useToImpl4ArgumentsCheckingIfPossibleWithOptionalArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::useToImpl4ArgumentsCheckingIfPossibleWithOptionalArgMethod(info); |
| } |
| |
| static void useToImpl4ArgumentsCheckingIfPossibleWithNullableArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| if (UNLIKELY(info.Length() < 2)) { |
| V8ThrowException::throwException(createMinimumArityTypeErrorForMethod(info.GetIsolate(), "useToImpl4ArgumentsCheckingIfPossibleWithNullableArg", "TestObject", 2, info.Length()), info.GetIsolate()); |
| return; |
| } |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| Node* node1; |
| Node* node2; |
| { |
| node1 = V8Node::toImplWithTypeCheck(info.GetIsolate(), info[0]); |
| if (!node1) { |
| V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("useToImpl4ArgumentsCheckingIfPossibleWithNullableArg", "TestObject", "parameter 1 is not of type 'Node'.")); |
| return; |
| } |
| node2 = V8Node::toImplWithTypeCheck(info.GetIsolate(), info[1]); |
| if (!node2 && !isUndefinedOrNull(info[1])) { |
| V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("useToImpl4ArgumentsCheckingIfPossibleWithNullableArg", "TestObject", "parameter 2 is not of type 'Node'.")); |
| return; |
| } |
| } |
| impl->useToImpl4ArgumentsCheckingIfPossibleWithNullableArg(node1, node2); |
| } |
| |
| static void useToImpl4ArgumentsCheckingIfPossibleWithNullableArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::useToImpl4ArgumentsCheckingIfPossibleWithNullableArgMethod(info); |
| } |
| |
| static void useToImpl4ArgumentsCheckingIfPossibleWithUndefinedArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| if (UNLIKELY(info.Length() < 1)) { |
| V8ThrowException::throwException(createMinimumArityTypeErrorForMethod(info.GetIsolate(), "useToImpl4ArgumentsCheckingIfPossibleWithUndefinedArg", "TestObject", 1, info.Length()), info.GetIsolate()); |
| return; |
| } |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| Node* node1; |
| Node* node2; |
| { |
| node1 = V8Node::toImplWithTypeCheck(info.GetIsolate(), info[0]); |
| if (!node1) { |
| V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("useToImpl4ArgumentsCheckingIfPossibleWithUndefinedArg", "TestObject", "parameter 1 is not of type 'Node'.")); |
| return; |
| } |
| node2 = V8Node::toImplWithTypeCheck(info.GetIsolate(), info[1]); |
| if (!node2) { |
| V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("useToImpl4ArgumentsCheckingIfPossibleWithUndefinedArg", "TestObject", "parameter 2 is not of type 'Node'.")); |
| return; |
| } |
| } |
| impl->useToImpl4ArgumentsCheckingIfPossibleWithUndefinedArg(node1, node2); |
| } |
| |
| static void useToImpl4ArgumentsCheckingIfPossibleWithUndefinedArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::useToImpl4ArgumentsCheckingIfPossibleWithUndefinedArgMethod(info); |
| } |
| |
| static void unforgeableVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| impl->unforgeableVoidMethod(); |
| } |
| |
| static void unforgeableVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::unforgeableVoidMethodMethod(info); |
| } |
| |
| static void voidMethodTestInterfaceGarbageCollectedSequenceArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodTestInterfaceGarbageCollectedSequenceArg", "TestObject", info.Holder(), info.GetIsolate()); |
| if (UNLIKELY(info.Length() < 1)) { |
| setMinimumArityTypeError(exceptionState, 1, info.Length()); |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| HeapVector<Member<TestInterfaceGarbageCollected>> testInterfaceGarbageCollectedSequenceArg; |
| { |
| testInterfaceGarbageCollectedSequenceArg = (toMemberNativeArray<TestInterfaceGarbageCollected>(info[0], 1, info.GetIsolate(), exceptionState)); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| } |
| impl->voidMethodTestInterfaceGarbageCollectedSequenceArg(testInterfaceGarbageCollectedSequenceArg); |
| } |
| |
| static void voidMethodTestInterfaceGarbageCollectedSequenceArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::voidMethodTestInterfaceGarbageCollectedSequenceArgMethod(info); |
| } |
| |
| static void voidMethodTestInterfaceGarbageCollectedArrayArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodTestInterfaceGarbageCollectedArrayArg", "TestObject", info.Holder(), info.GetIsolate()); |
| if (UNLIKELY(info.Length() < 1)) { |
| setMinimumArityTypeError(exceptionState, 1, info.Length()); |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| HeapVector<Member<TestInterfaceGarbageCollected>> testInterfaceGarbageCollectedArrayArg; |
| { |
| testInterfaceGarbageCollectedArrayArg = (toMemberNativeArray<TestInterfaceGarbageCollected>(info[0], 1, info.GetIsolate(), exceptionState)); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| } |
| impl->voidMethodTestInterfaceGarbageCollectedArrayArg(testInterfaceGarbageCollectedArrayArg); |
| } |
| |
| static void voidMethodTestInterfaceGarbageCollectedArrayArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::voidMethodTestInterfaceGarbageCollectedArrayArgMethod(info); |
| } |
| |
| static void newObjectTestInterfaceMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| v8SetReturnValue(info, impl->newObjectTestInterfaceMethod()); |
| } |
| |
| static void newObjectTestInterfaceMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::newObjectTestInterfaceMethodMethod(info); |
| } |
| |
| static void serializerMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| v8SetReturnValueString(info, impl->serializerMethod(), info.GetIsolate()); |
| } |
| |
| static void serializerMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::serializerMethodMethod(info); |
| } |
| |
| static void voidMethodImplementedInPrivateScriptMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| V8TestObject::PrivateScript::voidMethodImplementedInPrivateScriptMethod(toLocalFrame(toFrameIfNotDetached(info.GetIsolate()->GetCurrentContext())), impl); |
| } |
| |
| static void voidMethodImplementedInPrivateScriptMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::voidMethodImplementedInPrivateScriptMethod(info); |
| } |
| |
| static void shortMethodImplementedInPrivateScriptMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| int result = 0; |
| if (!V8TestObject::PrivateScript::shortMethodImplementedInPrivateScriptMethod(toLocalFrame(toFrameIfNotDetached(info.GetIsolate()->GetCurrentContext())), impl, &result)) |
| return; |
| v8SetReturnValueInt(info, result); |
| } |
| |
| static void shortMethodImplementedInPrivateScriptMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::shortMethodImplementedInPrivateScriptMethod(info); |
| } |
| |
| static void shortMethodWithShortArgumentImplementedInPrivateScriptMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "shortMethodWithShortArgumentImplementedInPrivateScript", "TestObject", info.Holder(), info.GetIsolate()); |
| if (UNLIKELY(info.Length() < 1)) { |
| setMinimumArityTypeError(exceptionState, 1, info.Length()); |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| int value; |
| { |
| value = toInt16(info.GetIsolate(), info[0], NormalConversion, exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| } |
| int result = 0; |
| if (!V8TestObject::PrivateScript::shortMethodWithShortArgumentImplementedInPrivateScriptMethod(toLocalFrame(toFrameIfNotDetached(info.GetIsolate()->GetCurrentContext())), impl, value, &result)) |
| return; |
| v8SetReturnValueInt(info, result); |
| } |
| |
| static void shortMethodWithShortArgumentImplementedInPrivateScriptMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::shortMethodWithShortArgumentImplementedInPrivateScriptMethod(info); |
| } |
| |
| static void stringMethodWithStringArgumentImplementedInPrivateScriptMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| if (UNLIKELY(info.Length() < 1)) { |
| V8ThrowException::throwException(createMinimumArityTypeErrorForMethod(info.GetIsolate(), "stringMethodWithStringArgumentImplementedInPrivateScript", "TestObject", 1, info.Length()), info.GetIsolate()); |
| return; |
| } |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| V8StringResource<> value; |
| { |
| value = info[0]; |
| if (!value.prepare()) |
| return; |
| } |
| String result; |
| if (!V8TestObject::PrivateScript::stringMethodWithStringArgumentImplementedInPrivateScriptMethod(toLocalFrame(toFrameIfNotDetached(info.GetIsolate()->GetCurrentContext())), impl, value, &result)) |
| return; |
| v8SetReturnValueString(info, result, info.GetIsolate()); |
| } |
| |
| static void stringMethodWithStringArgumentImplementedInPrivateScriptMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::stringMethodWithStringArgumentImplementedInPrivateScriptMethod(info); |
| } |
| |
| static void nodeMethodWithNodeArgumentImplementedInPrivateScriptMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| if (UNLIKELY(info.Length() < 1)) { |
| V8ThrowException::throwException(createMinimumArityTypeErrorForMethod(info.GetIsolate(), "nodeMethodWithNodeArgumentImplementedInPrivateScript", "TestObject", 1, info.Length()), info.GetIsolate()); |
| return; |
| } |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| Node* value; |
| { |
| value = V8Node::toImplWithTypeCheck(info.GetIsolate(), info[0]); |
| if (!value) { |
| V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("nodeMethodWithNodeArgumentImplementedInPrivateScript", "TestObject", "parameter 1 is not of type 'Node'.")); |
| return; |
| } |
| } |
| Node* result = nullptr; |
| if (!V8TestObject::PrivateScript::nodeMethodWithNodeArgumentImplementedInPrivateScriptMethod(toLocalFrame(toFrameIfNotDetached(info.GetIsolate()->GetCurrentContext())), impl, value, &result)) |
| return; |
| v8SetReturnValue(info, result); |
| } |
| |
| static void nodeMethodWithNodeArgumentImplementedInPrivateScriptMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::nodeMethodWithNodeArgumentImplementedInPrivateScriptMethod(info); |
| } |
| |
| static void nodeMethodWithVariousArgumentsImplementedInPrivateScriptMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "nodeMethodWithVariousArgumentsImplementedInPrivateScript", "TestObject", info.Holder(), info.GetIsolate()); |
| if (UNLIKELY(info.Length() < 5)) { |
| setMinimumArityTypeError(exceptionState, 5, info.Length()); |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| Document* document; |
| Node* node; |
| int value1; |
| double value2; |
| V8StringResource<> string; |
| { |
| document = V8Document::toImplWithTypeCheck(info.GetIsolate(), info[0]); |
| if (!document) { |
| exceptionState.throwTypeError("parameter 1 is not of type 'Document'."); |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| node = V8Node::toImplWithTypeCheck(info.GetIsolate(), info[1]); |
| if (!node) { |
| exceptionState.throwTypeError("parameter 2 is not of type 'Node'."); |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| value1 = toInt16(info.GetIsolate(), info[2], NormalConversion, exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| value2 = toRestrictedDouble(info.GetIsolate(), info[3], exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| string = info[4]; |
| if (!string.prepare()) |
| return; |
| } |
| Node* result = nullptr; |
| if (!V8TestObject::PrivateScript::nodeMethodWithVariousArgumentsImplementedInPrivateScriptMethod(toLocalFrame(toFrameIfNotDetached(info.GetIsolate()->GetCurrentContext())), impl, document, node, value1, value2, string, &result)) |
| return; |
| v8SetReturnValue(info, result); |
| } |
| |
| static void nodeMethodWithVariousArgumentsImplementedInPrivateScriptMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::nodeMethodWithVariousArgumentsImplementedInPrivateScriptMethod(info); |
| } |
| |
| static void methodImplementedInCPPForPrivateScriptOnlyMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "methodImplementedInCPPForPrivateScriptOnly", "TestObject", info.Holder(), info.GetIsolate()); |
| if (UNLIKELY(info.Length() < 2)) { |
| setMinimumArityTypeError(exceptionState, 2, info.Length()); |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| int value1; |
| int value2; |
| { |
| value1 = toInt16(info.GetIsolate(), info[0], NormalConversion, exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| value2 = toInt16(info.GetIsolate(), info[1], NormalConversion, exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| } |
| v8SetReturnValueInt(info, impl->methodImplementedInCPPForPrivateScriptOnly(value1, value2)); |
| } |
| |
| static void methodImplementedInCPPForPrivateScriptOnlyMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::methodImplementedInCPPForPrivateScriptOnlyMethod(info); |
| } |
| |
| static void keysMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "keys", "TestObject", info.Holder(), info.GetIsolate()); |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| ScriptState* scriptState = ScriptState::current(info.GetIsolate()); |
| Iterator* result = impl->keysForBinding(scriptState, exceptionState); |
| if (exceptionState.hadException()) { |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| v8SetReturnValue(info, result); |
| } |
| |
| static void keysMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::keysMethod(info); |
| } |
| |
| static void valuesMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "values", "TestObject", info.Holder(), info.GetIsolate()); |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| ScriptState* scriptState = ScriptState::current(info.GetIsolate()); |
| Iterator* result = impl->valuesForBinding(scriptState, exceptionState); |
| if (exceptionState.hadException()) { |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| v8SetReturnValue(info, result); |
| } |
| |
| static void valuesMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::valuesMethod(info); |
| } |
| |
| static void entriesMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "entries", "TestObject", info.Holder(), info.GetIsolate()); |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| ScriptState* scriptState = ScriptState::current(info.GetIsolate()); |
| Iterator* result = impl->entriesForBinding(scriptState, exceptionState); |
| if (exceptionState.hadException()) { |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| v8SetReturnValue(info, result); |
| } |
| |
| static void entriesMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::entriesMethod(info); |
| } |
| |
| static void forEachMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "forEach", "TestObject", info.Holder(), info.GetIsolate()); |
| if (UNLIKELY(info.Length() < 1)) { |
| setMinimumArityTypeError(exceptionState, 1, info.Length()); |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| ScriptValue callback; |
| ScriptValue thisArg; |
| { |
| if (!info[0]->IsFunction()) { |
| exceptionState.throwTypeError("The callback provided as parameter 1 is not a function."); |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| callback = ScriptValue(ScriptState::current(info.GetIsolate()), info[0]); |
| thisArg = ScriptValue(ScriptState::current(info.GetIsolate()), info[1]); |
| } |
| ScriptState* scriptState = ScriptState::current(info.GetIsolate()); |
| impl->forEachForBinding(scriptState, ScriptValue(scriptState, info.This()), callback, thisArg, exceptionState); |
| if (exceptionState.hadException()) { |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| } |
| |
| static void forEachMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::forEachMethod(info); |
| } |
| |
| static void hasMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "has", "TestObject", info.Holder(), info.GetIsolate()); |
| if (UNLIKELY(info.Length() < 1)) { |
| setMinimumArityTypeError(exceptionState, 1, info.Length()); |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| int key; |
| { |
| key = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| } |
| ScriptState* scriptState = ScriptState::current(info.GetIsolate()); |
| bool result = impl->hasForBinding(scriptState, key, exceptionState); |
| if (exceptionState.hadException()) { |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| v8SetReturnValueBool(info, result); |
| } |
| |
| static void hasMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::hasMethod(info); |
| } |
| |
| static void getMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "get", "TestObject", info.Holder(), info.GetIsolate()); |
| if (UNLIKELY(info.Length() < 1)) { |
| setMinimumArityTypeError(exceptionState, 1, info.Length()); |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| int key; |
| { |
| key = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| } |
| ScriptState* scriptState = ScriptState::current(info.GetIsolate()); |
| ScriptValue result = impl->getForBinding(scriptState, key, exceptionState); |
| if (exceptionState.hadException()) { |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| v8SetReturnValue(info, result.v8Value()); |
| } |
| |
| static void getMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::getMethod(info); |
| } |
| |
| static void clearMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "clear", "TestObject", info.Holder(), info.GetIsolate()); |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| ScriptState* scriptState = ScriptState::current(info.GetIsolate()); |
| impl->clearForBinding(scriptState, exceptionState); |
| if (exceptionState.hadException()) { |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| } |
| |
| static void clearMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::clearMethod(info); |
| } |
| |
| static void deleteMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "delete", "TestObject", info.Holder(), info.GetIsolate()); |
| if (UNLIKELY(info.Length() < 1)) { |
| setMinimumArityTypeError(exceptionState, 1, info.Length()); |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| int key; |
| { |
| key = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| } |
| ScriptState* scriptState = ScriptState::current(info.GetIsolate()); |
| bool result = impl->deleteForBinding(scriptState, key, exceptionState); |
| if (exceptionState.hadException()) { |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| v8SetReturnValueBool(info, result); |
| } |
| |
| static void deleteMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::deleteMethod(info); |
| } |
| |
| static void setMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "set", "TestObject", info.Holder(), info.GetIsolate()); |
| if (UNLIKELY(info.Length() < 2)) { |
| setMinimumArityTypeError(exceptionState, 2, info.Length()); |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| int key; |
| StringOrDouble value; |
| { |
| key = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| V8StringOrDouble::toImpl(info.GetIsolate(), info[1], value, UnionTypeConversionMode::NotNullable, exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| } |
| ScriptState* scriptState = ScriptState::current(info.GetIsolate()); |
| TestObject* result = impl->setForBinding(scriptState, key, value, exceptionState); |
| if (exceptionState.hadException()) { |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| v8SetReturnValue(info, result); |
| } |
| |
| static void setMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::setMethod(info); |
| } |
| |
| static void toJSONMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| v8SetReturnValueString(info, impl->serializerMethod(), info.GetIsolate()); |
| } |
| |
| static void toJSONMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::toJSONMethod(info); |
| } |
| |
| static void toStringMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| v8SetReturnValueString(info, impl->stringifierAttribute(), info.GetIsolate()); |
| } |
| |
| static void toStringMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::toStringMethod(info); |
| } |
| |
| static void iteratorMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "iterator", "TestObject", info.Holder(), info.GetIsolate()); |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| ScriptState* scriptState = ScriptState::current(info.GetIsolate()); |
| Iterator* result = impl->iterator(scriptState, exceptionState); |
| if (exceptionState.hadException()) { |
| exceptionState.throwIfNeeded(); |
| return; |
| } |
| v8SetReturnValue(info, result); |
| } |
| |
| static void iteratorMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::iteratorMethod(info); |
| } |
| |
| static void indexedPropertyGetter(uint32_t index, const v8::PropertyCallbackInfo<v8::Value>& info) |
| { |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| ScriptState* scriptState = ScriptState::current(info.GetIsolate()); |
| ScriptValue result = impl->item(scriptState, index); |
| if (result.isEmpty()) |
| return; |
| v8SetReturnValue(info, result.v8Value()); |
| } |
| |
| static void indexedPropertyGetterCallback(uint32_t index, const v8::PropertyCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::indexedPropertyGetter(index, info); |
| } |
| |
| static void indexedPropertySetter(uint32_t index, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<v8::Value>& info) |
| { |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| V8StringResource<> propertyValue = v8Value; |
| if (!propertyValue.prepare()) |
| return; |
| ScriptState* scriptState = ScriptState::current(info.GetIsolate()); |
| bool result = impl->setItem(scriptState, index, propertyValue); |
| if (!result) |
| return; |
| v8SetReturnValue(info, v8Value); |
| } |
| |
| static void indexedPropertySetterCallback(uint32_t index, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::indexedPropertySetter(index, v8Value, info); |
| } |
| |
| static void indexedPropertyDeleter(uint32_t index, const v8::PropertyCallbackInfo<v8::Boolean>& info) |
| { |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| ExceptionState exceptionState(ExceptionState::IndexedDeletionContext, "TestObject", info.Holder(), info.GetIsolate()); |
| ScriptState* scriptState = ScriptState::current(info.GetIsolate()); |
| DeleteResult result = impl->anonymousIndexedDeleter(scriptState, index, exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| if (result != DeleteUnknownProperty) |
| return v8SetReturnValueBool(info, result == DeleteSuccess); |
| } |
| |
| static void indexedPropertyDeleterCallback(uint32_t index, const v8::PropertyCallbackInfo<v8::Boolean>& info) |
| { |
| TestObjectV8Internal::indexedPropertyDeleter(index, info); |
| } |
| |
| static void namedPropertyGetter(v8::Local<v8::Name> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
| { |
| auto nameString = name.As<v8::String>(); |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| AtomicString propertyName = toCoreAtomicString(nameString); |
| ScriptState* scriptState = ScriptState::current(info.GetIsolate()); |
| ScriptValue result = impl->anonymousNamedGetter(scriptState, propertyName); |
| if (result.isEmpty()) |
| return; |
| v8SetReturnValue(info, result.v8Value()); |
| } |
| |
| static void namedPropertyGetterCallback(v8::Local<v8::Name> name, const v8::PropertyCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::namedPropertyGetter(name, info); |
| } |
| |
| static void namedPropertySetter(v8::Local<v8::Name> name, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<v8::Value>& info) |
| { |
| auto nameString = name.As<v8::String>(); |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| V8StringResource<> propertyName(nameString); |
| if (!propertyName.prepare()) |
| return; |
| V8StringResource<> propertyValue = v8Value; |
| if (!propertyValue.prepare()) |
| return; |
| ScriptState* scriptState = ScriptState::current(info.GetIsolate()); |
| bool result = impl->anonymousNamedSetter(scriptState, propertyName, propertyValue); |
| if (!result) |
| return; |
| v8SetReturnValue(info, v8Value); |
| } |
| |
| static void namedPropertySetterCallback(v8::Local<v8::Name> name, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<v8::Value>& info) |
| { |
| TestObjectV8Internal::namedPropertySetter(name, v8Value, info); |
| } |
| |
| static void namedPropertyQuery(v8::Local<v8::Name> name, const v8::PropertyCallbackInfo<v8::Integer>& info) |
| { |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| AtomicString propertyName = toCoreAtomicString(name.As<v8::String>()); |
| v8::String::Utf8Value namedProperty(name); |
| ExceptionState exceptionState(ExceptionState::GetterContext, *namedProperty, "TestObject", info.Holder(), info.GetIsolate()); |
| ScriptState* scriptState = ScriptState::current(info.GetIsolate()); |
| bool result = impl->namedPropertyQuery(scriptState, propertyName, exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| if (!result) |
| return; |
| v8SetReturnValueInt(info, v8::None); |
| } |
| |
| static void namedPropertyQueryCallback(v8::Local<v8::Name> name, const v8::PropertyCallbackInfo<v8::Integer>& info) |
| { |
| TestObjectV8Internal::namedPropertyQuery(name, info); |
| } |
| |
| static void namedPropertyDeleter(v8::Local<v8::Name> name, const v8::PropertyCallbackInfo<v8::Boolean>& info) |
| { |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| AtomicString propertyName = toCoreAtomicString(name.As<v8::String>()); |
| ScriptState* scriptState = ScriptState::current(info.GetIsolate()); |
| DeleteResult result = impl->anonymousNamedDeleter(scriptState, propertyName); |
| if (result != DeleteUnknownProperty) |
| return v8SetReturnValueBool(info, result == DeleteSuccess); |
| } |
| |
| static void namedPropertyDeleterCallback(v8::Local<v8::Name> name, const v8::PropertyCallbackInfo<v8::Boolean>& info) |
| { |
| TestObjectV8Internal::namedPropertyDeleter(name, info); |
| } |
| |
| static void namedPropertyEnumerator(const v8::PropertyCallbackInfo<v8::Array>& info) |
| { |
| TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| Vector<String> names; |
| ExceptionState exceptionState(ExceptionState::EnumerationContext, "TestObject", info.Holder(), info.GetIsolate()); |
| impl->namedPropertyEnumerator(names, exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return; |
| v8::Local<v8::Array> v8names = v8::Array::New(info.GetIsolate(), names.size()); |
| for (size_t i = 0; i < names.size(); ++i) { |
| if (!v8CallBoolean(v8names->Set(info.GetIsolate()->GetCurrentContext(), v8::Integer::New(info.GetIsolate(), i), v8String(info.GetIsolate(), names[i])))) |
| return; |
| } |
| v8SetReturnValue(info, v8names); |
| } |
| |
| static void namedPropertyEnumeratorCallback(const v8::PropertyCallbackInfo<v8::Array>& info) |
| { |
| TestObjectV8Internal::namedPropertyEnumerator(info); |
| } |
| |
| } // namespace TestObjectV8Internal |
| |
| // Suppress warning: global constructors, because AttributeConfiguration 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 V8DOMConfiguration::AttributeConfiguration V8TestObjectAttributes[] = { |
| {"testInterfaceEmptyConstructorAttribute", v8ConstructorAttributeGetter, 0, 0, 0, const_cast<WrapperTypeInfo*>(&V8TestInterfaceEmpty::wrapperTypeInfo), static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::DontEnum), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance, V8DOMConfiguration::CheckHolder}, |
| {"testInterfaceEmptyConstructorAttribute", TestObjectV8Internal::testInterfaceEmptyConstructorAttributeConstructorGetterCallback, 0, 0, 0, const_cast<WrapperTypeInfo*>(&V8TestInterfaceEmpty::wrapperTypeInfo), static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::DontEnum), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance, V8DOMConfiguration::CheckHolder}, |
| {"measureAsFeatureNameTestInterfaceEmptyConstructorAttribute", TestObjectV8Internal::measureAsFeatureNameTestInterfaceEmptyConstructorAttributeConstructorGetterCallback, 0, 0, 0, const_cast<WrapperTypeInfo*>(&V8TestInterfaceEmpty::wrapperTypeInfo), static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::DontEnum), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance, V8DOMConfiguration::CheckHolder}, |
| }; |
| #if defined(COMPONENT_BUILD) && defined(WIN32) && COMPILER(CLANG) |
| #pragma clang diagnostic pop |
| #endif |
| |
| const V8DOMConfiguration::AccessorConfiguration V8TestObjectAccessors[] = { |
| {"stringifierAttribute", TestObjectV8Internal::stringifierAttributeAttributeGetterCallback, TestObjectV8Internal::stringifierAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"readonlyStringAttribute", TestObjectV8Internal::readonlyStringAttributeAttributeGetterCallback, 0, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"readonlyTestInterfaceEmptyAttribute", TestObjectV8Internal::readonlyTestInterfaceEmptyAttributeAttributeGetterCallback, 0, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"readonlyLongAttribute", TestObjectV8Internal::readonlyLongAttributeAttributeGetterCallback, 0, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"dateAttribute", TestObjectV8Internal::dateAttributeAttributeGetterCallback, TestObjectV8Internal::dateAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"stringAttribute", TestObjectV8Internal::stringAttributeAttributeGetterCallback, TestObjectV8Internal::stringAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"byteStringAttribute", TestObjectV8Internal::byteStringAttributeAttributeGetterCallback, TestObjectV8Internal::byteStringAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"usvStringAttribute", TestObjectV8Internal::usvStringAttributeAttributeGetterCallback, TestObjectV8Internal::usvStringAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"domTimeStampAttribute", TestObjectV8Internal::domTimeStampAttributeAttributeGetterCallback, TestObjectV8Internal::domTimeStampAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"booleanAttribute", TestObjectV8Internal::booleanAttributeAttributeGetterCallback, TestObjectV8Internal::booleanAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"byteAttribute", TestObjectV8Internal::byteAttributeAttributeGetterCallback, TestObjectV8Internal::byteAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"doubleAttribute", TestObjectV8Internal::doubleAttributeAttributeGetterCallback, TestObjectV8Internal::doubleAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"floatAttribute", TestObjectV8Internal::floatAttributeAttributeGetterCallback, TestObjectV8Internal::floatAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"longAttribute", TestObjectV8Internal::longAttributeAttributeGetterCallback, TestObjectV8Internal::longAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"longLongAttribute", TestObjectV8Internal::longLongAttributeAttributeGetterCallback, TestObjectV8Internal::longLongAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"octetAttribute", TestObjectV8Internal::octetAttributeAttributeGetterCallback, TestObjectV8Internal::octetAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"shortAttribute", TestObjectV8Internal::shortAttributeAttributeGetterCallback, TestObjectV8Internal::shortAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"unrestrictedDoubleAttribute", TestObjectV8Internal::unrestrictedDoubleAttributeAttributeGetterCallback, TestObjectV8Internal::unrestrictedDoubleAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"unrestrictedFloatAttribute", TestObjectV8Internal::unrestrictedFloatAttributeAttributeGetterCallback, TestObjectV8Internal::unrestrictedFloatAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"unsignedLongAttribute", TestObjectV8Internal::unsignedLongAttributeAttributeGetterCallback, TestObjectV8Internal::unsignedLongAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"unsignedLongLongAttribute", TestObjectV8Internal::unsignedLongLongAttributeAttributeGetterCallback, TestObjectV8Internal::unsignedLongLongAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"unsignedShortAttribute", TestObjectV8Internal::unsignedShortAttributeAttributeGetterCallback, TestObjectV8Internal::unsignedShortAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"testInterfaceEmptyAttribute", TestObjectV8Internal::testInterfaceEmptyAttributeAttributeGetterCallback, TestObjectV8Internal::testInterfaceEmptyAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"testObjectAttribute", TestObjectV8Internal::testObjectAttributeAttributeGetterCallback, TestObjectV8Internal::testObjectAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"voidCallbackFunctionAttribute", TestObjectV8Internal::voidCallbackFunctionAttributeAttributeGetterCallback, TestObjectV8Internal::voidCallbackFunctionAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"anyCallbackFunctionOptionalAnyArgAttribute", TestObjectV8Internal::anyCallbackFunctionOptionalAnyArgAttributeAttributeGetterCallback, TestObjectV8Internal::anyCallbackFunctionOptionalAnyArgAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"cssAttribute", TestObjectV8Internal::cssAttributeAttributeGetterCallback, TestObjectV8Internal::cssAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"imeAttribute", TestObjectV8Internal::imeAttributeAttributeGetterCallback, TestObjectV8Internal::imeAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"svgAttribute", TestObjectV8Internal::svgAttributeAttributeGetterCallback, TestObjectV8Internal::svgAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"xmlAttribute", TestObjectV8Internal::xmlAttributeAttributeGetterCallback, TestObjectV8Internal::xmlAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"nodeFilterAttribute", TestObjectV8Internal::nodeFilterAttributeAttributeGetterCallback, TestObjectV8Internal::nodeFilterAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"serializedScriptValueAttribute", TestObjectV8Internal::serializedScriptValueAttributeAttributeGetterCallback, TestObjectV8Internal::serializedScriptValueAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"anyAttribute", TestObjectV8Internal::anyAttributeAttributeGetterCallback, TestObjectV8Internal::anyAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"promiseAttribute", TestObjectV8Internal::promiseAttributeAttributeGetterCallback, TestObjectV8Internal::promiseAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"windowAttribute", TestObjectV8Internal::windowAttributeAttributeGetterCallback, TestObjectV8Internal::windowAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"documentAttribute", TestObjectV8Internal::documentAttributeAttributeGetterCallback, TestObjectV8Internal::documentAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"documentFragmentAttribute", TestObjectV8Internal::documentFragmentAttributeAttributeGetterCallback, TestObjectV8Internal::documentFragmentAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"documentTypeAttribute", TestObjectV8Internal::documentTypeAttributeAttributeGetterCallback, TestObjectV8Internal::documentTypeAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"elementAttribute", TestObjectV8Internal::elementAttributeAttributeGetterCallback, TestObjectV8Internal::elementAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"nodeAttribute", TestObjectV8Internal::nodeAttributeAttributeGetterCallback, TestObjectV8Internal::nodeAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"shadowRootAttribute", TestObjectV8Internal::shadowRootAttributeAttributeGetterCallback, TestObjectV8Internal::shadowRootAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"arrayBufferAttribute", TestObjectV8Internal::arrayBufferAttributeAttributeGetterCallback, TestObjectV8Internal::arrayBufferAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"float32ArrayAttribute", TestObjectV8Internal::float32ArrayAttributeAttributeGetterCallback, TestObjectV8Internal::float32ArrayAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"uint8ArrayAttribute", TestObjectV8Internal::uint8ArrayAttributeAttributeGetterCallback, TestObjectV8Internal::uint8ArrayAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"self", TestObjectV8Internal::selfAttributeGetterCallback, 0, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"readonlyEventTargetAttribute", TestObjectV8Internal::readonlyEventTargetAttributeAttributeGetterCallback, 0, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"readonlyEventTargetOrNullAttribute", TestObjectV8Internal::readonlyEventTargetOrNullAttributeAttributeGetterCallback, 0, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"readonlyWindowAttribute", TestObjectV8Internal::readonlyWindowAttributeAttributeGetterCallback, 0, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"htmlCollectionAttribute", TestObjectV8Internal::htmlCollectionAttributeAttributeGetterCallback, 0, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"htmlElementAttribute", TestObjectV8Internal::htmlElementAttributeAttributeGetterCallback, 0, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"stringArrayAttribute", TestObjectV8Internal::stringArrayAttributeAttributeGetterCallback, TestObjectV8Internal::stringArrayAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"testInterfaceEmptyArrayAttribute", TestObjectV8Internal::testInterfaceEmptyArrayAttributeAttributeGetterCallback, TestObjectV8Internal::testInterfaceEmptyArrayAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"floatArrayAttribute", TestObjectV8Internal::floatArrayAttributeAttributeGetterCallback, TestObjectV8Internal::floatArrayAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"stringFrozenArrayAttribute", TestObjectV8Internal::stringFrozenArrayAttributeAttributeGetterCallback, TestObjectV8Internal::stringFrozenArrayAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"testInterfaceEmptyFrozenArrayAttribute", TestObjectV8Internal::testInterfaceEmptyFrozenArrayAttributeAttributeGetterCallback, TestObjectV8Internal::testInterfaceEmptyFrozenArrayAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"stringOrNullAttribute", TestObjectV8Internal::stringOrNullAttributeAttributeGetterCallback, TestObjectV8Internal::stringOrNullAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"longOrNullAttribute", TestObjectV8Internal::longOrNullAttributeAttributeGetterCallback, TestObjectV8Internal::longOrNullAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"testInterfaceOrNullAttribute", TestObjectV8Internal::testInterfaceOrNullAttributeAttributeGetterCallback, TestObjectV8Internal::testInterfaceOrNullAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"testEnumAttribute", TestObjectV8Internal::testEnumAttributeAttributeGetterCallback, TestObjectV8Internal::testEnumAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"testEnumOrNullAttribute", TestObjectV8Internal::testEnumOrNullAttributeAttributeGetterCallback, TestObjectV8Internal::testEnumOrNullAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"staticStringAttribute", TestObjectV8Internal::staticStringAttributeAttributeGetterCallback, TestObjectV8Internal::staticStringAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInterface, V8DOMConfiguration::CheckHolder}, |
| {"staticLongAttribute", TestObjectV8Internal::staticLongAttributeAttributeGetterCallback, TestObjectV8Internal::staticLongAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInterface, V8DOMConfiguration::CheckHolder}, |
| {"eventHandlerAttribute", TestObjectV8Internal::eventHandlerAttributeAttributeGetterCallback, TestObjectV8Internal::eventHandlerAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"doubleOrStringAttribute", TestObjectV8Internal::doubleOrStringAttributeAttributeGetterCallback, TestObjectV8Internal::doubleOrStringAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"doubleOrStringOrNullAttribute", TestObjectV8Internal::doubleOrStringOrNullAttributeAttributeGetterCallback, TestObjectV8Internal::doubleOrStringOrNullAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"doubleOrNullStringAttribute", TestObjectV8Internal::doubleOrNullStringAttributeAttributeGetterCallback, TestObjectV8Internal::doubleOrNullStringAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"stringOrStringSequenceAttribute", TestObjectV8Internal::stringOrStringSequenceAttributeAttributeGetterCallback, TestObjectV8Internal::stringOrStringSequenceAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"testEnumOrDoubleAttribute", TestObjectV8Internal::testEnumOrDoubleAttributeAttributeGetterCallback, TestObjectV8Internal::testEnumOrDoubleAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"unrestrictedDoubleOrStringAttribute", TestObjectV8Internal::unrestrictedDoubleOrStringAttributeAttributeGetterCallback, TestObjectV8Internal::unrestrictedDoubleOrStringAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"activityLoggingAccessForAllWorldsLongAttribute", TestObjectV8Internal::activityLoggingAccessForAllWorldsLongAttributeAttributeGetterCallback, TestObjectV8Internal::activityLoggingAccessForAllWorldsLongAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"activityLoggingGetterForAllWorldsLongAttribute", TestObjectV8Internal::activityLoggingGetterForAllWorldsLongAttributeAttributeGetterCallback, TestObjectV8Internal::activityLoggingGetterForAllWorldsLongAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"activityLoggingSetterForAllWorldsLongAttribute", TestObjectV8Internal::activityLoggingSetterForAllWorldsLongAttributeAttributeGetterCallback, TestObjectV8Internal::activityLoggingSetterForAllWorldsLongAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"cachedAttributeAnyAttribute", TestObjectV8Internal::cachedAttributeAnyAttributeAttributeGetterCallback, TestObjectV8Internal::cachedAttributeAnyAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"cachedArrayAttribute", TestObjectV8Internal::cachedArrayAttributeAttributeGetterCallback, TestObjectV8Internal::cachedArrayAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"cachedStringOrNoneAttribute", TestObjectV8Internal::cachedStringOrNoneAttributeAttributeGetterCallback, TestObjectV8Internal::cachedStringOrNoneAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"callWithExecutionContextAnyAttribute", TestObjectV8Internal::callWithExecutionContextAnyAttributeAttributeGetterCallback, TestObjectV8Internal::callWithExecutionContextAnyAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"callWithScriptStateAnyAttribute", TestObjectV8Internal::callWithScriptStateAnyAttributeAttributeGetterCallback, TestObjectV8Internal::callWithScriptStateAnyAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"callWithExecutionContextAndScriptStateAnyAttribute", TestObjectV8Internal::callWithExecutionContextAndScriptStateAnyAttributeAttributeGetterCallback, TestObjectV8Internal::callWithExecutionContextAndScriptStateAnyAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"checkSecurityForNodeReadonlyDocumentAttribute", TestObjectV8Internal::checkSecurityForNodeReadonlyDocumentAttributeAttributeGetterCallback, 0, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"customObjectAttribute", TestObjectV8Internal::customObjectAttributeAttributeGetterCallback, TestObjectV8Internal::customObjectAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"customGetterLongAttribute", TestObjectV8Internal::customGetterLongAttributeAttributeGetterCallback, TestObjectV8Internal::customGetterLongAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"customGetterReadonlyObjectAttribute", TestObjectV8Internal::customGetterReadonlyObjectAttributeAttributeGetterCallback, 0, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"customSetterLongAttribute", TestObjectV8Internal::customSetterLongAttributeAttributeGetterCallback, TestObjectV8Internal::customSetterLongAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"customElementsCallbacksReadonlyLongAttribute", TestObjectV8Internal::customElementsCallbacksReadonlyLongAttributeAttributeGetterCallback, 0, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"deprecatedLongAttribute", TestObjectV8Internal::deprecatedLongAttributeAttributeGetterCallback, TestObjectV8Internal::deprecatedLongAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"enforceRangeLongAttribute", TestObjectV8Internal::enforceRangeLongAttributeAttributeGetterCallback, TestObjectV8Internal::enforceRangeLongAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"implementedAsLongAttribute", TestObjectV8Internal::implementedAsLongAttributeAttributeGetterCallback, TestObjectV8Internal::implementedAsLongAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"customImplementedAsLongAttribute", TestObjectV8Internal::customImplementedAsLongAttributeAttributeGetterCallback, TestObjectV8Internal::customImplementedAsLongAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"customGetterImplementedAsLongAttribute", TestObjectV8Internal::customGetterImplementedAsLongAttributeAttributeGetterCallback, TestObjectV8Internal::customGetterImplementedAsLongAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"customSetterImplementedAsLongAttribute", TestObjectV8Internal::customSetterImplementedAsLongAttributeAttributeGetterCallback, TestObjectV8Internal::customSetterImplementedAsLongAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"measureAsLongAttribute", TestObjectV8Internal::measureAsLongAttributeAttributeGetterCallback, TestObjectV8Internal::measureAsLongAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"notEnumerableLongAttribute", TestObjectV8Internal::notEnumerableLongAttributeAttributeGetterCallback, TestObjectV8Internal::notEnumerableLongAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::DontEnum), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"originTrialEnabledLongAttribute", TestObjectV8Internal::originTrialEnabledLongAttributeAttributeGetterCallback, TestObjectV8Internal::originTrialEnabledLongAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"perWorldBindingsReadonlyTestInterfaceEmptyAttribute", TestObjectV8Internal::perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetterCallback, 0, TestObjectV8Internal::perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetterCallbackForMainWorld, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"activityLoggingAccessPerWorldBindingsLongAttribute", TestObjectV8Internal::activityLoggingAccessPerWorldBindingsLongAttributeAttributeGetterCallback, TestObjectV8Internal::activityLoggingAccessPerWorldBindingsLongAttributeAttributeSetterCallback, TestObjectV8Internal::activityLoggingAccessPerWorldBindingsLongAttributeAttributeGetterCallbackForMainWorld, TestObjectV8Internal::activityLoggingAccessPerWorldBindingsLongAttributeAttributeSetterCallbackForMainWorld, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttribute", TestObjectV8Internal::activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeAttributeGetterCallback, TestObjectV8Internal::activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeAttributeSetterCallback, TestObjectV8Internal::activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeAttributeGetterCallbackForMainWorld, TestObjectV8Internal::activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeAttributeSetterCallbackForMainWorld, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"activityLoggingGetterPerWorldBindingsLongAttribute", TestObjectV8Internal::activityLoggingGetterPerWorldBindingsLongAttributeAttributeGetterCallback, TestObjectV8Internal::activityLoggingGetterPerWorldBindingsLongAttributeAttributeSetterCallback, TestObjectV8Internal::activityLoggingGetterPerWorldBindingsLongAttributeAttributeGetterCallbackForMainWorld, TestObjectV8Internal::activityLoggingGetterPerWorldBindingsLongAttributeAttributeSetterCallbackForMainWorld, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttribute", TestObjectV8Internal::activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeAttributeGetterCallback, TestObjectV8Internal::activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeAttributeSetterCallback, TestObjectV8Internal::activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeAttributeGetterCallbackForMainWorld, TestObjectV8Internal::activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeAttributeSetterCallbackForMainWorld, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"location", TestObjectV8Internal::locationAttributeGetterCallback, TestObjectV8Internal::locationAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"locationWithException", TestObjectV8Internal::locationWithExceptionAttributeGetterCallback, TestObjectV8Internal::locationWithExceptionAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"locationWithCallWith", TestObjectV8Internal::locationWithCallWithAttributeGetterCallback, TestObjectV8Internal::locationWithCallWithAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"locationByteString", TestObjectV8Internal::locationByteStringAttributeGetterCallback, TestObjectV8Internal::locationByteStringAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"locationWithPerWorldBindings", TestObjectV8Internal::locationWithPerWorldBindingsAttributeGetterCallback, TestObjectV8Internal::locationWithPerWorldBindingsAttributeSetterCallback, TestObjectV8Internal::locationWithPerWorldBindingsAttributeGetterCallbackForMainWorld, TestObjectV8Internal::locationWithPerWorldBindingsAttributeSetterCallbackForMainWorld, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"locationLegacyInterfaceTypeChecking", TestObjectV8Internal::locationLegacyInterfaceTypeCheckingAttributeGetterCallback, TestObjectV8Internal::locationLegacyInterfaceTypeCheckingAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"locationGarbageCollected", TestObjectV8Internal::locationGarbageCollectedAttributeGetterCallback, TestObjectV8Internal::locationGarbageCollectedAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"raisesExceptionLongAttribute", TestObjectV8Internal::raisesExceptionLongAttributeAttributeGetterCallback, TestObjectV8Internal::raisesExceptionLongAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"raisesExceptionGetterLongAttribute", TestObjectV8Internal::raisesExceptionGetterLongAttributeAttributeGetterCallback, TestObjectV8Internal::raisesExceptionGetterLongAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"setterRaisesExceptionLongAttribute", TestObjectV8Internal::setterRaisesExceptionLongAttributeAttributeGetterCallback, TestObjectV8Internal::setterRaisesExceptionLongAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"raisesExceptionTestInterfaceEmptyAttribute", TestObjectV8Internal::raisesExceptionTestInterfaceEmptyAttributeAttributeGetterCallback, TestObjectV8Internal::raisesExceptionTestInterfaceEmptyAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"cachedAttributeRaisesExceptionGetterAnyAttribute", TestObjectV8Internal::cachedAttributeRaisesExceptionGetterAnyAttributeAttributeGetterCallback, TestObjectV8Internal::cachedAttributeRaisesExceptionGetterAnyAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"reflectTestInterfaceAttribute", TestObjectV8Internal::reflectTestInterfaceAttributeAttributeGetterCallback, TestObjectV8Internal::reflectTestInterfaceAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"reflectReflectedNameAttributeTestAttribute", TestObjectV8Internal::reflectReflectedNameAttributeTestAttributeAttributeGetterCallback, TestObjectV8Internal::reflectReflectedNameAttributeTestAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"reflectBooleanAttribute", TestObjectV8Internal::reflectBooleanAttributeAttributeGetterCallback, TestObjectV8Internal::reflectBooleanAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"reflectLongAttribute", TestObjectV8Internal::reflectLongAttributeAttributeGetterCallback, TestObjectV8Internal::reflectLongAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"reflectUnsignedShortAttribute", TestObjectV8Internal::reflectUnsignedShortAttributeAttributeGetterCallback, TestObjectV8Internal::reflectUnsignedShortAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"reflectUnsignedLongAttribute", TestObjectV8Internal::reflectUnsignedLongAttributeAttributeGetterCallback, TestObjectV8Internal::reflectUnsignedLongAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"id", TestObjectV8Internal::idAttributeGetterCallback, TestObjectV8Internal::idAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"name", TestObjectV8Internal::nameAttributeGetterCallback, TestObjectV8Internal::nameAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"class", TestObjectV8Internal::classAttributeGetterCallback, TestObjectV8Internal::classAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"reflectedId", TestObjectV8Internal::reflectedIdAttributeGetterCallback, TestObjectV8Internal::reflectedIdAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"reflectedName", TestObjectV8Internal::reflectedNameAttributeGetterCallback, TestObjectV8Internal::reflectedNameAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"reflectedClass", TestObjectV8Internal::reflectedClassAttributeGetterCallback, TestObjectV8Internal::reflectedClassAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"limitedToOnlyOneAttribute", TestObjectV8Internal::limitedToOnlyOneAttributeAttributeGetterCallback, TestObjectV8Internal::limitedToOnlyOneAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"limitedToOnlyAttribute", TestObjectV8Internal::limitedToOnlyAttributeAttributeGetterCallback, TestObjectV8Internal::limitedToOnlyAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"limitedToOnlyOtherAttribute", TestObjectV8Internal::limitedToOnlyOtherAttributeAttributeGetterCallback, TestObjectV8Internal::limitedToOnlyOtherAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"limitedWithMissingDefaultAttribute", TestObjectV8Internal::limitedWithMissingDefaultAttributeAttributeGetterCallback, TestObjectV8Internal::limitedWithMissingDefaultAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"limitedWithInvalidMissingDefaultAttribute", TestObjectV8Internal::limitedWithInvalidMissingDefaultAttributeAttributeGetterCallback, TestObjectV8Internal::limitedWithInvalidMissingDefaultAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"corsSettingAttribute", TestObjectV8Internal::corsSettingAttributeAttributeGetterCallback, 0, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"limitedWithEmptyMissingInvalidAttribute", TestObjectV8Internal::limitedWithEmptyMissingInvalidAttributeAttributeGetterCallback, 0, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"replaceableReadonlyLongAttribute", TestObjectV8Internal::replaceableReadonlyLongAttributeAttributeGetterCallback, TestObjectV8Internal::replaceableReadonlyLongAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"locationPutForwards", TestObjectV8Internal::locationPutForwardsAttributeGetterCallback, TestObjectV8Internal::locationPutForwardsAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"setterCallWithCurrentWindowAndEnteredWindowStringAttribute", TestObjectV8Internal::setterCallWithCurrentWindowAndEnteredWindowStringAttributeAttributeGetterCallback, TestObjectV8Internal::setterCallWithCurrentWindowAndEnteredWindowStringAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"setterCallWithExecutionContextStringAttribute", TestObjectV8Internal::setterCallWithExecutionContextStringAttributeAttributeGetterCallback, TestObjectV8Internal::setterCallWithExecutionContextStringAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"treatNullAsEmptyStringStringAttribute", TestObjectV8Internal::treatNullAsEmptyStringStringAttributeAttributeGetterCallback, TestObjectV8Internal::treatNullAsEmptyStringStringAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"treatNullAsNullStringStringAttribute", TestObjectV8Internal::treatNullAsNullStringStringAttributeAttributeGetterCallback, TestObjectV8Internal::treatNullAsNullStringStringAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"legacyInterfaceTypeCheckingFloatAttribute", TestObjectV8Internal::legacyInterfaceTypeCheckingFloatAttributeAttributeGetterCallback, TestObjectV8Internal::legacyInterfaceTypeCheckingFloatAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"legacyInterfaceTypeCheckingTestInterfaceAttribute", TestObjectV8Internal::legacyInterfaceTypeCheckingTestInterfaceAttributeAttributeGetterCallback, TestObjectV8Internal::legacyInterfaceTypeCheckingTestInterfaceAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"legacyInterfaceTypeCheckingTestInterfaceOrNullAttribute", TestObjectV8Internal::legacyInterfaceTypeCheckingTestInterfaceOrNullAttributeAttributeGetterCallback, TestObjectV8Internal::legacyInterfaceTypeCheckingTestInterfaceOrNullAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"urlStringAttribute", TestObjectV8Internal::urlStringAttributeAttributeGetterCallback, TestObjectV8Internal::urlStringAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"urlStringAttribute", TestObjectV8Internal::urlStringAttributeAttributeGetterCallback, TestObjectV8Internal::urlStringAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"unforgeableLongAttribute", TestObjectV8Internal::unforgeableLongAttributeAttributeGetterCallback, TestObjectV8Internal::unforgeableLongAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::DontDelete), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance, V8DOMConfiguration::CheckHolder}, |
| {"measuredLongAttribute", TestObjectV8Internal::measuredLongAttributeAttributeGetterCallback, TestObjectV8Internal::measuredLongAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"sameObjectAttribute", TestObjectV8Internal::sameObjectAttributeAttributeGetterCallback, TestObjectV8Internal::sameObjectAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"unscopeableLongAttribute", TestObjectV8Internal::unscopeableLongAttributeAttributeGetterCallback, TestObjectV8Internal::unscopeableLongAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"unscopeableOriginTrialEnabledLongAttribute", TestObjectV8Internal::unscopeableOriginTrialEnabledLongAttributeAttributeGetterCallback, TestObjectV8Internal::unscopeableOriginTrialEnabledLongAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"testInterfaceAttribute", TestObjectV8Internal::testInterfaceAttributeAttributeGetterCallback, TestObjectV8Internal::testInterfaceAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"testInterfaceGarbageCollectedAttribute", TestObjectV8Internal::testInterfaceGarbageCollectedAttributeAttributeGetterCallback, TestObjectV8Internal::testInterfaceGarbageCollectedAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"testInterfaceGarbageCollectedOrNullAttribute", TestObjectV8Internal::testInterfaceGarbageCollectedOrNullAttributeAttributeGetterCallback, TestObjectV8Internal::testInterfaceGarbageCollectedOrNullAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"readonlyShortAttribute", TestObjectV8Internal::readonlyShortAttributeAttributeGetterCallback, 0, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"shortAttribute", TestObjectV8Internal::shortAttributeAttributeGetterCallback, TestObjectV8Internal::shortAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"stringAttribute", TestObjectV8Internal::stringAttributeAttributeGetterCallback, TestObjectV8Internal::stringAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"nodeAttribute", TestObjectV8Internal::nodeAttributeAttributeGetterCallback, TestObjectV8Internal::nodeAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"attributeImplementedInCPPForPrivateScriptOnly", TestObjectV8Internal::attributeImplementedInCPPForPrivateScriptOnlyAttributeGetterCallback, TestObjectV8Internal::attributeImplementedInCPPForPrivateScriptOnlyAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnlyExposedToPrivateScript, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| {"enumForPrivateScript", TestObjectV8Internal::enumForPrivateScriptAttributeGetterCallback, TestObjectV8Internal::enumForPrivateScriptAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| }; |
| |
| const V8DOMConfiguration::MethodConfiguration V8TestObjectMethods[] = { |
| {"unscopeableVoidMethod", TestObjectV8Internal::unscopeableVoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"voidMethod", TestObjectV8Internal::voidMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"staticVoidMethod", TestObjectV8Internal::staticVoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInterface}, |
| {"dateMethod", TestObjectV8Internal::dateMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"stringMethod", TestObjectV8Internal::stringMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"byteStringMethod", TestObjectV8Internal::byteStringMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"usvStringMethod", TestObjectV8Internal::usvStringMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"readonlyDOMTimeStampMethod", TestObjectV8Internal::readonlyDOMTimeStampMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"booleanMethod", TestObjectV8Internal::booleanMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"byteMethod", TestObjectV8Internal::byteMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"doubleMethod", TestObjectV8Internal::doubleMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"floatMethod", TestObjectV8Internal::floatMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"longMethod", TestObjectV8Internal::longMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"longLongMethod", TestObjectV8Internal::longLongMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"octetMethod", TestObjectV8Internal::octetMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"shortMethod", TestObjectV8Internal::shortMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"unsignedLongMethod", TestObjectV8Internal::unsignedLongMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"unsignedLongLongMethod", TestObjectV8Internal::unsignedLongLongMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"unsignedShortMethod", TestObjectV8Internal::unsignedShortMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"voidMethodDateArg", TestObjectV8Internal::voidMethodDateArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"voidMethodStringArg", TestObjectV8Internal::voidMethodStringArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"voidMethodByteStringArg", TestObjectV8Internal::voidMethodByteStringArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"voidMethodUSVStringArg", TestObjectV8Internal::voidMethodUSVStringArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"voidMethodDOMTimeStampArg", TestObjectV8Internal::voidMethodDOMTimeStampArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"voidMethodBooleanArg", TestObjectV8Internal::voidMethodBooleanArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"voidMethodByteArg", TestObjectV8Internal::voidMethodByteArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"voidMethodDoubleArg", TestObjectV8Internal::voidMethodDoubleArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"voidMethodFloatArg", TestObjectV8Internal::voidMethodFloatArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"voidMethodLongArg", TestObjectV8Internal::voidMethodLongArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"voidMethodLongLongArg", TestObjectV8Internal::voidMethodLongLongArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"voidMethodOctetArg", TestObjectV8Internal::voidMethodOctetArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"voidMethodShortArg", TestObjectV8Internal::voidMethodShortArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"voidMethodUnsignedLongArg", TestObjectV8Internal::voidMethodUnsignedLongArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"voidMethodUnsignedLongLongArg", TestObjectV8Internal::voidMethodUnsignedLongLongArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"voidMethodUnsignedShortArg", TestObjectV8Internal::voidMethodUnsignedShortArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"testInterfaceEmptyMethod", TestObjectV8Internal::testInterfaceEmptyMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"voidMethodTestInterfaceEmptyArg", TestObjectV8Internal::voidMethodTestInterfaceEmptyArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"voidMethodLongArgTestInterfaceEmptyArg", TestObjectV8Internal::voidMethodLongArgTestInterfaceEmptyArgMethodCallback, 0, 2, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"voidCallbackFunctionMethod", TestObjectV8Internal::voidCallbackFunctionMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"anyCallbackFunctionOptionalAnyArgMethod", TestObjectV8Internal::anyCallbackFunctionOptionalAnyArgMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"voidMethodVoidCallbackFunctionArg", TestObjectV8Internal::voidMethodVoidCallbackFunctionArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"voidMethodOptionalVoidCallbackFunctionArg", TestObjectV8Internal::voidMethodOptionalVoidCallbackFunctionArgMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"voidMethodNullableVoidCallbackFunctionArg", TestObjectV8Internal::voidMethodNullableVoidCallbackFunctionArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"voidMethodAnyCallbackFunctionOptionalAnyArg", TestObjectV8Internal::voidMethodAnyCallbackFunctionOptionalAnyArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"anyMethod", TestObjectV8Internal::anyMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"voidMethodEventTargetArg", TestObjectV8Internal::voidMethodEventTargetArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"voidMethodAnyArg", TestObjectV8Internal::voidMethodAnyArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"voidMethodAttrArg", TestObjectV8Internal::voidMethodAttrArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"voidMethodDocumentArg", TestObjectV8Internal::voidMethodDocumentArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"voidMethodDocumentTypeArg", TestObjectV8Internal::voidMethodDocumentTypeArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"voidMethodElementArg", TestObjectV8Internal::voidMethodElementArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"voidMethodNodeArg", TestObjectV8Internal::voidMethodNodeArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"arrayBufferMethod", TestObjectV8Internal::arrayBufferMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"arrayBufferViewMethod", TestObjectV8Internal::arrayBufferViewMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"float32ArrayMethod", TestObjectV8Internal::float32ArrayMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"int32ArrayMethod", TestObjectV8Internal::int32ArrayMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"uint8ArrayMethod", TestObjectV8Internal::uint8ArrayMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"voidMethodArrayBufferArg", TestObjectV8Internal::voidMethodArrayBufferArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"voidMethodArrayBufferOrNullArg", TestObjectV8Internal::voidMethodArrayBufferOrNullArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"voidMethodArrayBufferViewArg", TestObjectV8Internal::voidMethodArrayBufferViewArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"voidMethodFlexibleArrayBufferViewArg", TestObjectV8Internal::voidMethodFlexibleArrayBufferViewArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"voidMethodFlexibleArrayBufferViewTypedArg", TestObjectV8Internal::voidMethodFlexibleArrayBufferViewTypedArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"voidMethodFloat32ArrayArg", TestObjectV8Internal::voidMethodFloat32ArrayArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"voidMethodInt32ArrayArg", TestObjectV8Internal::voidMethodInt32ArrayArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"voidMethodUint8ArrayArg", TestObjectV8Internal::voidMethodUint8ArrayArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"longArrayMethod", TestObjectV8Internal::longArrayMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"stringArrayMethod", TestObjectV8Internal::stringArrayMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"testInterfaceEmptyArrayMethod", TestObjectV8Internal::testInterfaceEmptyArrayMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"voidMethodArrayLongArg", TestObjectV8Internal::voidMethodArrayLongArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"voidMethodArrayStringArg", TestObjectV8Internal::voidMethodArrayStringArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"voidMethodArrayTestInterfaceEmptyArg", TestObjectV8Internal::voidMethodArrayTestInterfaceEmptyArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"voidMethodNullableArrayLongArg", TestObjectV8Internal::voidMethodNullableArrayLongArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"longSequenceMethod", TestObjectV8Internal::longSequenceMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"stringSequenceMethod", TestObjectV8Internal::stringSequenceMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"testInterfaceEmptySequenceMethod", TestObjectV8Internal::testInterfaceEmptySequenceMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"voidMethodSequenceLongArg", TestObjectV8Internal::voidMethodSequenceLongArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"voidMethodSequenceStringArg", TestObjectV8Internal::voidMethodSequenceStringArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"voidMethodSequenceTestInterfaceEmptyArg", TestObjectV8Internal::voidMethodSequenceTestInterfaceEmptyArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"voidMethodSequenceSequenceDOMStringArg", TestObjectV8Internal::voidMethodSequenceSequenceDOMStringArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"voidMethodNullableSequenceLongArg", TestObjectV8Internal::voidMethodNullableSequenceLongArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"longFrozenArrayMethod", TestObjectV8Internal::longFrozenArrayMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"voidMethodStringFrozenArrayMethod", TestObjectV8Internal::voidMethodStringFrozenArrayMethodMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"voidMethodTestInterfaceEmptyFrozenArrayMethod", TestObjectV8Internal::voidMethodTestInterfaceEmptyFrozenArrayMethodMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"nullableLongMethod", TestObjectV8Internal::nullableLongMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"nullableStringMethod", TestObjectV8Internal::nullableStringMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"nullableTestInterfaceMethod", TestObjectV8Internal::nullableTestInterfaceMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"nullableLongSequenceMethod", TestObjectV8Internal::nullableLongSequenceMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"testInterfaceGarbageCollectedOrDOMStringMethod", TestObjectV8Internal::testInterfaceGarbageCollectedOrDOMStringMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"booleanOrDOMStringOrUnrestrictedDoubleMethod", TestObjectV8Internal::booleanOrDOMStringOrUnrestrictedDoubleMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"testInterfaceOrLongMethod", TestObjectV8Internal::testInterfaceOrLongMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"voidMethodDoubleOrDOMStringArg", TestObjectV8Internal::voidMethodDoubleOrDOMStringArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"voidMethodDoubleOrDOMStringOrNullArg", TestObjectV8Internal::voidMethodDoubleOrDOMStringOrNullArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"voidMethodDoubleOrNullOrDOMStringArg", TestObjectV8Internal::voidMethodDoubleOrNullOrDOMStringArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"voidMethodDOMStringOrArrayBufferOrArrayBufferViewArg", TestObjectV8Internal::voidMethodDOMStringOrArrayBufferOrArrayBufferViewArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"voidMethodArrayBufferOrArrayBufferViewOrDictionaryArg", TestObjectV8Internal::voidMethodArrayBufferOrArrayBufferViewOrDictionaryArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"voidMethodArrayOfDoubleOrDOMStringArg", TestObjectV8Internal::voidMethodArrayOfDoubleOrDOMStringArgMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"voidMethodTestInterfaceEmptyOrNullArg", TestObjectV8Internal::voidMethodTestInterfaceEmptyOrNullArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"voidMethodTestCallbackInterfaceArg", TestObjectV8Internal::voidMethodTestCallbackInterfaceArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"voidMethodOptionalTestCallbackInterfaceArg", TestObjectV8Internal::voidMethodOptionalTestCallbackInterfaceArgMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"voidMethodTestCallbackInterfaceOrNullArg", TestObjectV8Internal::voidMethodTestCallbackInterfaceOrNullArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"testEnumMethod", TestObjectV8Internal::testEnumMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"voidMethodTestEnumArg", TestObjectV8Internal::voidMethodTestEnumArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"dictionaryMethod", TestObjectV8Internal::dictionaryMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"testDictionaryMethod", TestObjectV8Internal::testDictionaryMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"nullableTestDictionaryMethod", TestObjectV8Internal::nullableTestDictionaryMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"passPermissiveDictionaryMethod", TestObjectV8Internal::passPermissiveDictionaryMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"nodeFilterMethod", TestObjectV8Internal::nodeFilterMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"promiseMethod", TestObjectV8Internal::promiseMethodMethodCallback, 0, 3, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"promiseMethodWithoutExceptionState", TestObjectV8Internal::promiseMethodWithoutExceptionStateMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"serializedScriptValueMethod", TestObjectV8Internal::serializedScriptValueMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"xPathNSResolverMethod", TestObjectV8Internal::xPathNSResolverMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"voidMethodDictionaryArg", TestObjectV8Internal::voidMethodDictionaryArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"voidMethodNodeFilterArg", TestObjectV8Internal::voidMethodNodeFilterArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"voidMethodPromiseArg", TestObjectV8Internal::voidMethodPromiseArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"voidMethodSerializedScriptValueArg", TestObjectV8Internal::voidMethodSerializedScriptValueArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"voidMethodXPathNSResolverArg", TestObjectV8Internal::voidMethodXPathNSResolverArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"voidMethodDictionarySequenceArg", TestObjectV8Internal::voidMethodDictionarySequenceArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"voidMethodStringArgLongArg", TestObjectV8Internal::voidMethodStringArgLongArgMethodCallback, 0, 2, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"voidMethodOptionalStringArg", TestObjectV8Internal::voidMethodOptionalStringArgMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"voidMethodOptionalTestInterfaceEmptyArg", TestObjectV8Internal::voidMethodOptionalTestInterfaceEmptyArgMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"voidMethodOptionalLongArg", TestObjectV8Internal::voidMethodOptionalLongArgMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"stringMethodOptionalLongArg", TestObjectV8Internal::stringMethodOptionalLongArgMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"testInterfaceEmptyMethodOptionalLongArg", TestObjectV8Internal::testInterfaceEmptyMethodOptionalLongArgMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"longMethodOptionalLongArg", TestObjectV8Internal::longMethodOptionalLongArgMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"voidMethodLongArgOptionalLongArg", TestObjectV8Internal::voidMethodLongArgOptionalLongArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"voidMethodLongArgOptionalLongArgOptionalLongArg", TestObjectV8Internal::voidMethodLongArgOptionalLongArgOptionalLongArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"voidMethodLongArgOptionalTestInterfaceEmptyArg", TestObjectV8Internal::voidMethodLongArgOptionalTestInterfaceEmptyArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"voidMethodTestInterfaceEmptyArgOptionalLongArg", TestObjectV8Internal::voidMethodTestInterfaceEmptyArgOptionalLongArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"voidMethodOptionalDictionaryArg", TestObjectV8Internal::voidMethodOptionalDictionaryArgMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"voidMethodDefaultByteStringArg", TestObjectV8Internal::voidMethodDefaultByteStringArgMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"voidMethodDefaultStringArg", TestObjectV8Internal::voidMethodDefaultStringArgMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"voidMethodDefaultIntegerArgs", TestObjectV8Internal::voidMethodDefaultIntegerArgsMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"voidMethodDefaultDoubleArg", TestObjectV8Internal::voidMethodDefaultDoubleArgMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"voidMethodDefaultTrueBooleanArg", TestObjectV8Internal::voidMethodDefaultTrueBooleanArgMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"voidMethodDefaultFalseBooleanArg", TestObjectV8Internal::voidMethodDefaultFalseBooleanArgMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"voidMethodDefaultNullableByteStringArg", TestObjectV8Internal::voidMethodDefaultNullableByteStringArgMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"voidMethodDefaultNullableStringArg", TestObjectV8Internal::voidMethodDefaultNullableStringArgMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"voidMethodDefaultNullableTestInterfaceArg", TestObjectV8Internal::voidMethodDefaultNullableTestInterfaceArgMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"voidMethodDefaultDoubleOrStringArgs", TestObjectV8Internal::voidMethodDefaultDoubleOrStringArgsMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"voidMethodDefaultStringSequenceArg", TestObjectV8Internal::voidMethodDefaultStringSequenceArgMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"voidMethodVariadicStringArg", TestObjectV8Internal::voidMethodVariadicStringArgMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"voidMethodStringArgVariadicStringArg", TestObjectV8Internal::voidMethodStringArgVariadicStringArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"voidMethodVariadicTestInterfaceEmptyArg", TestObjectV8Internal::voidMethodVariadicTestInterfaceEmptyArgMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"voidMethodTestInterfaceEmptyArgVariadicTestInterfaceEmptyArg", TestObjectV8Internal::voidMethodTestInterfaceEmptyArgVariadicTestInterfaceEmptyArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"voidMethodVariadicTestInterfaceGarbageCollectedArg", TestObjectV8Internal::voidMethodVariadicTestInterfaceGarbageCollectedArgMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"overloadedMethodA", TestObjectV8Internal::overloadedMethodAMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"overloadedMethodB", TestObjectV8Internal::overloadedMethodBMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"overloadedMethodC", TestObjectV8Internal::overloadedMethodCMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"overloadedMethodD", TestObjectV8Internal::overloadedMethodDMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"overloadedMethodE", TestObjectV8Internal::overloadedMethodEMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"overloadedMethodF", TestObjectV8Internal::overloadedMethodFMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"overloadedMethodG", TestObjectV8Internal::overloadedMethodGMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"overloadedMethodH", TestObjectV8Internal::overloadedMethodHMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"overloadedMethodI", TestObjectV8Internal::overloadedMethodIMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"overloadedMethodJ", TestObjectV8Internal::overloadedMethodJMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"overloadedMethodK", TestObjectV8Internal::overloadedMethodKMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"overloadedMethodL", TestObjectV8Internal::overloadedMethodLMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"promiseOverloadMethod", TestObjectV8Internal::promiseOverloadMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"overloadedPerWorldBindingsMethod", TestObjectV8Internal::overloadedPerWorldBindingsMethodMethodCallback, TestObjectV8Internal::overloadedPerWorldBindingsMethodMethodCallbackForMainWorld, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"overloadedStaticMethod", TestObjectV8Internal::overloadedStaticMethodMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInterface}, |
| {"item", TestObjectV8Internal::itemMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"setItem", TestObjectV8Internal::setItemMethodCallback, 0, 2, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"voidMethodClampUnsignedShortArg", TestObjectV8Internal::voidMethodClampUnsignedShortArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"voidMethodClampUnsignedLongArg", TestObjectV8Internal::voidMethodClampUnsignedLongArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"voidMethodDefaultUndefinedTestInterfaceEmptyArg", TestObjectV8Internal::voidMethodDefaultUndefinedTestInterfaceEmptyArgMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"voidMethodDefaultUndefinedLongArg", TestObjectV8Internal::voidMethodDefaultUndefinedLongArgMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"voidMethodDefaultUndefinedStringArg", TestObjectV8Internal::voidMethodDefaultUndefinedStringArgMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"voidMethodEnforceRangeLongArg", TestObjectV8Internal::voidMethodEnforceRangeLongArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"voidMethodTreatNullAsEmptyStringStringArg", TestObjectV8Internal::voidMethodTreatNullAsEmptyStringStringArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"voidMethodTreatNullAsNullStringStringArg", TestObjectV8Internal::voidMethodTreatNullAsNullStringStringArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"voidMethodTreatNullAsNullStringTreatUndefinedAsNullStringStringArg", TestObjectV8Internal::voidMethodTreatNullAsNullStringTreatUndefinedAsNullStringStringArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"activityLoggingAccessForAllWorldsMethod", TestObjectV8Internal::activityLoggingAccessForAllWorldsMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"callWithExecutionContextVoidMethod", TestObjectV8Internal::callWithExecutionContextVoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"callWithScriptStateVoidMethod", TestObjectV8Internal::callWithScriptStateVoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"callWithScriptStateLongMethod", TestObjectV8Internal::callWithScriptStateLongMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"callWithScriptStateExecutionContextVoidMethod", TestObjectV8Internal::callWithScriptStateExecutionContextVoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"callWithScriptStateScriptArgumentsVoidMethod", TestObjectV8Internal::callWithScriptStateScriptArgumentsVoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"callWithScriptStateScriptArgumentsVoidMethodOptionalBooleanArg", TestObjectV8Internal::callWithScriptStateScriptArgumentsVoidMethodOptionalBooleanArgMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"callWithCurrentWindow", TestObjectV8Internal::callWithCurrentWindowMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"callWithCurrentWindowScriptWindow", TestObjectV8Internal::callWithCurrentWindowScriptWindowMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"callWithThisValue", TestObjectV8Internal::callWithThisValueMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"checkSecurityForNodeVoidMethod", TestObjectV8Internal::checkSecurityForNodeVoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"customVoidMethod", TestObjectV8Internal::customVoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"customCallPrologueVoidMethod", TestObjectV8Internal::customCallPrologueVoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"customCallEpilogueVoidMethod", TestObjectV8Internal::customCallEpilogueVoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"customElementCallbacksVoidMethod", TestObjectV8Internal::customElementCallbacksVoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"deprecatedVoidMethod", TestObjectV8Internal::deprecatedVoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"implementedAsVoidMethod", TestObjectV8Internal::implementedAsVoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"measureAsVoidMethod", TestObjectV8Internal::measureAsVoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"measureMethod", TestObjectV8Internal::measureMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"measureOverloadedMethod", TestObjectV8Internal::measureOverloadedMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"DeprecateAsOverloadedMethod", TestObjectV8Internal::DeprecateAsOverloadedMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"DeprecateAsSameValueOverloadedMethod", TestObjectV8Internal::DeprecateAsSameValueOverloadedMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"measureAsOverloadedMethod", TestObjectV8Internal::measureAsOverloadedMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"measureAsSameValueOverloadedMethod", TestObjectV8Internal::measureAsSameValueOverloadedMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"deprecateAsMeasureAsSameValueOverloadedMethod", TestObjectV8Internal::deprecateAsMeasureAsSameValueOverloadedMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"deprecateAsSameValueMeasureAsOverloadedMethod", TestObjectV8Internal::deprecateAsSameValueMeasureAsOverloadedMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"deprecateAsSameValueMeasureAsSameValueOverloadedMethod", TestObjectV8Internal::deprecateAsSameValueMeasureAsSameValueOverloadedMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"notEnumerableVoidMethod", TestObjectV8Internal::notEnumerableVoidMethodMethodCallback, 0, 0, static_cast<v8::PropertyAttribute>(v8::DontEnum), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"originTrialEnabledVoidMethod", TestObjectV8Internal::originTrialEnabledVoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"perWorldBindingsOriginTrialEnabledVoidMethod", TestObjectV8Internal::perWorldBindingsOriginTrialEnabledVoidMethodMethodCallback, TestObjectV8Internal::perWorldBindingsOriginTrialEnabledVoidMethodMethodCallbackForMainWorld, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"originTrialEnabledOverloadedVoidMethod", TestObjectV8Internal::originTrialEnabledOverloadedVoidMethodMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"partiallyOriginTrialEnabledOverloadedVoidMethod", TestObjectV8Internal::partiallyOriginTrialEnabledOverloadedVoidMethodMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"perWorldBindingsVoidMethod", TestObjectV8Internal::perWorldBindingsVoidMethodMethodCallback, TestObjectV8Internal::perWorldBindingsVoidMethodMethodCallbackForMainWorld, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"perWorldBindingsVoidMethodTestInterfaceEmptyArg", TestObjectV8Internal::perWorldBindingsVoidMethodTestInterfaceEmptyArgMethodCallback, TestObjectV8Internal::perWorldBindingsVoidMethodTestInterfaceEmptyArgMethodCallbackForMainWorld, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"postMessage", TestObjectV8Internal::postMessageMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"activityLoggingForAllWorldsPerWorldBindingsVoidMethod", TestObjectV8Internal::activityLoggingForAllWorldsPerWorldBindingsVoidMethodMethodCallback, TestObjectV8Internal::activityLoggingForAllWorldsPerWorldBindingsVoidMethodMethodCallbackForMainWorld, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethod", TestObjectV8Internal::activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethodMethodCallback, TestObjectV8Internal::activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethodMethodCallbackForMainWorld, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"raisesExceptionVoidMethod", TestObjectV8Internal::raisesExceptionVoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"raisesExceptionStringMethod", TestObjectV8Internal::raisesExceptionStringMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"raisesExceptionVoidMethodOptionalLongArg", TestObjectV8Internal::raisesExceptionVoidMethodOptionalLongArgMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"raisesExceptionVoidMethodTestCallbackInterfaceArg", TestObjectV8Internal::raisesExceptionVoidMethodTestCallbackInterfaceArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"raisesExceptionVoidMethodOptionalTestCallbackInterfaceArg", TestObjectV8Internal::raisesExceptionVoidMethodOptionalTestCallbackInterfaceArgMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"raisesExceptionTestInterfaceEmptyVoidMethod", TestObjectV8Internal::raisesExceptionTestInterfaceEmptyVoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"raisesExceptionXPathNSResolverVoidMethod", TestObjectV8Internal::raisesExceptionXPathNSResolverVoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"callWithExecutionContextRaisesExceptionVoidMethodLongArg", TestObjectV8Internal::callWithExecutionContextRaisesExceptionVoidMethodLongArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"legacyInterfaceTypeCheckingVoidMethodTestInterfaceEmptyArg", TestObjectV8Internal::legacyInterfaceTypeCheckingVoidMethodTestInterfaceEmptyArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"legacyInterfaceTypeCheckingVoidMethodTestInterfaceEmptyVariadicArg", TestObjectV8Internal::legacyInterfaceTypeCheckingVoidMethodTestInterfaceEmptyVariadicArgMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"useToImpl4ArgumentsCheckingIfPossibleWithOptionalArg", TestObjectV8Internal::useToImpl4ArgumentsCheckingIfPossibleWithOptionalArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"useToImpl4ArgumentsCheckingIfPossibleWithNullableArg", TestObjectV8Internal::useToImpl4ArgumentsCheckingIfPossibleWithNullableArgMethodCallback, 0, 2, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"useToImpl4ArgumentsCheckingIfPossibleWithUndefinedArg", TestObjectV8Internal::useToImpl4ArgumentsCheckingIfPossibleWithUndefinedArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"unforgeableVoidMethod", TestObjectV8Internal::unforgeableVoidMethodMethodCallback, 0, 0, static_cast<v8::PropertyAttribute>(v8::ReadOnly | v8::DontDelete), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance}, |
| {"voidMethodTestInterfaceGarbageCollectedSequenceArg", TestObjectV8Internal::voidMethodTestInterfaceGarbageCollectedSequenceArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"voidMethodTestInterfaceGarbageCollectedArrayArg", TestObjectV8Internal::voidMethodTestInterfaceGarbageCollectedArrayArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"newObjectTestInterfaceMethod", TestObjectV8Internal::newObjectTestInterfaceMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"serializerMethod", TestObjectV8Internal::serializerMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"voidMethodImplementedInPrivateScript", TestObjectV8Internal::voidMethodImplementedInPrivateScriptMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"shortMethodImplementedInPrivateScript", TestObjectV8Internal::shortMethodImplementedInPrivateScriptMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"shortMethodWithShortArgumentImplementedInPrivateScript", TestObjectV8Internal::shortMethodWithShortArgumentImplementedInPrivateScriptMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"stringMethodWithStringArgumentImplementedInPrivateScript", TestObjectV8Internal::stringMethodWithStringArgumentImplementedInPrivateScriptMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"nodeMethodWithNodeArgumentImplementedInPrivateScript", TestObjectV8Internal::nodeMethodWithNodeArgumentImplementedInPrivateScriptMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"nodeMethodWithVariousArgumentsImplementedInPrivateScript", TestObjectV8Internal::nodeMethodWithVariousArgumentsImplementedInPrivateScriptMethodCallback, 0, 5, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"methodImplementedInCPPForPrivateScriptOnly", TestObjectV8Internal::methodImplementedInCPPForPrivateScriptOnlyMethodCallback, 0, 2, v8::None, V8DOMConfiguration::OnlyExposedToPrivateScript, V8DOMConfiguration::OnPrototype}, |
| {"keys", TestObjectV8Internal::keysMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"values", TestObjectV8Internal::valuesMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"entries", TestObjectV8Internal::entriesMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"forEach", TestObjectV8Internal::forEachMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"has", TestObjectV8Internal::hasMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"get", TestObjectV8Internal::getMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"clear", TestObjectV8Internal::clearMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"delete", TestObjectV8Internal::deleteMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"set", TestObjectV8Internal::setMethodCallback, 0, 2, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"toJSON", TestObjectV8Internal::toJSONMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| {"toString", TestObjectV8Internal::toStringMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| }; |
| |
| static void installV8TestObjectTemplate(v8::Isolate* isolate, const DOMWrapperWorld& world, v8::Local<v8::FunctionTemplate> interfaceTemplate) |
| { |
| // Initialize the interface object's template. |
| V8DOMConfiguration::initializeDOMInterfaceTemplate(isolate, interfaceTemplate, V8TestObject::wrapperTypeInfo.interfaceName, v8::Local<v8::FunctionTemplate>(), V8TestObject::internalFieldCount); |
| v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interfaceTemplate); |
| ALLOW_UNUSED_LOCAL(signature); |
| v8::Local<v8::ObjectTemplate> instanceTemplate = interfaceTemplate->InstanceTemplate(); |
| ALLOW_UNUSED_LOCAL(instanceTemplate); |
| v8::Local<v8::ObjectTemplate> prototypeTemplate = interfaceTemplate->PrototypeTemplate(); |
| ALLOW_UNUSED_LOCAL(prototypeTemplate); |
| // Register DOM constants, attributes and operations. |
| const V8DOMConfiguration::ConstantConfiguration V8TestObjectConstants[] = { |
| {"CONST_VALUE_0", 0, 0, V8DOMConfiguration::ConstantTypeUnsignedShort}, |
| {"CONST_VALUE_1", 1, 0, V8DOMConfiguration::ConstantTypeUnsignedShort}, |
| {"CONST_VALUE_2", 2, 0, V8DOMConfiguration::ConstantTypeUnsignedShort}, |
| {"CONST_VALUE_4", 4, 0, V8DOMConfiguration::ConstantTypeUnsignedShort}, |
| {"CONST_VALUE_8", 8, 0, V8DOMConfiguration::ConstantTypeUnsignedShort}, |
| {"CONST_VALUE_9", -1, 0, V8DOMConfiguration::ConstantTypeShort}, |
| {"CONST_VALUE_11", 0xffffffff, 0, V8DOMConfiguration::ConstantTypeUnsignedShort}, |
| {"CONST_VALUE_12", 0x01, 0, V8DOMConfiguration::ConstantTypeUnsignedShort}, |
| {"CONST_VALUE_13", 0X20, 0, V8DOMConfiguration::ConstantTypeUnsignedShort}, |
| {"CONST_VALUE_14", 0x1abc, 0, V8DOMConfiguration::ConstantTypeUnsignedShort}, |
| {"CONST_VALUE_15", 010, 0, V8DOMConfiguration::ConstantTypeUnsignedShort}, |
| {"CONST_VALUE_16", -010, 0, V8DOMConfiguration::ConstantTypeUnsignedShort}, |
| {"CONST_VALUE_16", -0x1A, 0, V8DOMConfiguration::ConstantTypeUnsignedShort}, |
| {"CONST_VALUE_17", -0X1a, 0, V8DOMConfiguration::ConstantTypeUnsignedShort}, |
| {"CONST_VALUE_18", 0, 0.123, V8DOMConfiguration::ConstantTypeDouble}, |
| {"CONST_VALUE_19", 0, 4e9, V8DOMConfiguration::ConstantTypeDouble}, |
| {"CONST_VALUE_20", 0, 3.4e5, V8DOMConfiguration::ConstantTypeDouble}, |
| {"CONST_VALUE_21", 0, -1.3, V8DOMConfiguration::ConstantTypeDouble}, |
| {"CONST_VALUE_22", 0, -4e-9, V8DOMConfiguration::ConstantTypeDouble}, |
| {"CONST_VALUE_23", 0, .123, V8DOMConfiguration::ConstantTypeDouble}, |
| {"CONST_VALUE_24", 0, 5E+4, V8DOMConfiguration::ConstantTypeDouble}, |
| {"CONST_VALUE_25", 0, 1, V8DOMConfiguration::ConstantTypeFloat}, |
| {"CONST_JAVASCRIPT", 1, 0, V8DOMConfiguration::ConstantTypeShort}, |
| }; |
| V8DOMConfiguration::installConstants(isolate, interfaceTemplate, prototypeTemplate, V8TestObjectConstants, WTF_ARRAY_LENGTH(V8TestObjectConstants)); |
| if (RuntimeEnabledFeatures::featureName1Enabled()) { |
| const V8DOMConfiguration::ConstantConfiguration constantFeature1EnabledConst1Configuration = {"FEATURE1_ENABLED_CONST1", 1, 0, V8DOMConfiguration::ConstantTypeShort}; |
| V8DOMConfiguration::installConstant(isolate, interfaceTemplate, prototypeTemplate, constantFeature1EnabledConst1Configuration); |
| const V8DOMConfiguration::ConstantConfiguration constantFeature1EnabledConst2Configuration = {"FEATURE1_ENABLED_CONST2", 2, 0, V8DOMConfiguration::ConstantTypeShort}; |
| V8DOMConfiguration::installConstant(isolate, interfaceTemplate, prototypeTemplate, constantFeature1EnabledConst2Configuration); |
| } |
| if (RuntimeEnabledFeatures::featureName2Enabled()) { |
| const V8DOMConfiguration::ConstantConfiguration constantFeature2EnabledConst1Configuration = {"FEATURE2_ENABLED_CONST1", 3, 0, V8DOMConfiguration::ConstantTypeShort}; |
| V8DOMConfiguration::installConstant(isolate, interfaceTemplate, prototypeTemplate, constantFeature2EnabledConst1Configuration); |
| const V8DOMConfiguration::ConstantConfiguration constantFeature2EnabledConst2Configuration = {"FEATURE2_ENABLED_CONST2", 4, 0, V8DOMConfiguration::ConstantTypeShort}; |
| V8DOMConfiguration::installConstant(isolate, interfaceTemplate, prototypeTemplate, constantFeature2EnabledConst2Configuration); |
| } |
| if (RuntimeEnabledFeatures::featureName3Enabled()) { |
| const V8DOMConfiguration::ConstantConfiguration constantFeature3EnabledConst1Configuration = {"FEATURE3_ENABLED_CONST1", 5, 0, V8DOMConfiguration::ConstantTypeShort}; |
| V8DOMConfiguration::installConstant(isolate, interfaceTemplate, prototypeTemplate, constantFeature3EnabledConst1Configuration); |
| } |
| V8DOMConfiguration::installConstantWithGetter(isolate, interfaceTemplate, prototypeTemplate, "DEPRECATED_CONSTANT", TestObjectV8Internal::DEPRECATED_CONSTANTConstantGetterCallback); |
| V8DOMConfiguration::installConstantWithGetter(isolate, interfaceTemplate, prototypeTemplate, "MEASURED_CONSTANT", TestObjectV8Internal::MEASURED_CONSTANTConstantGetterCallback); |
| V8DOMConfiguration::installConstantWithGetter(isolate, interfaceTemplate, prototypeTemplate, "FEATURE1_ORIGIN_TRIAL_ENABLED_CONST1", TestObjectV8Internal::FEATURE1_ORIGIN_TRIAL_ENABLED_CONST1ConstantGetterCallback); |
| V8DOMConfiguration::installConstantWithGetter(isolate, interfaceTemplate, prototypeTemplate, "FEATURE1_ORIGIN_TRIAL_ENABLED_CONST2", TestObjectV8Internal::FEATURE1_ORIGIN_TRIAL_ENABLED_CONST2ConstantGetterCallback); |
| V8DOMConfiguration::installConstantWithGetter(isolate, interfaceTemplate, prototypeTemplate, "FEATURE2_ORIGIN_TRIAL_ENABLED_CONST1", TestObjectV8Internal::FEATURE2_ORIGIN_TRIAL_ENABLED_CONST1ConstantGetterCallback); |
| V8DOMConfiguration::installConstantWithGetter(isolate, interfaceTemplate, prototypeTemplate, "FEATURE2_ORIGIN_TRIAL_ENABLED_CONST2", TestObjectV8Internal::FEATURE2_ORIGIN_TRIAL_ENABLED_CONST2ConstantGetterCallback); |
| V8DOMConfiguration::installConstantWithGetter(isolate, interfaceTemplate, prototypeTemplate, "FEATURE3_ORIGIN_TRIAL_ENABLED_CONST1", TestObjectV8Internal::FEATURE3_ORIGIN_TRIAL_ENABLED_CONST1ConstantGetterCallback); |
| static_assert(0 == TestObject::CONST_VALUE_0, "the value of TestObject_CONST_VALUE_0 does not match with implementation"); |
| static_assert(1 == TestObject::CONST_VALUE_1, "the value of TestObject_CONST_VALUE_1 does not match with implementation"); |
| static_assert(2 == TestObject::CONST_VALUE_2, "the value of TestObject_CONST_VALUE_2 does not match with implementation"); |
| static_assert(4 == TestObject::CONST_VALUE_4, "the value of TestObject_CONST_VALUE_4 does not match with implementation"); |
| static_assert(8 == TestObject::CONST_VALUE_8, "the value of TestObject_CONST_VALUE_8 does not match with implementation"); |
| static_assert(-1 == TestObject::CONST_VALUE_9, "the value of TestObject_CONST_VALUE_9 does not match with implementation"); |
| static_assert(0xffffffff == TestObject::CONST_VALUE_11, "the value of TestObject_CONST_VALUE_11 does not match with implementation"); |
| static_assert(0x01 == TestObject::CONST_VALUE_12, "the value of TestObject_CONST_VALUE_12 does not match with implementation"); |
| static_assert(0X20 == TestObject::CONST_VALUE_13, "the value of TestObject_CONST_VALUE_13 does not match with implementation"); |
| static_assert(0x1abc == TestObject::CONST_VALUE_14, "the value of TestObject_CONST_VALUE_14 does not match with implementation"); |
| static_assert(010 == TestObject::CONST_VALUE_15, "the value of TestObject_CONST_VALUE_15 does not match with implementation"); |
| static_assert(-010 == TestObject::CONST_VALUE_16, "the value of TestObject_CONST_VALUE_16 does not match with implementation"); |
| static_assert(-0x1A == TestObject::CONST_VALUE_16, "the value of TestObject_CONST_VALUE_16 does not match with implementation"); |
| static_assert(-0X1a == TestObject::CONST_VALUE_17, "the value of TestObject_CONST_VALUE_17 does not match with implementation"); |
| static_assert(1 == TestObject::DEPRECATED_CONSTANT, "the value of TestObject_DEPRECATED_CONSTANT does not match with implementation"); |
| static_assert(1 == TestObject::MEASURED_CONSTANT, "the value of TestObject_MEASURED_CONSTANT does not match with implementation"); |
| static_assert(1 == TestObject::FEATURE1_ENABLED_CONST1, "the value of TestObject_FEATURE1_ENABLED_CONST1 does not match with implementation"); |
| static_assert(2 == TestObject::FEATURE1_ENABLED_CONST2, "the value of TestObject_FEATURE1_ENABLED_CONST2 does not match with implementation"); |
| static_assert(3 == TestObject::FEATURE2_ENABLED_CONST1, "the value of TestObject_FEATURE2_ENABLED_CONST1 does not match with implementation"); |
| static_assert(4 == TestObject::FEATURE2_ENABLED_CONST2, "the value of TestObject_FEATURE2_ENABLED_CONST2 does not match with implementation"); |
| static_assert(5 == TestObject::FEATURE3_ENABLED_CONST1, "the value of TestObject_FEATURE3_ENABLED_CONST1 does not match with implementation"); |
| static_assert(1 == TestObject::FEATURE1_ORIGIN_TRIAL_ENABLED_CONST1, "the value of TestObject_FEATURE1_ORIGIN_TRIAL_ENABLED_CONST1 does not match with implementation"); |
| static_assert(2 == TestObject::FEATURE1_ORIGIN_TRIAL_ENABLED_CONST2, "the value of TestObject_FEATURE1_ORIGIN_TRIAL_ENABLED_CONST2 does not match with implementation"); |
| static_assert(3 == TestObject::FEATURE2_ORIGIN_TRIAL_ENABLED_CONST1, "the value of TestObject_FEATURE2_ORIGIN_TRIAL_ENABLED_CONST1 does not match with implementation"); |
| static_assert(4 == TestObject::FEATURE2_ORIGIN_TRIAL_ENABLED_CONST2, "the value of TestObject_FEATURE2_ORIGIN_TRIAL_ENABLED_CONST2 does not match with implementation"); |
| static_assert(5 == TestObject::FEATURE3_ORIGIN_TRIAL_ENABLED_CONST1, "the value of TestObject_FEATURE3_ORIGIN_TRIAL_ENABLED_CONST1 does not match with implementation"); |
| static_assert(1 == TestObject::CONST_IMPL, "the value of TestObject_CONST_IMPL does not match with implementation"); |
| V8DOMConfiguration::installAttributes(isolate, world, instanceTemplate, prototypeTemplate, V8TestObjectAttributes, WTF_ARRAY_LENGTH(V8TestObjectAttributes)); |
| V8DOMConfiguration::installAccessors(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, V8TestObjectAccessors, WTF_ARRAY_LENGTH(V8TestObjectAccessors)); |
| V8DOMConfiguration::installMethods(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, V8TestObjectMethods, WTF_ARRAY_LENGTH(V8TestObjectMethods)); |
| |
| if (RuntimeEnabledFeatures::featureNameEnabled()) { |
| const V8DOMConfiguration::AccessorConfiguration accessorruntimeEnabledLongAttributeConfiguration = \ |
| {"runtimeEnabledLongAttribute", TestObjectV8Internal::runtimeEnabledLongAttributeAttributeGetterCallback, TestObjectV8Internal::runtimeEnabledLongAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; |
| V8DOMConfiguration::installAccessor(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, accessorruntimeEnabledLongAttributeConfiguration); |
| const V8DOMConfiguration::AccessorConfiguration accessorunscopeableRuntimeEnabledLongAttributeConfiguration = \ |
| {"unscopeableRuntimeEnabledLongAttribute", TestObjectV8Internal::unscopeableRuntimeEnabledLongAttributeAttributeGetterCallback, TestObjectV8Internal::unscopeableRuntimeEnabledLongAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; |
| V8DOMConfiguration::installAccessor(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, accessorunscopeableRuntimeEnabledLongAttributeConfiguration); |
| } |
| |
| // Indexed properties |
| v8::IndexedPropertyHandlerConfiguration indexedPropertyHandlerConfig(TestObjectV8Internal::indexedPropertyGetterCallback, TestObjectV8Internal::indexedPropertySetterCallback, 0, TestObjectV8Internal::indexedPropertyDeleterCallback, indexedPropertyEnumerator<TestObject>, v8::Local<v8::Value>(), v8::PropertyHandlerFlags::kNone); |
| instanceTemplate->SetHandler(indexedPropertyHandlerConfig); |
| // Named properties |
| v8::NamedPropertyHandlerConfiguration namedPropertyHandlerConfig(TestObjectV8Internal::namedPropertyGetterCallback, TestObjectV8Internal::namedPropertySetterCallback, TestObjectV8Internal::namedPropertyQueryCallback, TestObjectV8Internal::namedPropertyDeleterCallback, TestObjectV8Internal::namedPropertyEnumeratorCallback, v8::Local<v8::Value>(), static_cast<v8::PropertyHandlerFlags>(int(v8::PropertyHandlerFlags::kOnlyInterceptStrings) | int(v8::PropertyHandlerFlags::kNonMasking))); |
| instanceTemplate->SetHandler(namedPropertyHandlerConfig); |
| |
| // Iterator (@@iterator) |
| const V8DOMConfiguration::SymbolKeyedMethodConfiguration symbolKeyedIteratorConfiguration = { v8::Symbol::GetIterator, TestObjectV8Internal::iteratorMethodCallback, 0, v8::DontDelete, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype }; |
| V8DOMConfiguration::installMethod(isolate, world, prototypeTemplate, signature, symbolKeyedIteratorConfiguration); |
| |
| if (RuntimeEnabledFeatures::featureNameEnabled()) { |
| const V8DOMConfiguration::MethodConfiguration unscopeableRuntimeEnabledVoidMethodMethodConfiguration = {"unscopeableRuntimeEnabledVoidMethod", TestObjectV8Internal::unscopeableRuntimeEnabledVoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}; |
| V8DOMConfiguration::installMethod(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, unscopeableRuntimeEnabledVoidMethodMethodConfiguration); |
| } |
| if (RuntimeEnabledFeatures::featureNameEnabled()) { |
| const V8DOMConfiguration::MethodConfiguration runtimeEnabledVoidMethodMethodConfiguration = {"runtimeEnabledVoidMethod", TestObjectV8Internal::runtimeEnabledVoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}; |
| V8DOMConfiguration::installMethod(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, runtimeEnabledVoidMethodMethodConfiguration); |
| } |
| if (RuntimeEnabledFeatures::featureNameEnabled()) { |
| const V8DOMConfiguration::MethodConfiguration perWorldBindingsRuntimeEnabledVoidMethodMethodConfiguration = {"perWorldBindingsRuntimeEnabledVoidMethod", TestObjectV8Internal::perWorldBindingsRuntimeEnabledVoidMethodMethodCallback, TestObjectV8Internal::perWorldBindingsRuntimeEnabledVoidMethodMethodCallbackForMainWorld, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}; |
| V8DOMConfiguration::installMethod(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, perWorldBindingsRuntimeEnabledVoidMethodMethodConfiguration); |
| } |
| if (RuntimeEnabledFeatures::featureNameEnabled()) { |
| const V8DOMConfiguration::MethodConfiguration runtimeEnabledOverloadedVoidMethodMethodConfiguration = {"runtimeEnabledOverloadedVoidMethod", TestObjectV8Internal::runtimeEnabledOverloadedVoidMethodMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}; |
| V8DOMConfiguration::installMethod(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, runtimeEnabledOverloadedVoidMethodMethodConfiguration); |
| } |
| const V8DOMConfiguration::MethodConfiguration partiallyRuntimeEnabledOverloadedVoidMethodMethodConfiguration = {"partiallyRuntimeEnabledOverloadedVoidMethod", TestObjectV8Internal::partiallyRuntimeEnabledOverloadedVoidMethodMethodCallback, 0, TestObjectV8Internal::partiallyRuntimeEnabledOverloadedVoidMethodMethodLength(), v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}; |
| V8DOMConfiguration::installMethod(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, partiallyRuntimeEnabledOverloadedVoidMethodMethodConfiguration); |
| } |
| |
| v8::Local<v8::FunctionTemplate> V8TestObject::domTemplate(v8::Isolate* isolate, const DOMWrapperWorld& world) |
| { |
| return V8DOMConfiguration::domClassTemplate(isolate, world, const_cast<WrapperTypeInfo*>(&wrapperTypeInfo), installV8TestObjectTemplate); |
| } |
| |
| bool V8TestObject::hasInstance(v8::Local<v8::Value> v8Value, v8::Isolate* isolate) |
| { |
| return V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, v8Value); |
| } |
| |
| v8::Local<v8::Object> V8TestObject::findInstanceInPrototypeChain(v8::Local<v8::Value> v8Value, v8::Isolate* isolate) |
| { |
| return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrapperTypeInfo, v8Value); |
| } |
| |
| TestObject* V8TestObject::toImplWithTypeCheck(v8::Isolate* isolate, v8::Local<v8::Value> value) |
| { |
| return hasInstance(value, isolate) ? toImpl(v8::Local<v8::Object>::Cast(value)) : 0; |
| } |
| |
| void V8TestObject::preparePrototypeAndInterfaceObject(v8::Local<v8::Context> context, const DOMWrapperWorld& world, v8::Local<v8::Object> prototypeObject, v8::Local<v8::Function> interfaceObject, v8::Local<v8::FunctionTemplate> interfaceTemplate) |
| { |
| v8::Isolate* isolate = context->GetIsolate(); |
| v8::Local<v8::Name> unscopablesSymbol(v8::Symbol::GetUnscopables(isolate)); |
| v8::Local<v8::Object> unscopeables; |
| if (v8CallBoolean(prototypeObject->HasOwnProperty(context, unscopablesSymbol))) |
| unscopeables = prototypeObject->Get(context, unscopablesSymbol).ToLocalChecked().As<v8::Object>(); |
| else |
| unscopeables = v8::Object::New(isolate); |
| unscopeables->CreateDataProperty(context, v8AtomicString(isolate, "unscopeableLongAttribute"), v8::True(isolate)).FromJust(); |
| unscopeables->CreateDataProperty(context, v8AtomicString(isolate, "unscopeableOriginTrialEnabledLongAttribute"), v8::True(isolate)).FromJust(); |
| if (RuntimeEnabledFeatures::featureNameEnabled()) { |
| unscopeables->CreateDataProperty(context, v8AtomicString(isolate, "unscopeableRuntimeEnabledLongAttribute"), v8::True(isolate)).FromJust(); |
| } |
| if (RuntimeEnabledFeatures::featureNameEnabled()) { |
| unscopeables->CreateDataProperty(context, v8AtomicString(isolate, "unscopeableRuntimeEnabledVoidMethod"), v8::True(isolate)).FromJust(); |
| } |
| unscopeables->CreateDataProperty(context, v8AtomicString(isolate, "unscopeableVoidMethod"), v8::True(isolate)).FromJust(); |
| prototypeObject->CreateDataProperty(context, unscopablesSymbol, unscopeables).FromJust(); |
| } |
| |
| bool V8TestObject::PrivateScript::voidMethodImplementedInPrivateScriptMethod(LocalFrame* frame, TestObject* holderImpl) |
| { |
| if (!frame) |
| return false; |
| v8::HandleScope handleScope(toIsolate(frame)); |
| ScriptForbiddenScope::AllowUserAgentScript script; |
| ScriptState* scriptState = ScriptState::forWorld(frame, DOMWrapperWorld::privateScriptIsolatedWorld()); |
| if (!scriptState) |
| return false; |
| ScriptState* scriptStateInUserScript = ScriptState::forMainWorld(frame); |
| if (!scriptStateInUserScript) |
| return false; |
| |
| ScriptState::Scope scope(scriptState); |
| v8::Local<v8::Value> holder = toV8(holderImpl, scriptState->context()->Global(), scriptState->isolate()); |
| if (holder.IsEmpty()) |
| return false; |
| |
| v8::Local<v8::Value> *argv = 0; |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodImplementedInPrivateScript", "TestObject", scriptState->context()->Global(), scriptState->isolate()); |
| v8::Local<v8::Value> v8Value = PrivateScriptRunner::runDOMMethod(scriptState, scriptStateInUserScript, "TestObject", "voidMethodImplementedInPrivateScript", holder, 0, argv); |
| if (v8Value.IsEmpty()) |
| return false; |
| RELEASE_ASSERT(!exceptionState.hadException()); |
| return true; |
| } |
| |
| bool V8TestObject::PrivateScript::shortMethodImplementedInPrivateScriptMethod(LocalFrame* frame, TestObject* holderImpl, int* result) |
| { |
| if (!frame) |
| return false; |
| v8::HandleScope handleScope(toIsolate(frame)); |
| ScriptForbiddenScope::AllowUserAgentScript script; |
| ScriptState* scriptState = ScriptState::forWorld(frame, DOMWrapperWorld::privateScriptIsolatedWorld()); |
| if (!scriptState) |
| return false; |
| ScriptState* scriptStateInUserScript = ScriptState::forMainWorld(frame); |
| if (!scriptStateInUserScript) |
| return false; |
| |
| ScriptState::Scope scope(scriptState); |
| v8::Local<v8::Value> holder = toV8(holderImpl, scriptState->context()->Global(), scriptState->isolate()); |
| if (holder.IsEmpty()) |
| return false; |
| |
| v8::Local<v8::Value> *argv = 0; |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "shortMethodImplementedInPrivateScript", "TestObject", scriptState->context()->Global(), scriptState->isolate()); |
| v8::Local<v8::Value> v8Value = PrivateScriptRunner::runDOMMethod(scriptState, scriptStateInUserScript, "TestObject", "shortMethodImplementedInPrivateScript", holder, 0, argv); |
| if (v8Value.IsEmpty()) |
| return false; |
| int cppValue = toInt16(scriptState->isolate(), v8Value, NormalConversion, exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return false; |
| *result = cppValue; |
| RELEASE_ASSERT(!exceptionState.hadException()); |
| return true; |
| } |
| |
| bool V8TestObject::PrivateScript::shortMethodWithShortArgumentImplementedInPrivateScriptMethod(LocalFrame* frame, TestObject* holderImpl, int value, int* result) |
| { |
| if (!frame) |
| return false; |
| v8::HandleScope handleScope(toIsolate(frame)); |
| ScriptForbiddenScope::AllowUserAgentScript script; |
| ScriptState* scriptState = ScriptState::forWorld(frame, DOMWrapperWorld::privateScriptIsolatedWorld()); |
| if (!scriptState) |
| return false; |
| ScriptState* scriptStateInUserScript = ScriptState::forMainWorld(frame); |
| if (!scriptStateInUserScript) |
| return false; |
| |
| ScriptState::Scope scope(scriptState); |
| v8::Local<v8::Value> holder = toV8(holderImpl, scriptState->context()->Global(), scriptState->isolate()); |
| if (holder.IsEmpty()) |
| return false; |
| |
| v8::Local<v8::Value> valueHandle = v8::Integer::New(scriptState->isolate(), value); |
| v8::Local<v8::Value> argv[] = { valueHandle }; |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "shortMethodWithShortArgumentImplementedInPrivateScript", "TestObject", scriptState->context()->Global(), scriptState->isolate()); |
| v8::Local<v8::Value> v8Value = PrivateScriptRunner::runDOMMethod(scriptState, scriptStateInUserScript, "TestObject", "shortMethodWithShortArgumentImplementedInPrivateScript", holder, 1, argv); |
| if (v8Value.IsEmpty()) |
| return false; |
| int cppValue = toInt16(scriptState->isolate(), v8Value, NormalConversion, exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return false; |
| *result = cppValue; |
| RELEASE_ASSERT(!exceptionState.hadException()); |
| return true; |
| } |
| |
| bool V8TestObject::PrivateScript::stringMethodWithStringArgumentImplementedInPrivateScriptMethod(LocalFrame* frame, TestObject* holderImpl, String value, String* result) |
| { |
| if (!frame) |
| return false; |
| v8::HandleScope handleScope(toIsolate(frame)); |
| ScriptForbiddenScope::AllowUserAgentScript script; |
| ScriptState* scriptState = ScriptState::forWorld(frame, DOMWrapperWorld::privateScriptIsolatedWorld()); |
| if (!scriptState) |
| return false; |
| ScriptState* scriptStateInUserScript = ScriptState::forMainWorld(frame); |
| if (!scriptStateInUserScript) |
| return false; |
| |
| ScriptState::Scope scope(scriptState); |
| v8::Local<v8::Value> holder = toV8(holderImpl, scriptState->context()->Global(), scriptState->isolate()); |
| if (holder.IsEmpty()) |
| return false; |
| |
| v8::Local<v8::Value> valueHandle = v8String(scriptState->isolate(), value); |
| v8::Local<v8::Value> argv[] = { valueHandle }; |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "stringMethodWithStringArgumentImplementedInPrivateScript", "TestObject", scriptState->context()->Global(), scriptState->isolate()); |
| v8::Local<v8::Value> v8Value = PrivateScriptRunner::runDOMMethod(scriptState, scriptStateInUserScript, "TestObject", "stringMethodWithStringArgumentImplementedInPrivateScript", holder, 1, argv); |
| if (v8Value.IsEmpty()) |
| return false; |
| V8StringResource<> cppValue = v8Value; |
| if (!cppValue.prepare()) |
| return false; |
| *result = cppValue; |
| RELEASE_ASSERT(!exceptionState.hadException()); |
| return true; |
| } |
| |
| bool V8TestObject::PrivateScript::nodeMethodWithNodeArgumentImplementedInPrivateScriptMethod(LocalFrame* frame, TestObject* holderImpl, Node* value, Node** result) |
| { |
| if (!frame) |
| return false; |
| v8::HandleScope handleScope(toIsolate(frame)); |
| ScriptForbiddenScope::AllowUserAgentScript script; |
| ScriptState* scriptState = ScriptState::forWorld(frame, DOMWrapperWorld::privateScriptIsolatedWorld()); |
| if (!scriptState) |
| return false; |
| ScriptState* scriptStateInUserScript = ScriptState::forMainWorld(frame); |
| if (!scriptStateInUserScript) |
| return false; |
| |
| ScriptState::Scope scope(scriptState); |
| v8::Local<v8::Value> holder = toV8(holderImpl, scriptState->context()->Global(), scriptState->isolate()); |
| if (holder.IsEmpty()) |
| return false; |
| |
| v8::Local<v8::Value> valueHandle = toV8(value, scriptState->context()->Global(), scriptState->isolate()); |
| v8::Local<v8::Value> argv[] = { valueHandle }; |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "nodeMethodWithNodeArgumentImplementedInPrivateScript", "TestObject", scriptState->context()->Global(), scriptState->isolate()); |
| v8::Local<v8::Value> v8Value = PrivateScriptRunner::runDOMMethod(scriptState, scriptStateInUserScript, "TestObject", "nodeMethodWithNodeArgumentImplementedInPrivateScript", holder, 1, argv); |
| if (v8Value.IsEmpty()) |
| return false; |
| Node* cppValue = V8Node::toImplWithTypeCheck(scriptState->isolate(), v8Value); |
| *result = cppValue; |
| RELEASE_ASSERT(!exceptionState.hadException()); |
| return true; |
| } |
| |
| bool V8TestObject::PrivateScript::nodeMethodWithVariousArgumentsImplementedInPrivateScriptMethod(LocalFrame* frame, TestObject* holderImpl, Document* document, Node* node, int value1, double value2, String string, Node** result) |
| { |
| if (!frame) |
| return false; |
| v8::HandleScope handleScope(toIsolate(frame)); |
| ScriptForbiddenScope::AllowUserAgentScript script; |
| ScriptState* scriptState = ScriptState::forWorld(frame, DOMWrapperWorld::privateScriptIsolatedWorld()); |
| if (!scriptState) |
| return false; |
| ScriptState* scriptStateInUserScript = ScriptState::forMainWorld(frame); |
| if (!scriptStateInUserScript) |
| return false; |
| |
| ScriptState::Scope scope(scriptState); |
| v8::Local<v8::Value> holder = toV8(holderImpl, scriptState->context()->Global(), scriptState->isolate()); |
| if (holder.IsEmpty()) |
| return false; |
| |
| v8::Local<v8::Value> documentHandle = toV8(document, scriptState->context()->Global(), scriptState->isolate()); |
| v8::Local<v8::Value> nodeHandle = toV8(node, scriptState->context()->Global(), scriptState->isolate()); |
| v8::Local<v8::Value> value1Handle = v8::Integer::New(scriptState->isolate(), value1); |
| v8::Local<v8::Value> value2Handle = v8::Number::New(scriptState->isolate(), value2); |
| v8::Local<v8::Value> stringHandle = v8String(scriptState->isolate(), string); |
| v8::Local<v8::Value> argv[] = { documentHandle, nodeHandle, value1Handle, value2Handle, stringHandle }; |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "nodeMethodWithVariousArgumentsImplementedInPrivateScript", "TestObject", scriptState->context()->Global(), scriptState->isolate()); |
| v8::Local<v8::Value> v8Value = PrivateScriptRunner::runDOMMethod(scriptState, scriptStateInUserScript, "TestObject", "nodeMethodWithVariousArgumentsImplementedInPrivateScript", holder, 5, argv); |
| if (v8Value.IsEmpty()) |
| return false; |
| Node* cppValue = V8Node::toImplWithTypeCheck(scriptState->isolate(), v8Value); |
| *result = cppValue; |
| RELEASE_ASSERT(!exceptionState.hadException()); |
| return true; |
| } |
| |
| bool V8TestObject::PrivateScript::methodForPrivateScriptOnlyMethod(LocalFrame* frame, TestObject* holderImpl, int value1, int value2, int* result) |
| { |
| if (!frame) |
| return false; |
| v8::HandleScope handleScope(toIsolate(frame)); |
| ScriptForbiddenScope::AllowUserAgentScript script; |
| ScriptState* scriptState = ScriptState::forWorld(frame, DOMWrapperWorld::privateScriptIsolatedWorld()); |
| if (!scriptState) |
| return false; |
| ScriptState* scriptStateInUserScript = ScriptState::forMainWorld(frame); |
| if (!scriptStateInUserScript) |
| return false; |
| |
| ScriptState::Scope scope(scriptState); |
| v8::Local<v8::Value> holder = toV8(holderImpl, scriptState->context()->Global(), scriptState->isolate()); |
| if (holder.IsEmpty()) |
| return false; |
| |
| v8::Local<v8::Value> value1Handle = v8::Integer::New(scriptState->isolate(), value1); |
| v8::Local<v8::Value> value2Handle = v8::Integer::New(scriptState->isolate(), value2); |
| v8::Local<v8::Value> argv[] = { value1Handle, value2Handle }; |
| ExceptionState exceptionState(ExceptionState::ExecutionContext, "methodForPrivateScriptOnly", "TestObject", scriptState->context()->Global(), scriptState->isolate()); |
| v8::Local<v8::Value> v8Value = PrivateScriptRunner::runDOMMethod(scriptState, scriptStateInUserScript, "TestObject", "methodForPrivateScriptOnly", holder, 2, argv); |
| if (v8Value.IsEmpty()) |
| return false; |
| int cppValue = toInt16(scriptState->isolate(), v8Value, NormalConversion, exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return false; |
| *result = cppValue; |
| RELEASE_ASSERT(!exceptionState.hadException()); |
| return true; |
| } |
| |
| bool V8TestObject::PrivateScript::readonlyShortAttributeAttributeGetter(LocalFrame* frame, TestObject* holderImpl, int* result) |
| { |
| if (!frame) |
| return false; |
| v8::HandleScope handleScope(toIsolate(frame)); |
| ScriptForbiddenScope::AllowUserAgentScript script; |
| ScriptState* scriptState = ScriptState::forWorld(frame, DOMWrapperWorld::privateScriptIsolatedWorld()); |
| if (!scriptState) |
| return false; |
| ScriptState* scriptStateInUserScript = ScriptState::forMainWorld(frame); |
| if (!scriptStateInUserScript) |
| return false; |
| |
| ScriptState::Scope scope(scriptState); |
| v8::Local<v8::Value> holder = toV8(holderImpl, scriptState->context()->Global(), scriptState->isolate()); |
| if (holder.IsEmpty()) |
| return false; |
| |
| |
| ExceptionState exceptionState(ExceptionState::GetterContext, "readonlyShortAttribute", "TestObject", scriptState->context()->Global(), scriptState->isolate()); |
| v8::Local<v8::Value> v8Value = PrivateScriptRunner::runDOMAttributeGetter(scriptState, scriptStateInUserScript, "TestObject", "readonlyShortAttribute", holder); |
| if (v8Value.IsEmpty()) |
| return false; |
| int cppValue = toInt16(scriptState->isolate(), v8Value, NormalConversion, exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return false; |
| RELEASE_ASSERT(!exceptionState.hadException()); |
| *result = cppValue; |
| return true; |
| } |
| |
| bool V8TestObject::PrivateScript::shortAttributeAttributeGetter(LocalFrame* frame, TestObject* holderImpl, int* result) |
| { |
| if (!frame) |
| return false; |
| v8::HandleScope handleScope(toIsolate(frame)); |
| ScriptForbiddenScope::AllowUserAgentScript script; |
| ScriptState* scriptState = ScriptState::forWorld(frame, DOMWrapperWorld::privateScriptIsolatedWorld()); |
| if (!scriptState) |
| return false; |
| ScriptState* scriptStateInUserScript = ScriptState::forMainWorld(frame); |
| if (!scriptStateInUserScript) |
| return false; |
| |
| ScriptState::Scope scope(scriptState); |
| v8::Local<v8::Value> holder = toV8(holderImpl, scriptState->context()->Global(), scriptState->isolate()); |
| if (holder.IsEmpty()) |
| return false; |
| |
| |
| ExceptionState exceptionState(ExceptionState::GetterContext, "shortAttribute", "TestObject", scriptState->context()->Global(), scriptState->isolate()); |
| v8::Local<v8::Value> v8Value = PrivateScriptRunner::runDOMAttributeGetter(scriptState, scriptStateInUserScript, "TestObject", "shortAttribute", holder); |
| if (v8Value.IsEmpty()) |
| return false; |
| int cppValue = toInt16(scriptState->isolate(), v8Value, NormalConversion, exceptionState); |
| if (exceptionState.throwIfNeeded()) |
| return false; |
| RELEASE_ASSERT(!exceptionState.hadException()); |
| *result = cppValue; |
| return true; |
| } |
| |
| bool V8TestObject::PrivateScript::shortAttributeAttributeSetter(LocalFrame* frame, TestObject* holderImpl, int cppValue) |
| { |
| if (!frame) |
| return false; |
| v8::HandleScope handleScope(toIsolate(frame)); |
| ScriptForbiddenScope::AllowUserAgentScript script; |
| ScriptState* scriptState = ScriptState::forWorld(frame, DOMWrapperWorld::privateScriptIsolatedWorld()); |
| if (!scriptState) |
| return false; |
| ScriptState* scriptStateInUserScript = ScriptState::forMainWorld(frame); |
| if (!scriptStateInUserScript) |
| return false; |
| |
| ScriptState::Scope scope(scriptState); |
| v8::Local<v8::Value> holder = toV8(holderImpl, scriptState->context()->Global(), scriptState->isolate()); |
| if (holder.IsEmpty()) |
| return false; |
| |
| ExceptionState exceptionState(ExceptionState::SetterContext, "shortAttribute", "TestObject", scriptState->context()->Global(), scriptState->isolate()); |
| return PrivateScriptRunner::runDOMAttributeSetter(scriptState, scriptStateInUserScript, "TestObject", "shortAttribute", holder, v8::Integer::New(scriptState->isolate(), cppValue)); |
| } |
| |
| bool V8TestObject::PrivateScript::stringAttributeAttributeGetter(LocalFrame* frame, TestObject* holderImpl, String* result) |
| { |
| if (!frame) |
| return false; |
| v8::HandleScope handleScope(toIsolate(frame)); |
| ScriptForbiddenScope::AllowUserAgentScript script; |
| ScriptState* scriptState = ScriptState::forWorld(frame, DOMWrapperWorld::privateScriptIsolatedWorld()); |
| if (!scriptState) |
| return false; |
| ScriptState* scriptStateInUserScript = ScriptState::forMainWorld(frame); |
| if (!scriptStateInUserScript) |
| return false; |
| |
| ScriptState::Scope scope(scriptState); |
| v8::Local<v8::Value> holder = toV8(holderImpl, scriptState->context()->Global(), scriptState->isolate()); |
| if (holder.IsEmpty()) |
| return false; |
| |
| |
| ExceptionState exceptionState(ExceptionState::GetterContext, "stringAttribute", "TestObject", scriptState->context()->Global(), scriptState->isolate()); |
| v8::Local<v8::Value> v8Value = PrivateScriptRunner::runDOMAttributeGetter(scriptState, scriptStateInUserScript, "TestObject", "stringAttribute", holder); |
| if (v8Value.IsEmpty()) |
| return false; |
| V8StringResource<> cppValue = v8Value; |
| if (!cppValue.prepare()) |
| return false; |
| RELEASE_ASSERT(!exceptionState.hadException()); |
| *result = cppValue; |
| return true; |
| } |
| |
| bool V8TestObject::PrivateScript::stringAttributeAttributeSetter(LocalFrame* frame, TestObject* holderImpl, String cppValue) |
| { |
| if (!frame) |
| return false; |
| v8::HandleScope handleScope(toIsolate(frame)); |
| ScriptForbiddenScope::AllowUserAgentScript script; |
| ScriptState* scriptState = ScriptState::forWorld(frame, DOMWrapperWorld::privateScriptIsolatedWorld()); |
| if (!scriptState) |
| return false; |
| ScriptState* scriptStateInUserScript = ScriptState::forMainWorld(frame); |
| if (!scriptStateInUserScript) |
| return false; |
| |
| ScriptState::Scope scope(scriptState); |
| v8::Local<v8::Value> holder = toV8(holderImpl, scriptState->context()->Global(), scriptState->isolate()); |
| if (holder.IsEmpty()) |
| return false; |
| |
| ExceptionState exceptionState(ExceptionState::SetterContext, "stringAttribute", "TestObject", scriptState->context()->Global(), scriptState->isolate()); |
| return PrivateScriptRunner::runDOMAttributeSetter(scriptState, scriptStateInUserScript, "TestObject", "stringAttribute", holder, v8String(scriptState->isolate(), cppValue)); |
| } |
| |
| bool V8TestObject::PrivateScript::nodeAttributeAttributeGetter(LocalFrame* frame, TestObject* holderImpl, Node** result) |
| { |
| if (!frame) |
| return false; |
| v8::HandleScope handleScope(toIsolate(frame)); |
| ScriptForbiddenScope::AllowUserAgentScript script; |
| ScriptState* scriptState = ScriptState::forWorld(frame, DOMWrapperWorld::privateScriptIsolatedWorld()); |
| if (!scriptState) |
| return false; |
| ScriptState* scriptStateInUserScript = ScriptState::forMainWorld(frame); |
| if (!scriptStateInUserScript) |
| return false; |
| |
| ScriptState::Scope scope(scriptState); |
| v8::Local<v8::Value> holder = toV8(holderImpl, scriptState->context()->Global(), scriptState->isolate()); |
| if (holder.IsEmpty()) |
| return false; |
| |
| |
| ExceptionState exceptionState(ExceptionState::GetterContext, "nodeAttribute", "TestObject", scriptState->context()->Global(), scriptState->isolate()); |
| v8::Local<v8::Value> v8Value = PrivateScriptRunner::runDOMAttributeGetter(scriptState, scriptStateInUserScript, "TestObject", "nodeAttribute", holder); |
| if (v8Value.IsEmpty()) |
| return false; |
| Node* cppValue = V8Node::toImplWithTypeCheck(scriptState->isolate(), v8Value); |
| RELEASE_ASSERT(!exceptionState.hadException()); |
| *result = cppValue; |
| return true; |
| } |
| |
| bool V8TestObject::PrivateScript::nodeAttributeAttributeSetter(LocalFrame* frame, TestObject* holderImpl, Node* cppValue) |
| { |
| if (!frame) |
| return false; |
| v8::HandleScope handleScope(toIsolate(frame)); |
| ScriptForbiddenScope::AllowUserAgentScript script; |
| ScriptState* scriptState = ScriptState::forWorld(frame, DOMWrapperWorld::privateScriptIsolatedWorld()); |
| if (!scriptState) |
| return false; |
| ScriptState* scriptStateInUserScript = ScriptState::forMainWorld(frame); |
| if (!scriptStateInUserScript) |
| return false; |
| |
| ScriptState::Scope scope(scriptState); |
| v8::Local<v8::Value> holder = toV8(holderImpl, scriptState->context()->Global(), scriptState->isolate()); |
| if (holder.IsEmpty()) |
| return false; |
| |
| ExceptionState exceptionState(ExceptionState::SetterContext, "nodeAttribute", "TestObject", scriptState->context()->Global(), scriptState->isolate()); |
| return PrivateScriptRunner::runDOMAttributeSetter(scriptState, scriptStateInUserScript, "TestObject", "nodeAttribute", holder, toV8(cppValue, scriptState->context()->Global(), scriptState->isolate())); |
| } |
| |
| bool V8TestObject::PrivateScript::attributeForPrivateScriptOnlyAttributeGetter(LocalFrame* frame, TestObject* holderImpl, String* result) |
| { |
| if (!frame) |
| return false; |
| v8::HandleScope handleScope(toIsolate(frame)); |
| ScriptForbiddenScope::AllowUserAgentScript script; |
| ScriptState* scriptState = ScriptState::forWorld(frame, DOMWrapperWorld::privateScriptIsolatedWorld()); |
| if (!scriptState) |
| return false; |
| ScriptState* scriptStateInUserScript = ScriptState::forMainWorld(frame); |
| if (!scriptStateInUserScript) |
| return false; |
| |
| ScriptState::Scope scope(scriptState); |
| v8::Local<v8::Value> holder = toV8(holderImpl, scriptState->context()->Global(), scriptState->isolate()); |
| if (holder.IsEmpty()) |
| return false; |
| |
| |
| ExceptionState exceptionState(ExceptionState::GetterContext, "attributeForPrivateScriptOnly", "TestObject", scriptState->context()->Global(), scriptState->isolate()); |
| v8::Local<v8::Value> v8Value = PrivateScriptRunner::runDOMAttributeGetter(scriptState, scriptStateInUserScript, "TestObject", "attributeForPrivateScriptOnly", holder); |
| if (v8Value.IsEmpty()) |
| return false; |
| V8StringResource<> cppValue = v8Value; |
| if (!cppValue.prepare()) |
| return false; |
| RELEASE_ASSERT(!exceptionState.hadException()); |
| *result = cppValue; |
| return true; |
| } |
| |
| bool V8TestObject::PrivateScript::attributeForPrivateScriptOnlyAttributeSetter(LocalFrame* frame, TestObject* holderImpl, String cppValue) |
| { |
| if (!frame) |
| return false; |
| v8::HandleScope handleScope(toIsolate(frame)); |
| ScriptForbiddenScope::AllowUserAgentScript script; |
| ScriptState* scriptState = ScriptState::forWorld(frame, DOMWrapperWorld::privateScriptIsolatedWorld()); |
| if (!scriptState) |
| return false; |
| ScriptState* scriptStateInUserScript = ScriptState::forMainWorld(frame); |
| if (!scriptStateInUserScript) |
| return false; |
| |
| ScriptState::Scope scope(scriptState); |
| v8::Local<v8::Value> holder = toV8(holderImpl, scriptState->context()->Global(), scriptState->isolate()); |
| if (holder.IsEmpty()) |
| return false; |
| |
| ExceptionState exceptionState(ExceptionState::SetterContext, "attributeForPrivateScriptOnly", "TestObject", scriptState->context()->Global(), scriptState->isolate()); |
| return PrivateScriptRunner::runDOMAttributeSetter(scriptState, scriptStateInUserScript, "TestObject", "attributeForPrivateScriptOnly", holder, v8String(scriptState->isolate(), cppValue)); |
| } |
| |
| bool V8TestObject::PrivateScript::enumForPrivateScriptAttributeGetter(LocalFrame* frame, TestObject* holderImpl, String* result) |
| { |
| if (!frame) |
| return false; |
| v8::HandleScope handleScope(toIsolate(frame)); |
| ScriptForbiddenScope::AllowUserAgentScript script; |
| ScriptState* scriptState = ScriptState::forWorld(frame, DOMWrapperWorld::privateScriptIsolatedWorld()); |
| if (!scriptState) |
| return false; |
| ScriptState* scriptStateInUserScript = ScriptState::forMainWorld(frame); |
| if (!scriptStateInUserScript) |
| return false; |
| |
| ScriptState::Scope scope(scriptState); |
| v8::Local<v8::Value> holder = toV8(holderImpl, scriptState->context()->Global(), scriptState->isolate()); |
| if (holder.IsEmpty()) |
| return false; |
| |
| |
| ExceptionState exceptionState(ExceptionState::GetterContext, "enumForPrivateScript", "TestObject", scriptState->context()->Global(), scriptState->isolate()); |
| v8::Local<v8::Value> v8Value = PrivateScriptRunner::runDOMAttributeGetter(scriptState, scriptStateInUserScript, "TestObject", "enumForPrivateScript", holder); |
| if (v8Value.IsEmpty()) |
| return false; |
| V8StringResource<> cppValue = v8Value; |
| if (!cppValue.prepare()) |
| return false; |
| RELEASE_ASSERT(!exceptionState.hadException()); |
| *result = cppValue; |
| return true; |
| } |
| |
| bool V8TestObject::PrivateScript::enumForPrivateScriptAttributeSetter(LocalFrame* frame, TestObject* holderImpl, String cppValue) |
| { |
| if (!frame) |
| return false; |
| v8::HandleScope handleScope(toIsolate(frame)); |
| ScriptForbiddenScope::AllowUserAgentScript script; |
| ScriptState* scriptState = ScriptState::forWorld(frame, DOMWrapperWorld::privateScriptIsolatedWorld()); |
| if (!scriptState) |
| return false; |
| ScriptState* scriptStateInUserScript = ScriptState::forMainWorld(frame); |
| if (!scriptStateInUserScript) |
| return false; |
| |
| ScriptState::Scope scope(scriptState); |
| v8::Local<v8::Value> holder = toV8(holderImpl, scriptState->context()->Global(), scriptState->isolate()); |
| if (holder.IsEmpty()) |
| return false; |
| |
| ExceptionState exceptionState(ExceptionState::SetterContext, "enumForPrivateScript", "TestObject", scriptState->context()->Global(), scriptState->isolate()); |
| return PrivateScriptRunner::runDOMAttributeSetter(scriptState, scriptStateInUserScript, "TestObject", "enumForPrivateScript", holder, v8String(scriptState->isolate(), cppValue)); |
| } |
| |
| } // namespace blink |