Commit ca549372 authored by ggaren@apple.com's avatar ggaren@apple.com

Qt build fix: Updated for ArgList changes.

* bridge/qt/qt_pixmapruntime.cpp:
(JSC::Bindings::QtPixmapInstance::invokeMethod):
* bridge/qt/qt_runtime.cpp:
(JSC::Bindings::findMethodIndex):
(JSC::Bindings::QtRuntimeMetaMethod::call):
(JSC::Bindings::QtRuntimeConnectionMethod::call):
* bridge/qt/qt_runtime.h:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@60398 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 4450022c
2010-05-29 Geoffrey Garen <ggaren@apple.com>
Qt build fix: Updated for ArgList changes.
* bridge/qt/qt_pixmapruntime.cpp:
(JSC::Bindings::QtPixmapInstance::invokeMethod):
* bridge/qt/qt_runtime.cpp:
(JSC::Bindings::findMethodIndex):
(JSC::Bindings::QtRuntimeMetaMethod::call):
(JSC::Bindings::QtRuntimeConnectionMethod::call):
* bridge/qt/qt_runtime.h:
2010-05-29 Geoffrey Garen <ggaren@apple.com>
Qt build fix: Updated for ArgList changes.
......
......@@ -190,7 +190,7 @@ JSValue QtPixmapInstance::invokeMethod(ExecState* exec, RuntimeMethod* runtimeMe
if (methods.size() == 1) {
QtPixmapRuntimeMethod* method = static_cast<QtPixmapRuntimeMethod*>(methods[0]);
return method->invoke(exec, this, args);
return method->invoke(exec, this);
}
return jsUndefined();
}
......
......@@ -1108,7 +1108,6 @@ static int findMethodIndex(ExecState* exec,
const QMetaObject* meta,
const QByteArray& signature,
bool allowPrivate,
const ArgList& jsArgs,
QVarLengthArray<QVariant, 10> &vars,
void** vvars,
JSObject **pError)
......@@ -1202,7 +1201,7 @@ static int findMethodIndex(ExecState* exec,
}
// If the native method requires more arguments than what was passed from JavaScript
if (jsArgs.size() + 1 < static_cast<unsigned>(types.count())) {
if (exec->argumentCount() + 1 < static_cast<unsigned>(types.count())) {
qMatchDebug() << "Match:too few args for" << method.signature();
tooFewArgs.append(index);
continue;
......@@ -1226,7 +1225,7 @@ static int findMethodIndex(ExecState* exec,
bool converted = true;
int matchDistance = 0;
for (unsigned i = 0; converted && i + 1 < static_cast<unsigned>(types.count()); ++i) {
JSValue arg = i < jsArgs.size() ? jsArgs.at(i) : jsUndefined();
JSValue arg = i < exec->argumentCount() ? exec->argument(i) : jsUndefined();
int argdistance = -1;
QVariant v = convertValueToQVariant(exec, arg, types.at(i+1).typeId(), &argdistance);
......@@ -1242,7 +1241,7 @@ static int findMethodIndex(ExecState* exec,
qMatchDebug() << "Match: " << method.signature() << (converted ? "converted":"failed to convert") << "distance " << matchDistance;
if (converted) {
if ((jsArgs.size() + 1 == static_cast<unsigned>(types.count()))
if ((exec->argumentCount() + 1 == static_cast<unsigned>(types.count()))
&& (matchDistance == 0)) {
// perfect match, use this one
chosenIndex = index;
......@@ -1378,7 +1377,7 @@ void QtRuntimeMetaMethod::markChildren(MarkStack& markStack)
markStack.append(d->m_disconnect);
}
JSValue QtRuntimeMetaMethod::call(ExecState* exec, JSObject* functionObject, JSValue, const ArgList& args)
JSValue QtRuntimeMetaMethod::call(ExecState* exec)
{
QtRuntimeMetaMethodData* d = static_cast<QtRuntimeMetaMethod *>(functionObject)->d_func();
......@@ -1396,7 +1395,7 @@ JSValue QtRuntimeMetaMethod::call(ExecState* exec, JSObject* functionObject, JSV
int methodIndex;
JSObject* errorObj = 0;
if ((methodIndex = findMethodIndex(exec, obj->metaObject(), d->m_signature, d->m_allowPrivate, args, vargs, (void **)qargs, &errorObj)) != -1) {
if ((methodIndex = findMethodIndex(exec, obj->metaObject(), d->m_signature, d->m_allowPrivate, vargs, (void **)qargs, &errorObj)) != -1) {
if (QMetaObject::metacall(obj, QMetaObject::InvokeMetaMethod, methodIndex, qargs) >= 0)
return jsUndefined();
......@@ -1513,7 +1512,7 @@ QtRuntimeConnectionMethod::QtRuntimeConnectionMethod(ExecState* exec, const Iden
d->m_isConnect = isConnect;
}
JSValue QtRuntimeConnectionMethod::call(ExecState* exec, JSObject* functionObject, JSValue, const ArgList& args)
JSValue QtRuntimeConnectionMethod::call(ExecState* exec)
{
QtRuntimeConnectionMethodData* d = static_cast<QtRuntimeConnectionMethod *>(functionObject)->d_func();
......
......@@ -182,7 +182,7 @@ protected:
private:
virtual CallType getCallData(CallData&);
static JSValue JSC_HOST_CALL call(ExecState* exec, JSObject* functionObject, JSValue thisValue, const ArgList& args);
static JSValue JSC_HOST_CALL call(ExecState* exec);
static JSValue lengthGetter(ExecState*, JSValue, const Identifier&);
static JSValue connectGetter(ExecState*, JSValue, const Identifier&);
static JSValue disconnectGetter(ExecState*, JSValue, const Identifier&);
......@@ -203,7 +203,7 @@ protected:
private:
virtual CallType getCallData(CallData&);
static JSValue JSC_HOST_CALL call(ExecState* exec, JSObject* functionObject, JSValue thisValue, const ArgList& args);
static JSValue JSC_HOST_CALL call(ExecState* exec);
static JSValue lengthGetter(ExecState*, JSValue, const Identifier&);
static QMultiMap<QObject *, QtConnectionObject *> connections;
friend class QtConnectionObject;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment