summaryrefslogtreecommitdiffstats
path: root/WebCore/bindings/scripts/test/JS/JSTestObj.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/bindings/scripts/test/JS/JSTestObj.cpp')
-rw-r--r--WebCore/bindings/scripts/test/JS/JSTestObj.cpp242
1 files changed, 121 insertions, 121 deletions
diff --git a/WebCore/bindings/scripts/test/JS/JSTestObj.cpp b/WebCore/bindings/scripts/test/JS/JSTestObj.cpp
index 926d137..1e563c6 100644
--- a/WebCore/bindings/scripts/test/JS/JSTestObj.cpp
+++ b/WebCore/bindings/scripts/test/JS/JSTestObj.cpp
@@ -86,7 +86,7 @@ public:
JSTestObjConstructor(ExecState* exec, JSDOMGlobalObject* globalObject)
: DOMConstructorObject(JSTestObjConstructor::createStructure(globalObject->objectPrototype()), globalObject)
{
- putDirect(exec->propertyNames().prototype, JSTestObjPrototype::self(exec, globalObject), None);
+ putDirect(exec->propertyNames().prototype, JSTestObjPrototype::self(exec, globalObject), DontDelete | ReadOnly);
}
virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&);
virtual bool getOwnPropertyDescriptor(ExecState*, const Identifier&, PropertyDescriptor&);
@@ -188,7 +188,7 @@ JSTestObj::~JSTestObj()
JSObject* JSTestObj::createPrototype(ExecState* exec, JSGlobalObject* globalObject)
{
- return new (exec) JSTestObjPrototype(JSTestObjPrototype::createStructure(globalObject->objectPrototype()));
+ return new (exec) JSTestObjPrototype(globalObject, JSTestObjPrototype::createStructure(globalObject->objectPrototype()));
}
bool JSTestObj::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
@@ -396,9 +396,9 @@ JSValue JSTestObj::getConstructor(ExecState* exec, JSGlobalObject* globalObject)
return getDOMConstructor<JSTestObjConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject));
}
-JSValue JSC_HOST_CALL jsTestObjPrototypeFunctionVoidMethod(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
+JSValue JSC_HOST_CALL jsTestObjPrototypeFunctionVoidMethod(ExecState* exec)
{
- UNUSED_PARAM(args);
+ JSValue thisValue = exec->hostThisValue();
if (!thisValue.inherits(&JSTestObj::s_info))
return throwError(exec, TypeError);
JSTestObj* castedThis = static_cast<JSTestObj*>(asObject(thisValue));
@@ -408,24 +408,24 @@ JSValue JSC_HOST_CALL jsTestObjPrototypeFunctionVoidMethod(ExecState* exec, JSOb
return jsUndefined();
}
-JSValue JSC_HOST_CALL jsTestObjPrototypeFunctionVoidMethodWithArgs(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
+JSValue JSC_HOST_CALL jsTestObjPrototypeFunctionVoidMethodWithArgs(ExecState* exec)
{
- UNUSED_PARAM(args);
+ JSValue thisValue = exec->hostThisValue();
if (!thisValue.inherits(&JSTestObj::s_info))
return throwError(exec, TypeError);
JSTestObj* castedThis = static_cast<JSTestObj*>(asObject(thisValue));
TestObj* imp = static_cast<TestObj*>(castedThis->impl());
- int intArg = args.at(0).toInt32(exec);
- const String& strArg = ustringToString(args.at(1).toString(exec));
- TestObj* objArg = toTestObj(args.at(2));
+ int intArg = exec->argument(0).toInt32(exec);
+ const String& strArg = ustringToString(exec->argument(1).toString(exec));
+ TestObj* objArg = toTestObj(exec->argument(2));
imp->voidMethodWithArgs(intArg, strArg, objArg);
return jsUndefined();
}
-JSValue JSC_HOST_CALL jsTestObjPrototypeFunctionIntMethod(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
+JSValue JSC_HOST_CALL jsTestObjPrototypeFunctionIntMethod(ExecState* exec)
{
- UNUSED_PARAM(args);
+ JSValue thisValue = exec->hostThisValue();
if (!thisValue.inherits(&JSTestObj::s_info))
return throwError(exec, TypeError);
JSTestObj* castedThis = static_cast<JSTestObj*>(asObject(thisValue));
@@ -436,25 +436,25 @@ JSValue JSC_HOST_CALL jsTestObjPrototypeFunctionIntMethod(ExecState* exec, JSObj
return result;
}
-JSValue JSC_HOST_CALL jsTestObjPrototypeFunctionIntMethodWithArgs(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
+JSValue JSC_HOST_CALL jsTestObjPrototypeFunctionIntMethodWithArgs(ExecState* exec)
{
- UNUSED_PARAM(args);
+ JSValue thisValue = exec->hostThisValue();
if (!thisValue.inherits(&JSTestObj::s_info))
return throwError(exec, TypeError);
JSTestObj* castedThis = static_cast<JSTestObj*>(asObject(thisValue));
TestObj* imp = static_cast<TestObj*>(castedThis->impl());
- int intArg = args.at(0).toInt32(exec);
- const String& strArg = ustringToString(args.at(1).toString(exec));
- TestObj* objArg = toTestObj(args.at(2));
+ int intArg = exec->argument(0).toInt32(exec);
+ const String& strArg = ustringToString(exec->argument(1).toString(exec));
+ TestObj* objArg = toTestObj(exec->argument(2));
JSC::JSValue result = jsNumber(exec, imp->intMethodWithArgs(intArg, strArg, objArg));
return result;
}
-JSValue JSC_HOST_CALL jsTestObjPrototypeFunctionObjMethod(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
+JSValue JSC_HOST_CALL jsTestObjPrototypeFunctionObjMethod(ExecState* exec)
{
- UNUSED_PARAM(args);
+ JSValue thisValue = exec->hostThisValue();
if (!thisValue.inherits(&JSTestObj::s_info))
return throwError(exec, TypeError);
JSTestObj* castedThis = static_cast<JSTestObj*>(asObject(thisValue));
@@ -465,51 +465,51 @@ JSValue JSC_HOST_CALL jsTestObjPrototypeFunctionObjMethod(ExecState* exec, JSObj
return result;
}
-JSValue JSC_HOST_CALL jsTestObjPrototypeFunctionObjMethodWithArgs(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
+JSValue JSC_HOST_CALL jsTestObjPrototypeFunctionObjMethodWithArgs(ExecState* exec)
{
- UNUSED_PARAM(args);
+ JSValue thisValue = exec->hostThisValue();
if (!thisValue.inherits(&JSTestObj::s_info))
return throwError(exec, TypeError);
JSTestObj* castedThis = static_cast<JSTestObj*>(asObject(thisValue));
TestObj* imp = static_cast<TestObj*>(castedThis->impl());
- int intArg = args.at(0).toInt32(exec);
- const String& strArg = ustringToString(args.at(1).toString(exec));
- TestObj* objArg = toTestObj(args.at(2));
+ int intArg = exec->argument(0).toInt32(exec);
+ const String& strArg = ustringToString(exec->argument(1).toString(exec));
+ TestObj* objArg = toTestObj(exec->argument(2));
JSC::JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->objMethodWithArgs(intArg, strArg, objArg)));
return result;
}
-JSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodThatRequiresAllArgs(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
+JSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodThatRequiresAllArgs(ExecState* exec)
{
- UNUSED_PARAM(args);
+ JSValue thisValue = exec->hostThisValue();
if (!thisValue.inherits(&JSTestObj::s_info))
return throwError(exec, TypeError);
JSTestObj* castedThis = static_cast<JSTestObj*>(asObject(thisValue));
TestObj* imp = static_cast<TestObj*>(castedThis->impl());
- if (args.size() < 2)
+ if (exec->argumentCount() < 2)
return jsUndefined();
- const String& strArg = ustringToString(args.at(0).toString(exec));
- TestObj* objArg = toTestObj(args.at(1));
+ const String& strArg = ustringToString(exec->argument(0).toString(exec));
+ TestObj* objArg = toTestObj(exec->argument(1));
JSC::JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->methodThatRequiresAllArgs(strArg, objArg)));
return result;
}
-JSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodThatRequiresAllArgsAndThrows(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
+JSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodThatRequiresAllArgsAndThrows(ExecState* exec)
{
- UNUSED_PARAM(args);
+ JSValue thisValue = exec->hostThisValue();
if (!thisValue.inherits(&JSTestObj::s_info))
return throwError(exec, TypeError);
JSTestObj* castedThis = static_cast<JSTestObj*>(asObject(thisValue));
TestObj* imp = static_cast<TestObj*>(castedThis->impl());
- if (args.size() < 2)
+ if (exec->argumentCount() < 2)
return throwError(exec, SyntaxError, "Not enough arguments");
ExceptionCode ec = 0;
- const String& strArg = ustringToString(args.at(0).toString(exec));
- TestObj* objArg = toTestObj(args.at(1));
+ const String& strArg = ustringToString(exec->argument(0).toString(exec));
+ TestObj* objArg = toTestObj(exec->argument(1));
JSC::JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->methodThatRequiresAllArgsAndThrows(strArg, objArg, ec)));
@@ -517,22 +517,22 @@ JSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodThatRequiresAllArgsAndThro
return result;
}
-JSValue JSC_HOST_CALL jsTestObjPrototypeFunctionSerializedValue(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
+JSValue JSC_HOST_CALL jsTestObjPrototypeFunctionSerializedValue(ExecState* exec)
{
- UNUSED_PARAM(args);
+ JSValue thisValue = exec->hostThisValue();
if (!thisValue.inherits(&JSTestObj::s_info))
return throwError(exec, TypeError);
JSTestObj* castedThis = static_cast<JSTestObj*>(asObject(thisValue));
TestObj* imp = static_cast<TestObj*>(castedThis->impl());
- RefPtr<SerializedScriptValue> serializedArg = SerializedScriptValue::create(exec, args.at(0));
+ RefPtr<SerializedScriptValue> serializedArg = SerializedScriptValue::create(exec, exec->argument(0));
imp->serializedValue(serializedArg);
return jsUndefined();
}
-JSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithException(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
+JSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithException(ExecState* exec)
{
- UNUSED_PARAM(args);
+ JSValue thisValue = exec->hostThisValue();
if (!thisValue.inherits(&JSTestObj::s_info))
return throwError(exec, TypeError);
JSTestObj* castedThis = static_cast<JSTestObj*>(asObject(thisValue));
@@ -544,71 +544,71 @@ JSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithException(ExecState* e
return jsUndefined();
}
-JSValue JSC_HOST_CALL jsTestObjPrototypeFunctionCustomMethod(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
+JSValue JSC_HOST_CALL jsTestObjPrototypeFunctionCustomMethod(ExecState* exec)
{
- UNUSED_PARAM(args);
+ JSValue thisValue = exec->hostThisValue();
if (!thisValue.inherits(&JSTestObj::s_info))
return throwError(exec, TypeError);
JSTestObj* castedThis = static_cast<JSTestObj*>(asObject(thisValue));
- return castedThis->customMethod(exec, args);
+ return castedThis->customMethod(exec);
}
-JSValue JSC_HOST_CALL jsTestObjPrototypeFunctionCustomMethodWithArgs(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
+JSValue JSC_HOST_CALL jsTestObjPrototypeFunctionCustomMethodWithArgs(ExecState* exec)
{
- UNUSED_PARAM(args);
+ JSValue thisValue = exec->hostThisValue();
if (!thisValue.inherits(&JSTestObj::s_info))
return throwError(exec, TypeError);
JSTestObj* castedThis = static_cast<JSTestObj*>(asObject(thisValue));
- return castedThis->customMethodWithArgs(exec, args);
+ return castedThis->customMethodWithArgs(exec);
}
-JSValue JSC_HOST_CALL jsTestObjPrototypeFunctionCustomArgsAndException(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
+JSValue JSC_HOST_CALL jsTestObjPrototypeFunctionCustomArgsAndException(ExecState* exec)
{
- UNUSED_PARAM(args);
+ JSValue thisValue = exec->hostThisValue();
if (!thisValue.inherits(&JSTestObj::s_info))
return throwError(exec, TypeError);
JSTestObj* castedThis = static_cast<JSTestObj*>(asObject(thisValue));
TestObj* imp = static_cast<TestObj*>(castedThis->impl());
ExceptionCode ec = 0;
- ScriptCallStack callStack(exec, args, 1);
- log* intArg = tolog(args.at(0));
+ ScriptCallStack callStack(exec, 1);
+ log* intArg = tolog(exec->argument(0));
imp->customArgsAndException(intArg, &callStack, ec);
setDOMException(exec, ec);
return jsUndefined();
}
-JSValue JSC_HOST_CALL jsTestObjPrototypeFunctionAddEventListener(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
+JSValue JSC_HOST_CALL jsTestObjPrototypeFunctionAddEventListener(ExecState* exec)
{
- UNUSED_PARAM(args);
+ JSValue thisValue = exec->hostThisValue();
if (!thisValue.inherits(&JSTestObj::s_info))
return throwError(exec, TypeError);
JSTestObj* castedThis = static_cast<JSTestObj*>(asObject(thisValue));
TestObj* imp = static_cast<TestObj*>(castedThis->impl());
- JSValue listener = args.at(1);
+ JSValue listener = exec->argument(1);
if (!listener.isObject())
return jsUndefined();
- imp->addEventListener(ustringToAtomicString(args.at(0).toString(exec)), JSEventListener::create(asObject(listener), castedThis, false, currentWorld(exec)), args.at(2).toBoolean(exec));
+ imp->addEventListener(ustringToAtomicString(exec->argument(0).toString(exec)), JSEventListener::create(asObject(listener), castedThis, false, currentWorld(exec)), exec->argument(2).toBoolean(exec));
return jsUndefined();
}
-JSValue JSC_HOST_CALL jsTestObjPrototypeFunctionRemoveEventListener(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
+JSValue JSC_HOST_CALL jsTestObjPrototypeFunctionRemoveEventListener(ExecState* exec)
{
- UNUSED_PARAM(args);
+ JSValue thisValue = exec->hostThisValue();
if (!thisValue.inherits(&JSTestObj::s_info))
return throwError(exec, TypeError);
JSTestObj* castedThis = static_cast<JSTestObj*>(asObject(thisValue));
TestObj* imp = static_cast<TestObj*>(castedThis->impl());
- JSValue listener = args.at(1);
+ JSValue listener = exec->argument(1);
if (!listener.isObject())
return jsUndefined();
- imp->removeEventListener(ustringToAtomicString(args.at(0).toString(exec)), JSEventListener::create(asObject(listener), castedThis, false, currentWorld(exec)).get(), args.at(2).toBoolean(exec));
+ imp->removeEventListener(ustringToAtomicString(exec->argument(0).toString(exec)), JSEventListener::create(asObject(listener), castedThis, false, currentWorld(exec)).get(), exec->argument(2).toBoolean(exec));
return jsUndefined();
}
-JSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithDynamicFrame(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
+JSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithDynamicFrame(ExecState* exec)
{
- UNUSED_PARAM(args);
+ JSValue thisValue = exec->hostThisValue();
if (!thisValue.inherits(&JSTestObj::s_info))
return throwError(exec, TypeError);
JSTestObj* castedThis = static_cast<JSTestObj*>(asObject(thisValue));
@@ -621,9 +621,9 @@ JSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithDynamicFrame(ExecState* exec
return jsUndefined();
}
-JSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithDynamicFrameAndArg(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
+JSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithDynamicFrameAndArg(ExecState* exec)
{
- UNUSED_PARAM(args);
+ JSValue thisValue = exec->hostThisValue();
if (!thisValue.inherits(&JSTestObj::s_info))
return throwError(exec, TypeError);
JSTestObj* castedThis = static_cast<JSTestObj*>(asObject(thisValue));
@@ -631,15 +631,15 @@ JSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithDynamicFrameAndArg(ExecState
Frame* dynamicFrame = toDynamicFrame(exec);
if (!dynamicFrame)
return jsUndefined();
- int intArg = args.at(1).toInt32(exec);
+ int intArg = exec->argument(1).toInt32(exec);
imp->withDynamicFrameAndArg(dynamicFrame, intArg);
return jsUndefined();
}
-JSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithDynamicFrameAndOptionalArg(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
+JSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithDynamicFrameAndOptionalArg(ExecState* exec)
{
- UNUSED_PARAM(args);
+ JSValue thisValue = exec->hostThisValue();
if (!thisValue.inherits(&JSTestObj::s_info))
return throwError(exec, TypeError);
JSTestObj* castedThis = static_cast<JSTestObj*>(asObject(thisValue));
@@ -647,23 +647,23 @@ JSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithDynamicFrameAndOptionalArg(E
Frame* dynamicFrame = toDynamicFrame(exec);
if (!dynamicFrame)
return jsUndefined();
- int intArg = args.at(1).toInt32(exec);
+ int intArg = exec->argument(1).toInt32(exec);
- int argsCount = args.size();
+ int argsCount = exec->argumentCount();
if (argsCount < 3) {
imp->withDynamicFrameAndOptionalArg(dynamicFrame, intArg);
return jsUndefined();
}
- int optionalArg = args.at(2).toInt32(exec);
+ int optionalArg = exec->argument(2).toInt32(exec);
imp->withDynamicFrameAndOptionalArg(dynamicFrame, intArg, optionalArg);
return jsUndefined();
}
-JSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithDynamicFrameAndUserGesture(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
+JSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithDynamicFrameAndUserGesture(ExecState* exec)
{
- UNUSED_PARAM(args);
+ JSValue thisValue = exec->hostThisValue();
if (!thisValue.inherits(&JSTestObj::s_info))
return throwError(exec, TypeError);
JSTestObj* castedThis = static_cast<JSTestObj*>(asObject(thisValue));
@@ -671,15 +671,15 @@ JSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithDynamicFrameAndUserGesture(E
Frame* dynamicFrame = toDynamicFrame(exec);
if (!dynamicFrame)
return jsUndefined();
- int intArg = args.at(1).toInt32(exec);
+ int intArg = exec->argument(1).toInt32(exec);
imp->withDynamicFrameAndUserGesture(dynamicFrame, intArg, processingUserGesture(exec));
return jsUndefined();
}
-JSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithDynamicFrameAndUserGestureASAD(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
+JSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithDynamicFrameAndUserGestureASAD(ExecState* exec)
{
- UNUSED_PARAM(args);
+ JSValue thisValue = exec->hostThisValue();
if (!thisValue.inherits(&JSTestObj::s_info))
return throwError(exec, TypeError);
JSTestObj* castedThis = static_cast<JSTestObj*>(asObject(thisValue));
@@ -687,23 +687,23 @@ JSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithDynamicFrameAndUserGestureAS
Frame* dynamicFrame = toDynamicFrame(exec);
if (!dynamicFrame)
return jsUndefined();
- int intArg = args.at(1).toInt32(exec);
+ int intArg = exec->argument(1).toInt32(exec);
- int argsCount = args.size();
+ int argsCount = exec->argumentCount();
if (argsCount < 3) {
imp->withDynamicFrameAndUserGestureASAD(dynamicFrame, intArg);
return jsUndefined();
}
- int optionalArg = args.at(2).toInt32(exec);
+ int optionalArg = exec->argument(2).toInt32(exec);
imp->withDynamicFrameAndUserGestureASAD(dynamicFrame, intArg, optionalArg, processingUserGesture(exec));
return jsUndefined();
}
-JSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithScriptStateVoid(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
+JSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithScriptStateVoid(ExecState* exec)
{
- UNUSED_PARAM(args);
+ JSValue thisValue = exec->hostThisValue();
if (!thisValue.inherits(&JSTestObj::s_info))
return throwError(exec, TypeError);
JSTestObj* castedThis = static_cast<JSTestObj*>(asObject(thisValue));
@@ -713,9 +713,9 @@ JSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithScriptStateVoid(ExecState* e
return jsUndefined();
}
-JSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithScriptStateObj(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
+JSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithScriptStateObj(ExecState* exec)
{
- UNUSED_PARAM(args);
+ JSValue thisValue = exec->hostThisValue();
if (!thisValue.inherits(&JSTestObj::s_info))
return throwError(exec, TypeError);
JSTestObj* castedThis = static_cast<JSTestObj*>(asObject(thisValue));
@@ -728,9 +728,9 @@ JSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithScriptStateObj(ExecState* ex
return result;
}
-JSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithScriptStateVoidException(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
+JSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithScriptStateVoidException(ExecState* exec)
{
- UNUSED_PARAM(args);
+ JSValue thisValue = exec->hostThisValue();
if (!thisValue.inherits(&JSTestObj::s_info))
return throwError(exec, TypeError);
JSTestObj* castedThis = static_cast<JSTestObj*>(asObject(thisValue));
@@ -742,9 +742,9 @@ JSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithScriptStateVoidException(Exe
return jsUndefined();
}
-JSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithScriptStateObjException(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
+JSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithScriptStateObjException(ExecState* exec)
{
- UNUSED_PARAM(args);
+ JSValue thisValue = exec->hostThisValue();
if (!thisValue.inherits(&JSTestObj::s_info))
return throwError(exec, TypeError);
JSTestObj* castedThis = static_cast<JSTestObj*>(asObject(thisValue));
@@ -759,140 +759,140 @@ JSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithScriptStateObjException(Exec
return result;
}
-JSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalArg(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
+JSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalArg(ExecState* exec)
{
- UNUSED_PARAM(args);
+ JSValue thisValue = exec->hostThisValue();
if (!thisValue.inherits(&JSTestObj::s_info))
return throwError(exec, TypeError);
JSTestObj* castedThis = static_cast<JSTestObj*>(asObject(thisValue));
TestObj* imp = static_cast<TestObj*>(castedThis->impl());
- int argsCount = args.size();
+ int argsCount = exec->argumentCount();
if (argsCount < 1) {
imp->methodWithOptionalArg();
return jsUndefined();
}
- int opt = args.at(0).toInt32(exec);
+ int opt = exec->argument(0).toInt32(exec);
imp->methodWithOptionalArg(opt);
return jsUndefined();
}
-JSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndOptionalArg(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
+JSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndOptionalArg(ExecState* exec)
{
- UNUSED_PARAM(args);
+ JSValue thisValue = exec->hostThisValue();
if (!thisValue.inherits(&JSTestObj::s_info))
return throwError(exec, TypeError);
JSTestObj* castedThis = static_cast<JSTestObj*>(asObject(thisValue));
TestObj* imp = static_cast<TestObj*>(castedThis->impl());
- int nonOpt = args.at(0).toInt32(exec);
+ int nonOpt = exec->argument(0).toInt32(exec);
- int argsCount = args.size();
+ int argsCount = exec->argumentCount();
if (argsCount < 2) {
imp->methodWithNonOptionalArgAndOptionalArg(nonOpt);
return jsUndefined();
}
- int opt = args.at(1).toInt32(exec);
+ int opt = exec->argument(1).toInt32(exec);
imp->methodWithNonOptionalArgAndOptionalArg(nonOpt, opt);
return jsUndefined();
}
-JSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndTwoOptionalArgs(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
+JSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndTwoOptionalArgs(ExecState* exec)
{
- UNUSED_PARAM(args);
+ JSValue thisValue = exec->hostThisValue();
if (!thisValue.inherits(&JSTestObj::s_info))
return throwError(exec, TypeError);
JSTestObj* castedThis = static_cast<JSTestObj*>(asObject(thisValue));
TestObj* imp = static_cast<TestObj*>(castedThis->impl());
- int nonOpt = args.at(0).toInt32(exec);
+ int nonOpt = exec->argument(0).toInt32(exec);
- int argsCount = args.size();
+ int argsCount = exec->argumentCount();
if (argsCount < 2) {
imp->methodWithNonOptionalArgAndTwoOptionalArgs(nonOpt);
return jsUndefined();
}
- int opt1 = args.at(1).toInt32(exec);
- int opt2 = args.at(2).toInt32(exec);
+ int opt1 = exec->argument(1).toInt32(exec);
+ int opt2 = exec->argument(2).toInt32(exec);
imp->methodWithNonOptionalArgAndTwoOptionalArgs(nonOpt, opt1, opt2);
return jsUndefined();
}
-JSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOverloadedMethod1(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
+JSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOverloadedMethod1(ExecState* exec)
{
- UNUSED_PARAM(args);
+ JSValue thisValue = exec->hostThisValue();
if (!thisValue.inherits(&JSTestObj::s_info))
return throwError(exec, TypeError);
JSTestObj* castedThis = static_cast<JSTestObj*>(asObject(thisValue));
TestObj* imp = static_cast<TestObj*>(castedThis->impl());
- TestObj* objArg = toTestObj(args.at(0));
- const String& strArg = ustringToString(args.at(1).toString(exec));
+ TestObj* objArg = toTestObj(exec->argument(0));
+ const String& strArg = ustringToString(exec->argument(1).toString(exec));
imp->overloadedMethod(objArg, strArg);
return jsUndefined();
}
-JSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOverloadedMethod2(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
+JSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOverloadedMethod2(ExecState* exec)
{
- UNUSED_PARAM(args);
+ JSValue thisValue = exec->hostThisValue();
if (!thisValue.inherits(&JSTestObj::s_info))
return throwError(exec, TypeError);
JSTestObj* castedThis = static_cast<JSTestObj*>(asObject(thisValue));
TestObj* imp = static_cast<TestObj*>(castedThis->impl());
- TestObj* objArg = toTestObj(args.at(0));
+ TestObj* objArg = toTestObj(exec->argument(0));
- int argsCount = args.size();
+ int argsCount = exec->argumentCount();
if (argsCount < 2) {
imp->overloadedMethod(objArg);
return jsUndefined();
}
- int intArg = args.at(1).toInt32(exec);
+ int intArg = exec->argument(1).toInt32(exec);
imp->overloadedMethod(objArg, intArg);
return jsUndefined();
}
-JSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOverloadedMethod3(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
+JSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOverloadedMethod3(ExecState* exec)
{
- UNUSED_PARAM(args);
+ JSValue thisValue = exec->hostThisValue();
if (!thisValue.inherits(&JSTestObj::s_info))
return throwError(exec, TypeError);
JSTestObj* castedThis = static_cast<JSTestObj*>(asObject(thisValue));
TestObj* imp = static_cast<TestObj*>(castedThis->impl());
- const String& strArg = ustringToString(args.at(0).toString(exec));
+ const String& strArg = ustringToString(exec->argument(0).toString(exec));
imp->overloadedMethod(strArg);
return jsUndefined();
}
-JSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOverloadedMethod4(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
+JSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOverloadedMethod4(ExecState* exec)
{
- UNUSED_PARAM(args);
+ JSValue thisValue = exec->hostThisValue();
if (!thisValue.inherits(&JSTestObj::s_info))
return throwError(exec, TypeError);
JSTestObj* castedThis = static_cast<JSTestObj*>(asObject(thisValue));
TestObj* imp = static_cast<TestObj*>(castedThis->impl());
- int intArg = args.at(0).toInt32(exec);
+ int intArg = exec->argument(0).toInt32(exec);
imp->overloadedMethod(intArg);
return jsUndefined();
}
-JSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOverloadedMethod(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
+JSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOverloadedMethod(ExecState* exec)
{
- if ((args.size() == 2 && (args.at(0).isNull() || asObject(args.at(0))->inherits(JSTestObj::s_info) && (args.at(1).isNull() || args.at(1).isUndefined() || args.at(1).isString() || args.at(1).isObject())))
- return jsTestObjPrototypeFunctionOverloadedMethod1(exec, thisValue, args);
- if ((args.size() == 1 && (args.at(0).isNull() || asObject(args.at(0))->inherits(JSTestObj::s_info)) || (args.size() == 2 && (args.at(0).isNull() || asObject(args.at(0))->inherits(JSTestObj::s_info)))
- return jsTestObjPrototypeFunctionOverloadedMethod2(exec, thisValue, args);
- if ((args.size() == 1 && (args.at(0).isNull() || args.at(0).isUndefined() || args.at(0).isString() || args.at(0).isObject())))
- return jsTestObjPrototypeFunctionOverloadedMethod3(exec, thisValue, args);
- if (args.size() == 1)
- return jsTestObjPrototypeFunctionOverloadedMethod4(exec, thisValue, args);
+ if ((exec->argumentCount() == 2 && (exec->argument(0).isNull() || asObject(exec->argument(0))->inherits(JSTestObj::s_info) && (exec->argument(1).isNull() || exec->argument(1).isUndefined() || exec->argument(1).isString() || exec->argument(1).isObject())))
+ return jsTestObjPrototypeFunctionOverloadedMethod1(exec);
+ if ((exec->argumentCount() == 1 && (exec->argument(0).isNull() || asObject(exec->argument(0))->inherits(JSTestObj::s_info)) || (exec->argumentCount() == 2 && (exec->argument(0).isNull() || asObject(exec->argument(0))->inherits(JSTestObj::s_info)))
+ return jsTestObjPrototypeFunctionOverloadedMethod2(exec);
+ if ((exec->argumentCount() == 1 && (exec->argument(0).isNull() || exec->argument(0).isUndefined() || exec->argument(0).isString() || exec->argument(0).isObject())))
+ return jsTestObjPrototypeFunctionOverloadedMethod3(exec);
+ if (exec->argumentCount() == 1)
+ return jsTestObjPrototypeFunctionOverloadedMethod4(exec);
return throwError(exec, TypeError);
}