From ccf34d2a9f2d3aa2341de7babab5188b359861a1 Mon Sep 17 00:00:00 2001 From: Kent Hansen Date: Mon, 15 Mar 2010 08:32:38 +0100 Subject: Add missing QtScript API shims Need shims wherever a JSC::Identifier can be created/destroyed. --- src/script/api/qscriptengine.cpp | 1 + src/script/api/qscriptvalue.cpp | 3 +++ 2 files changed, 4 insertions(+) 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); -- cgit v0.12