#include "config.h"
#include "JSTestObj.h"
#include "CallbackFunction.h"
#include "DOMStringList.h"
#include "Dictionary.h"
#include "Document.h"
#include "ExceptionCode.h"
#include "Frame.h"
#include "HTMLNames.h"
#include "JSDOMBinding.h"
#include "JSDOMStringList.h"
#include "JSDocument.h"
#include "JSEventListener.h"
#include "JSNode.h"
#include "JSSVGDocument.h"
#include "JSSVGPoint.h"
#include "JSScriptProfile.h"
#include "JSTestCallback.h"
#include "JSTestNode.h"
#include "JSTestObj.h"
#include "JSTestSubObj.h"
#include "JSbool.h"
#include "SVGDocument.h"
#include "SVGPoint.h"
#include "SVGStaticPropertyTearOff.h"
#include "ScriptExecutionContext.h"
#include "ScriptProfile.h"
#include "SerializedScriptValue.h"
#include "Settings.h"
#include "TestObj.h"
#include "URL.h"
#include "bool.h"
#include <inspector/ScriptArguments.h>
#include <inspector/ScriptCallStackFactory.h>
#include <runtime/Error.h>
#include <runtime/JSArray.h>
#include <runtime/JSString.h>
#include <wtf/GetPtr.h>
#if ENABLE(Condition1)
#include "JSTestObjectA.h"
#endif
#if ENABLE(Condition1) && ENABLE(Condition2)
#include "JSTestObjectB.h"
#endif
#if ENABLE(Condition1) || ENABLE(Condition2)
#include "JSTestObjectC.h"
#endif
using namespace JSC;
namespace WebCore {
JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionVoidMethod(JSC::ExecState*);
JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionVoidMethodWithArgs(JSC::ExecState*);
JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionByteMethod(JSC::ExecState*);
JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionByteMethodWithArgs(JSC::ExecState*);
JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOctetMethod(JSC::ExecState*);
JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOctetMethodWithArgs(JSC::ExecState*);
JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionLongMethod(JSC::ExecState*);
JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionLongMethodWithArgs(JSC::ExecState*);
JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionObjMethod(JSC::ExecState*);
JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionObjMethodWithArgs(JSC::ExecState*);
JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithSequenceArg(JSC::ExecState*);
JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodReturningSequence(JSC::ExecState*);
JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithEnumArg(JSC::ExecState*);
JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodThatRequiresAllArgsAndThrows(JSC::ExecState*);
JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionSerializedValue(JSC::ExecState*);
JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOptionsObject(JSC::ExecState*);
JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithException(JSC::ExecState*);
JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionCustomMethod(JSC::ExecState*);
JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionCustomMethodWithArgs(JSC::ExecState*);
JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionAddEventListener(JSC::ExecState*);
JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionRemoveEventListener(JSC::ExecState*);
JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithScriptStateVoid(JSC::ExecState*);
JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithScriptStateObj(JSC::ExecState*);
JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithScriptStateVoidException(JSC::ExecState*);
JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithScriptStateObjException(JSC::ExecState*);
JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithScriptExecutionContext(JSC::ExecState*);
JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithScriptExecutionContextAndScriptState(JSC::ExecState*);
JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithScriptExecutionContextAndScriptStateObjException(JSC::ExecState*);
JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithScriptExecutionContextAndScriptStateWithSpaces(JSC::ExecState*);
JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithScriptArgumentsAndCallStack(JSC::ExecState*);
JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalArg(JSC::ExecState*);
JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndOptionalArg(JSC::ExecState*);
JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndTwoOptionalArgs(JSC::ExecState*);
JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalString(JSC::ExecState*);
JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalStringIsUndefined(JSC::ExecState*);
JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalStringIsNullString(JSC::ExecState*);
JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithCallbackArg(JSC::ExecState*);
JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackArg(JSC::ExecState*);
JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithCallbackAndOptionalArg(JSC::ExecState*);
JSC::EncodedJSValue JSC_HOST_CALL jsTestObjConstructorFunctionStaticMethodWithCallbackAndOptionalArg(JSC::ExecState*);
JSC::EncodedJSValue JSC_HOST_CALL jsTestObjConstructorFunctionStaticMethodWithCallbackArg(JSC::ExecState*);
#if ENABLE(Condition1)
JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionConditionalMethod1(JSC::ExecState*);
#endif
#if ENABLE(Condition1) && ENABLE(Condition2)
JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionConditionalMethod2(JSC::ExecState*);
#endif
#if ENABLE(Condition1) || ENABLE(Condition2)
JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionConditionalMethod3(JSC::ExecState*);
#endif
JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOverloadedMethod(JSC::ExecState*);
JSC::EncodedJSValue JSC_HOST_CALL jsTestObjConstructorFunctionClassMethod(JSC::ExecState*);
JSC::EncodedJSValue JSC_HOST_CALL jsTestObjConstructorFunctionClassMethodWithOptional(JSC::ExecState*);
JSC::EncodedJSValue JSC_HOST_CALL jsTestObjConstructorFunctionClassMethod2(JSC::ExecState*);
#if ENABLE(Condition1)
JSC::EncodedJSValue JSC_HOST_CALL jsTestObjConstructorFunctionOverloadedMethod1(JSC::ExecState*);
#endif
JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionClassMethodWithClamp(JSC::ExecState*);
JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithUnsignedLongSequence(JSC::ExecState*);
JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionStringArrayFunction(JSC::ExecState*);
JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionDomStringListFunction(JSC::ExecState*);
JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithAndWithoutNullableSequence(JSC::ExecState*);
JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithAndWithoutNullableSequence2(JSC::ExecState*);
JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionGetSVGDocument(JSC::ExecState*);
JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionConvert1(JSC::ExecState*);
JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionConvert2(JSC::ExecState*);
JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionConvert4(JSC::ExecState*);
JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionConvert5(JSC::ExecState*);
JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMutablePointFunction(JSC::ExecState*);
JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionImmutablePointFunction(JSC::ExecState*);
JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOrange(JSC::ExecState*);
JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionStrictFunction(JSC::ExecState*);
JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionStrictFunctionWithSequence(JSC::ExecState*);
JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionStrictFunctionWithArray(JSC::ExecState*);
JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionVariadicStringMethod(JSC::ExecState*);
JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionVariadicDoubleMethod(JSC::ExecState*);
JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionVariadicNodeMethod(JSC::ExecState*);
JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionAny(JSC::ExecState*);
JSC::EncodedJSValue jsTestObjReadOnlyLongAttr(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
JSC::EncodedJSValue jsTestObjReadOnlyStringAttr(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
JSC::EncodedJSValue jsTestObjReadOnlyTestObjAttr(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
JSC::EncodedJSValue jsTestObjConstructorStaticReadOnlyLongAttr(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
JSC::EncodedJSValue jsTestObjConstructorStaticStringAttr(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
void setJSTestObjConstructorStaticStringAttr(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::EncodedJSValue);
JSC::EncodedJSValue jsTestObjConstructorTestSubObj(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
JSC::EncodedJSValue jsTestObjTestSubObjEnabledBySettingConstructor(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
void setJSTestObjTestSubObjEnabledBySettingConstructor(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::EncodedJSValue);
JSC::EncodedJSValue jsTestObjEnumAttr(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
void setJSTestObjEnumAttr(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::EncodedJSValue);
JSC::EncodedJSValue jsTestObjByteAttr(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
void setJSTestObjByteAttr(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::EncodedJSValue);
JSC::EncodedJSValue jsTestObjOctetAttr(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
void setJSTestObjOctetAttr(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::EncodedJSValue);
JSC::EncodedJSValue jsTestObjShortAttr(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
void setJSTestObjShortAttr(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::EncodedJSValue);
JSC::EncodedJSValue jsTestObjUnsignedShortAttr(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
void setJSTestObjUnsignedShortAttr(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::EncodedJSValue);
JSC::EncodedJSValue jsTestObjLongAttr(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
void setJSTestObjLongAttr(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::EncodedJSValue);
JSC::EncodedJSValue jsTestObjLongLongAttr(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
void setJSTestObjLongLongAttr(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::EncodedJSValue);
JSC::EncodedJSValue jsTestObjUnsignedLongLongAttr(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
void setJSTestObjUnsignedLongLongAttr(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::EncodedJSValue);
JSC::EncodedJSValue jsTestObjStringAttr(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
void setJSTestObjStringAttr(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::EncodedJSValue);
JSC::EncodedJSValue jsTestObjTestObjAttr(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
void setJSTestObjTestObjAttr(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::EncodedJSValue);
JSC::EncodedJSValue jsTestObjXMLObjAttr(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
void setJSTestObjXMLObjAttr(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::EncodedJSValue);
JSC::EncodedJSValue jsTestObjCreate(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
void setJSTestObjCreate(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::EncodedJSValue);
JSC::EncodedJSValue jsTestObjReflectedStringAttr(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
void setJSTestObjReflectedStringAttr(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::EncodedJSValue);
JSC::EncodedJSValue jsTestObjReflectedIntegralAttr(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
void setJSTestObjReflectedIntegralAttr(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::EncodedJSValue);
JSC::EncodedJSValue jsTestObjReflectedUnsignedIntegralAttr(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
void setJSTestObjReflectedUnsignedIntegralAttr(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::EncodedJSValue);
JSC::EncodedJSValue jsTestObjReflectedBooleanAttr(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
void setJSTestObjReflectedBooleanAttr(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::EncodedJSValue);
JSC::EncodedJSValue jsTestObjReflectedURLAttr(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
void setJSTestObjReflectedURLAttr(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::EncodedJSValue);
JSC::EncodedJSValue jsTestObjReflectedStringAttr(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
void setJSTestObjReflectedStringAttr(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::EncodedJSValue);
JSC::EncodedJSValue jsTestObjReflectedCustomIntegralAttr(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
void setJSTestObjReflectedCustomIntegralAttr(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::EncodedJSValue);
JSC::EncodedJSValue jsTestObjReflectedCustomBooleanAttr(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
void setJSTestObjReflectedCustomBooleanAttr(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::EncodedJSValue);
JSC::EncodedJSValue jsTestObjReflectedCustomURLAttr(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
void setJSTestObjReflectedCustomURLAttr(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::EncodedJSValue);
JSC::EncodedJSValue jsTestObjTypedArrayAttr(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
void setJSTestObjTypedArrayAttr(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::EncodedJSValue);
JSC::EncodedJSValue jsTestObjAttrWithGetterException(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
void setJSTestObjAttrWithGetterException(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::EncodedJSValue);
JSC::EncodedJSValue jsTestObjAttrWithSetterException(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
void setJSTestObjAttrWithSetterException(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::EncodedJSValue);
JSC::EncodedJSValue jsTestObjStringAttrWithGetterException(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
void setJSTestObjStringAttrWithGetterException(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::EncodedJSValue);
JSC::EncodedJSValue jsTestObjStringAttrWithSetterException(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
void setJSTestObjStringAttrWithSetterException(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::EncodedJSValue);
JSC::EncodedJSValue jsTestObjCustomAttr(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
void setJSTestObjCustomAttr(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::EncodedJSValue);
JSC::EncodedJSValue jsTestObjWithScriptStateAttribute(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
void setJSTestObjWithScriptStateAttribute(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::EncodedJSValue);
JSC::EncodedJSValue jsTestObjWithScriptExecutionContextAttribute(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
void setJSTestObjWithScriptExecutionContextAttribute(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::EncodedJSValue);
JSC::EncodedJSValue jsTestObjWithScriptStateAttributeRaises(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
void setJSTestObjWithScriptStateAttributeRaises(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::EncodedJSValue);
JSC::EncodedJSValue jsTestObjWithScriptExecutionContextAttributeRaises(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
void setJSTestObjWithScriptExecutionContextAttributeRaises(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::EncodedJSValue);
JSC::EncodedJSValue jsTestObjWithScriptExecutionContextAndScriptStateAttribute(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
void setJSTestObjWithScriptExecutionContextAndScriptStateAttribute(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::EncodedJSValue);
JSC::EncodedJSValue jsTestObjWithScriptExecutionContextAndScriptStateAttributeRaises(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
void setJSTestObjWithScriptExecutionContextAndScriptStateAttributeRaises(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::EncodedJSValue);
JSC::EncodedJSValue jsTestObjWithScriptExecutionContextAndScriptStateWithSpacesAttribute(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
void setJSTestObjWithScriptExecutionContextAndScriptStateWithSpacesAttribute(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::EncodedJSValue);
JSC::EncodedJSValue jsTestObjWithScriptArgumentsAndCallStackAttribute(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
void setJSTestObjWithScriptArgumentsAndCallStackAttribute(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::EncodedJSValue);
#if ENABLE(Condition1)
JSC::EncodedJSValue jsTestObjConditionalAttr1(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
void setJSTestObjConditionalAttr1(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::EncodedJSValue);
#endif
#if ENABLE(Condition1) && ENABLE(Condition2)
JSC::EncodedJSValue jsTestObjConditionalAttr2(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
void setJSTestObjConditionalAttr2(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::EncodedJSValue);
#endif
#if ENABLE(Condition1) || ENABLE(Condition2)
JSC::EncodedJSValue jsTestObjConditionalAttr3(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
void setJSTestObjConditionalAttr3(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::EncodedJSValue);
#endif
#if ENABLE(Condition1)
JSC::EncodedJSValue jsTestObjConditionalAttr4Constructor(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
void setJSTestObjConditionalAttr4Constructor(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::EncodedJSValue);
#endif
#if ENABLE(Condition1) && ENABLE(Condition2)
JSC::EncodedJSValue jsTestObjConditionalAttr5Constructor(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
void setJSTestObjConditionalAttr5Constructor(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::EncodedJSValue);
#endif
#if ENABLE(Condition1) || ENABLE(Condition2)
JSC::EncodedJSValue jsTestObjConditionalAttr6Constructor(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
void setJSTestObjConditionalAttr6Constructor(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::EncodedJSValue);
#endif
JSC::EncodedJSValue jsTestObjCachedAttribute1(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
JSC::EncodedJSValue jsTestObjCachedAttribute2(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
JSC::EncodedJSValue jsTestObjAnyAttribute(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
void setJSTestObjAnyAttribute(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::EncodedJSValue);
JSC::EncodedJSValue jsTestObjContentDocument(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
JSC::EncodedJSValue jsTestObjMutablePoint(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
void setJSTestObjMutablePoint(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::EncodedJSValue);
JSC::EncodedJSValue jsTestObjImmutablePoint(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
void setJSTestObjImmutablePoint(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::EncodedJSValue);
JSC::EncodedJSValue jsTestObjStrawberry(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
void setJSTestObjStrawberry(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::EncodedJSValue);
JSC::EncodedJSValue jsTestObjStrictFloat(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
void setJSTestObjStrictFloat(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::EncodedJSValue);
JSC::EncodedJSValue jsTestObjDescription(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
JSC::EncodedJSValue jsTestObjId(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
void setJSTestObjId(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::EncodedJSValue);
JSC::EncodedJSValue jsTestObjHash(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
JSC::EncodedJSValue jsTestObjReplaceableAttribute(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
void setJSTestObjReplaceableAttribute(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::EncodedJSValue);
JSC::EncodedJSValue jsTestObjNullableDoubleAttribute(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
JSC::EncodedJSValue jsTestObjNullableLongAttribute(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
JSC::EncodedJSValue jsTestObjNullableBooleanAttribute(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
JSC::EncodedJSValue jsTestObjNullableStringAttribute(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
JSC::EncodedJSValue jsTestObjNullableLongSettableAttribute(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
void setJSTestObjNullableLongSettableAttribute(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::EncodedJSValue);
JSC::EncodedJSValue jsTestObjNullableStringValue(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
void setJSTestObjNullableStringValue(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::EncodedJSValue);
JSC::EncodedJSValue jsTestObjAttribute(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
JSC::EncodedJSValue jsTestObjAttributeWithReservedEnumType(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
void setJSTestObjAttributeWithReservedEnumType(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::EncodedJSValue);
JSC::EncodedJSValue jsTestObjConstructor(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
class JSTestObjPrototype : public JSC::JSNonFinalObject {
public:
typedef JSC::JSNonFinalObject Base;
static JSTestObjPrototype* create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure)
{
JSTestObjPrototype* ptr = new (NotNull, JSC::allocateCell<JSTestObjPrototype>(vm.heap)) JSTestObjPrototype(vm, globalObject, structure);
ptr->finishCreation(vm);
return ptr;
}
DECLARE_INFO;
static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
{
return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());
}
private:
JSTestObjPrototype(JSC::VM& vm, JSC::JSGlobalObject*, JSC::Structure* structure)
: JSC::JSNonFinalObject(vm, structure)
{
}
void finishCreation(JSC::VM&);
};
class JSTestObjConstructor : public DOMConstructorObject {
private:
JSTestObjConstructor(JSC::Structure*, JSDOMGlobalObject*);
void finishCreation(JSC::VM&, JSDOMGlobalObject*);
public:
typedef DOMConstructorObject Base;
static JSTestObjConstructor* create(JSC::VM& vm, JSC::Structure* structure, JSDOMGlobalObject* globalObject)
{
JSTestObjConstructor* ptr = new (NotNull, JSC::allocateCell<JSTestObjConstructor>(vm.heap)) JSTestObjConstructor(structure, globalObject);
ptr->finishCreation(vm, globalObject);
return ptr;
}
DECLARE_INFO;
static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
{
return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());
}
protected:
static JSC::EncodedJSValue JSC_HOST_CALL constructJSTestObj(JSC::ExecState*);
static JSC::ConstructType getConstructData(JSC::JSCell*, JSC::ConstructData&);
};
static const struct CompactHashIndex JSTestObjTableIndex[17] = {
{ 5, -1 },
{ -1, -1 },
{ -1, -1 },
{ -1, -1 },
{ -1, -1 },
{ -1, -1 },
{ 4, -1 },
{ -1, -1 },
{ -1, -1 },
{ 2, -1 },
{ 0, 16 },
{ -1, -1 },
{ 1, -1 },
{ -1, -1 },
{ -1, -1 },
{ -1, -1 },
{ 3, -1 },
};
static const HashTableValue JSTestObjTableValues[] =
{
{ "TestSubObjEnabledBySetting", DontEnum, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjTestSubObjEnabledBySettingConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjTestSubObjEnabledBySettingConstructor) },
{ "customAttr", DontDelete | CustomAccessor, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCustomAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjCustomAttr) },
#if ENABLE(Condition1)
{ "conditionalAttr4", DontEnum, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjConditionalAttr4Constructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjConditionalAttr4Constructor) },
#else
{ 0, 0, NoIntrinsic, 0, 0 },
#endif
#if ENABLE(Condition1) && ENABLE(Condition2)
{ "conditionalAttr5", DontEnum, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjConditionalAttr5Constructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjConditionalAttr5Constructor) },
#else
{ 0, 0, NoIntrinsic, 0, 0 },
#endif
#if ENABLE(Condition1) || ENABLE(Condition2)
{ "conditionalAttr6", DontEnum, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjConditionalAttr6Constructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjConditionalAttr6Constructor) },
#else
{ 0, 0, NoIntrinsic, 0, 0 },
#endif
{ "contentDocument", DontDelete | ReadOnly | CustomAccessor, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjContentDocument), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) },
};
static const HashTable JSTestObjTable = { 6, 15, true, JSTestObjTableValues, 0, JSTestObjTableIndex };
static const HashTableValue JSTestObjConstructorTableValues[] =
{
#if ENABLE(Condition1)
{ "CONDITIONAL_CONST", DontDelete | ReadOnly | ConstantInteger, NoIntrinsic, (intptr_t)(0), (intptr_t) (0) },
#else
{ 0, 0, NoIntrinsic, 0, 0 },
#endif
{ "CONST_VALUE_0", DontDelete | ReadOnly | ConstantInteger, NoIntrinsic, (intptr_t)(0), (intptr_t) (0) },
{ "CONST_VALUE_1", DontDelete | ReadOnly | ConstantInteger, NoIntrinsic, (intptr_t)(1), (intptr_t) (0) },
{ "CONST_VALUE_2", DontDelete | ReadOnly | ConstantInteger, NoIntrinsic, (intptr_t)(2), (intptr_t) (0) },
{ "CONST_VALUE_4", DontDelete | ReadOnly | ConstantInteger, NoIntrinsic, (intptr_t)(4), (intptr_t) (0) },
{ "CONST_VALUE_8", DontDelete | ReadOnly | ConstantInteger, NoIntrinsic, (intptr_t)(8), (intptr_t) (0) },
{ "CONST_VALUE_9", DontDelete | ReadOnly | ConstantInteger, NoIntrinsic, (intptr_t)(-1), (intptr_t) (0) },
{ "CONST_VALUE_11", DontDelete | ReadOnly | ConstantInteger, NoIntrinsic, (intptr_t)(0xffffffff), (intptr_t) (0) },
{ "CONST_VALUE_12", DontDelete | ReadOnly | ConstantInteger, NoIntrinsic, (intptr_t)(0x01), (intptr_t) (0) },
{ "CONST_VALUE_13", DontDelete | ReadOnly | ConstantInteger, NoIntrinsic, (intptr_t)(0X20), (intptr_t) (0) },
{ "CONST_VALUE_14", DontDelete | ReadOnly | ConstantInteger, NoIntrinsic, (intptr_t)(0x1abc), (intptr_t) (0) },
{ "CONST_JAVASCRIPT", DontDelete | ReadOnly | ConstantInteger, NoIntrinsic, (intptr_t)(15), (intptr_t) (0) },
{ "readonly", DontDelete | ReadOnly | ConstantInteger, NoIntrinsic, (intptr_t)(0), (intptr_t) (0) },
{ "staticReadOnlyLongAttr", DontDelete | ReadOnly, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjConstructorStaticReadOnlyLongAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) },
{ "staticStringAttr", DontDelete, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjConstructorStaticStringAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjConstructorStaticStringAttr) },
{ "TestSubObj", DontDelete | ReadOnly, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjConstructorTestSubObj), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) },
{ "staticMethodWithCallbackAndOptionalArg", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjConstructorFunctionStaticMethodWithCallbackAndOptionalArg), (intptr_t) (0) },
{ "staticMethodWithCallbackArg", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjConstructorFunctionStaticMethodWithCallbackArg), (intptr_t) (1) },
{ "classMethod", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjConstructorFunctionClassMethod), (intptr_t) (0) },
{ "classMethodWithOptional", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjConstructorFunctionClassMethodWithOptional), (intptr_t) (0) },
{ "classMethod2", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjConstructorFunctionClassMethod2), (intptr_t) (1) },
#if ENABLE(Condition1)
{ "overloadedMethod1", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjConstructorFunctionOverloadedMethod1), (intptr_t) (1) },
#else
{ 0, 0, NoIntrinsic, 0, 0 },
#endif
};
#if ENABLE(Condition1)
COMPILE_ASSERT(0 == TestObj::CONDITIONAL_CONST, TestObjEnumCONDITIONAL_CONSTIsWrongUseDoNotCheckConstants);
#endif
COMPILE_ASSERT(0 == TestObj::CONST_VALUE_0, TestObjEnumCONST_VALUE_0IsWrongUseDoNotCheckConstants);
COMPILE_ASSERT(1 == TestObj::CONST_VALUE_1, TestObjEnumCONST_VALUE_1IsWrongUseDoNotCheckConstants);
COMPILE_ASSERT(2 == TestObj::CONST_VALUE_2, TestObjEnumCONST_VALUE_2IsWrongUseDoNotCheckConstants);
COMPILE_ASSERT(4 == TestObj::CONST_VALUE_4, TestObjEnumCONST_VALUE_4IsWrongUseDoNotCheckConstants);
COMPILE_ASSERT(8 == TestObj::CONST_VALUE_8, TestObjEnumCONST_VALUE_8IsWrongUseDoNotCheckConstants);
COMPILE_ASSERT(-1 == TestObj::CONST_VALUE_9, TestObjEnumCONST_VALUE_9IsWrongUseDoNotCheckConstants);
COMPILE_ASSERT(0xffffffff == TestObj::CONST_VALUE_11, TestObjEnumCONST_VALUE_11IsWrongUseDoNotCheckConstants);
COMPILE_ASSERT(0x01 == TestObj::CONST_VALUE_12, TestObjEnumCONST_VALUE_12IsWrongUseDoNotCheckConstants);
COMPILE_ASSERT(0X20 == TestObj::CONST_VALUE_13, TestObjEnumCONST_VALUE_13IsWrongUseDoNotCheckConstants);
COMPILE_ASSERT(0x1abc == TestObj::CONST_VALUE_14, TestObjEnumCONST_VALUE_14IsWrongUseDoNotCheckConstants);
COMPILE_ASSERT(15 == TestObj::CONST_IMPL, TestObjEnumCONST_IMPLIsWrongUseDoNotCheckConstants);
COMPILE_ASSERT(0 == TestObj::readonly, TestObjEnumreadonlyIsWrongUseDoNotCheckConstants);
EncodedJSValue JSC_HOST_CALL JSTestObjConstructor::constructJSTestObj(ExecState* exec)
{
JSTestObjConstructor* castedThis = jsCast<JSTestObjConstructor*>(exec->callee());
if (exec->argumentCount() < 1)
return throwVMError(exec, createNotEnoughArgumentsError(exec));
if (!exec->argument(0).isFunction())
return throwArgumentMustBeFunctionError(*exec, 0, "testCallback", "TestObj", nullptr);
RefPtr<TestCallback> testCallback = JSTestCallback::create(asObject(exec->uncheckedArgument(0)), castedThis->globalObject());
RefPtr<TestObj> object = TestObj::create(testCallback);
return JSValue::encode(asObject(toJS(exec, castedThis->globalObject(), object.get())));
}
const ClassInfo JSTestObjConstructor::s_info = { "TestObjectConstructor", &Base::s_info, 0, 0, CREATE_METHOD_TABLE(JSTestObjConstructor) };
JSTestObjConstructor::JSTestObjConstructor(Structure* structure, JSDOMGlobalObject* globalObject)
: DOMConstructorObject(structure, globalObject)
{
}
void JSTestObjConstructor::finishCreation(VM& vm, JSDOMGlobalObject* globalObject)
{
Base::finishCreation(vm);
ASSERT(inherits(info()));
putDirect(vm, vm.propertyNames->prototype, JSTestObj::getPrototype(vm, globalObject), DontDelete | ReadOnly);
putDirect(vm, vm.propertyNames->length, jsNumber(1), ReadOnly | DontDelete | DontEnum);
reifyStaticProperties(vm, JSTestObjConstructorTableValues, *this);
}
ConstructType JSTestObjConstructor::getConstructData(JSCell*, ConstructData& constructData)
{
constructData.native.function = constructJSTestObj;
return ConstructTypeHost;
}
static const HashTableValue JSTestObjPrototypeTableValues[] =
{
{ "constructor", DontEnum | ReadOnly, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) },
{ "readOnlyLongAttr", DontDelete | ReadOnly | CustomAccessor, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjReadOnlyLongAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) },
{ "readOnlyStringAttr", DontDelete | ReadOnly | CustomAccessor, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjReadOnlyStringAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) },
{ "readOnlyTestObjAttr", DontDelete | ReadOnly | CustomAccessor, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjReadOnlyTestObjAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) },
{ "enumAttr", DontDelete | CustomAccessor, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjEnumAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjEnumAttr) },
{ "byteAttr", DontDelete | CustomAccessor, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjByteAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjByteAttr) },
{ "octetAttr", DontDelete | CustomAccessor, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjOctetAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjOctetAttr) },
{ "shortAttr", DontDelete | CustomAccessor, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjShortAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjShortAttr) },
{ "unsignedShortAttr", DontDelete | CustomAccessor, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjUnsignedShortAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjUnsignedShortAttr) },
{ "longAttr", DontDelete | CustomAccessor, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjLongAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjLongAttr) },
{ "longLongAttr", DontDelete | CustomAccessor, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjLongLongAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjLongLongAttr) },
{ "unsignedLongLongAttr", DontDelete | CustomAccessor, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjUnsignedLongLongAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjUnsignedLongLongAttr) },
{ "stringAttr", DontDelete | CustomAccessor, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjStringAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjStringAttr) },
{ "testObjAttr", DontDelete | CustomAccessor, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjTestObjAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjTestObjAttr) },
{ "XMLObjAttr", DontDelete | CustomAccessor, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjXMLObjAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjXMLObjAttr) },
{ "create", DontDelete | CustomAccessor, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCreate), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjCreate) },
{ "reflectedStringAttr", DontDelete | CustomAccessor, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjReflectedStringAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjReflectedStringAttr) },
{ "reflectedIntegralAttr", DontDelete | CustomAccessor, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjReflectedIntegralAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjReflectedIntegralAttr) },
{ "reflectedUnsignedIntegralAttr", DontDelete | CustomAccessor, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjReflectedUnsignedIntegralAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjReflectedUnsignedIntegralAttr) },
{ "reflectedBooleanAttr", DontDelete | CustomAccessor, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjReflectedBooleanAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjReflectedBooleanAttr) },
{ "reflectedURLAttr", DontDelete | CustomAccessor, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjReflectedURLAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjReflectedURLAttr) },
{ "reflectedStringAttr", DontDelete | CustomAccessor, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjReflectedStringAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjReflectedStringAttr) },
{ "reflectedCustomIntegralAttr", DontDelete | CustomAccessor, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjReflectedCustomIntegralAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjReflectedCustomIntegralAttr) },
{ "reflectedCustomBooleanAttr", DontDelete | CustomAccessor, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjReflectedCustomBooleanAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjReflectedCustomBooleanAttr) },
{ "reflectedCustomURLAttr", DontDelete | CustomAccessor, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjReflectedCustomURLAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjReflectedCustomURLAttr) },
{ "typedArrayAttr", DontDelete | CustomAccessor, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjTypedArrayAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjTypedArrayAttr) },
{ "attrWithGetterException", DontDelete | CustomAccessor, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjAttrWithGetterException), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjAttrWithGetterException) },
{ "attrWithSetterException", DontDelete | CustomAccessor, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjAttrWithSetterException), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjAttrWithSetterException) },
{ "stringAttrWithGetterException", DontDelete | CustomAccessor, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjStringAttrWithGetterException), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjStringAttrWithGetterException) },
{ "stringAttrWithSetterException", DontDelete | CustomAccessor, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjStringAttrWithSetterException), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjStringAttrWithSetterException) },
{ "withScriptStateAttribute", DontDelete | CustomAccessor, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjWithScriptStateAttribute), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjWithScriptStateAttribute) },
{ "withScriptExecutionContextAttribute", DontDelete | CustomAccessor, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjWithScriptExecutionContextAttribute), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjWithScriptExecutionContextAttribute) },
{ "withScriptStateAttributeRaises", DontDelete | CustomAccessor, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjWithScriptStateAttributeRaises), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjWithScriptStateAttributeRaises) },
{ "withScriptExecutionContextAttributeRaises", DontDelete | CustomAccessor, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjWithScriptExecutionContextAttributeRaises), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjWithScriptExecutionContextAttributeRaises) },
{ "withScriptExecutionContextAndScriptStateAttribute", DontDelete | CustomAccessor, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjWithScriptExecutionContextAndScriptStateAttribute), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjWithScriptExecutionContextAndScriptStateAttribute) },
{ "withScriptExecutionContextAndScriptStateAttributeRaises", DontDelete | CustomAccessor, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjWithScriptExecutionContextAndScriptStateAttributeRaises), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjWithScriptExecutionContextAndScriptStateAttributeRaises) },
{ "withScriptExecutionContextAndScriptStateWithSpacesAttribute", DontDelete | CustomAccessor, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjWithScriptExecutionContextAndScriptStateWithSpacesAttribute), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjWithScriptExecutionContextAndScriptStateWithSpacesAttribute) },
{ "withScriptArgumentsAndCallStackAttribute", DontDelete | CustomAccessor, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjWithScriptArgumentsAndCallStackAttribute), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjWithScriptArgumentsAndCallStackAttribute) },
#if ENABLE(Condition1)
{ "conditionalAttr1", DontDelete | CustomAccessor, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjConditionalAttr1), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjConditionalAttr1) },
#else
{ 0, 0, NoIntrinsic, 0, 0 },
#endif
#if ENABLE(Condition1) && ENABLE(Condition2)
{ "conditionalAttr2", DontDelete | CustomAccessor, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjConditionalAttr2), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjConditionalAttr2) },
#else
{ 0, 0, NoIntrinsic, 0, 0 },
#endif
#if ENABLE(Condition1) || ENABLE(Condition2)
{ "conditionalAttr3", DontDelete | CustomAccessor, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjConditionalAttr3), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjConditionalAttr3) },
#else
{ 0, 0, NoIntrinsic, 0, 0 },
#endif
{ "cachedAttribute1", DontDelete | ReadOnly | CustomAccessor, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCachedAttribute1), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) },
{ "cachedAttribute2", DontDelete | ReadOnly | CustomAccessor, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCachedAttribute2), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) },
{ "anyAttribute", DontDelete | CustomAccessor, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjAnyAttribute), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjAnyAttribute) },
{ "mutablePoint", DontDelete | CustomAccessor, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjMutablePoint), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjMutablePoint) },
{ "immutablePoint", DontDelete | CustomAccessor, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjImmutablePoint), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjImmutablePoint) },
{ "strawberry", DontDelete | CustomAccessor, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjStrawberry), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjStrawberry) },
{ "strictFloat", DontDelete | CustomAccessor, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjStrictFloat), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjStrictFloat) },
{ "description", DontDelete | ReadOnly | CustomAccessor, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjDescription), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) },
{ "id", DontDelete | CustomAccessor, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjId), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjId) },
{ "hash", DontDelete | ReadOnly | CustomAccessor, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjHash), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) },
{ "replaceableAttribute", DontDelete | CustomAccessor, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjReplaceableAttribute), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjReplaceableAttribute) },
{ "nullableDoubleAttribute", DontDelete | ReadOnly | CustomAccessor, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjNullableDoubleAttribute), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) },
{ "nullableLongAttribute", DontDelete | ReadOnly | CustomAccessor, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjNullableLongAttribute), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) },
{ "nullableBooleanAttribute", DontDelete | ReadOnly | CustomAccessor, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjNullableBooleanAttribute), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) },
{ "nullableStringAttribute", DontDelete | ReadOnly | CustomAccessor, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjNullableStringAttribute), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) },
{ "nullableLongSettableAttribute", DontDelete | CustomAccessor, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjNullableLongSettableAttribute), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjNullableLongSettableAttribute) },
{ "nullableStringValue", DontDelete | CustomAccessor, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjNullableStringValue), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjNullableStringValue) },
{ "attribute", DontDelete | ReadOnly | CustomAccessor, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjAttribute), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) },
{ "attributeWithReservedEnumType", DontDelete | CustomAccessor, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjAttributeWithReservedEnumType), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjAttributeWithReservedEnumType) },
#if ENABLE(Condition1)
{ "CONDITIONAL_CONST", DontDelete | ReadOnly | ConstantInteger, NoIntrinsic, (intptr_t)(0), (intptr_t) (0) },
#else
{ 0, 0, NoIntrinsic, 0, 0 },
#endif
{ "CONST_VALUE_0", DontDelete | ReadOnly | ConstantInteger, NoIntrinsic, (intptr_t)(0), (intptr_t) (0) },
{ "CONST_VALUE_1", DontDelete | ReadOnly | ConstantInteger, NoIntrinsic, (intptr_t)(1), (intptr_t) (0) },
{ "CONST_VALUE_2", DontDelete | ReadOnly | ConstantInteger, NoIntrinsic, (intptr_t)(2), (intptr_t) (0) },
{ "CONST_VALUE_4", DontDelete | ReadOnly | ConstantInteger, NoIntrinsic, (intptr_t)(4), (intptr_t) (0) },
{ "CONST_VALUE_8", DontDelete | ReadOnly | ConstantInteger, NoIntrinsic, (intptr_t)(8), (intptr_t) (0) },
{ "CONST_VALUE_9", DontDelete | ReadOnly | ConstantInteger, NoIntrinsic, (intptr_t)(-1), (intptr_t) (0) },
{ "CONST_VALUE_11", DontDelete | ReadOnly | ConstantInteger, NoIntrinsic, (intptr_t)(0xffffffff), (intptr_t) (0) },
{ "CONST_VALUE_12", DontDelete | ReadOnly | ConstantInteger, NoIntrinsic, (intptr_t)(0x01), (intptr_t) (0) },
{ "CONST_VALUE_13", DontDelete | ReadOnly | ConstantInteger, NoIntrinsic, (intptr_t)(0X20), (intptr_t) (0) },
{ "CONST_VALUE_14", DontDelete | ReadOnly | ConstantInteger, NoIntrinsic, (intptr_t)(0x1abc), (intptr_t) (0) },
{ "CONST_JAVASCRIPT", DontDelete | ReadOnly | ConstantInteger, NoIntrinsic, (intptr_t)(15), (intptr_t) (0) },
{ "readonly", DontDelete | ReadOnly | ConstantInteger, NoIntrinsic, (intptr_t)(0), (intptr_t) (0) },
{ "voidMethod", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionVoidMethod), (intptr_t) (0) },
{ "voidMethodWithArgs", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionVoidMethodWithArgs), (intptr_t) (3) },
{ "byteMethod", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionByteMethod), (intptr_t) (0) },
{ "byteMethodWithArgs", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionByteMethodWithArgs), (intptr_t) (3) },
{ "octetMethod", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionOctetMethod), (intptr_t) (0) },
{ "octetMethodWithArgs", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionOctetMethodWithArgs), (intptr_t) (3) },
{ "longMethod", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionLongMethod), (intptr_t) (0) },
{ "longMethodWithArgs", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionLongMethodWithArgs), (intptr_t) (3) },
{ "objMethod", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionObjMethod), (intptr_t) (0) },
{ "objMethodWithArgs", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionObjMethodWithArgs), (intptr_t) (3) },
{ "methodWithSequenceArg", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithSequenceArg), (intptr_t) (1) },
{ "methodReturningSequence", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodReturningSequence), (intptr_t) (1) },
{ "methodWithEnumArg", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithEnumArg), (intptr_t) (1) },
{ "methodThatRequiresAllArgsAndThrows", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodThatRequiresAllArgsAndThrows), (intptr_t) (2) },
{ "serializedValue", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionSerializedValue), (intptr_t) (1) },
{ "optionsObject", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionOptionsObject), (intptr_t) (1) },
{ "methodWithException", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithException), (intptr_t) (0) },
{ "customMethod", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionCustomMethod), (intptr_t) (0) },
{ "customMethodWithArgs", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionCustomMethodWithArgs), (intptr_t) (3) },
{ "addEventListener", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionAddEventListener), (intptr_t) (2) },
{ "removeEventListener", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionRemoveEventListener), (intptr_t) (2) },
{ "withScriptStateVoid", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionWithScriptStateVoid), (intptr_t) (0) },
{ "withScriptStateObj", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionWithScriptStateObj), (intptr_t) (0) },
{ "withScriptStateVoidException", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionWithScriptStateVoidException), (intptr_t) (0) },
{ "withScriptStateObjException", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionWithScriptStateObjException), (intptr_t) (0) },
{ "withScriptExecutionContext", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionWithScriptExecutionContext), (intptr_t) (0) },
{ "withScriptExecutionContextAndScriptState", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionWithScriptExecutionContextAndScriptState), (intptr_t) (0) },
{ "withScriptExecutionContextAndScriptStateObjException", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionWithScriptExecutionContextAndScriptStateObjException), (intptr_t) (0) },
{ "withScriptExecutionContextAndScriptStateWithSpaces", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionWithScriptExecutionContextAndScriptStateWithSpaces), (intptr_t) (0) },
{ "withScriptArgumentsAndCallStack", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionWithScriptArgumentsAndCallStack), (intptr_t) (0) },
{ "methodWithOptionalArg", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithOptionalArg), (intptr_t) (0) },
{ "methodWithNonOptionalArgAndOptionalArg", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndOptionalArg), (intptr_t) (1) },
{ "methodWithNonOptionalArgAndTwoOptionalArgs", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndTwoOptionalArgs), (intptr_t) (1) },
{ "methodWithOptionalString", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithOptionalString), (intptr_t) (0) },
{ "methodWithOptionalStringIsUndefined", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithOptionalStringIsUndefined), (intptr_t) (0) },
{ "methodWithOptionalStringIsNullString", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithOptionalStringIsNullString), (intptr_t) (0) },
{ "methodWithCallbackArg", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithCallbackArg), (intptr_t) (1) },
{ "methodWithNonCallbackArgAndCallbackArg", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackArg), (intptr_t) (2) },
{ "methodWithCallbackAndOptionalArg", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithCallbackAndOptionalArg), (intptr_t) (0) },
#if ENABLE(Condition1)
{ "conditionalMethod1", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionConditionalMethod1), (intptr_t) (0) },
#else
{ 0, 0, NoIntrinsic, 0, 0 },
#endif
#if ENABLE(Condition1) && ENABLE(Condition2)
{ "conditionalMethod2", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionConditionalMethod2), (intptr_t) (0) },
#else
{ 0, 0, NoIntrinsic, 0, 0 },
#endif
#if ENABLE(Condition1) || ENABLE(Condition2)
{ "conditionalMethod3", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionConditionalMethod3), (intptr_t) (0) },
#else
{ 0, 0, NoIntrinsic, 0, 0 },
#endif
{ "overloadedMethod", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionOverloadedMethod), (intptr_t) (2) },
{ "classMethodWithClamp", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionClassMethodWithClamp), (intptr_t) (2) },
{ "methodWithUnsignedLongSequence", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithUnsignedLongSequence), (intptr_t) (1) },
{ "stringArrayFunction", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionStringArrayFunction), (intptr_t) (1) },
{ "domStringListFunction", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionDomStringListFunction), (intptr_t) (1) },
{ "methodWithAndWithoutNullableSequence", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithAndWithoutNullableSequence), (intptr_t) (2) },
{ "methodWithAndWithoutNullableSequence2", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithAndWithoutNullableSequence2), (intptr_t) (2) },
{ "getSVGDocument", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionGetSVGDocument), (intptr_t) (0) },
{ "convert1", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionConvert1), (intptr_t) (1) },
{ "convert2", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionConvert2), (intptr_t) (1) },
{ "convert4", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionConvert4), (intptr_t) (1) },
{ "convert5", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionConvert5), (intptr_t) (1) },
{ "mutablePointFunction", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMutablePointFunction), (intptr_t) (0) },
{ "immutablePointFunction", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionImmutablePointFunction), (intptr_t) (0) },
{ "orange", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionOrange), (intptr_t) (0) },
{ "strictFunction", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionStrictFunction), (intptr_t) (3) },
{ "strictFunctionWithSequence", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionStrictFunctionWithSequence), (intptr_t) (2) },
{ "strictFunctionWithArray", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionStrictFunctionWithArray), (intptr_t) (2) },
{ "variadicStringMethod", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionVariadicStringMethod), (intptr_t) (2) },
{ "variadicDoubleMethod", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionVariadicDoubleMethod), (intptr_t) (2) },
{ "variadicNodeMethod", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionVariadicNodeMethod), (intptr_t) (2) },
{ "any", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionAny), (intptr_t) (2) },
};
const ClassInfo JSTestObjPrototype::s_info = { "TestObjectPrototype", &Base::s_info, 0, 0, CREATE_METHOD_TABLE(JSTestObjPrototype) };
void JSTestObjPrototype::finishCreation(VM& vm)
{
Base::finishCreation(vm);
reifyStaticProperties(vm, JSTestObjPrototypeTableValues, *this);
}
const ClassInfo JSTestObj::s_info = { "TestObject", &Base::s_info, &JSTestObjTable, 0 , CREATE_METHOD_TABLE(JSTestObj) };
JSTestObj::JSTestObj(Structure* structure, JSDOMGlobalObject* globalObject, PassRefPtr<TestObj> impl)
: JSDOMWrapper(structure, globalObject)
, m_impl(impl.leakRef())
{
}
JSObject* JSTestObj::createPrototype(VM& vm, JSGlobalObject* globalObject)
{
return JSTestObjPrototype::create(vm, globalObject, JSTestObjPrototype::createStructure(vm, globalObject, globalObject->objectPrototype()));
}
JSObject* JSTestObj::getPrototype(VM& vm, JSGlobalObject* globalObject)
{
return getDOMPrototype<JSTestObj>(vm, globalObject);
}
void JSTestObj::destroy(JSC::JSCell* cell)
{
JSTestObj* thisObject = static_cast<JSTestObj*>(cell);
thisObject->JSTestObj::~JSTestObj();
}
JSTestObj::~JSTestObj()
{
releaseImplIfNotNull();
}
bool JSTestObj::getOwnPropertySlot(JSObject* object, ExecState* exec, PropertyName propertyName, PropertySlot& slot)
{
JSTestObj* thisObject = jsCast<JSTestObj*>(object);
ASSERT_GC_OBJECT_INHERITS(thisObject, info());
return getStaticValueSlot<JSTestObj, Base>(exec, JSTestObjTable, thisObject, propertyName, slot);
}
EncodedJSValue jsTestObjReadOnlyLongAttr(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
{
UNUSED_PARAM(exec);
UNUSED_PARAM(slotBase);
UNUSED_PARAM(thisValue);
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
if (jsDynamicCast<JSTestObjPrototype*>(slotBase))
return reportDeprecatedGetterError(*exec, "TestObj", "readOnlyLongAttr");
return throwGetterTypeError(*exec, "TestObj", "readOnlyLongAttr");
}
TestObj& impl = castedThis->impl();
JSValue result = jsNumber(impl.readOnlyLongAttr());
return JSValue::encode(result);
}
EncodedJSValue jsTestObjReadOnlyStringAttr(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
{
UNUSED_PARAM(exec);
UNUSED_PARAM(slotBase);
UNUSED_PARAM(thisValue);
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
if (jsDynamicCast<JSTestObjPrototype*>(slotBase))
return reportDeprecatedGetterError(*exec, "TestObj", "readOnlyStringAttr");
return throwGetterTypeError(*exec, "TestObj", "readOnlyStringAttr");
}
TestObj& impl = castedThis->impl();
JSValue result = jsStringWithCache(exec, impl.readOnlyStringAttr());
return JSValue::encode(result);
}
EncodedJSValue jsTestObjReadOnlyTestObjAttr(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
{
UNUSED_PARAM(exec);
UNUSED_PARAM(slotBase);
UNUSED_PARAM(thisValue);
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
if (jsDynamicCast<JSTestObjPrototype*>(slotBase))
return reportDeprecatedGetterError(*exec, "TestObj", "readOnlyTestObjAttr");
return throwGetterTypeError(*exec, "TestObj", "readOnlyTestObjAttr");
}
TestObj& impl = castedThis->impl();
JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl.readOnlyTestObjAttr()));
return JSValue::encode(result);
}
EncodedJSValue jsTestObjConstructorStaticReadOnlyLongAttr(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
{
UNUSED_PARAM(exec);
UNUSED_PARAM(slotBase);
UNUSED_PARAM(thisValue);
JSValue result = jsNumber(TestObj::staticReadOnlyLongAttr());
return JSValue::encode(result);
}
EncodedJSValue jsTestObjConstructorStaticStringAttr(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
{
UNUSED_PARAM(exec);
UNUSED_PARAM(slotBase);
UNUSED_PARAM(thisValue);
JSValue result = jsStringWithCache(exec, TestObj::staticStringAttr());
return JSValue::encode(result);
}
EncodedJSValue jsTestObjConstructorTestSubObj(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
{
UNUSED_PARAM(exec);
UNUSED_PARAM(slotBase);
UNUSED_PARAM(thisValue);
JSTestObj* castedThis = jsCast<JSTestObj*>(slotBase);
return JSValue::encode(JSTestSubObj::getConstructor(exec->vm(), castedThis->globalObject()));
}
EncodedJSValue jsTestObjTestSubObjEnabledBySettingConstructor(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
{
UNUSED_PARAM(exec);
UNUSED_PARAM(slotBase);
UNUSED_PARAM(thisValue);
JSTestObj* castedThis = jsCast<JSTestObj*>(slotBase);
if (!castedThis->impl().frame())
return JSValue::encode(jsUndefined());
Settings& settings = castedThis->impl().frame()->settings();
if (!settings.testSettingEnabled())
return JSValue::encode(jsUndefined());
return JSValue::encode(JSTestSubObj::getConstructor(exec->vm(), castedThis->globalObject()));
}
EncodedJSValue jsTestObjEnumAttr(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
{
UNUSED_PARAM(exec);
UNUSED_PARAM(slotBase);
UNUSED_PARAM(thisValue);
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
if (jsDynamicCast<JSTestObjPrototype*>(slotBase))
return reportDeprecatedGetterError(*exec, "TestObj", "enumAttr");
return throwGetterTypeError(*exec, "TestObj", "enumAttr");
}
TestObj& impl = castedThis->impl();
JSValue result = jsStringWithCache(exec, impl.enumAttr());
return JSValue::encode(result);
}
EncodedJSValue jsTestObjByteAttr(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
{
UNUSED_PARAM(exec);
UNUSED_PARAM(slotBase);
UNUSED_PARAM(thisValue);
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
if (jsDynamicCast<JSTestObjPrototype*>(slotBase))
return reportDeprecatedGetterError(*exec, "TestObj", "byteAttr");
return throwGetterTypeError(*exec, "TestObj", "byteAttr");
}
TestObj& impl = castedThis->impl();
JSValue result = jsNumber(impl.byteAttr());
return JSValue::encode(result);
}
EncodedJSValue jsTestObjOctetAttr(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
{
UNUSED_PARAM(exec);
UNUSED_PARAM(slotBase);
UNUSED_PARAM(thisValue);
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
if (jsDynamicCast<JSTestObjPrototype*>(slotBase))
return reportDeprecatedGetterError(*exec, "TestObj", "octetAttr");
return throwGetterTypeError(*exec, "TestObj", "octetAttr");
}
TestObj& impl = castedThis->impl();
JSValue result = jsNumber(impl.octetAttr());
return JSValue::encode(result);
}
EncodedJSValue jsTestObjShortAttr(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
{
UNUSED_PARAM(exec);
UNUSED_PARAM(slotBase);
UNUSED_PARAM(thisValue);
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
if (jsDynamicCast<JSTestObjPrototype*>(slotBase))
return reportDeprecatedGetterError(*exec, "TestObj", "shortAttr");
return throwGetterTypeError(*exec, "TestObj", "shortAttr");
}
TestObj& impl = castedThis->impl();
JSValue result = jsNumber(impl.shortAttr());
return JSValue::encode(result);
}
EncodedJSValue jsTestObjUnsignedShortAttr(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
{
UNUSED_PARAM(exec);
UNUSED_PARAM(slotBase);
UNUSED_PARAM(thisValue);
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
if (jsDynamicCast<JSTestObjPrototype*>(slotBase))
return reportDeprecatedGetterError(*exec, "TestObj", "unsignedShortAttr");
return throwGetterTypeError(*exec, "TestObj", "unsignedShortAttr");
}
TestObj& impl = castedThis->impl();
JSValue result = jsNumber(impl.unsignedShortAttr());
return JSValue::encode(result);
}
EncodedJSValue jsTestObjLongAttr(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
{
UNUSED_PARAM(exec);
UNUSED_PARAM(slotBase);
UNUSED_PARAM(thisValue);
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
if (jsDynamicCast<JSTestObjPrototype*>(slotBase))
return reportDeprecatedGetterError(*exec, "TestObj", "longAttr");
return throwGetterTypeError(*exec, "TestObj", "longAttr");
}
TestObj& impl = castedThis->impl();
JSValue result = jsNumber(impl.longAttr());
return JSValue::encode(result);
}
EncodedJSValue jsTestObjLongLongAttr(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
{
UNUSED_PARAM(exec);
UNUSED_PARAM(slotBase);
UNUSED_PARAM(thisValue);
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
if (jsDynamicCast<JSTestObjPrototype*>(slotBase))
return reportDeprecatedGetterError(*exec, "TestObj", "longLongAttr");
return throwGetterTypeError(*exec, "TestObj", "longLongAttr");
}
TestObj& impl = castedThis->impl();
JSValue result = jsNumber(impl.longLongAttr());
return JSValue::encode(result);
}
EncodedJSValue jsTestObjUnsignedLongLongAttr(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
{
UNUSED_PARAM(exec);
UNUSED_PARAM(slotBase);
UNUSED_PARAM(thisValue);
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
if (jsDynamicCast<JSTestObjPrototype*>(slotBase))
return reportDeprecatedGetterError(*exec, "TestObj", "unsignedLongLongAttr");
return throwGetterTypeError(*exec, "TestObj", "unsignedLongLongAttr");
}
TestObj& impl = castedThis->impl();
JSValue result = jsNumber(impl.unsignedLongLongAttr());
return JSValue::encode(result);
}
EncodedJSValue jsTestObjStringAttr(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
{
UNUSED_PARAM(exec);
UNUSED_PARAM(slotBase);
UNUSED_PARAM(thisValue);
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
if (jsDynamicCast<JSTestObjPrototype*>(slotBase))
return reportDeprecatedGetterError(*exec, "TestObj", "stringAttr");
return throwGetterTypeError(*exec, "TestObj", "stringAttr");
}
TestObj& impl = castedThis->impl();
JSValue result = jsStringWithCache(exec, impl.stringAttr());
return JSValue::encode(result);
}
EncodedJSValue jsTestObjTestObjAttr(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
{
UNUSED_PARAM(exec);
UNUSED_PARAM(slotBase);
UNUSED_PARAM(thisValue);
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
if (jsDynamicCast<JSTestObjPrototype*>(slotBase))
return reportDeprecatedGetterError(*exec, "TestObj", "testObjAttr");
return throwGetterTypeError(*exec, "TestObj", "testObjAttr");
}
TestObj& impl = castedThis->impl();
JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl.testObjAttr()));
return JSValue::encode(result);
}
EncodedJSValue jsTestObjXMLObjAttr(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
{
UNUSED_PARAM(exec);
UNUSED_PARAM(slotBase);
UNUSED_PARAM(thisValue);
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
if (jsDynamicCast<JSTestObjPrototype*>(slotBase))
return reportDeprecatedGetterError(*exec, "TestObj", "XMLObjAttr");
return throwGetterTypeError(*exec, "TestObj", "XMLObjAttr");
}
TestObj& impl = castedThis->impl();
JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl.xmlObjAttr()));
return JSValue::encode(result);
}
EncodedJSValue jsTestObjCreate(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
{
UNUSED_PARAM(exec);
UNUSED_PARAM(slotBase);
UNUSED_PARAM(thisValue);
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
if (jsDynamicCast<JSTestObjPrototype*>(slotBase))
return reportDeprecatedGetterError(*exec, "TestObj", "create");
return throwGetterTypeError(*exec, "TestObj", "create");
}
TestObj& impl = castedThis->impl();
JSValue result = jsBoolean(impl.isCreate());
return JSValue::encode(result);
}
EncodedJSValue jsTestObjReflectedStringAttr(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
{
UNUSED_PARAM(exec);
UNUSED_PARAM(slotBase);
UNUSED_PARAM(thisValue);
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
if (jsDynamicCast<JSTestObjPrototype*>(slotBase))
return reportDeprecatedGetterError(*exec, "TestObj", "reflectedStringAttr");
return throwGetterTypeError(*exec, "TestObj", "reflectedStringAttr");
}
TestObj& impl = castedThis->impl();
JSValue result = jsStringWithCache(exec, impl.fastGetAttribute(WebCore::HTMLNames::reflectedstringattrAttr));
return JSValue::encode(result);
}
EncodedJSValue jsTestObjReflectedIntegralAttr(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
{
UNUSED_PARAM(exec);
UNUSED_PARAM(slotBase);
UNUSED_PARAM(thisValue);
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
if (jsDynamicCast<JSTestObjPrototype*>(slotBase))
return reportDeprecatedGetterError(*exec, "TestObj", "reflectedIntegralAttr");
return throwGetterTypeError(*exec, "TestObj", "reflectedIntegralAttr");
}
TestObj& impl = castedThis->impl();
JSValue result = jsNumber(impl.getIntegralAttribute(WebCore::HTMLNames::reflectedintegralattrAttr));
return JSValue::encode(result);
}
EncodedJSValue jsTestObjReflectedUnsignedIntegralAttr(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
{
UNUSED_PARAM(exec);
UNUSED_PARAM(slotBase);
UNUSED_PARAM(thisValue);
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
if (jsDynamicCast<JSTestObjPrototype*>(slotBase))
return reportDeprecatedGetterError(*exec, "TestObj", "reflectedUnsignedIntegralAttr");
return throwGetterTypeError(*exec, "TestObj", "reflectedUnsignedIntegralAttr");
}
TestObj& impl = castedThis->impl();
JSValue result = jsNumber(std::max(0, impl.getIntegralAttribute(WebCore::HTMLNames::reflectedunsignedintegralattrAttr)));
return JSValue::encode(result);
}
EncodedJSValue jsTestObjReflectedBooleanAttr(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
{
UNUSED_PARAM(exec);
UNUSED_PARAM(slotBase);
UNUSED_PARAM(thisValue);
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
if (jsDynamicCast<JSTestObjPrototype*>(slotBase))
return reportDeprecatedGetterError(*exec, "TestObj", "reflectedBooleanAttr");
return throwGetterTypeError(*exec, "TestObj", "reflectedBooleanAttr");
}
TestObj& impl = castedThis->impl();
JSValue result = jsBoolean(impl.fastHasAttribute(WebCore::HTMLNames::reflectedbooleanattrAttr));
return JSValue::encode(result);
}
EncodedJSValue jsTestObjReflectedURLAttr(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
{
UNUSED_PARAM(exec);
UNUSED_PARAM(slotBase);
UNUSED_PARAM(thisValue);
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
if (jsDynamicCast<JSTestObjPrototype*>(slotBase))
return reportDeprecatedGetterError(*exec, "TestObj", "reflectedURLAttr");
return throwGetterTypeError(*exec, "TestObj", "reflectedURLAttr");
}
TestObj& impl = castedThis->impl();
JSValue result = jsStringWithCache(exec, impl.getURLAttribute(WebCore::HTMLNames::reflectedurlattrAttr));
return JSValue::encode(result);
}
EncodedJSValue jsTestObjReflectedStringAttr(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
{
UNUSED_PARAM(exec);
UNUSED_PARAM(slotBase);
UNUSED_PARAM(thisValue);
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
if (jsDynamicCast<JSTestObjPrototype*>(slotBase))
return reportDeprecatedGetterError(*exec, "TestObj", "reflectedStringAttr");
return throwGetterTypeError(*exec, "TestObj", "reflectedStringAttr");
}
TestObj& impl = castedThis->impl();
JSValue result = jsStringWithCache(exec, impl.fastGetAttribute(WebCore::HTMLNames::customContentStringAttrAttr));
return JSValue::encode(result);
}
EncodedJSValue jsTestObjReflectedCustomIntegralAttr(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
{
UNUSED_PARAM(exec);
UNUSED_PARAM(slotBase);
UNUSED_PARAM(thisValue);
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
if (jsDynamicCast<JSTestObjPrototype*>(slotBase))
return reportDeprecatedGetterError(*exec, "TestObj", "reflectedCustomIntegralAttr");
return throwGetterTypeError(*exec, "TestObj", "reflectedCustomIntegralAttr");
}
TestObj& impl = castedThis->impl();
JSValue result = jsNumber(impl.getIntegralAttribute(WebCore::HTMLNames::customContentIntegralAttrAttr));
return JSValue::encode(result);
}
EncodedJSValue jsTestObjReflectedCustomBooleanAttr(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
{
UNUSED_PARAM(exec);
UNUSED_PARAM(slotBase);
UNUSED_PARAM(thisValue);
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
if (jsDynamicCast<JSTestObjPrototype*>(slotBase))
return reportDeprecatedGetterError(*exec, "TestObj", "reflectedCustomBooleanAttr");
return throwGetterTypeError(*exec, "TestObj", "reflectedCustomBooleanAttr");
}
TestObj& impl = castedThis->impl();
JSValue result = jsBoolean(impl.fastHasAttribute(WebCore::HTMLNames::customContentBooleanAttrAttr));
return JSValue::encode(result);
}
EncodedJSValue jsTestObjReflectedCustomURLAttr(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
{
UNUSED_PARAM(exec);
UNUSED_PARAM(slotBase);
UNUSED_PARAM(thisValue);
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
if (jsDynamicCast<JSTestObjPrototype*>(slotBase))
return reportDeprecatedGetterError(*exec, "TestObj", "reflectedCustomURLAttr");
return throwGetterTypeError(*exec, "TestObj", "reflectedCustomURLAttr");
}
TestObj& impl = castedThis->impl();
JSValue result = jsStringWithCache(exec, impl.getURLAttribute(WebCore::HTMLNames::customContentURLAttrAttr));
return JSValue::encode(result);
}
EncodedJSValue jsTestObjTypedArrayAttr(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
{
UNUSED_PARAM(exec);
UNUSED_PARAM(slotBase);
UNUSED_PARAM(thisValue);
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
if (jsDynamicCast<JSTestObjPrototype*>(slotBase))
return reportDeprecatedGetterError(*exec, "TestObj", "typedArrayAttr");
return throwGetterTypeError(*exec, "TestObj", "typedArrayAttr");
}
TestObj& impl = castedThis->impl();
JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl.typedArrayAttr()));
return JSValue::encode(result);
}
EncodedJSValue jsTestObjAttrWithGetterException(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
{
UNUSED_PARAM(exec);
UNUSED_PARAM(slotBase);
UNUSED_PARAM(thisValue);
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
if (jsDynamicCast<JSTestObjPrototype*>(slotBase))
return reportDeprecatedGetterError(*exec, "TestObj", "attrWithGetterException");
return throwGetterTypeError(*exec, "TestObj", "attrWithGetterException");
}
ExceptionCode ec = 0;
TestObj& impl = castedThis->impl();
JSValue result = jsNumber(impl.attrWithGetterException(ec));
setDOMException(exec, ec);
return JSValue::encode(result);
}
EncodedJSValue jsTestObjAttrWithSetterException(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
{
UNUSED_PARAM(exec);
UNUSED_PARAM(slotBase);
UNUSED_PARAM(thisValue);
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
if (jsDynamicCast<JSTestObjPrototype*>(slotBase))
return reportDeprecatedGetterError(*exec, "TestObj", "attrWithSetterException");
return throwGetterTypeError(*exec, "TestObj", "attrWithSetterException");
}
TestObj& impl = castedThis->impl();
JSValue result = jsNumber(impl.attrWithSetterException());
return JSValue::encode(result);
}
EncodedJSValue jsTestObjStringAttrWithGetterException(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
{
UNUSED_PARAM(exec);
UNUSED_PARAM(slotBase);
UNUSED_PARAM(thisValue);
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
if (jsDynamicCast<JSTestObjPrototype*>(slotBase))
return reportDeprecatedGetterError(*exec, "TestObj", "stringAttrWithGetterException");
return throwGetterTypeError(*exec, "TestObj", "stringAttrWithGetterException");
}
ExceptionCode ec = 0;
TestObj& impl = castedThis->impl();
JSValue result = jsStringWithCache(exec, impl.stringAttrWithGetterException(ec));
setDOMException(exec, ec);
return JSValue::encode(result);
}
EncodedJSValue jsTestObjStringAttrWithSetterException(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
{
UNUSED_PARAM(exec);
UNUSED_PARAM(slotBase);
UNUSED_PARAM(thisValue);
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
if (jsDynamicCast<JSTestObjPrototype*>(slotBase))
return reportDeprecatedGetterError(*exec, "TestObj", "stringAttrWithSetterException");
return throwGetterTypeError(*exec, "TestObj", "stringAttrWithSetterException");
}
TestObj& impl = castedThis->impl();
JSValue result = jsStringWithCache(exec, impl.stringAttrWithSetterException());
return JSValue::encode(result);
}
EncodedJSValue jsTestObjCustomAttr(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
{
UNUSED_PARAM(exec);
UNUSED_PARAM(slotBase);
UNUSED_PARAM(thisValue);
JSTestObj* castedThis = jsCast<JSTestObj*>(slotBase);
return JSValue::encode(castedThis->customAttr(exec));
}
EncodedJSValue jsTestObjWithScriptStateAttribute(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
{
UNUSED_PARAM(exec);
UNUSED_PARAM(slotBase);
UNUSED_PARAM(thisValue);
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
if (jsDynamicCast<JSTestObjPrototype*>(slotBase))
return reportDeprecatedGetterError(*exec, "TestObj", "withScriptStateAttribute");
return throwGetterTypeError(*exec, "TestObj", "withScriptStateAttribute");
}
TestObj& impl = castedThis->impl();
JSValue result = jsNumber(impl.withScriptStateAttribute(exec));
return JSValue::encode(result);
}
EncodedJSValue jsTestObjWithScriptExecutionContextAttribute(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
{
UNUSED_PARAM(exec);
UNUSED_PARAM(slotBase);
UNUSED_PARAM(thisValue);
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
if (jsDynamicCast<JSTestObjPrototype*>(slotBase))
return reportDeprecatedGetterError(*exec, "TestObj", "withScriptExecutionContextAttribute");
return throwGetterTypeError(*exec, "TestObj", "withScriptExecutionContextAttribute");
}
ScriptExecutionContext* scriptContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
if (!scriptContext)
return JSValue::encode(jsUndefined());
TestObj& impl = castedThis->impl();
JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl.withScriptExecutionContextAttribute(scriptContext)));
return JSValue::encode(result);
}
EncodedJSValue jsTestObjWithScriptStateAttributeRaises(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
{
UNUSED_PARAM(exec);
UNUSED_PARAM(slotBase);
UNUSED_PARAM(thisValue);
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
if (jsDynamicCast<JSTestObjPrototype*>(slotBase))
return reportDeprecatedGetterError(*exec, "TestObj", "withScriptStateAttributeRaises");
return throwGetterTypeError(*exec, "TestObj", "withScriptStateAttributeRaises");
}
ExceptionCode ec = 0;
TestObj& impl = castedThis->impl();
JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl.withScriptStateAttributeRaises(exec, ec)));
setDOMException(exec, ec);
return JSValue::encode(result);
}
EncodedJSValue jsTestObjWithScriptExecutionContextAttributeRaises(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
{
UNUSED_PARAM(exec);
UNUSED_PARAM(slotBase);
UNUSED_PARAM(thisValue);
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
if (jsDynamicCast<JSTestObjPrototype*>(slotBase))
return reportDeprecatedGetterError(*exec, "TestObj", "withScriptExecutionContextAttributeRaises");
return throwGetterTypeError(*exec, "TestObj", "withScriptExecutionContextAttributeRaises");
}
ExceptionCode ec = 0;
ScriptExecutionContext* scriptContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
if (!scriptContext)
return JSValue::encode(jsUndefined());
TestObj& impl = castedThis->impl();
JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl.withScriptExecutionContextAttributeRaises(scriptContext, ec)));
setDOMException(exec, ec);
return JSValue::encode(result);
}
EncodedJSValue jsTestObjWithScriptExecutionContextAndScriptStateAttribute(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
{
UNUSED_PARAM(exec);
UNUSED_PARAM(slotBase);
UNUSED_PARAM(thisValue);
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
if (jsDynamicCast<JSTestObjPrototype*>(slotBase))
return reportDeprecatedGetterError(*exec, "TestObj", "withScriptExecutionContextAndScriptStateAttribute");
return throwGetterTypeError(*exec, "TestObj", "withScriptExecutionContextAndScriptStateAttribute");
}
ScriptExecutionContext* scriptContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
if (!scriptContext)
return JSValue::encode(jsUndefined());
TestObj& impl = castedThis->impl();
JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl.withScriptExecutionContextAndScriptStateAttribute(exec, scriptContext)));
return JSValue::encode(result);
}
EncodedJSValue jsTestObjWithScriptExecutionContextAndScriptStateAttributeRaises(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
{
UNUSED_PARAM(exec);
UNUSED_PARAM(slotBase);
UNUSED_PARAM(thisValue);
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
if (jsDynamicCast<JSTestObjPrototype*>(slotBase))
return reportDeprecatedGetterError(*exec, "TestObj", "withScriptExecutionContextAndScriptStateAttributeRaises");
return throwGetterTypeError(*exec, "TestObj", "withScriptExecutionContextAndScriptStateAttributeRaises");
}
ExceptionCode ec = 0;
ScriptExecutionContext* scriptContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
if (!scriptContext)
return JSValue::encode(jsUndefined());
TestObj& impl = castedThis->impl();
JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl.withScriptExecutionContextAndScriptStateAttributeRaises(exec, scriptContext, ec)));
setDOMException(exec, ec);
return JSValue::encode(result);
}
EncodedJSValue jsTestObjWithScriptExecutionContextAndScriptStateWithSpacesAttribute(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
{
UNUSED_PARAM(exec);
UNUSED_PARAM(slotBase);
UNUSED_PARAM(thisValue);
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
if (jsDynamicCast<JSTestObjPrototype*>(slotBase))
return reportDeprecatedGetterError(*exec, "TestObj", "withScriptExecutionContextAndScriptStateWithSpacesAttribute");
return throwGetterTypeError(*exec, "TestObj", "withScriptExecutionContextAndScriptStateWithSpacesAttribute");
}
ScriptExecutionContext* scriptContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
if (!scriptContext)
return JSValue::encode(jsUndefined());
TestObj& impl = castedThis->impl();
JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl.withScriptExecutionContextAndScriptStateWithSpacesAttribute(exec, scriptContext)));
return JSValue::encode(result);
}
EncodedJSValue jsTestObjWithScriptArgumentsAndCallStackAttribute(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
{
UNUSED_PARAM(exec);
UNUSED_PARAM(slotBase);
UNUSED_PARAM(thisValue);
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
if (jsDynamicCast<JSTestObjPrototype*>(slotBase))
return reportDeprecatedGetterError(*exec, "TestObj", "withScriptArgumentsAndCallStackAttribute");
return throwGetterTypeError(*exec, "TestObj", "withScriptArgumentsAndCallStackAttribute");
}
TestObj& impl = castedThis->impl();
JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl.withScriptArgumentsAndCallStackAttribute()));
return JSValue::encode(result);
}
#if ENABLE(Condition1)
EncodedJSValue jsTestObjConditionalAttr1(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
{
UNUSED_PARAM(exec);
UNUSED_PARAM(slotBase);
UNUSED_PARAM(thisValue);
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
if (jsDynamicCast<JSTestObjPrototype*>(slotBase))
return reportDeprecatedGetterError(*exec, "TestObj", "conditionalAttr1");
return throwGetterTypeError(*exec, "TestObj", "conditionalAttr1");
}
TestObj& impl = castedThis->impl();
JSValue result = jsNumber(impl.conditionalAttr1());
return JSValue::encode(result);
}
#endif
#if ENABLE(Condition1) && ENABLE(Condition2)
EncodedJSValue jsTestObjConditionalAttr2(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
{
UNUSED_PARAM(exec);
UNUSED_PARAM(slotBase);
UNUSED_PARAM(thisValue);
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
if (jsDynamicCast<JSTestObjPrototype*>(slotBase))
return reportDeprecatedGetterError(*exec, "TestObj", "conditionalAttr2");
return throwGetterTypeError(*exec, "TestObj", "conditionalAttr2");
}
TestObj& impl = castedThis->impl();
JSValue result = jsNumber(impl.conditionalAttr2());
return JSValue::encode(result);
}
#endif
#if ENABLE(Condition1) || ENABLE(Condition2)
EncodedJSValue jsTestObjConditionalAttr3(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
{
UNUSED_PARAM(exec);
UNUSED_PARAM(slotBase);
UNUSED_PARAM(thisValue);
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
if (jsDynamicCast<JSTestObjPrototype*>(slotBase))
return reportDeprecatedGetterError(*exec, "TestObj", "conditionalAttr3");
return throwGetterTypeError(*exec, "TestObj", "conditionalAttr3");
}
TestObj& impl = castedThis->impl();
JSValue result = jsNumber(impl.conditionalAttr3());
return JSValue::encode(result);
}
#endif
#if ENABLE(Condition1)
EncodedJSValue jsTestObjConditionalAttr4Constructor(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
{
UNUSED_PARAM(exec);
UNUSED_PARAM(slotBase);
UNUSED_PARAM(thisValue);
JSTestObj* castedThis = jsCast<JSTestObj*>(slotBase);
return JSValue::encode(JSTestObjectA::getConstructor(exec->vm(), castedThis->globalObject()));
}
#endif
#if ENABLE(Condition1) && ENABLE(Condition2)
EncodedJSValue jsTestObjConditionalAttr5Constructor(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
{
UNUSED_PARAM(exec);
UNUSED_PARAM(slotBase);
UNUSED_PARAM(thisValue);
JSTestObj* castedThis = jsCast<JSTestObj*>(slotBase);
return JSValue::encode(JSTestObjectB::getConstructor(exec->vm(), castedThis->globalObject()));
}
#endif
#if ENABLE(Condition1) || ENABLE(Condition2)
EncodedJSValue jsTestObjConditionalAttr6Constructor(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
{
UNUSED_PARAM(exec);
UNUSED_PARAM(slotBase);
UNUSED_PARAM(thisValue);
JSTestObj* castedThis = jsCast<JSTestObj*>(slotBase);
return JSValue::encode(JSTestObjectC::getConstructor(exec->vm(), castedThis->globalObject()));
}
#endif
EncodedJSValue jsTestObjCachedAttribute1(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
{
UNUSED_PARAM(exec);
UNUSED_PARAM(slotBase);
UNUSED_PARAM(thisValue);
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
if (jsDynamicCast<JSTestObjPrototype*>(slotBase))
return reportDeprecatedGetterError(*exec, "TestObj", "cachedAttribute1");
return throwGetterTypeError(*exec, "TestObj", "cachedAttribute1");
}
if (JSValue cachedValue = castedThis->m_cachedAttribute1.get())
return JSValue::encode(cachedValue);
TestObj& impl = castedThis->impl();
JSValue result = (impl.cachedAttribute1().hasNoValue() ? jsNull() : impl.cachedAttribute1().jsValue());
castedThis->m_cachedAttribute1.set(exec->vm(), castedThis, result);
return JSValue::encode(result);
}
EncodedJSValue jsTestObjCachedAttribute2(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
{
UNUSED_PARAM(exec);
UNUSED_PARAM(slotBase);
UNUSED_PARAM(thisValue);
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
if (jsDynamicCast<JSTestObjPrototype*>(slotBase))
return reportDeprecatedGetterError(*exec, "TestObj", "cachedAttribute2");
return throwGetterTypeError(*exec, "TestObj", "cachedAttribute2");
}
if (JSValue cachedValue = castedThis->m_cachedAttribute2.get())
return JSValue::encode(cachedValue);
TestObj& impl = castedThis->impl();
JSValue result = (impl.cachedAttribute2().hasNoValue() ? jsNull() : impl.cachedAttribute2().jsValue());
castedThis->m_cachedAttribute2.set(exec->vm(), castedThis, result);
return JSValue::encode(result);
}
EncodedJSValue jsTestObjAnyAttribute(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
{
UNUSED_PARAM(exec);
UNUSED_PARAM(slotBase);
UNUSED_PARAM(thisValue);
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
if (jsDynamicCast<JSTestObjPrototype*>(slotBase))
return reportDeprecatedGetterError(*exec, "TestObj", "anyAttribute");
return throwGetterTypeError(*exec, "TestObj", "anyAttribute");
}
TestObj& impl = castedThis->impl();
JSValue result = (impl.anyAttribute().hasNoValue() ? jsNull() : impl.anyAttribute().jsValue());
return JSValue::encode(result);
}
EncodedJSValue jsTestObjContentDocument(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
{
UNUSED_PARAM(exec);
UNUSED_PARAM(slotBase);
UNUSED_PARAM(thisValue);
JSTestObj* castedThis = jsCast<JSTestObj*>(slotBase);
TestObj& impl = castedThis->impl();
return JSValue::encode(shouldAllowAccessToNode(exec, impl.contentDocument()) ? toJS(exec, castedThis->globalObject(), WTF::getPtr(impl.contentDocument())) : jsNull());
}
EncodedJSValue jsTestObjMutablePoint(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
{
UNUSED_PARAM(exec);
UNUSED_PARAM(slotBase);
UNUSED_PARAM(thisValue);
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
if (jsDynamicCast<JSTestObjPrototype*>(slotBase))
return reportDeprecatedGetterError(*exec, "TestObj", "mutablePoint");
return throwGetterTypeError(*exec, "TestObj", "mutablePoint");
}
TestObj& impl = castedThis->impl();
JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(SVGStaticPropertyTearOff<TestObj, SVGPoint>::create(impl, impl.mutablePoint(), &TestObj::updateMutablePoint)));
return JSValue::encode(result);
}
EncodedJSValue jsTestObjImmutablePoint(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
{
UNUSED_PARAM(exec);
UNUSED_PARAM(slotBase);
UNUSED_PARAM(thisValue);
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
if (jsDynamicCast<JSTestObjPrototype*>(slotBase))
return reportDeprecatedGetterError(*exec, "TestObj", "immutablePoint");
return throwGetterTypeError(*exec, "TestObj", "immutablePoint");
}
TestObj& impl = castedThis->impl();
JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(SVGPropertyTearOff<SVGPoint>::create(impl.immutablePoint())));
return JSValue::encode(result);
}
EncodedJSValue jsTestObjStrawberry(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
{
UNUSED_PARAM(exec);
UNUSED_PARAM(slotBase);
UNUSED_PARAM(thisValue);
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
if (jsDynamicCast<JSTestObjPrototype*>(slotBase))
return reportDeprecatedGetterError(*exec, "TestObj", "strawberry");
return throwGetterTypeError(*exec, "TestObj", "strawberry");
}
TestObj& impl = castedThis->impl();
JSValue result = jsNumber(impl.blueberry());
return JSValue::encode(result);
}
EncodedJSValue jsTestObjStrictFloat(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
{
UNUSED_PARAM(exec);
UNUSED_PARAM(slotBase);
UNUSED_PARAM(thisValue);
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
if (jsDynamicCast<JSTestObjPrototype*>(slotBase))
return reportDeprecatedGetterError(*exec, "TestObj", "strictFloat");
return throwGetterTypeError(*exec, "TestObj", "strictFloat");
}
TestObj& impl = castedThis->impl();
JSValue result = jsNumber(impl.strictFloat());
return JSValue::encode(result);
}
EncodedJSValue jsTestObjDescription(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
{
UNUSED_PARAM(exec);
UNUSED_PARAM(slotBase);
UNUSED_PARAM(thisValue);
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
if (jsDynamicCast<JSTestObjPrototype*>(slotBase))
return reportDeprecatedGetterError(*exec, "TestObj", "description");
return throwGetterTypeError(*exec, "TestObj", "description");
}
TestObj& impl = castedThis->impl();
JSValue result = jsNumber(impl.description());
return JSValue::encode(result);
}
EncodedJSValue jsTestObjId(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
{
UNUSED_PARAM(exec);
UNUSED_PARAM(slotBase);
UNUSED_PARAM(thisValue);
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
if (jsDynamicCast<JSTestObjPrototype*>(slotBase))
return reportDeprecatedGetterError(*exec, "TestObj", "id");
return throwGetterTypeError(*exec, "TestObj", "id");
}
TestObj& impl = castedThis->impl();
JSValue result = jsNumber(impl.id());
return JSValue::encode(result);
}
EncodedJSValue jsTestObjHash(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
{
UNUSED_PARAM(exec);
UNUSED_PARAM(slotBase);
UNUSED_PARAM(thisValue);
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
if (jsDynamicCast<JSTestObjPrototype*>(slotBase))
return reportDeprecatedGetterError(*exec, "TestObj", "hash");
return throwGetterTypeError(*exec, "TestObj", "hash");
}
TestObj& impl = castedThis->impl();
JSValue result = jsStringWithCache(exec, impl.hash());
return JSValue::encode(result);
}
EncodedJSValue jsTestObjReplaceableAttribute(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
{
UNUSED_PARAM(exec);
UNUSED_PARAM(slotBase);
UNUSED_PARAM(thisValue);
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
if (jsDynamicCast<JSTestObjPrototype*>(slotBase))
return reportDeprecatedGetterError(*exec, "TestObj", "replaceableAttribute");
return throwGetterTypeError(*exec, "TestObj", "replaceableAttribute");
}
TestObj& impl = castedThis->impl();
JSValue result = jsNumber(impl.replaceableAttribute());
return JSValue::encode(result);
}
EncodedJSValue jsTestObjNullableDoubleAttribute(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
{
UNUSED_PARAM(exec);
UNUSED_PARAM(slotBase);
UNUSED_PARAM(thisValue);
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
if (jsDynamicCast<JSTestObjPrototype*>(slotBase))
return reportDeprecatedGetterError(*exec, "TestObj", "nullableDoubleAttribute");
return throwGetterTypeError(*exec, "TestObj", "nullableDoubleAttribute");
}
bool isNull = false;
TestObj& impl = castedThis->impl();
JSValue result = jsNumber(impl.nullableDoubleAttribute(isNull));
if (isNull)
return JSValue::encode(jsNull());
return JSValue::encode(result);
}
EncodedJSValue jsTestObjNullableLongAttribute(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
{
UNUSED_PARAM(exec);
UNUSED_PARAM(slotBase);
UNUSED_PARAM(thisValue);
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
if (jsDynamicCast<JSTestObjPrototype*>(slotBase))
return reportDeprecatedGetterError(*exec, "TestObj", "nullableLongAttribute");
return throwGetterTypeError(*exec, "TestObj", "nullableLongAttribute");
}
bool isNull = false;
TestObj& impl = castedThis->impl();
JSValue result = jsNumber(impl.nullableLongAttribute(isNull));
if (isNull)
return JSValue::encode(jsNull());
return JSValue::encode(result);
}
EncodedJSValue jsTestObjNullableBooleanAttribute(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
{
UNUSED_PARAM(exec);
UNUSED_PARAM(slotBase);
UNUSED_PARAM(thisValue);
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
if (jsDynamicCast<JSTestObjPrototype*>(slotBase))
return reportDeprecatedGetterError(*exec, "TestObj", "nullableBooleanAttribute");
return throwGetterTypeError(*exec, "TestObj", "nullableBooleanAttribute");
}
bool isNull = false;
TestObj& impl = castedThis->impl();
JSValue result = jsBoolean(impl.nullableBooleanAttribute(isNull));
if (isNull)
return JSValue::encode(jsNull());
return JSValue::encode(result);
}
EncodedJSValue jsTestObjNullableStringAttribute(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
{
UNUSED_PARAM(exec);
UNUSED_PARAM(slotBase);
UNUSED_PARAM(thisValue);
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
if (jsDynamicCast<JSTestObjPrototype*>(slotBase))
return reportDeprecatedGetterError(*exec, "TestObj", "nullableStringAttribute");
return throwGetterTypeError(*exec, "TestObj", "nullableStringAttribute");
}
bool isNull = false;
TestObj& impl = castedThis->impl();
JSValue result = jsStringWithCache(exec, impl.nullableStringAttribute(isNull));
if (isNull)
return JSValue::encode(jsNull());
return JSValue::encode(result);
}
EncodedJSValue jsTestObjNullableLongSettableAttribute(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
{
UNUSED_PARAM(exec);
UNUSED_PARAM(slotBase);
UNUSED_PARAM(thisValue);
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
if (jsDynamicCast<JSTestObjPrototype*>(slotBase))
return reportDeprecatedGetterError(*exec, "TestObj", "nullableLongSettableAttribute");
return throwGetterTypeError(*exec, "TestObj", "nullableLongSettableAttribute");
}
bool isNull = false;
TestObj& impl = castedThis->impl();
JSValue result = jsNumber(impl.nullableLongSettableAttribute(isNull));
if (isNull)
return JSValue::encode(jsNull());
return JSValue::encode(result);
}
EncodedJSValue jsTestObjNullableStringValue(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
{
UNUSED_PARAM(exec);
UNUSED_PARAM(slotBase);
UNUSED_PARAM(thisValue);
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
if (jsDynamicCast<JSTestObjPrototype*>(slotBase))
return reportDeprecatedGetterError(*exec, "TestObj", "nullableStringValue");
return throwGetterTypeError(*exec, "TestObj", "nullableStringValue");
}
ExceptionCode ec = 0;
bool isNull = false;
TestObj& impl = castedThis->impl();
JSValue result = jsNumber(impl.nullableStringValue(isNull, ec));
setDOMException(exec, ec);
if (isNull)
return JSValue::encode(jsNull());
return JSValue::encode(result);
}
EncodedJSValue jsTestObjAttribute(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
{
UNUSED_PARAM(exec);
UNUSED_PARAM(slotBase);
UNUSED_PARAM(thisValue);
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
if (jsDynamicCast<JSTestObjPrototype*>(slotBase))
return reportDeprecatedGetterError(*exec, "TestObj", "attribute");
return throwGetterTypeError(*exec, "TestObj", "attribute");
}
TestObj& impl = castedThis->impl();
JSValue result = jsStringWithCache(exec, impl.attribute());
return JSValue::encode(result);
}
EncodedJSValue jsTestObjAttributeWithReservedEnumType(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
{
UNUSED_PARAM(exec);
UNUSED_PARAM(slotBase);
UNUSED_PARAM(thisValue);
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
if (jsDynamicCast<JSTestObjPrototype*>(slotBase))
return reportDeprecatedGetterError(*exec, "TestObj", "attributeWithReservedEnumType");
return throwGetterTypeError(*exec, "TestObj", "attributeWithReservedEnumType");
}
TestObj& impl = castedThis->impl();
JSValue result = jsStringWithCache(exec, impl.attributeWithReservedEnumType());
return JSValue::encode(result);
}
EncodedJSValue jsTestObjConstructor(ExecState* exec, JSObject* baseValue, EncodedJSValue, PropertyName)
{
JSTestObjPrototype* domObject = jsDynamicCast<JSTestObjPrototype*>(baseValue);
if (!domObject)
return throwVMTypeError(exec);
return JSValue::encode(JSTestObj::getConstructor(exec->vm(), domObject->globalObject()));
}
void setJSTestObjConstructorStaticStringAttr(ExecState* exec, JSObject* baseObject, EncodedJSValue, EncodedJSValue encodedValue)
{
JSValue value = JSValue::decode(encodedValue);
UNUSED_PARAM(baseObject);
const String& nativeValue(value.isEmpty() ? String() : value.toString(exec)->value(exec));
if (UNLIKELY(exec->hadException()))
return;
TestObj::setStaticStringAttr(nativeValue);
}
void setJSTestObjTestSubObjEnabledBySettingConstructor(ExecState* exec, JSObject* baseObject, EncodedJSValue thisValue, EncodedJSValue encodedValue)
{
JSValue value = JSValue::decode(encodedValue);
UNUSED_PARAM(baseObject);
UNUSED_PARAM(thisValue);
JSTestObj* castedThis = jsCast<JSTestObj*>(baseObject);
UNUSED_PARAM(thisValue);
UNUSED_PARAM(exec);
castedThis->putDirect(exec->vm(), Identifier(exec, "TestSubObjEnabledBySetting"), value);
}
void setJSTestObjEnumAttr(ExecState* exec, JSObject* baseObject, EncodedJSValue thisValue, EncodedJSValue encodedValue)
{
JSValue value = JSValue::decode(encodedValue);
UNUSED_PARAM(baseObject);
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
reportDeprecatedSetterError(*exec, "TestObj", "enumAttr");
else
throwSetterTypeError(*exec, "TestObj", "enumAttr");
return;
}
TestObj& impl = castedThis->impl();
const String nativeValue(value.isEmpty() ? String() : value.toString(exec)->value(exec));
if (UNLIKELY(exec->hadException()))
return;
if (nativeValue != "" && nativeValue != "EnumValue1" && nativeValue != "EnumValue2" && nativeValue != "EnumValue3")
return;
impl.setEnumAttr(nativeValue);
}
void setJSTestObjByteAttr(ExecState* exec, JSObject* baseObject, EncodedJSValue thisValue, EncodedJSValue encodedValue)
{
JSValue value = JSValue::decode(encodedValue);
UNUSED_PARAM(baseObject);
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
reportDeprecatedSetterError(*exec, "TestObj", "byteAttr");
else
throwSetterTypeError(*exec, "TestObj", "byteAttr");
return;
}
TestObj& impl = castedThis->impl();
int8_t nativeValue(toInt8(exec, value, NormalConversion));
if (UNLIKELY(exec->hadException()))
return;
impl.setByteAttr(nativeValue);
}
void setJSTestObjOctetAttr(ExecState* exec, JSObject* baseObject, EncodedJSValue thisValue, EncodedJSValue encodedValue)
{
JSValue value = JSValue::decode(encodedValue);
UNUSED_PARAM(baseObject);
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
reportDeprecatedSetterError(*exec, "TestObj", "octetAttr");
else
throwSetterTypeError(*exec, "TestObj", "octetAttr");
return;
}
TestObj& impl = castedThis->impl();
uint8_t nativeValue(toUInt8(exec, value, NormalConversion));
if (UNLIKELY(exec->hadException()))
return;
impl.setOctetAttr(nativeValue);
}
void setJSTestObjShortAttr(ExecState* exec, JSObject* baseObject, EncodedJSValue thisValue, EncodedJSValue encodedValue)
{
JSValue value = JSValue::decode(encodedValue);
UNUSED_PARAM(baseObject);
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
reportDeprecatedSetterError(*exec, "TestObj", "shortAttr");
else
throwSetterTypeError(*exec, "TestObj", "shortAttr");
return;
}
TestObj& impl = castedThis->impl();
int16_t nativeValue(toInt16(exec, value, NormalConversion));
if (UNLIKELY(exec->hadException()))
return;
impl.setShortAttr(nativeValue);
}
void setJSTestObjUnsignedShortAttr(ExecState* exec, JSObject* baseObject, EncodedJSValue thisValue, EncodedJSValue encodedValue)
{
JSValue value = JSValue::decode(encodedValue);
UNUSED_PARAM(baseObject);
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
reportDeprecatedSetterError(*exec, "TestObj", "unsignedShortAttr");
else
throwSetterTypeError(*exec, "TestObj", "unsignedShortAttr");
return;
}
TestObj& impl = castedThis->impl();
uint16_t nativeValue(toUInt16(exec, value, NormalConversion));
if (UNLIKELY(exec->hadException()))
return;
impl.setUnsignedShortAttr(nativeValue);
}
void setJSTestObjLongAttr(ExecState* exec, JSObject* baseObject, EncodedJSValue thisValue, EncodedJSValue encodedValue)
{
JSValue value = JSValue::decode(encodedValue);
UNUSED_PARAM(baseObject);
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
reportDeprecatedSetterError(*exec, "TestObj", "longAttr");
else
throwSetterTypeError(*exec, "TestObj", "longAttr");
return;
}
TestObj& impl = castedThis->impl();
int nativeValue(toInt32(exec, value, NormalConversion));
if (UNLIKELY(exec->hadException()))
return;
impl.setLongAttr(nativeValue);
}
void setJSTestObjLongLongAttr(ExecState* exec, JSObject* baseObject, EncodedJSValue thisValue, EncodedJSValue encodedValue)
{
JSValue value = JSValue::decode(encodedValue);
UNUSED_PARAM(baseObject);
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
reportDeprecatedSetterError(*exec, "TestObj", "longLongAttr");
else
throwSetterTypeError(*exec, "TestObj", "longLongAttr");
return;
}
TestObj& impl = castedThis->impl();
long long nativeValue(toInt64(exec, value, NormalConversion));
if (UNLIKELY(exec->hadException()))
return;
impl.setLongLongAttr(nativeValue);
}
void setJSTestObjUnsignedLongLongAttr(ExecState* exec, JSObject* baseObject, EncodedJSValue thisValue, EncodedJSValue encodedValue)
{
JSValue value = JSValue::decode(encodedValue);
UNUSED_PARAM(baseObject);
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
reportDeprecatedSetterError(*exec, "TestObj", "unsignedLongLongAttr");
else
throwSetterTypeError(*exec, "TestObj", "unsignedLongLongAttr");
return;
}
TestObj& impl = castedThis->impl();
unsigned long long nativeValue(toUInt64(exec, value, NormalConversion));
if (UNLIKELY(exec->hadException()))
return;
impl.setUnsignedLongLongAttr(nativeValue);
}
void setJSTestObjStringAttr(ExecState* exec, JSObject* baseObject, EncodedJSValue thisValue, EncodedJSValue encodedValue)
{
JSValue value = JSValue::decode(encodedValue);
UNUSED_PARAM(baseObject);
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
reportDeprecatedSetterError(*exec, "TestObj", "stringAttr");
else
throwSetterTypeError(*exec, "TestObj", "stringAttr");
return;
}
TestObj& impl = castedThis->impl();
const String& nativeValue(value.isEmpty() ? String() : value.toString(exec)->value(exec));
if (UNLIKELY(exec->hadException()))
return;
impl.setStringAttr(nativeValue);
}
void setJSTestObjTestObjAttr(ExecState* exec, JSObject* baseObject, EncodedJSValue thisValue, EncodedJSValue encodedValue)
{
JSValue value = JSValue::decode(encodedValue);
UNUSED_PARAM(baseObject);
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
reportDeprecatedSetterError(*exec, "TestObj", "testObjAttr");
else
throwSetterTypeError(*exec, "TestObj", "testObjAttr");
return;
}
TestObj& impl = castedThis->impl();
TestObj* nativeValue(toTestObj(value));
if (UNLIKELY(exec->hadException()))
return;
impl.setTestObjAttr(nativeValue);
}
void setJSTestObjXMLObjAttr(ExecState* exec, JSObject* baseObject, EncodedJSValue thisValue, EncodedJSValue encodedValue)
{
JSValue value = JSValue::decode(encodedValue);
UNUSED_PARAM(baseObject);
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
reportDeprecatedSetterError(*exec, "TestObj", "XMLObjAttr");
else
throwSetterTypeError(*exec, "TestObj", "XMLObjAttr");
return;
}
TestObj& impl = castedThis->impl();
TestObj* nativeValue(toTestObj(value));
if (UNLIKELY(exec->hadException()))
return;
impl.setXMLObjAttr(nativeValue);
}
void setJSTestObjCreate(ExecState* exec, JSObject* baseObject, EncodedJSValue thisValue, EncodedJSValue encodedValue)
{
JSValue value = JSValue::decode(encodedValue);
UNUSED_PARAM(baseObject);
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
reportDeprecatedSetterError(*exec, "TestObj", "create");
else
throwSetterTypeError(*exec, "TestObj", "create");
return;
}
TestObj& impl = castedThis->impl();
bool nativeValue(value.toBoolean(exec));
if (UNLIKELY(exec->hadException()))
return;
impl.setCreate(nativeValue);
}
void setJSTestObjReflectedStringAttr(ExecState* exec, JSObject* baseObject, EncodedJSValue thisValue, EncodedJSValue encodedValue)
{
JSValue value = JSValue::decode(encodedValue);
UNUSED_PARAM(baseObject);
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
reportDeprecatedSetterError(*exec, "TestObj", "reflectedStringAttr");
else
throwSetterTypeError(*exec, "TestObj", "reflectedStringAttr");
return;
}
TestObj& impl = castedThis->impl();
const String& nativeValue(valueToStringWithNullCheck(exec, value));
if (UNLIKELY(exec->hadException()))
return;
impl.setAttributeWithoutSynchronization(WebCore::HTMLNames::reflectedstringattrAttr, nativeValue);
}
void setJSTestObjReflectedIntegralAttr(ExecState* exec, JSObject* baseObject, EncodedJSValue thisValue, EncodedJSValue encodedValue)
{
JSValue value = JSValue::decode(encodedValue);
UNUSED_PARAM(baseObject);
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
reportDeprecatedSetterError(*exec, "TestObj", "reflectedIntegralAttr");
else
throwSetterTypeError(*exec, "TestObj", "reflectedIntegralAttr");
return;
}
TestObj& impl = castedThis->impl();
int nativeValue(toInt32(exec, value, NormalConversion));
if (UNLIKELY(exec->hadException()))
return;
impl.setIntegralAttribute(WebCore::HTMLNames::reflectedintegralattrAttr, nativeValue);
}
void setJSTestObjReflectedUnsignedIntegralAttr(ExecState* exec, JSObject* baseObject, EncodedJSValue thisValue, EncodedJSValue encodedValue)
{
JSValue value = JSValue::decode(encodedValue);
UNUSED_PARAM(baseObject);
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
reportDeprecatedSetterError(*exec, "TestObj", "reflectedUnsignedIntegralAttr");
else
throwSetterTypeError(*exec, "TestObj", "reflectedUnsignedIntegralAttr");
return;
}
TestObj& impl = castedThis->impl();
unsigned nativeValue(toUInt32(exec, value, NormalConversion));
if (UNLIKELY(exec->hadException()))
return;
impl.setUnsignedIntegralAttribute(WebCore::HTMLNames::reflectedunsignedintegralattrAttr, nativeValue);
}
void setJSTestObjReflectedBooleanAttr(ExecState* exec, JSObject* baseObject, EncodedJSValue thisValue, EncodedJSValue encodedValue)
{
JSValue value = JSValue::decode(encodedValue);
UNUSED_PARAM(baseObject);
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
reportDeprecatedSetterError(*exec, "TestObj", "reflectedBooleanAttr");
else
throwSetterTypeError(*exec, "TestObj", "reflectedBooleanAttr");
return;
}
TestObj& impl = castedThis->impl();
bool nativeValue(value.toBoolean(exec));
if (UNLIKELY(exec->hadException()))
return;
impl.setBooleanAttribute(WebCore::HTMLNames::reflectedbooleanattrAttr, nativeValue);
}
void setJSTestObjReflectedURLAttr(ExecState* exec, JSObject* baseObject, EncodedJSValue thisValue, EncodedJSValue encodedValue)
{
JSValue value = JSValue::decode(encodedValue);
UNUSED_PARAM(baseObject);
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
reportDeprecatedSetterError(*exec, "TestObj", "reflectedURLAttr");
else
throwSetterTypeError(*exec, "TestObj", "reflectedURLAttr");
return;
}
TestObj& impl = castedThis->impl();
const String& nativeValue(valueToStringWithNullCheck(exec, value));
if (UNLIKELY(exec->hadException()))
return;
impl.setAttributeWithoutSynchronization(WebCore::HTMLNames::reflectedurlattrAttr, nativeValue);
}
void setJSTestObjReflectedStringAttr(ExecState* exec, JSObject* baseObject, EncodedJSValue thisValue, EncodedJSValue encodedValue)
{
JSValue value = JSValue::decode(encodedValue);
UNUSED_PARAM(baseObject);
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
reportDeprecatedSetterError(*exec, "TestObj", "reflectedStringAttr");
else
throwSetterTypeError(*exec, "TestObj", "reflectedStringAttr");
return;
}
TestObj& impl = castedThis->impl();
const String& nativeValue(valueToStringWithNullCheck(exec, value));
if (UNLIKELY(exec->hadException()))
return;
impl.setAttributeWithoutSynchronization(WebCore::HTMLNames::customContentStringAttrAttr, nativeValue);
}
void setJSTestObjReflectedCustomIntegralAttr(ExecState* exec, JSObject* baseObject, EncodedJSValue thisValue, EncodedJSValue encodedValue)
{
JSValue value = JSValue::decode(encodedValue);
UNUSED_PARAM(baseObject);
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
reportDeprecatedSetterError(*exec, "TestObj", "reflectedCustomIntegralAttr");
else
throwSetterTypeError(*exec, "TestObj", "reflectedCustomIntegralAttr");
return;
}
TestObj& impl = castedThis->impl();
int nativeValue(toInt32(exec, value, NormalConversion));
if (UNLIKELY(exec->hadException()))
return;
impl.setIntegralAttribute(WebCore::HTMLNames::customContentIntegralAttrAttr, nativeValue);
}
void setJSTestObjReflectedCustomBooleanAttr(ExecState* exec, JSObject* baseObject, EncodedJSValue thisValue, EncodedJSValue encodedValue)
{
JSValue value = JSValue::decode(encodedValue);
UNUSED_PARAM(baseObject);
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
reportDeprecatedSetterError(*exec, "TestObj", "reflectedCustomBooleanAttr");
else
throwSetterTypeError(*exec, "TestObj", "reflectedCustomBooleanAttr");
return;
}
TestObj& impl = castedThis->impl();
bool nativeValue(value.toBoolean(exec));
if (UNLIKELY(exec->hadException()))
return;
impl.setBooleanAttribute(WebCore::HTMLNames::customContentBooleanAttrAttr, nativeValue);
}
void setJSTestObjReflectedCustomURLAttr(ExecState* exec, JSObject* baseObject, EncodedJSValue thisValue, EncodedJSValue encodedValue)
{
JSValue value = JSValue::decode(encodedValue);
UNUSED_PARAM(baseObject);
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
reportDeprecatedSetterError(*exec, "TestObj", "reflectedCustomURLAttr");
else
throwSetterTypeError(*exec, "TestObj", "reflectedCustomURLAttr");
return;
}
TestObj& impl = castedThis->impl();
const String& nativeValue(valueToStringWithNullCheck(exec, value));
if (UNLIKELY(exec->hadException()))
return;
impl.setAttributeWithoutSynchronization(WebCore::HTMLNames::customContentURLAttrAttr, nativeValue);
}
void setJSTestObjTypedArrayAttr(ExecState* exec, JSObject* baseObject, EncodedJSValue thisValue, EncodedJSValue encodedValue)
{
JSValue value = JSValue::decode(encodedValue);
UNUSED_PARAM(baseObject);
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
reportDeprecatedSetterError(*exec, "TestObj", "typedArrayAttr");
else
throwSetterTypeError(*exec, "TestObj", "typedArrayAttr");
return;
}
TestObj& impl = castedThis->impl();
RefPtr<Float32Array> nativeValue(toFloat32Array(value));
if (UNLIKELY(exec->hadException()))
return;
impl.setTypedArrayAttr(nativeValue.get());
}
void setJSTestObjAttrWithGetterException(ExecState* exec, JSObject* baseObject, EncodedJSValue thisValue, EncodedJSValue encodedValue)
{
JSValue value = JSValue::decode(encodedValue);
UNUSED_PARAM(baseObject);
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
reportDeprecatedSetterError(*exec, "TestObj", "attrWithGetterException");
else
throwSetterTypeError(*exec, "TestObj", "attrWithGetterException");
return;
}
TestObj& impl = castedThis->impl();
int nativeValue(toInt32(exec, value, NormalConversion));
if (UNLIKELY(exec->hadException()))
return;
impl.setAttrWithGetterException(nativeValue);
}
void setJSTestObjAttrWithSetterException(ExecState* exec, JSObject* baseObject, EncodedJSValue thisValue, EncodedJSValue encodedValue)
{
JSValue value = JSValue::decode(encodedValue);
UNUSED_PARAM(baseObject);
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
reportDeprecatedSetterError(*exec, "TestObj", "attrWithSetterException");
else
throwSetterTypeError(*exec, "TestObj", "attrWithSetterException");
return;
}
TestObj& impl = castedThis->impl();
ExceptionCode ec = 0;
int nativeValue(toInt32(exec, value, NormalConversion));
if (UNLIKELY(exec->hadException()))
return;
impl.setAttrWithSetterException(nativeValue, ec);
setDOMException(exec, ec);
}
void setJSTestObjStringAttrWithGetterException(ExecState* exec, JSObject* baseObject, EncodedJSValue thisValue, EncodedJSValue encodedValue)
{
JSValue value = JSValue::decode(encodedValue);
UNUSED_PARAM(baseObject);
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
reportDeprecatedSetterError(*exec, "TestObj", "stringAttrWithGetterException");
else
throwSetterTypeError(*exec, "TestObj", "stringAttrWithGetterException");
return;
}
TestObj& impl = castedThis->impl();
const String& nativeValue(value.isEmpty() ? String() : value.toString(exec)->value(exec));
if (UNLIKELY(exec->hadException()))
return;
impl.setStringAttrWithGetterException(nativeValue);
}
void setJSTestObjStringAttrWithSetterException(ExecState* exec, JSObject* baseObject, EncodedJSValue thisValue, EncodedJSValue encodedValue)
{
JSValue value = JSValue::decode(encodedValue);
UNUSED_PARAM(baseObject);
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
reportDeprecatedSetterError(*exec, "TestObj", "stringAttrWithSetterException");
else
throwSetterTypeError(*exec, "TestObj", "stringAttrWithSetterException");
return;
}
TestObj& impl = castedThis->impl();
ExceptionCode ec = 0;
const String& nativeValue(value.isEmpty() ? String() : value.toString(exec)->value(exec));
if (UNLIKELY(exec->hadException()))
return;
impl.setStringAttrWithSetterException(nativeValue, ec);
setDOMException(exec, ec);
}
void setJSTestObjCustomAttr(ExecState* exec, JSObject* baseObject, EncodedJSValue thisValue, EncodedJSValue encodedValue)
{
JSValue value = JSValue::decode(encodedValue);
UNUSED_PARAM(baseObject);
UNUSED_PARAM(thisValue);
JSTestObj* castedThis = jsCast<JSTestObj*>(baseObject);
UNUSED_PARAM(thisValue);
UNUSED_PARAM(exec);
castedThis->setCustomAttr(exec, value);
}
void setJSTestObjWithScriptStateAttribute(ExecState* exec, JSObject* baseObject, EncodedJSValue thisValue, EncodedJSValue encodedValue)
{
JSValue value = JSValue::decode(encodedValue);
UNUSED_PARAM(baseObject);
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
reportDeprecatedSetterError(*exec, "TestObj", "withScriptStateAttribute");
else
throwSetterTypeError(*exec, "TestObj", "withScriptStateAttribute");
return;
}
TestObj& impl = castedThis->impl();
int nativeValue(toInt32(exec, value, NormalConversion));
if (UNLIKELY(exec->hadException()))
return;
impl.setWithScriptStateAttribute(exec, nativeValue);
}
void setJSTestObjWithScriptExecutionContextAttribute(ExecState* exec, JSObject* baseObject, EncodedJSValue thisValue, EncodedJSValue encodedValue)
{
JSValue value = JSValue::decode(encodedValue);
UNUSED_PARAM(baseObject);
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
reportDeprecatedSetterError(*exec, "TestObj", "withScriptExecutionContextAttribute");
else
throwSetterTypeError(*exec, "TestObj", "withScriptExecutionContextAttribute");
return;
}
TestObj& impl = castedThis->impl();
TestObj* nativeValue(toTestObj(value));
if (UNLIKELY(exec->hadException()))
return;
ScriptExecutionContext* scriptContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
if (!scriptContext)
return;
impl.setWithScriptExecutionContextAttribute(scriptContext, nativeValue);
}
void setJSTestObjWithScriptStateAttributeRaises(ExecState* exec, JSObject* baseObject, EncodedJSValue thisValue, EncodedJSValue encodedValue)
{
JSValue value = JSValue::decode(encodedValue);
UNUSED_PARAM(baseObject);
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
reportDeprecatedSetterError(*exec, "TestObj", "withScriptStateAttributeRaises");
else
throwSetterTypeError(*exec, "TestObj", "withScriptStateAttributeRaises");
return;
}
TestObj& impl = castedThis->impl();
TestObj* nativeValue(toTestObj(value));
if (UNLIKELY(exec->hadException()))
return;
impl.setWithScriptStateAttributeRaises(exec, nativeValue);
}
void setJSTestObjWithScriptExecutionContextAttributeRaises(ExecState* exec, JSObject* baseObject, EncodedJSValue thisValue, EncodedJSValue encodedValue)
{
JSValue value = JSValue::decode(encodedValue);
UNUSED_PARAM(baseObject);
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
reportDeprecatedSetterError(*exec, "TestObj", "withScriptExecutionContextAttributeRaises");
else
throwSetterTypeError(*exec, "TestObj", "withScriptExecutionContextAttributeRaises");
return;
}
TestObj& impl = castedThis->impl();
TestObj* nativeValue(toTestObj(value));
if (UNLIKELY(exec->hadException()))
return;
ScriptExecutionContext* scriptContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
if (!scriptContext)
return;
impl.setWithScriptExecutionContextAttributeRaises(scriptContext, nativeValue);
}
void setJSTestObjWithScriptExecutionContextAndScriptStateAttribute(ExecState* exec, JSObject* baseObject, EncodedJSValue thisValue, EncodedJSValue encodedValue)
{
JSValue value = JSValue::decode(encodedValue);
UNUSED_PARAM(baseObject);
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
reportDeprecatedSetterError(*exec, "TestObj", "withScriptExecutionContextAndScriptStateAttribute");
else
throwSetterTypeError(*exec, "TestObj", "withScriptExecutionContextAndScriptStateAttribute");
return;
}
TestObj& impl = castedThis->impl();
TestObj* nativeValue(toTestObj(value));
if (UNLIKELY(exec->hadException()))
return;
ScriptExecutionContext* scriptContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
if (!scriptContext)
return;
impl.setWithScriptExecutionContextAndScriptStateAttribute(exec, scriptContext, nativeValue);
}
void setJSTestObjWithScriptExecutionContextAndScriptStateAttributeRaises(ExecState* exec, JSObject* baseObject, EncodedJSValue thisValue, EncodedJSValue encodedValue)
{
JSValue value = JSValue::decode(encodedValue);
UNUSED_PARAM(baseObject);
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
reportDeprecatedSetterError(*exec, "TestObj", "withScriptExecutionContextAndScriptStateAttributeRaises");
else
throwSetterTypeError(*exec, "TestObj", "withScriptExecutionContextAndScriptStateAttributeRaises");
return;
}
TestObj& impl = castedThis->impl();
TestObj* nativeValue(toTestObj(value));
if (UNLIKELY(exec->hadException()))
return;
ScriptExecutionContext* scriptContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
if (!scriptContext)
return;
impl.setWithScriptExecutionContextAndScriptStateAttributeRaises(exec, scriptContext, nativeValue);
}
void setJSTestObjWithScriptExecutionContextAndScriptStateWithSpacesAttribute(ExecState* exec, JSObject* baseObject, EncodedJSValue thisValue, EncodedJSValue encodedValue)
{
JSValue value = JSValue::decode(encodedValue);
UNUSED_PARAM(baseObject);
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
reportDeprecatedSetterError(*exec, "TestObj", "withScriptExecutionContextAndScriptStateWithSpacesAttribute");
else
throwSetterTypeError(*exec, "TestObj", "withScriptExecutionContextAndScriptStateWithSpacesAttribute");
return;
}
TestObj& impl = castedThis->impl();
TestObj* nativeValue(toTestObj(value));
if (UNLIKELY(exec->hadException()))
return;
ScriptExecutionContext* scriptContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
if (!scriptContext)
return;
impl.setWithScriptExecutionContextAndScriptStateWithSpacesAttribute(exec, scriptContext, nativeValue);
}
void setJSTestObjWithScriptArgumentsAndCallStackAttribute(ExecState* exec, JSObject* baseObject, EncodedJSValue thisValue, EncodedJSValue encodedValue)
{
JSValue value = JSValue::decode(encodedValue);
UNUSED_PARAM(baseObject);
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
reportDeprecatedSetterError(*exec, "TestObj", "withScriptArgumentsAndCallStackAttribute");
else
throwSetterTypeError(*exec, "TestObj", "withScriptArgumentsAndCallStackAttribute");
return;
}
TestObj& impl = castedThis->impl();
TestObj* nativeValue(toTestObj(value));
if (UNLIKELY(exec->hadException()))
return;
impl.setWithScriptArgumentsAndCallStackAttribute(nativeValue);
}
#if ENABLE(Condition1)
void setJSTestObjConditionalAttr1(ExecState* exec, JSObject* baseObject, EncodedJSValue thisValue, EncodedJSValue encodedValue)
{
JSValue value = JSValue::decode(encodedValue);
UNUSED_PARAM(baseObject);
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
reportDeprecatedSetterError(*exec, "TestObj", "conditionalAttr1");
else
throwSetterTypeError(*exec, "TestObj", "conditionalAttr1");
return;
}
TestObj& impl = castedThis->impl();
int nativeValue(toInt32(exec, value, NormalConversion));
if (UNLIKELY(exec->hadException()))
return;
impl.setConditionalAttr1(nativeValue);
}
#endif
#if ENABLE(Condition1) && ENABLE(Condition2)
void setJSTestObjConditionalAttr2(ExecState* exec, JSObject* baseObject, EncodedJSValue thisValue, EncodedJSValue encodedValue)
{
JSValue value = JSValue::decode(encodedValue);
UNUSED_PARAM(baseObject);
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
reportDeprecatedSetterError(*exec, "TestObj", "conditionalAttr2");
else
throwSetterTypeError(*exec, "TestObj", "conditionalAttr2");
return;
}
TestObj& impl = castedThis->impl();
int nativeValue(toInt32(exec, value, NormalConversion));
if (UNLIKELY(exec->hadException()))
return;
impl.setConditionalAttr2(nativeValue);
}
#endif
#if ENABLE(Condition1) || ENABLE(Condition2)
void setJSTestObjConditionalAttr3(ExecState* exec, JSObject* baseObject, EncodedJSValue thisValue, EncodedJSValue encodedValue)
{
JSValue value = JSValue::decode(encodedValue);
UNUSED_PARAM(baseObject);
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
reportDeprecatedSetterError(*exec, "TestObj", "conditionalAttr3");
else
throwSetterTypeError(*exec, "TestObj", "conditionalAttr3");
return;
}
TestObj& impl = castedThis->impl();
int nativeValue(toInt32(exec, value, NormalConversion));
if (UNLIKELY(exec->hadException()))
return;
impl.setConditionalAttr3(nativeValue);
}
#endif
#if ENABLE(Condition1)
void setJSTestObjConditionalAttr4Constructor(ExecState* exec, JSObject* baseObject, EncodedJSValue thisValue, EncodedJSValue encodedValue)
{
JSValue value = JSValue::decode(encodedValue);
UNUSED_PARAM(baseObject);
UNUSED_PARAM(thisValue);
JSTestObj* castedThis = jsCast<JSTestObj*>(baseObject);
UNUSED_PARAM(thisValue);
UNUSED_PARAM(exec);
castedThis->putDirect(exec->vm(), Identifier(exec, "conditionalAttr4"), value);
}
#endif
#if ENABLE(Condition1) && ENABLE(Condition2)
void setJSTestObjConditionalAttr5Constructor(ExecState* exec, JSObject* baseObject, EncodedJSValue thisValue, EncodedJSValue encodedValue)
{
JSValue value = JSValue::decode(encodedValue);
UNUSED_PARAM(baseObject);
UNUSED_PARAM(thisValue);
JSTestObj* castedThis = jsCast<JSTestObj*>(baseObject);
UNUSED_PARAM(thisValue);
UNUSED_PARAM(exec);
castedThis->putDirect(exec->vm(), Identifier(exec, "conditionalAttr5"), value);
}
#endif
#if ENABLE(Condition1) || ENABLE(Condition2)
void setJSTestObjConditionalAttr6Constructor(ExecState* exec, JSObject* baseObject, EncodedJSValue thisValue, EncodedJSValue encodedValue)
{
JSValue value = JSValue::decode(encodedValue);
UNUSED_PARAM(baseObject);
UNUSED_PARAM(thisValue);
JSTestObj* castedThis = jsCast<JSTestObj*>(baseObject);
UNUSED_PARAM(thisValue);
UNUSED_PARAM(exec);
castedThis->putDirect(exec->vm(), Identifier(exec, "conditionalAttr6"), value);
}
#endif
void setJSTestObjAnyAttribute(ExecState* exec, JSObject* baseObject, EncodedJSValue thisValue, EncodedJSValue encodedValue)
{
JSValue value = JSValue::decode(encodedValue);
UNUSED_PARAM(baseObject);
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
reportDeprecatedSetterError(*exec, "TestObj", "anyAttribute");
else
throwSetterTypeError(*exec, "TestObj", "anyAttribute");
return;
}
TestObj& impl = castedThis->impl();
Deprecated::ScriptValue nativeValue(exec->vm(), value);
if (UNLIKELY(exec->hadException()))
return;
impl.setAnyAttribute(nativeValue);
}
void setJSTestObjMutablePoint(ExecState* exec, JSObject* baseObject, EncodedJSValue thisValue, EncodedJSValue encodedValue)
{
JSValue value = JSValue::decode(encodedValue);
UNUSED_PARAM(baseObject);
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
reportDeprecatedSetterError(*exec, "TestObj", "mutablePoint");
else
throwSetterTypeError(*exec, "TestObj", "mutablePoint");
return;
}
TestObj& impl = castedThis->impl();
SVGPropertyTearOff<SVGPoint>* nativeValue(toSVGPoint(value));
if (UNLIKELY(exec->hadException()))
return;
impl.setMutablePoint(nativeValue);
}
void setJSTestObjImmutablePoint(ExecState* exec, JSObject* baseObject, EncodedJSValue thisValue, EncodedJSValue encodedValue)
{
JSValue value = JSValue::decode(encodedValue);
UNUSED_PARAM(baseObject);
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
reportDeprecatedSetterError(*exec, "TestObj", "immutablePoint");
else
throwSetterTypeError(*exec, "TestObj", "immutablePoint");
return;
}
TestObj& impl = castedThis->impl();
SVGPropertyTearOff<SVGPoint>* nativeValue(toSVGPoint(value));
if (UNLIKELY(exec->hadException()))
return;
impl.setImmutablePoint(nativeValue);
}
void setJSTestObjStrawberry(ExecState* exec, JSObject* baseObject, EncodedJSValue thisValue, EncodedJSValue encodedValue)
{
JSValue value = JSValue::decode(encodedValue);
UNUSED_PARAM(baseObject);
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
reportDeprecatedSetterError(*exec, "TestObj", "strawberry");
else
throwSetterTypeError(*exec, "TestObj", "strawberry");
return;
}
TestObj& impl = castedThis->impl();
int nativeValue(toInt32(exec, value, NormalConversion));
if (UNLIKELY(exec->hadException()))
return;
impl.setBlueberry(nativeValue);
}
void setJSTestObjStrictFloat(ExecState* exec, JSObject* baseObject, EncodedJSValue thisValue, EncodedJSValue encodedValue)
{
JSValue value = JSValue::decode(encodedValue);
UNUSED_PARAM(baseObject);
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
reportDeprecatedSetterError(*exec, "TestObj", "strictFloat");
else
throwSetterTypeError(*exec, "TestObj", "strictFloat");
return;
}
TestObj& impl = castedThis->impl();
float nativeValue(value.toFloat(exec));
if (UNLIKELY(exec->hadException()))
return;
impl.setStrictFloat(nativeValue);
}
void setJSTestObjId(ExecState* exec, JSObject* baseObject, EncodedJSValue thisValue, EncodedJSValue encodedValue)
{
JSValue value = JSValue::decode(encodedValue);
UNUSED_PARAM(baseObject);
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
reportDeprecatedSetterError(*exec, "TestObj", "id");
else
throwSetterTypeError(*exec, "TestObj", "id");
return;
}
TestObj& impl = castedThis->impl();
int nativeValue(toInt32(exec, value, NormalConversion));
if (UNLIKELY(exec->hadException()))
return;
impl.setId(nativeValue);
}
void setJSTestObjReplaceableAttribute(ExecState* exec, JSObject* baseObject, EncodedJSValue thisValue, EncodedJSValue encodedValue)
{
JSValue value = JSValue::decode(encodedValue);
UNUSED_PARAM(baseObject);
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
reportDeprecatedSetterError(*exec, "TestObj", "replaceableAttribute");
else
throwSetterTypeError(*exec, "TestObj", "replaceableAttribute");
return;
}
castedThis->putDirect(exec->vm(), Identifier(exec, "replaceableAttribute"), value);
}
void setJSTestObjNullableLongSettableAttribute(ExecState* exec, JSObject* baseObject, EncodedJSValue thisValue, EncodedJSValue encodedValue)
{
JSValue value = JSValue::decode(encodedValue);
UNUSED_PARAM(baseObject);
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
reportDeprecatedSetterError(*exec, "TestObj", "nullableLongSettableAttribute");
else
throwSetterTypeError(*exec, "TestObj", "nullableLongSettableAttribute");
return;
}
TestObj& impl = castedThis->impl();
int nativeValue(toInt32(exec, value, NormalConversion));
if (UNLIKELY(exec->hadException()))
return;
impl.setNullableLongSettableAttribute(nativeValue);
}
void setJSTestObjNullableStringValue(ExecState* exec, JSObject* baseObject, EncodedJSValue thisValue, EncodedJSValue encodedValue)
{
JSValue value = JSValue::decode(encodedValue);
UNUSED_PARAM(baseObject);
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
reportDeprecatedSetterError(*exec, "TestObj", "nullableStringValue");
else
throwSetterTypeError(*exec, "TestObj", "nullableStringValue");
return;
}
TestObj& impl = castedThis->impl();
int nativeValue(toInt32(exec, value, NormalConversion));
if (UNLIKELY(exec->hadException()))
return;
impl.setNullableStringValue(nativeValue);
}
void setJSTestObjAttributeWithReservedEnumType(ExecState* exec, JSObject* baseObject, EncodedJSValue thisValue, EncodedJSValue encodedValue)
{
JSValue value = JSValue::decode(encodedValue);
UNUSED_PARAM(baseObject);
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(JSValue::decode(thisValue));
if (UNLIKELY(!castedThis)) {
if (jsDynamicCast<JSTestObjPrototype*>(JSValue::decode(thisValue)))
reportDeprecatedSetterError(*exec, "TestObj", "attributeWithReservedEnumType");
else
throwSetterTypeError(*exec, "TestObj", "attributeWithReservedEnumType");
return;
}
TestObj& impl = castedThis->impl();
const String nativeValue(value.isEmpty() ? String() : value.toString(exec)->value(exec));
if (UNLIKELY(exec->hadException()))
return;
if (nativeValue != "" && nativeValue != "OptionalValue1" && nativeValue != "OptionalValue2" && nativeValue != "OptionalValue3")
return;
impl.setAttributeWithReservedEnumType(nativeValue);
}
JSValue JSTestObj::getConstructor(VM& vm, JSGlobalObject* globalObject)
{
return getDOMConstructor<JSTestObjConstructor>(vm, jsCast<JSDOMGlobalObject*>(globalObject));
}
EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionVoidMethod(ExecState* exec)
{
JSValue thisValue = exec->thisValue();
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
if (UNLIKELY(!castedThis))
return throwThisTypeError(*exec, "TestObj", "voidMethod");
ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
TestObj& impl = castedThis->impl();
impl.voidMethod();
return JSValue::encode(jsUndefined());
}
EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionVoidMethodWithArgs(ExecState* exec)
{
JSValue thisValue = exec->thisValue();
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
if (UNLIKELY(!castedThis))
return throwThisTypeError(*exec, "TestObj", "voidMethodWithArgs");
ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
TestObj& impl = castedThis->impl();
if (exec->argumentCount() < 3)
return throwVMError(exec, createNotEnoughArgumentsError(exec));
int longArg(toInt32(exec, exec->argument(0), NormalConversion));
if (UNLIKELY(exec->hadException()))
return JSValue::encode(jsUndefined());
const String& strArg(exec->argument(1).isEmpty() ? String() : exec->argument(1).toString(exec)->value(exec));
if (UNLIKELY(exec->hadException()))
return JSValue::encode(jsUndefined());
TestObj* objArg(toTestObj(exec->argument(2)));
if (UNLIKELY(exec->hadException()))
return JSValue::encode(jsUndefined());
impl.voidMethodWithArgs(longArg, strArg, objArg);
return JSValue::encode(jsUndefined());
}
EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionByteMethod(ExecState* exec)
{
JSValue thisValue = exec->thisValue();
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
if (UNLIKELY(!castedThis))
return throwThisTypeError(*exec, "TestObj", "byteMethod");
ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
TestObj& impl = castedThis->impl();
JSValue result = jsNumber(impl.byteMethod());
return JSValue::encode(result);
}
EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionByteMethodWithArgs(ExecState* exec)
{
JSValue thisValue = exec->thisValue();
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
if (UNLIKELY(!castedThis))
return throwThisTypeError(*exec, "TestObj", "byteMethodWithArgs");
ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
TestObj& impl = castedThis->impl();
if (exec->argumentCount() < 3)
return throwVMError(exec, createNotEnoughArgumentsError(exec));
int8_t byteArg(toInt8(exec, exec->argument(0), NormalConversion));
if (UNLIKELY(exec->hadException()))
return JSValue::encode(jsUndefined());
const String& strArg(exec->argument(1).isEmpty() ? String() : exec->argument(1).toString(exec)->value(exec));
if (UNLIKELY(exec->hadException()))
return JSValue::encode(jsUndefined());
TestObj* objArg(toTestObj(exec->argument(2)));
if (UNLIKELY(exec->hadException()))
return JSValue::encode(jsUndefined());
JSValue result = jsNumber(impl.byteMethodWithArgs(byteArg, strArg, objArg));
return JSValue::encode(result);
}
EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOctetMethod(ExecState* exec)
{
JSValue thisValue = exec->thisValue();
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
if (UNLIKELY(!castedThis))
return throwThisTypeError(*exec, "TestObj", "octetMethod");
ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
TestObj& impl = castedThis->impl();
JSValue result = jsNumber(impl.octetMethod());
return JSValue::encode(result);
}
EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOctetMethodWithArgs(ExecState* exec)
{
JSValue thisValue = exec->thisValue();
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
if (UNLIKELY(!castedThis))
return throwThisTypeError(*exec, "TestObj", "octetMethodWithArgs");
ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
TestObj& impl = castedThis->impl();
if (exec->argumentCount() < 3)
return throwVMError(exec, createNotEnoughArgumentsError(exec));
uint8_t octetArg(toUInt8(exec, exec->argument(0), NormalConversion));
if (UNLIKELY(exec->hadException()))
return JSValue::encode(jsUndefined());
const String& strArg(exec->argument(1).isEmpty() ? String() : exec->argument(1).toString(exec)->value(exec));
if (UNLIKELY(exec->hadException()))
return JSValue::encode(jsUndefined());
TestObj* objArg(toTestObj(exec->argument(2)));
if (UNLIKELY(exec->hadException()))
return JSValue::encode(jsUndefined());
JSValue result = jsNumber(impl.octetMethodWithArgs(octetArg, strArg, objArg));
return JSValue::encode(result);
}
EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionLongMethod(ExecState* exec)
{
JSValue thisValue = exec->thisValue();
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
if (UNLIKELY(!castedThis))
return throwThisTypeError(*exec, "TestObj", "longMethod");
ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
TestObj& impl = castedThis->impl();
JSValue result = jsNumber(impl.longMethod());
return JSValue::encode(result);
}
EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionLongMethodWithArgs(ExecState* exec)
{
JSValue thisValue = exec->thisValue();
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
if (UNLIKELY(!castedThis))
return throwThisTypeError(*exec, "TestObj", "longMethodWithArgs");
ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
TestObj& impl = castedThis->impl();
if (exec->argumentCount() < 3)
return throwVMError(exec, createNotEnoughArgumentsError(exec));
int longArg(toInt32(exec, exec->argument(0), NormalConversion));
if (UNLIKELY(exec->hadException()))
return JSValue::encode(jsUndefined());
const String& strArg(exec->argument(1).isEmpty() ? String() : exec->argument(1).toString(exec)->value(exec));
if (UNLIKELY(exec->hadException()))
return JSValue::encode(jsUndefined());
TestObj* objArg(toTestObj(exec->argument(2)));
if (UNLIKELY(exec->hadException()))
return JSValue::encode(jsUndefined());
JSValue result = jsNumber(impl.longMethodWithArgs(longArg, strArg, objArg));
return JSValue::encode(result);
}
EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionObjMethod(ExecState* exec)
{
JSValue thisValue = exec->thisValue();
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
if (UNLIKELY(!castedThis))
return throwThisTypeError(*exec, "TestObj", "objMethod");
ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
TestObj& impl = castedThis->impl();
JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl.objMethod()));
return JSValue::encode(result);
}
EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionObjMethodWithArgs(ExecState* exec)
{
JSValue thisValue = exec->thisValue();
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
if (UNLIKELY(!castedThis))
return throwThisTypeError(*exec, "TestObj", "objMethodWithArgs");
ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
TestObj& impl = castedThis->impl();
if (exec->argumentCount() < 3)
return throwVMError(exec, createNotEnoughArgumentsError(exec));
int longArg(toInt32(exec, exec->argument(0), NormalConversion));
if (UNLIKELY(exec->hadException()))
return JSValue::encode(jsUndefined());
const String& strArg(exec->argument(1).isEmpty() ? String() : exec->argument(1).toString(exec)->value(exec));
if (UNLIKELY(exec->hadException()))
return JSValue::encode(jsUndefined());
TestObj* objArg(toTestObj(exec->argument(2)));
if (UNLIKELY(exec->hadException()))
return JSValue::encode(jsUndefined());
JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl.objMethodWithArgs(longArg, strArg, objArg)));
return JSValue::encode(result);
}
EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithSequenceArg(ExecState* exec)
{
JSValue thisValue = exec->thisValue();
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
if (UNLIKELY(!castedThis))
return throwThisTypeError(*exec, "TestObj", "methodWithSequenceArg");
ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
TestObj& impl = castedThis->impl();
if (exec->argumentCount() < 1)
return throwVMError(exec, createNotEnoughArgumentsError(exec));
Vector<RefPtr<ScriptProfile>> sequenceArg((toRefPtrNativeArray<ScriptProfile, JSScriptProfile>(exec, exec->argument(0), &toScriptProfile)));
if (UNLIKELY(exec->hadException()))
return JSValue::encode(jsUndefined());
impl.methodWithSequenceArg(sequenceArg);
return JSValue::encode(jsUndefined());
}
EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodReturningSequence(ExecState* exec)
{
JSValue thisValue = exec->thisValue();
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
if (UNLIKELY(!castedThis))
return throwThisTypeError(*exec, "TestObj", "methodReturningSequence");
ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
TestObj& impl = castedThis->impl();
if (exec->argumentCount() < 1)
return throwVMError(exec, createNotEnoughArgumentsError(exec));
int longArg(toInt32(exec, exec->argument(0), NormalConversion));
if (UNLIKELY(exec->hadException()))
return JSValue::encode(jsUndefined());
JSValue result = jsArray(exec, castedThis->globalObject(), impl.methodReturningSequence(longArg));
return JSValue::encode(result);
}
EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithEnumArg(ExecState* exec)
{
JSValue thisValue = exec->thisValue();
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
if (UNLIKELY(!castedThis))
return throwThisTypeError(*exec, "TestObj", "methodWithEnumArg");
ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
TestObj& impl = castedThis->impl();
if (exec->argumentCount() < 1)
return throwVMError(exec, createNotEnoughArgumentsError(exec));
const String enumArg(exec->argument(0).isEmpty() ? String() : exec->argument(0).toString(exec)->value(exec));
if (UNLIKELY(exec->hadException()))
return JSValue::encode(jsUndefined());
if (enumArg != "" && enumArg != "EnumValue1" && enumArg != "EnumValue2" && enumArg != "EnumValue3")
return throwArgumentMustBeEnumError(*exec, 0, "enumArg", "TestObj", "methodWithEnumArg", "\"\", \"EnumValue1\", \"EnumValue2\", \"EnumValue3\"");
impl.methodWithEnumArg(enumArg);
return JSValue::encode(jsUndefined());
}
EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodThatRequiresAllArgsAndThrows(ExecState* exec)
{
JSValue thisValue = exec->thisValue();
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
if (UNLIKELY(!castedThis))
return throwThisTypeError(*exec, "TestObj", "methodThatRequiresAllArgsAndThrows");
ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
TestObj& impl = castedThis->impl();
if (exec->argumentCount() < 2)
return throwVMError(exec, createNotEnoughArgumentsError(exec));
ExceptionCode ec = 0;
const String& strArg(exec->argument(0).isEmpty() ? String() : exec->argument(0).toString(exec)->value(exec));
if (UNLIKELY(exec->hadException()))
return JSValue::encode(jsUndefined());
TestObj* objArg(toTestObj(exec->argument(1)));
if (UNLIKELY(exec->hadException()))
return JSValue::encode(jsUndefined());
JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl.methodThatRequiresAllArgsAndThrows(strArg, objArg, ec)));
setDOMException(exec, ec);
return JSValue::encode(result);
}
EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionSerializedValue(ExecState* exec)
{
JSValue thisValue = exec->thisValue();
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
if (UNLIKELY(!castedThis))
return throwThisTypeError(*exec, "TestObj", "serializedValue");
ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
TestObj& impl = castedThis->impl();
if (exec->argumentCount() < 1)
return throwVMError(exec, createNotEnoughArgumentsError(exec));
RefPtr<SerializedScriptValue> serializedArg(SerializedScriptValue::create(exec, exec->argument(0), 0, 0));
if (UNLIKELY(exec->hadException()))
return JSValue::encode(jsUndefined());
impl.serializedValue(serializedArg);
return JSValue::encode(jsUndefined());
}
EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOptionsObject(ExecState* exec)
{
JSValue thisValue = exec->thisValue();
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
if (UNLIKELY(!castedThis))
return throwThisTypeError(*exec, "TestObj", "optionsObject");
ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
TestObj& impl = castedThis->impl();
if (exec->argumentCount() < 1)
return throwVMError(exec, createNotEnoughArgumentsError(exec));
Dictionary oo(exec, exec->argument(0));
if (UNLIKELY(exec->hadException()))
return JSValue::encode(jsUndefined());
Dictionary ooo(exec, exec->argument(1));
if (UNLIKELY(exec->hadException()))
return JSValue::encode(jsUndefined());
impl.optionsObject(oo, ooo);
return JSValue::encode(jsUndefined());
}
EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithException(ExecState* exec)
{
JSValue thisValue = exec->thisValue();
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
if (UNLIKELY(!castedThis))
return throwThisTypeError(*exec, "TestObj", "methodWithException");
ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
TestObj& impl = castedThis->impl();
ExceptionCode ec = 0;
impl.methodWithException(ec);
setDOMException(exec, ec);
return JSValue::encode(jsUndefined());
}
EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionCustomMethod(ExecState* exec)
{
JSValue thisValue = exec->thisValue();
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
if (UNLIKELY(!castedThis))
return throwThisTypeError(*exec, "TestObj", "customMethod");
ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
return JSValue::encode(castedThis->customMethod(exec));
}
EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionCustomMethodWithArgs(ExecState* exec)
{
JSValue thisValue = exec->thisValue();
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
if (UNLIKELY(!castedThis))
return throwThisTypeError(*exec, "TestObj", "customMethodWithArgs");
ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
return JSValue::encode(castedThis->customMethodWithArgs(exec));
}
EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionAddEventListener(ExecState* exec)
{
JSValue thisValue = exec->thisValue();
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
if (UNLIKELY(!castedThis))
return throwThisTypeError(*exec, "TestObj", "addEventListener");
ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
TestObj& impl = castedThis->impl();
JSValue listener = exec->argument(1);
if (!listener.isObject())
return JSValue::encode(jsUndefined());
impl.addEventListener(exec->argument(0).toString(exec)->value(exec), JSEventListener::create(asObject(listener), castedThis, false, currentWorld(exec)), exec->argument(2).toBoolean(exec));
return JSValue::encode(jsUndefined());
}
EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionRemoveEventListener(ExecState* exec)
{
JSValue thisValue = exec->thisValue();
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
if (UNLIKELY(!castedThis))
return throwThisTypeError(*exec, "TestObj", "removeEventListener");
ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
TestObj& impl = castedThis->impl();
JSValue listener = exec->argument(1);
if (!listener.isObject())
return JSValue::encode(jsUndefined());
impl.removeEventListener(exec->argument(0).toString(exec)->value(exec), JSEventListener::create(asObject(listener), castedThis, false, currentWorld(exec)).get(), exec->argument(2).toBoolean(exec));
return JSValue::encode(jsUndefined());
}
EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithScriptStateVoid(ExecState* exec)
{
JSValue thisValue = exec->thisValue();
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
if (UNLIKELY(!castedThis))
return throwThisTypeError(*exec, "TestObj", "withScriptStateVoid");
ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
TestObj& impl = castedThis->impl();
impl.withScriptStateVoid(exec);
return JSValue::encode(jsUndefined());
}
EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithScriptStateObj(ExecState* exec)
{
JSValue thisValue = exec->thisValue();
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
if (UNLIKELY(!castedThis))
return throwThisTypeError(*exec, "TestObj", "withScriptStateObj");
ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
TestObj& impl = castedThis->impl();
JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl.withScriptStateObj(exec)));
if (UNLIKELY(exec->hadException()))
return JSValue::encode(jsUndefined());
return JSValue::encode(result);
}
EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithScriptStateVoidException(ExecState* exec)
{
JSValue thisValue = exec->thisValue();
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
if (UNLIKELY(!castedThis))
return throwThisTypeError(*exec, "TestObj", "withScriptStateVoidException");
ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
TestObj& impl = castedThis->impl();
ExceptionCode ec = 0;
impl.withScriptStateVoidException(exec, ec);
setDOMException(exec, ec);
return JSValue::encode(jsUndefined());
}
EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithScriptStateObjException(ExecState* exec)
{
JSValue thisValue = exec->thisValue();
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
if (UNLIKELY(!castedThis))
return throwThisTypeError(*exec, "TestObj", "withScriptStateObjException");
ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
TestObj& impl = castedThis->impl();
ExceptionCode ec = 0;
JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl.withScriptStateObjException(exec, ec)));
setDOMException(exec, ec);
if (UNLIKELY(exec->hadException()))
return JSValue::encode(jsUndefined());
return JSValue::encode(result);
}
EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithScriptExecutionContext(ExecState* exec)
{
JSValue thisValue = exec->thisValue();
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
if (UNLIKELY(!castedThis))
return throwThisTypeError(*exec, "TestObj", "withScriptExecutionContext");
ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
TestObj& impl = castedThis->impl();
ScriptExecutionContext* scriptContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
if (!scriptContext)
return JSValue::encode(jsUndefined());
impl.withScriptExecutionContext(scriptContext);
return JSValue::encode(jsUndefined());
}
EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithScriptExecutionContextAndScriptState(ExecState* exec)
{
JSValue thisValue = exec->thisValue();
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
if (UNLIKELY(!castedThis))
return throwThisTypeError(*exec, "TestObj", "withScriptExecutionContextAndScriptState");
ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
TestObj& impl = castedThis->impl();
ScriptExecutionContext* scriptContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
if (!scriptContext)
return JSValue::encode(jsUndefined());
impl.withScriptExecutionContextAndScriptState(exec, scriptContext);
return JSValue::encode(jsUndefined());
}
EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithScriptExecutionContextAndScriptStateObjException(ExecState* exec)
{
JSValue thisValue = exec->thisValue();
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
if (UNLIKELY(!castedThis))
return throwThisTypeError(*exec, "TestObj", "withScriptExecutionContextAndScriptStateObjException");
ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
TestObj& impl = castedThis->impl();
ExceptionCode ec = 0;
ScriptExecutionContext* scriptContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
if (!scriptContext)
return JSValue::encode(jsUndefined());
JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl.withScriptExecutionContextAndScriptStateObjException(exec, scriptContext, ec)));
setDOMException(exec, ec);
if (UNLIKELY(exec->hadException()))
return JSValue::encode(jsUndefined());
return JSValue::encode(result);
}
EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithScriptExecutionContextAndScriptStateWithSpaces(ExecState* exec)
{
JSValue thisValue = exec->thisValue();
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
if (UNLIKELY(!castedThis))
return throwThisTypeError(*exec, "TestObj", "withScriptExecutionContextAndScriptStateWithSpaces");
ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
TestObj& impl = castedThis->impl();
ScriptExecutionContext* scriptContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
if (!scriptContext)
return JSValue::encode(jsUndefined());
JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl.withScriptExecutionContextAndScriptStateWithSpaces(exec, scriptContext)));
if (UNLIKELY(exec->hadException()))
return JSValue::encode(jsUndefined());
return JSValue::encode(result);
}
EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithScriptArgumentsAndCallStack(ExecState* exec)
{
JSValue thisValue = exec->thisValue();
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
if (UNLIKELY(!castedThis))
return throwThisTypeError(*exec, "TestObj", "withScriptArgumentsAndCallStack");
ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
TestObj& impl = castedThis->impl();
RefPtr<Inspector::ScriptArguments> scriptArguments(Inspector::createScriptArguments(exec, 0));
impl.withScriptArgumentsAndCallStack(scriptArguments.release());
return JSValue::encode(jsUndefined());
}
EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalArg(ExecState* exec)
{
JSValue thisValue = exec->thisValue();
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
if (UNLIKELY(!castedThis))
return throwThisTypeError(*exec, "TestObj", "methodWithOptionalArg");
ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
TestObj& impl = castedThis->impl();
size_t argsCount = exec->argumentCount();
if (argsCount <= 0) {
impl.methodWithOptionalArg();
return JSValue::encode(jsUndefined());
}
int opt(toInt32(exec, exec->argument(0), NormalConversion));
if (UNLIKELY(exec->hadException()))
return JSValue::encode(jsUndefined());
impl.methodWithOptionalArg(opt);
return JSValue::encode(jsUndefined());
}
EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndOptionalArg(ExecState* exec)
{
JSValue thisValue = exec->thisValue();
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
if (UNLIKELY(!castedThis))
return throwThisTypeError(*exec, "TestObj", "methodWithNonOptionalArgAndOptionalArg");
ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
TestObj& impl = castedThis->impl();
if (exec->argumentCount() < 1)
return throwVMError(exec, createNotEnoughArgumentsError(exec));
int nonOpt(toInt32(exec, exec->argument(0), NormalConversion));
if (UNLIKELY(exec->hadException()))
return JSValue::encode(jsUndefined());
size_t argsCount = exec->argumentCount();
if (argsCount <= 1) {
impl.methodWithNonOptionalArgAndOptionalArg(nonOpt);
return JSValue::encode(jsUndefined());
}
int opt(toInt32(exec, exec->argument(1), NormalConversion));
if (UNLIKELY(exec->hadException()))
return JSValue::encode(jsUndefined());
impl.methodWithNonOptionalArgAndOptionalArg(nonOpt, opt);
return JSValue::encode(jsUndefined());
}
EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndTwoOptionalArgs(ExecState* exec)
{
JSValue thisValue = exec->thisValue();
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
if (UNLIKELY(!castedThis))
return throwThisTypeError(*exec, "TestObj", "methodWithNonOptionalArgAndTwoOptionalArgs");
ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
TestObj& impl = castedThis->impl();
if (exec->argumentCount() < 1)
return throwVMError(exec, createNotEnoughArgumentsError(exec));
int nonOpt(toInt32(exec, exec->argument(0), NormalConversion));
if (UNLIKELY(exec->hadException()))
return JSValue::encode(jsUndefined());
size_t argsCount = exec->argumentCount();
if (argsCount <= 1) {
impl.methodWithNonOptionalArgAndTwoOptionalArgs(nonOpt);
return JSValue::encode(jsUndefined());
}
int opt1(toInt32(exec, exec->argument(1), NormalConversion));
if (UNLIKELY(exec->hadException()))
return JSValue::encode(jsUndefined());
if (argsCount <= 2) {
impl.methodWithNonOptionalArgAndTwoOptionalArgs(nonOpt, opt1);
return JSValue::encode(jsUndefined());
}
int opt2(toInt32(exec, exec->argument(2), NormalConversion));
if (UNLIKELY(exec->hadException()))
return JSValue::encode(jsUndefined());
impl.methodWithNonOptionalArgAndTwoOptionalArgs(nonOpt, opt1, opt2);
return JSValue::encode(jsUndefined());
}
EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalString(ExecState* exec)
{
JSValue thisValue = exec->thisValue();
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
if (UNLIKELY(!castedThis))
return throwThisTypeError(*exec, "TestObj", "methodWithOptionalString");
ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
TestObj& impl = castedThis->impl();
size_t argsCount = exec->argumentCount();
if (argsCount <= 0) {
impl.methodWithOptionalString();
return JSValue::encode(jsUndefined());
}
const String& str(exec->argument(0).isEmpty() ? String() : exec->argument(0).toString(exec)->value(exec));
if (UNLIKELY(exec->hadException()))
return JSValue::encode(jsUndefined());
impl.methodWithOptionalString(str);
return JSValue::encode(jsUndefined());
}
EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalStringIsUndefined(ExecState* exec)
{
JSValue thisValue = exec->thisValue();
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
if (UNLIKELY(!castedThis))
return throwThisTypeError(*exec, "TestObj", "methodWithOptionalStringIsUndefined");
ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
TestObj& impl = castedThis->impl();
const String& str(exec->argument(0).isEmpty() ? String() : exec->argument(0).toString(exec)->value(exec));
if (UNLIKELY(exec->hadException()))
return JSValue::encode(jsUndefined());
impl.methodWithOptionalStringIsUndefined(str);
return JSValue::encode(jsUndefined());
}
EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalStringIsNullString(ExecState* exec)
{
JSValue thisValue = exec->thisValue();
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
if (UNLIKELY(!castedThis))
return throwThisTypeError(*exec, "TestObj", "methodWithOptionalStringIsNullString");
ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
TestObj& impl = castedThis->impl();
const String& str(argumentOrNull(exec, 0).isEmpty() ? String() : argumentOrNull(exec, 0).toString(exec)->value(exec));
if (UNLIKELY(exec->hadException()))
return JSValue::encode(jsUndefined());
impl.methodWithOptionalStringIsNullString(str);
return JSValue::encode(jsUndefined());
}
EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithCallbackArg(ExecState* exec)
{
JSValue thisValue = exec->thisValue();
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
if (UNLIKELY(!castedThis))
return throwThisTypeError(*exec, "TestObj", "methodWithCallbackArg");
ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
TestObj& impl = castedThis->impl();
if (exec->argumentCount() < 1)
return throwVMError(exec, createNotEnoughArgumentsError(exec));
if (!exec->argument(0).isFunction())
return throwArgumentMustBeFunctionError(*exec, 0, "callback", "TestObj", "methodWithCallbackArg");
RefPtr<TestCallback> callback = JSTestCallback::create(asObject(exec->uncheckedArgument(0)), castedThis->globalObject());
impl.methodWithCallbackArg(callback);
return JSValue::encode(jsUndefined());
}
EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackArg(ExecState* exec)
{
JSValue thisValue = exec->thisValue();
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
if (UNLIKELY(!castedThis))
return throwThisTypeError(*exec, "TestObj", "methodWithNonCallbackArgAndCallbackArg");
ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
TestObj& impl = castedThis->impl();
if (exec->argumentCount() < 2)
return throwVMError(exec, createNotEnoughArgumentsError(exec));
int nonCallback(toInt32(exec, exec->argument(0), NormalConversion));
if (UNLIKELY(exec->hadException()))
return JSValue::encode(jsUndefined());
if (!exec->argument(1).isFunction())
return throwArgumentMustBeFunctionError(*exec, 1, "callback", "TestObj", "methodWithNonCallbackArgAndCallbackArg");
RefPtr<TestCallback> callback = JSTestCallback::create(asObject(exec->uncheckedArgument(1)), castedThis->globalObject());
impl.methodWithNonCallbackArgAndCallbackArg(nonCallback, callback);
return JSValue::encode(jsUndefined());
}
EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithCallbackAndOptionalArg(ExecState* exec)
{
JSValue thisValue = exec->thisValue();
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
if (UNLIKELY(!castedThis))
return throwThisTypeError(*exec, "TestObj", "methodWithCallbackAndOptionalArg");
ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
TestObj& impl = castedThis->impl();
RefPtr<TestCallback> callback;
if (!exec->argument(0).isUndefinedOrNull()) {
if (!exec->uncheckedArgument(0).isFunction())
return throwArgumentMustBeFunctionError(*exec, 0, "callback", "TestObj", "methodWithCallbackAndOptionalArg");
callback = JSTestCallback::create(asObject(exec->uncheckedArgument(0)), castedThis->globalObject());
}
impl.methodWithCallbackAndOptionalArg(callback);
return JSValue::encode(jsUndefined());
}
EncodedJSValue JSC_HOST_CALL jsTestObjConstructorFunctionStaticMethodWithCallbackAndOptionalArg(ExecState* exec)
{
RefPtr<TestCallback> callback;
if (!exec->argument(0).isUndefinedOrNull()) {
if (!exec->uncheckedArgument(0).isFunction())
return throwArgumentMustBeFunctionError(*exec, 0, "callback", "TestObj", "staticMethodWithCallbackAndOptionalArg");
callback = createFunctionOnlyCallback<JSTestCallback>(exec, jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject()), exec->uncheckedArgument(0));
}
TestObj::staticMethodWithCallbackAndOptionalArg(callback);
return JSValue::encode(jsUndefined());
}
EncodedJSValue JSC_HOST_CALL jsTestObjConstructorFunctionStaticMethodWithCallbackArg(ExecState* exec)
{
if (exec->argumentCount() < 1)
return throwVMError(exec, createNotEnoughArgumentsError(exec));
if (!exec->argument(0).isFunction())
return throwArgumentMustBeFunctionError(*exec, 0, "callback", "TestObj", "staticMethodWithCallbackArg");
RefPtr<TestCallback> callback = createFunctionOnlyCallback<JSTestCallback>(exec, jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject()), exec->uncheckedArgument(0));
TestObj::staticMethodWithCallbackArg(callback);
return JSValue::encode(jsUndefined());
}
#if ENABLE(Condition1)
EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionConditionalMethod1(ExecState* exec)
{
JSValue thisValue = exec->thisValue();
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
if (UNLIKELY(!castedThis))
return throwThisTypeError(*exec, "TestObj", "conditionalMethod1");
ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
TestObj& impl = castedThis->impl();
JSValue result = jsStringWithCache(exec, impl.conditionalMethod1());
return JSValue::encode(result);
}
#endif
#if ENABLE(Condition1) && ENABLE(Condition2)
EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionConditionalMethod2(ExecState* exec)
{
JSValue thisValue = exec->thisValue();
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
if (UNLIKELY(!castedThis))
return throwThisTypeError(*exec, "TestObj", "conditionalMethod2");
ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
TestObj& impl = castedThis->impl();
impl.conditionalMethod2();
return JSValue::encode(jsUndefined());
}
#endif
#if ENABLE(Condition1) || ENABLE(Condition2)
EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionConditionalMethod3(ExecState* exec)
{
JSValue thisValue = exec->thisValue();
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
if (UNLIKELY(!castedThis))
return throwThisTypeError(*exec, "TestObj", "conditionalMethod3");
ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
TestObj& impl = castedThis->impl();
impl.conditionalMethod3();
return JSValue::encode(jsUndefined());
}
#endif
static EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOverloadedMethod1(ExecState* exec)
{
JSValue thisValue = exec->thisValue();
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
if (UNLIKELY(!castedThis))
return throwThisTypeError(*exec, "TestObj", "overloadedMethod");
ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
TestObj& impl = castedThis->impl();
if (exec->argumentCount() < 2)
return throwVMError(exec, createNotEnoughArgumentsError(exec));
TestObj* objArg(toTestObj(exec->argument(0)));
if (UNLIKELY(exec->hadException()))
return JSValue::encode(jsUndefined());
const String& strArg(exec->argument(1).isEmpty() ? String() : exec->argument(1).toString(exec)->value(exec));
if (UNLIKELY(exec->hadException()))
return JSValue::encode(jsUndefined());
impl.overloadedMethod(objArg, strArg);
return JSValue::encode(jsUndefined());
}
static EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOverloadedMethod2(ExecState* exec)
{
JSValue thisValue = exec->thisValue();
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
if (UNLIKELY(!castedThis))
return throwThisTypeError(*exec, "TestObj", "overloadedMethod");
ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
TestObj& impl = castedThis->impl();
if (exec->argumentCount() < 1)
return throwVMError(exec, createNotEnoughArgumentsError(exec));
TestObj* objArg(toTestObj(exec->argument(0)));
if (UNLIKELY(exec->hadException()))
return JSValue::encode(jsUndefined());
size_t argsCount = exec->argumentCount();
if (argsCount <= 1) {
impl.overloadedMethod(objArg);
return JSValue::encode(jsUndefined());
}
int longArg(toInt32(exec, exec->argument(1), NormalConversion));
if (UNLIKELY(exec->hadException()))
return JSValue::encode(jsUndefined());
impl.overloadedMethod(objArg, longArg);
return JSValue::encode(jsUndefined());
}
static EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOverloadedMethod3(ExecState* exec)
{
JSValue thisValue = exec->thisValue();
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
if (UNLIKELY(!castedThis))
return throwThisTypeError(*exec, "TestObj", "overloadedMethod");
ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
TestObj& impl = castedThis->impl();
if (exec->argumentCount() < 1)
return throwVMError(exec, createNotEnoughArgumentsError(exec));
const String& strArg(exec->argument(0).isEmpty() ? String() : exec->argument(0).toString(exec)->value(exec));
if (UNLIKELY(exec->hadException()))
return JSValue::encode(jsUndefined());
impl.overloadedMethod(strArg);
return JSValue::encode(jsUndefined());
}
static EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOverloadedMethod4(ExecState* exec)
{
JSValue thisValue = exec->thisValue();
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
if (UNLIKELY(!castedThis))
return throwThisTypeError(*exec, "TestObj", "overloadedMethod");
ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
TestObj& impl = castedThis->impl();
if (exec->argumentCount() < 1)
return throwVMError(exec, createNotEnoughArgumentsError(exec));
int longArg(toInt32(exec, exec->argument(0), NormalConversion));
if (UNLIKELY(exec->hadException()))
return JSValue::encode(jsUndefined());
impl.overloadedMethod(longArg);
return JSValue::encode(jsUndefined());
}
static EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOverloadedMethod5(ExecState* exec)
{
JSValue thisValue = exec->thisValue();
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
if (UNLIKELY(!castedThis))
return throwThisTypeError(*exec, "TestObj", "overloadedMethod");
ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
TestObj& impl = castedThis->impl();
if (exec->argumentCount() < 1)
return throwVMError(exec, createNotEnoughArgumentsError(exec));
if (!exec->argument(0).isFunction())
return throwArgumentMustBeFunctionError(*exec, 0, "callback", "TestObj", "overloadedMethod");
RefPtr<TestCallback> callback = JSTestCallback::create(asObject(exec->uncheckedArgument(0)), castedThis->globalObject());
impl.overloadedMethod(callback);
return JSValue::encode(jsUndefined());
}
static EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOverloadedMethod6(ExecState* exec)
{
JSValue thisValue = exec->thisValue();
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
if (UNLIKELY(!castedThis))
return throwThisTypeError(*exec, "TestObj", "overloadedMethod");
ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
TestObj& impl = castedThis->impl();
if (exec->argumentCount() < 1)
return throwVMError(exec, createNotEnoughArgumentsError(exec));
RefPtr<DOMStringList> listArg(toDOMStringList(exec, exec->argument(0)));
if (UNLIKELY(exec->hadException()))
return JSValue::encode(jsUndefined());
impl.overloadedMethod(listArg);
return JSValue::encode(jsUndefined());
}
static EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOverloadedMethod7(ExecState* exec)
{
JSValue thisValue = exec->thisValue();
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
if (UNLIKELY(!castedThis))
return throwThisTypeError(*exec, "TestObj", "overloadedMethod");
ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
TestObj& impl = castedThis->impl();
if (exec->argumentCount() < 1)
return throwVMError(exec, createNotEnoughArgumentsError(exec));
Vector<String> arrayArg(toNativeArray<String>(exec, exec->argument(0)));
if (UNLIKELY(exec->hadException()))
return JSValue::encode(jsUndefined());
impl.overloadedMethod(arrayArg);
return JSValue::encode(jsUndefined());
}
static EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOverloadedMethod8(ExecState* exec)
{
JSValue thisValue = exec->thisValue();
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
if (UNLIKELY(!castedThis))
return throwThisTypeError(*exec, "TestObj", "overloadedMethod");
ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
TestObj& impl = castedThis->impl();
if (exec->argumentCount() < 1)
return throwVMError(exec, createNotEnoughArgumentsError(exec));
TestObj* objArg(toTestObj(exec->argument(0)));
if (UNLIKELY(exec->hadException()))
return JSValue::encode(jsUndefined());
impl.overloadedMethod(objArg);
return JSValue::encode(jsUndefined());
}
static EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOverloadedMethod9(ExecState* exec)
{
JSValue thisValue = exec->thisValue();
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
if (UNLIKELY(!castedThis))
return throwThisTypeError(*exec, "TestObj", "overloadedMethod");
ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
TestObj& impl = castedThis->impl();
if (exec->argumentCount() < 1)
return throwVMError(exec, createNotEnoughArgumentsError(exec));
Vector<String> arrayArg(toNativeArray<String>(exec, exec->argument(0)));
if (UNLIKELY(exec->hadException()))
return JSValue::encode(jsUndefined());
impl.overloadedMethod(arrayArg);
return JSValue::encode(jsUndefined());
}
static EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOverloadedMethod10(ExecState* exec)
{
JSValue thisValue = exec->thisValue();
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
if (UNLIKELY(!castedThis))
return throwThisTypeError(*exec, "TestObj", "overloadedMethod");
ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
TestObj& impl = castedThis->impl();
if (exec->argumentCount() < 1)
return throwVMError(exec, createNotEnoughArgumentsError(exec));
Vector<unsigned> arrayArg(toNativeArray<unsigned>(exec, exec->argument(0)));
if (UNLIKELY(exec->hadException()))
return JSValue::encode(jsUndefined());
impl.overloadedMethod(arrayArg);
return JSValue::encode(jsUndefined());
}
static EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOverloadedMethod11(ExecState* exec)
{
JSValue thisValue = exec->thisValue();
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
if (UNLIKELY(!castedThis))
return throwThisTypeError(*exec, "TestObj", "overloadedMethod");
ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
TestObj& impl = castedThis->impl();
if (exec->argumentCount() < 1)
return throwVMError(exec, createNotEnoughArgumentsError(exec));
const String& strArg(exec->argument(0).isEmpty() ? String() : exec->argument(0).toString(exec)->value(exec));
if (UNLIKELY(exec->hadException()))
return JSValue::encode(jsUndefined());
impl.overloadedMethod(strArg);
return JSValue::encode(jsUndefined());
}
EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOverloadedMethod(ExecState* exec)
{
size_t argsCount = exec->argumentCount();
JSValue arg0(exec->argument(0));
JSValue arg1(exec->argument(1));
if ((argsCount == 2 && (arg0.isNull() || (arg0.isObject() && asObject(arg0)->inherits(JSTestObj::info()))) && (arg1.isUndefinedOrNull() || arg1.isString() || arg1.isObject())))
return jsTestObjPrototypeFunctionOverloadedMethod1(exec);
if ((argsCount == 1 && (arg0.isNull() || (arg0.isObject() && asObject(arg0)->inherits(JSTestObj::info())))) || (argsCount == 2 && (arg0.isNull() || (arg0.isObject() && asObject(arg0)->inherits(JSTestObj::info())))))
return jsTestObjPrototypeFunctionOverloadedMethod2(exec);
if ((argsCount == 1 && (arg0.isUndefinedOrNull() || arg0.isString() || arg0.isObject())))
return jsTestObjPrototypeFunctionOverloadedMethod3(exec);
if (argsCount == 1)
return jsTestObjPrototypeFunctionOverloadedMethod4(exec);
if ((argsCount == 1 && (arg0.isNull() || arg0.isFunction())))
return jsTestObjPrototypeFunctionOverloadedMethod5(exec);
if ((argsCount == 1 && (arg0.isNull() || (arg0.isObject() && asObject(arg0)->inherits(JSDOMStringList::info())))))
return jsTestObjPrototypeFunctionOverloadedMethod6(exec);
if ((argsCount == 1 && (arg0.isNull() || (arg0.isObject() && isJSArray(arg0)))))
return jsTestObjPrototypeFunctionOverloadedMethod7(exec);
if ((argsCount == 1 && (arg0.isObject() && asObject(arg0)->inherits(JSTestObj::info()))))
return jsTestObjPrototypeFunctionOverloadedMethod8(exec);
if ((argsCount == 1 && (arg0.isObject() && isJSArray(arg0))))
return jsTestObjPrototypeFunctionOverloadedMethod9(exec);
if ((argsCount == 1 && (arg0.isObject() && isJSArray(arg0))))
return jsTestObjPrototypeFunctionOverloadedMethod10(exec);
if (argsCount == 1)
return jsTestObjPrototypeFunctionOverloadedMethod11(exec);
if (argsCount < 1)
return throwVMError(exec, createNotEnoughArgumentsError(exec));
return throwVMTypeError(exec);
}
EncodedJSValue JSC_HOST_CALL jsTestObjConstructorFunctionClassMethod(ExecState* exec)
{
TestObj::classMethod();
return JSValue::encode(jsUndefined());
}
EncodedJSValue JSC_HOST_CALL jsTestObjConstructorFunctionClassMethodWithOptional(ExecState* exec)
{
size_t argsCount = exec->argumentCount();
if (argsCount <= 0) {
JSValue result = jsNumber(TestObj::classMethodWithOptional());
return JSValue::encode(result);
}
int arg(toInt32(exec, exec->argument(0), NormalConversion));
if (UNLIKELY(exec->hadException()))
return JSValue::encode(jsUndefined());
JSValue result = jsNumber(TestObj::classMethodWithOptional(arg));
return JSValue::encode(result);
}
EncodedJSValue JSC_HOST_CALL jsTestObjConstructorFunctionClassMethod2(ExecState* exec)
{
if (exec->argumentCount() < 1)
return throwVMError(exec, createNotEnoughArgumentsError(exec));
return JSValue::encode(JSTestObj::classMethod2(exec));
}
#if ENABLE(Condition1)
static EncodedJSValue JSC_HOST_CALL jsTestObjConstructorFunctionOverloadedMethod11(ExecState* exec)
{
if (exec->argumentCount() < 1)
return throwVMError(exec, createNotEnoughArgumentsError(exec));
int arg(toInt32(exec, exec->argument(0), NormalConversion));
if (UNLIKELY(exec->hadException()))
return JSValue::encode(jsUndefined());
TestObj::overloadedMethod1(arg);
return JSValue::encode(jsUndefined());
}
#endif
#if ENABLE(Condition1)
static EncodedJSValue JSC_HOST_CALL jsTestObjConstructorFunctionOverloadedMethod12(ExecState* exec)
{
if (exec->argumentCount() < 1)
return throwVMError(exec, createNotEnoughArgumentsError(exec));
const String& type(exec->argument(0).isEmpty() ? String() : exec->argument(0).toString(exec)->value(exec));
if (UNLIKELY(exec->hadException()))
return JSValue::encode(jsUndefined());
TestObj::overloadedMethod1(type);
return JSValue::encode(jsUndefined());
}
#endif
EncodedJSValue JSC_HOST_CALL jsTestObjConstructorFunctionOverloadedMethod1(ExecState* exec)
{
size_t argsCount = exec->argumentCount();
#if ENABLE(Condition1)
if (argsCount == 1)
return jsTestObjConstructorFunctionOverloadedMethod11(exec);
#endif
JSValue arg0(exec->argument(0));
#if ENABLE(Condition1)
if ((argsCount == 1 && (arg0.isUndefinedOrNull() || arg0.isString() || arg0.isObject())))
return jsTestObjConstructorFunctionOverloadedMethod12(exec);
#endif
if (argsCount < 1)
return throwVMError(exec, createNotEnoughArgumentsError(exec));
return throwVMTypeError(exec);
}
EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionClassMethodWithClamp(ExecState* exec)
{
JSValue thisValue = exec->thisValue();
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
if (UNLIKELY(!castedThis))
return throwThisTypeError(*exec, "TestObj", "classMethodWithClamp");
ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
TestObj& impl = castedThis->impl();
if (exec->argumentCount() < 2)
return throwVMError(exec, createNotEnoughArgumentsError(exec));
unsigned short objArgsShort = 0;
double objArgsShortNativeValue = exec->argument(0).toNumber(exec);
if (UNLIKELY(exec->hadException()))
return JSValue::encode(jsUndefined());
if (!std::isnan(objArgsShortNativeValue))
objArgsShort = clampTo<unsigned short>(objArgsShortNativeValue);
unsigned long objArgsLong = 0;
double objArgsLongNativeValue = exec->argument(1).toNumber(exec);
if (UNLIKELY(exec->hadException()))
return JSValue::encode(jsUndefined());
if (!std::isnan(objArgsLongNativeValue))
objArgsLong = clampTo<unsigned long>(objArgsLongNativeValue);
impl.classMethodWithClamp(objArgsShort, objArgsLong);
return JSValue::encode(jsUndefined());
}
EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithUnsignedLongSequence(ExecState* exec)
{
JSValue thisValue = exec->thisValue();
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
if (UNLIKELY(!castedThis))
return throwThisTypeError(*exec, "TestObj", "methodWithUnsignedLongSequence");
ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
TestObj& impl = castedThis->impl();
if (exec->argumentCount() < 1)
return throwVMError(exec, createNotEnoughArgumentsError(exec));
Vector<unsigned> unsignedLongSequence(toNativeArray<unsigned>(exec, exec->argument(0)));
if (UNLIKELY(exec->hadException()))
return JSValue::encode(jsUndefined());
impl.methodWithUnsignedLongSequence(unsignedLongSequence);
return JSValue::encode(jsUndefined());
}
EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionStringArrayFunction(ExecState* exec)
{
JSValue thisValue = exec->thisValue();
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
if (UNLIKELY(!castedThis))
return throwThisTypeError(*exec, "TestObj", "stringArrayFunction");
ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
TestObj& impl = castedThis->impl();
if (exec->argumentCount() < 1)
return throwVMError(exec, createNotEnoughArgumentsError(exec));
ExceptionCode ec = 0;
Vector<String> values(toNativeArray<String>(exec, exec->argument(0)));
if (UNLIKELY(exec->hadException()))
return JSValue::encode(jsUndefined());
JSValue result = jsArray(exec, castedThis->globalObject(), impl.stringArrayFunction(values, ec));
setDOMException(exec, ec);
return JSValue::encode(result);
}
EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionDomStringListFunction(ExecState* exec)
{
JSValue thisValue = exec->thisValue();
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
if (UNLIKELY(!castedThis))
return throwThisTypeError(*exec, "TestObj", "domStringListFunction");
ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
TestObj& impl = castedThis->impl();
if (exec->argumentCount() < 1)
return throwVMError(exec, createNotEnoughArgumentsError(exec));
ExceptionCode ec = 0;
RefPtr<DOMStringList> values(toDOMStringList(exec, exec->argument(0)));
if (UNLIKELY(exec->hadException()))
return JSValue::encode(jsUndefined());
JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl.domStringListFunction(values, ec)));
setDOMException(exec, ec);
return JSValue::encode(result);
}
EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithAndWithoutNullableSequence(ExecState* exec)
{
JSValue thisValue = exec->thisValue();
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
if (UNLIKELY(!castedThis))
return throwThisTypeError(*exec, "TestObj", "methodWithAndWithoutNullableSequence");
ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
TestObj& impl = castedThis->impl();
if (exec->argumentCount() < 2)
return throwVMError(exec, createNotEnoughArgumentsError(exec));
Vector<unsigned> arrayArg(toNativeArray<unsigned>(exec, exec->argument(0)));
if (UNLIKELY(exec->hadException()))
return JSValue::encode(jsUndefined());
Vector<unsigned> nullableArrayArg(toNativeArray<unsigned>(exec, exec->argument(1)));
if (UNLIKELY(exec->hadException()))
return JSValue::encode(jsUndefined());
impl.methodWithAndWithoutNullableSequence(arrayArg, nullableArrayArg);
return JSValue::encode(jsUndefined());
}
EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithAndWithoutNullableSequence2(ExecState* exec)
{
JSValue thisValue = exec->thisValue();
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
if (UNLIKELY(!castedThis))
return throwThisTypeError(*exec, "TestObj", "methodWithAndWithoutNullableSequence2");
ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
TestObj& impl = castedThis->impl();
if (exec->argumentCount() < 2)
return throwVMError(exec, createNotEnoughArgumentsError(exec));
Vector<unsigned> arrayArg(toNativeArray<unsigned>(exec, exec->argument(0)));
if (UNLIKELY(exec->hadException()))
return JSValue::encode(jsUndefined());
Vector<unsigned> nullableArrayArg(toNativeArray<unsigned>(exec, exec->argument(1)));
if (UNLIKELY(exec->hadException()))
return JSValue::encode(jsUndefined());
impl.methodWithAndWithoutNullableSequence2(arrayArg, nullableArrayArg);
return JSValue::encode(jsUndefined());
}
EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionGetSVGDocument(ExecState* exec)
{
JSValue thisValue = exec->thisValue();
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
if (UNLIKELY(!castedThis))
return throwThisTypeError(*exec, "TestObj", "getSVGDocument");
ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
TestObj& impl = castedThis->impl();
ExceptionCode ec = 0;
if (!shouldAllowAccessToNode(exec, impl.getSVGDocument(ec)))
return JSValue::encode(jsNull());
JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl.getSVGDocument(ec)));
setDOMException(exec, ec);
return JSValue::encode(result);
}
EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionConvert1(ExecState* exec)
{
JSValue thisValue = exec->thisValue();
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
if (UNLIKELY(!castedThis))
return throwThisTypeError(*exec, "TestObj", "convert1");
ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
TestObj& impl = castedThis->impl();
if (exec->argumentCount() < 1)
return throwVMError(exec, createNotEnoughArgumentsError(exec));
TestNode* value(toTestNode(exec->argument(0)));
if (UNLIKELY(exec->hadException()))
return JSValue::encode(jsUndefined());
impl.convert1(value);
return JSValue::encode(jsUndefined());
}
EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionConvert2(ExecState* exec)
{
JSValue thisValue = exec->thisValue();
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
if (UNLIKELY(!castedThis))
return throwThisTypeError(*exec, "TestObj", "convert2");
ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
TestObj& impl = castedThis->impl();
if (exec->argumentCount() < 1)
return throwVMError(exec, createNotEnoughArgumentsError(exec));
TestNode* value(toTestNode(exec->argument(0)));
if (UNLIKELY(exec->hadException()))
return JSValue::encode(jsUndefined());
impl.convert2(value);
return JSValue::encode(jsUndefined());
}
EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionConvert4(ExecState* exec)
{
JSValue thisValue = exec->thisValue();
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
if (UNLIKELY(!castedThis))
return throwThisTypeError(*exec, "TestObj", "convert4");
ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
TestObj& impl = castedThis->impl();
if (exec->argumentCount() < 1)
return throwVMError(exec, createNotEnoughArgumentsError(exec));
TestNode* value(toTestNode(exec->argument(0)));
if (UNLIKELY(exec->hadException()))
return JSValue::encode(jsUndefined());
impl.convert4(value);
return JSValue::encode(jsUndefined());
}
EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionConvert5(ExecState* exec)
{
JSValue thisValue = exec->thisValue();
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
if (UNLIKELY(!castedThis))
return throwThisTypeError(*exec, "TestObj", "convert5");
ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
TestObj& impl = castedThis->impl();
if (exec->argumentCount() < 1)
return throwVMError(exec, createNotEnoughArgumentsError(exec));
TestNode* value(toTestNode(exec->argument(0)));
if (UNLIKELY(exec->hadException()))
return JSValue::encode(jsUndefined());
impl.convert5(value);
return JSValue::encode(jsUndefined());
}
EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMutablePointFunction(ExecState* exec)
{
JSValue thisValue = exec->thisValue();
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
if (UNLIKELY(!castedThis))
return throwThisTypeError(*exec, "TestObj", "mutablePointFunction");
ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
TestObj& impl = castedThis->impl();
JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(SVGPropertyTearOff<SVGPoint>::create(impl.mutablePointFunction())));
return JSValue::encode(result);
}
EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionImmutablePointFunction(ExecState* exec)
{
JSValue thisValue = exec->thisValue();
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
if (UNLIKELY(!castedThis))
return throwThisTypeError(*exec, "TestObj", "immutablePointFunction");
ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
TestObj& impl = castedThis->impl();
JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(SVGPropertyTearOff<SVGPoint>::create(impl.immutablePointFunction())));
return JSValue::encode(result);
}
EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOrange(ExecState* exec)
{
JSValue thisValue = exec->thisValue();
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
if (UNLIKELY(!castedThis))
return throwThisTypeError(*exec, "TestObj", "orange");
ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
TestObj& impl = castedThis->impl();
impl.banana();
return JSValue::encode(jsUndefined());
}
EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionStrictFunction(ExecState* exec)
{
JSValue thisValue = exec->thisValue();
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
if (UNLIKELY(!castedThis))
return throwThisTypeError(*exec, "TestObj", "strictFunction");
ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
TestObj& impl = castedThis->impl();
if (exec->argumentCount() < 3)
return throwVMError(exec, createNotEnoughArgumentsError(exec));
ExceptionCode ec = 0;
const String& str(exec->argument(0).isEmpty() ? String() : exec->argument(0).toString(exec)->value(exec));
if (UNLIKELY(exec->hadException()))
return JSValue::encode(jsUndefined());
float a(exec->argument(1).toFloat(exec));
if (UNLIKELY(exec->hadException()))
return JSValue::encode(jsUndefined());
int b(toInt32(exec, exec->argument(2), NormalConversion));
if (UNLIKELY(exec->hadException()))
return JSValue::encode(jsUndefined());
JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl.strictFunction(str, a, b, ec)));
setDOMException(exec, ec);
return JSValue::encode(result);
}
EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionStrictFunctionWithSequence(ExecState* exec)
{
JSValue thisValue = exec->thisValue();
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
if (UNLIKELY(!castedThis))
return throwThisTypeError(*exec, "TestObj", "strictFunctionWithSequence");
ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
TestObj& impl = castedThis->impl();
if (exec->argumentCount() < 2)
return throwVMError(exec, createNotEnoughArgumentsError(exec));
ExceptionCode ec = 0;
if (!exec->argument(0).isUndefinedOrNull() && !exec->argument(0).inherits(JSTestObj::info()))
return throwArgumentTypeError(*exec, 0, "objArg", "TestObj", "strictFunctionWithSequence", "TestObj");
TestObj* objArg(toTestObj(exec->argument(0)));
if (UNLIKELY(exec->hadException()))
return JSValue::encode(jsUndefined());
Vector<unsigned> a(toNativeArray<unsigned>(exec, exec->argument(1)));
if (UNLIKELY(exec->hadException()))
return JSValue::encode(jsUndefined());
JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl.strictFunctionWithSequence(objArg, a, ec)));
setDOMException(exec, ec);
return JSValue::encode(result);
}
EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionStrictFunctionWithArray(ExecState* exec)
{
JSValue thisValue = exec->thisValue();
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
if (UNLIKELY(!castedThis))
return throwThisTypeError(*exec, "TestObj", "strictFunctionWithArray");
ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
TestObj& impl = castedThis->impl();
if (exec->argumentCount() < 2)
return throwVMError(exec, createNotEnoughArgumentsError(exec));
ExceptionCode ec = 0;
if (!exec->argument(0).isUndefinedOrNull() && !exec->argument(0).inherits(JSTestObj::info()))
return throwArgumentTypeError(*exec, 0, "objArg", "TestObj", "strictFunctionWithArray", "TestObj");
TestObj* objArg(toTestObj(exec->argument(0)));
if (UNLIKELY(exec->hadException()))
return JSValue::encode(jsUndefined());
Vector<int> array(toNativeArray<int>(exec, exec->argument(1)));
if (UNLIKELY(exec->hadException()))
return JSValue::encode(jsUndefined());
JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl.strictFunctionWithArray(objArg, array, ec)));
setDOMException(exec, ec);
return JSValue::encode(result);
}
EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionVariadicStringMethod(ExecState* exec)
{
JSValue thisValue = exec->thisValue();
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
if (UNLIKELY(!castedThis))
return throwThisTypeError(*exec, "TestObj", "variadicStringMethod");
ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
TestObj& impl = castedThis->impl();
if (exec->argumentCount() < 1)
return throwVMError(exec, createNotEnoughArgumentsError(exec));
const String& head(exec->argument(0).isEmpty() ? String() : exec->argument(0).toString(exec)->value(exec));
if (UNLIKELY(exec->hadException()))
return JSValue::encode(jsUndefined());
Vector<String> tail = toNativeArguments<String>(exec, 1);
if (UNLIKELY(exec->hadException()))
return JSValue::encode(jsUndefined());
impl.variadicStringMethod(head, tail);
return JSValue::encode(jsUndefined());
}
EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionVariadicDoubleMethod(ExecState* exec)
{
JSValue thisValue = exec->thisValue();
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
if (UNLIKELY(!castedThis))
return throwThisTypeError(*exec, "TestObj", "variadicDoubleMethod");
ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
TestObj& impl = castedThis->impl();
if (exec->argumentCount() < 1)
return throwVMError(exec, createNotEnoughArgumentsError(exec));
double head(exec->argument(0).toNumber(exec));
if (UNLIKELY(exec->hadException()))
return JSValue::encode(jsUndefined());
Vector<double> tail = toNativeArguments<double>(exec, 1);
if (UNLIKELY(exec->hadException()))
return JSValue::encode(jsUndefined());
impl.variadicDoubleMethod(head, tail);
return JSValue::encode(jsUndefined());
}
EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionVariadicNodeMethod(ExecState* exec)
{
JSValue thisValue = exec->thisValue();
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
if (UNLIKELY(!castedThis))
return throwThisTypeError(*exec, "TestObj", "variadicNodeMethod");
ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
TestObj& impl = castedThis->impl();
if (exec->argumentCount() < 1)
return throwVMError(exec, createNotEnoughArgumentsError(exec));
Node* head(toNode(exec->argument(0)));
if (UNLIKELY(exec->hadException()))
return JSValue::encode(jsUndefined());
Vector<Node*> tail;
for (unsigned i = 1, count = exec->argumentCount(); i < count; ++i) {
if (!exec->uncheckedArgument(i).inherits(JSNode::info()))
return throwArgumentTypeError(*exec, i, "tail", "TestObj", "variadicNodeMethod", "Node");
tail.append(toNode(exec->uncheckedArgument(i)));
}
impl.variadicNodeMethod(head, tail);
return JSValue::encode(jsUndefined());
}
EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionAny(ExecState* exec)
{
JSValue thisValue = exec->thisValue();
JSTestObj* castedThis = jsDynamicCast<JSTestObj*>(thisValue);
if (UNLIKELY(!castedThis))
return throwThisTypeError(*exec, "TestObj", "any");
ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
TestObj& impl = castedThis->impl();
if (exec->argumentCount() < 2)
return throwVMError(exec, createNotEnoughArgumentsError(exec));
float a(exec->argument(0).toFloat(exec));
if (UNLIKELY(exec->hadException()))
return JSValue::encode(jsUndefined());
int b(toInt32(exec, exec->argument(1), NormalConversion));
if (UNLIKELY(exec->hadException()))
return JSValue::encode(jsUndefined());
impl.any(a, b);
return JSValue::encode(jsUndefined());
}
void JSTestObj::visitChildren(JSCell* cell, SlotVisitor& visitor)
{
JSTestObj* thisObject = jsCast<JSTestObj*>(cell);
ASSERT_GC_OBJECT_INHERITS(thisObject, info());
COMPILE_ASSERT(StructureFlags & OverridesVisitChildren, OverridesVisitChildrenWithoutSettingFlag);
ASSERT(thisObject->structure()->typeInfo().overridesVisitChildren());
Base::visitChildren(thisObject, visitor);
visitor.append(&thisObject->m_cachedAttribute1);
visitor.append(&thisObject->m_cachedAttribute2);
}
bool JSTestObjOwner::isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown> handle, void*, SlotVisitor& visitor)
{
UNUSED_PARAM(handle);
UNUSED_PARAM(visitor);
return false;
}
void JSTestObjOwner::finalize(JSC::Handle<JSC::Unknown> handle, void* context)
{
JSTestObj* jsTestObj = jsCast<JSTestObj*>(handle.slot()->asCell());
DOMWrapperWorld& world = *static_cast<DOMWrapperWorld*>(context);
uncacheWrapper(world, &jsTestObj->impl(), jsTestObj);
jsTestObj->releaseImpl();
}
#if ENABLE(BINDING_INTEGRITY)
#if PLATFORM(WIN)
#pragma warning(disable: 4483)
extern "C" { extern void (*const __identifier("??_7TestObj@WebCore@@6B@")[])(); }
#else
extern "C" { extern void* _ZTVN7WebCore7TestObjE[]; }
#endif
#endif
JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject* globalObject, TestObj* impl)
{
if (!impl)
return jsNull();
if (JSValue result = getExistingWrapper<JSTestObj>(globalObject, impl))
return result;
#if ENABLE(BINDING_INTEGRITY)
void* actualVTablePointer = *(reinterpret_cast<void**>(impl));
#if PLATFORM(WIN)
void* expectedVTablePointer = reinterpret_cast<void*>(__identifier("??_7TestObj@WebCore@@6B@"));
#else
void* expectedVTablePointer = &_ZTVN7WebCore7TestObjE[2];
#if COMPILER(CLANG)
COMPILE_ASSERT(__is_polymorphic(TestObj), TestObj_is_not_polymorphic);
#endif
#endif
RELEASE_ASSERT(actualVTablePointer == expectedVTablePointer);
#endif
return createNewWrapper<JSTestObj>(globalObject, impl);
}
TestObj* toTestObj(JSC::JSValue value)
{
if (auto* wrapper = jsDynamicCast<JSTestObj*>(value))
return &wrapper->impl();
return nullptr;
}
}