summaryrefslogtreecommitdiffstats
path: root/src/script
diff options
context:
space:
mode:
authorKent Hansen <khansen@trolltech.com>2009-09-21 09:18:57 (GMT)
committerKent Hansen <khansen@trolltech.com>2009-09-21 09:21:17 (GMT)
commit74bd11b55388ca6a8e5cfdbdcfb044bb538fafa0 (patch)
treea856e772686a2f5162078b374afc5ea353ad221d /src/script
parent0ebdd27ea802a4b40eaa330725e15213a4072cdc (diff)
downloadQt-74bd11b55388ca6a8e5cfdbdcfb044bb538fafa0.zip
Qt-74bd11b55388ca6a8e5cfdbdcfb044bb538fafa0.tar.gz
Qt-74bd11b55388ca6a8e5cfdbdcfb044bb538fafa0.tar.bz2
use JSObject::inherits() instead of JSObject::isObject()
The functions are identical, but in recent WebKit trunk isObject() doesn't exist anymore. So this renaming is done to prepare for the import of a more recent JavaScriptCore.
Diffstat (limited to 'src/script')
-rw-r--r--src/script/api/qscriptcontext.cpp6
-rw-r--r--src/script/api/qscriptcontextinfo.cpp8
-rw-r--r--src/script/api/qscriptengine.cpp4
-rw-r--r--src/script/api/qscriptvalue.cpp2
-rw-r--r--src/script/bridge/qscriptclassobject.cpp4
-rw-r--r--src/script/bridge/qscriptqobject.cpp6
6 files changed, 15 insertions, 15 deletions
diff --git a/src/script/api/qscriptcontext.cpp b/src/script/api/qscriptcontext.cpp
index 199ee66..caa4dc2 100644
--- a/src/script/api/qscriptcontext.cpp
+++ b/src/script/api/qscriptcontext.cpp
@@ -468,7 +468,7 @@ QScriptValue QScriptContext::activationObject() const
}*/
}
- if (result && result->isObject(&QScript::QScriptActivationObject::info)
+ if (result && result->inherits(&QScript::QScriptActivationObject::info)
&& (static_cast<QScript::QScriptActivationObject*>(result)->delegate() != 0)) {
// Return the object that property access is being delegated to
result = static_cast<QScript::QScriptActivationObject*>(result)->delegate();
@@ -517,7 +517,7 @@ void QScriptContext::setActivationObject(const QScriptValue &activation)
while (node != 0) {
if (node->object && node->object->isVariableObject()) {
if (!object->isVariableObject()) {
- if (node->object->isObject(&QScript::QScriptActivationObject::info)) {
+ if (node->object->inherits(&QScript::QScriptActivationObject::info)) {
static_cast<QScript::QScriptActivationObject*>(node->object)->setDelegate(object);
} else {
// Create a QScriptActivationObject that acts as a proxy
@@ -687,7 +687,7 @@ QScriptValueList QScriptContext::scopeChain() const
JSC::JSObject *object = *it;
if (!object)
continue;
- if (object->isObject(&QScript::QScriptActivationObject::info)
+ if (object->inherits(&QScript::QScriptActivationObject::info)
&& (static_cast<QScript::QScriptActivationObject*>(object)->delegate() != 0)) {
// Return the object that property access is being delegated to
object = static_cast<QScript::QScriptActivationObject*>(object)->delegate();
diff --git a/src/script/api/qscriptcontextinfo.cpp b/src/script/api/qscriptcontextinfo.cpp
index 1be76a9..ba295cf 100644
--- a/src/script/api/qscriptcontextinfo.cpp
+++ b/src/script/api/qscriptcontextinfo.cpp
@@ -198,9 +198,9 @@ QScriptContextInfoPrivate::QScriptContextInfoPrivate(const QScriptContext *conte
// Get the others informations:
JSC::JSObject *callee = frame->callee();
- if (callee && callee->isObject(&JSC::InternalFunction::info))
+ if (callee && callee->inherits(&JSC::InternalFunction::info))
functionName = JSC::asInternalFunction(callee)->name(&frame->globalData());
- if (callee && callee->isObject(&JSC::JSFunction::info)) {
+ if (callee && callee->inherits(&JSC::JSFunction::info)) {
functionType = QScriptContextInfo::ScriptFunction;
JSC::FunctionBodyNode *body = JSC::asFunction(callee)->body();
functionStartLineNumber = body->firstLine();
@@ -209,7 +209,7 @@ QScriptContextInfoPrivate::QScriptContextInfoPrivate(const QScriptContext *conte
for (size_t i = 0; i < body->parameterCount(); ++i)
parameterNames.append(params[i].ustring());
// ### get the function name from the AST
- } else if (callee && callee->isObject(&QScript::QtFunction::info)) {
+ } else if (callee && callee->inherits(&QScript::QtFunction::info)) {
functionType = QScriptContextInfo::QtFunction;
// ### the slot can be overloaded -- need to get the particular overload from the context
functionMetaIndex = static_cast<QScript::QtFunction*>(callee)->initialIndex();
@@ -221,7 +221,7 @@ QScriptContextInfoPrivate::QScriptContextInfoPrivate(const QScriptContext *conte
parameterNames.append(QLatin1String(formals.at(i)));
}
}
- else if (callee && callee->isObject(&QScript::QtPropertyFunction::info)) {
+ else if (callee && callee->inherits(&QScript::QtPropertyFunction::info)) {
functionType = QScriptContextInfo::QtPropertyFunction;
functionMetaIndex = static_cast<QScript::QtPropertyFunction*>(callee)->propertyIndex();
}
diff --git a/src/script/api/qscriptengine.cpp b/src/script/api/qscriptengine.cpp
index cb47f5d..7a910d2 100644
--- a/src/script/api/qscriptengine.cpp
+++ b/src/script/api/qscriptengine.cpp
@@ -1656,7 +1656,7 @@ QScriptValue QScriptEngine::newVariant(const QScriptValue &object,
if (!object.isObject())
return newVariant(value);
JSC::JSObject *jscObject = JSC::asObject(QScriptValuePrivate::get(object)->jscValue);
- if (!jscObject->isObject(&QScriptObject::info)) {
+ if (!jscObject->inherits(&QScriptObject::info)) {
qWarning("QScriptEngine::newVariant(): changing class of non-QScriptObject not supported");
return QScriptValue();
}
@@ -1733,7 +1733,7 @@ QScriptValue QScriptEngine::newQObject(const QScriptValue &scriptObject,
if (!scriptObject.isObject())
return newQObject(qtObject, ownership, options);
JSC::JSObject *jscObject = JSC::asObject(QScriptValuePrivate::get(scriptObject)->jscValue);
- if (!jscObject->isObject(&QScriptObject::info)) {
+ if (!jscObject->inherits(&QScriptObject::info)) {
qWarning("QScriptEngine::newQObject(): changing class of non-QScriptObject not supported");
return QScriptValue();
}
diff --git a/src/script/api/qscriptvalue.cpp b/src/script/api/qscriptvalue.cpp
index 2ca036a..1d73a8f 100644
--- a/src/script/api/qscriptvalue.cpp
+++ b/src/script/api/qscriptvalue.cpp
@@ -2321,7 +2321,7 @@ bool QScriptValue::isQMetaObject() const
Q_D(const QScriptValue);
if (!d || !d->isObject())
return false;
- return JSC::asObject(d->jscValue)->isObject(&QScript::QMetaObjectWrapperObject::info);
+ return JSC::asObject(d->jscValue)->inherits(&QScript::QMetaObjectWrapperObject::info);
}
/*!
diff --git a/src/script/bridge/qscriptclassobject.cpp b/src/script/bridge/qscriptclassobject.cpp
index b85fa5e..a5dc670 100644
--- a/src/script/bridge/qscriptclassobject.cpp
+++ b/src/script/bridge/qscriptclassobject.cpp
@@ -212,7 +212,7 @@ JSC::CallType ClassObjectDelegate::getCallData(QScriptObject*, JSC::CallData &ca
JSC::JSValue JSC_HOST_CALL ClassObjectDelegate::call(JSC::ExecState *exec, JSC::JSObject *callee,
JSC::JSValue thisValue, const JSC::ArgList &args)
{
- if (!callee->isObject(&QScriptObject::info))
+ if (!callee->inherits(&QScriptObject::info))
return JSC::throwError(exec, JSC::TypeError, "callee is not a ClassObject object");
QScriptObject *obj = static_cast<QScriptObject*>(callee);
QScriptObjectDelegate *delegate = obj->delegate();
@@ -243,7 +243,7 @@ JSC::ConstructType ClassObjectDelegate::getConstructData(QScriptObject*, JSC::Co
JSC::JSObject* ClassObjectDelegate::construct(JSC::ExecState *exec, JSC::JSObject *callee,
const JSC::ArgList &args)
{
- Q_ASSERT(callee->isObject(&QScriptObject::info));
+ Q_ASSERT(callee->inherits(&QScriptObject::info));
QScriptObject *obj = static_cast<QScriptObject*>(callee);
QScriptObjectDelegate *delegate = obj->delegate();
QScriptClass *scriptClass = static_cast<ClassObjectDelegate*>(delegate)->scriptClass();
diff --git a/src/script/bridge/qscriptqobject.cpp b/src/script/bridge/qscriptqobject.cpp
index d603e9f..b7df781 100644
--- a/src/script/bridge/qscriptqobject.cpp
+++ b/src/script/bridge/qscriptqobject.cpp
@@ -1021,7 +1021,7 @@ const JSC::ClassInfo QtFunction::info = { "QtFunction", &InternalFunction::info,
JSC::JSValue JSC_HOST_CALL QtFunction::call(JSC::ExecState *exec, JSC::JSObject *callee,
JSC::JSValue thisValue, const JSC::ArgList &args)
{
- if (!callee->isObject(&QtFunction::info))
+ if (!callee->inherits(&QtFunction::info))
return throwError(exec, JSC::TypeError, "callee is not a QtFunction object");
QtFunction *qfun = static_cast<QtFunction*>(callee);
QScriptEnginePrivate *eng_p = scriptEngineFromExec(exec);
@@ -1060,7 +1060,7 @@ JSC::JSValue JSC_HOST_CALL QtPropertyFunction::call(
JSC::ExecState *exec, JSC::JSObject *callee,
JSC::JSValue thisValue, const JSC::ArgList &args)
{
- if (!callee->isObject(&QtPropertyFunction::info))
+ if (!callee->inherits(&QtPropertyFunction::info))
return throwError(exec, JSC::TypeError, "callee is not a QtPropertyFunction object");
QtPropertyFunction *qfun = static_cast<QtPropertyFunction*>(callee);
QScriptEnginePrivate *eng_p = scriptEngineFromExec(exec);
@@ -1836,7 +1836,7 @@ JSC::JSValue JSC_HOST_CALL QMetaObjectWrapperObject::call(
{
QScriptEnginePrivate *eng_p = scriptEngineFromExec(exec);
thisValue = eng_p->toUsableValue(thisValue);
- if (!callee->isObject(&QMetaObjectWrapperObject::info))
+ if (!callee->inherits(&QMetaObjectWrapperObject::info))
return throwError(exec, JSC::TypeError, "callee is not a QMetaObject");
QMetaObjectWrapperObject *self = static_cast<QMetaObjectWrapperObject*>(callee);
JSC::ExecState *previousFrame = eng_p->currentFrame;