summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKent Hansen <kent.hansen@nokia.com>2010-03-15 07:32:38 (GMT)
committerKent Hansen <kent.hansen@nokia.com>2010-03-15 07:32:38 (GMT)
commitccf34d2a9f2d3aa2341de7babab5188b359861a1 (patch)
tree7d56c03c0ef372ab44673575e8ea4b603a820a86
parent3f8f04af41297b85afb68356d17d3c612f8388e2 (diff)
downloadQt-ccf34d2a9f2d3aa2341de7babab5188b359861a1.zip
Qt-ccf34d2a9f2d3aa2341de7babab5188b359861a1.tar.gz
Qt-ccf34d2a9f2d3aa2341de7babab5188b359861a1.tar.bz2
Add missing QtScript API shims
Need shims wherever a JSC::Identifier can be created/destroyed.
-rw-r--r--src/script/api/qscriptengine.cpp1
-rw-r--r--src/script/api/qscriptvalue.cpp3
2 files changed, 4 insertions, 0 deletions
diff --git a/src/script/api/qscriptengine.cpp b/src/script/api/qscriptengine.cpp
index bef7a3e..294c3a0 100644
--- a/src/script/api/qscriptengine.cpp
+++ b/src/script/api/qscriptengine.cpp
@@ -4063,6 +4063,7 @@ QScriptEngineAgent *QScriptEngine::agent() const
QScriptString QScriptEngine::toStringHandle(const QString &str)
{
Q_D(QScriptEngine);
+ QScript::APIShim shim(d);
return d->toStringHandle(JSC::Identifier(d->currentFrame, str));
}
diff --git a/src/script/api/qscriptvalue.cpp b/src/script/api/qscriptvalue.cpp
index 458bab8..a3af2d4 100644
--- a/src/script/api/qscriptvalue.cpp
+++ b/src/script/api/qscriptvalue.cpp
@@ -1304,6 +1304,7 @@ void QScriptValue::setProperty(const QString &name, const QScriptValue &value,
Q_D(QScriptValue);
if (!d || !d->isObject())
return;
+ QScript::APIShim shim(d->engine);
QScriptEnginePrivate *valueEngine = QScriptValuePrivate::getEngine(value);
if (valueEngine && (valueEngine != d->engine)) {
qWarning("QScriptValue::setProperty(%s) failed: "
@@ -1336,6 +1337,7 @@ QScriptValue QScriptValue::property(const QString &name,
Q_D(const QScriptValue);
if (!d || !d->isObject())
return QScriptValue();
+ QScript::APIShim shim(d->engine);
return d->engine->scriptValueFromJSCValue(d->property(name, mode));
}
@@ -1453,6 +1455,7 @@ QScriptValue::PropertyFlags QScriptValue::propertyFlags(const QString &name,
Q_D(const QScriptValue);
if (!d || !d->isObject())
return 0;
+ QScript::APIShim shim(d->engine);
JSC::ExecState *exec = d->engine->currentFrame;
return d->propertyFlags(JSC::Identifier(exec, name), mode);