summaryrefslogtreecommitdiffstats
path: root/src/script/api/qscriptengine.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/script/api/qscriptengine.cpp')
-rw-r--r--src/script/api/qscriptengine.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/script/api/qscriptengine.cpp b/src/script/api/qscriptengine.cpp
index c7729d7..230a8c5 100644
--- a/src/script/api/qscriptengine.cpp
+++ b/src/script/api/qscriptengine.cpp
@@ -848,12 +848,11 @@ QScriptEnginePrivate::~QScriptEnginePrivate()
QScriptValue QScriptEnginePrivate::scriptValueFromJSCValue(JSC::JSValue value)
{
- Q_Q(QScriptEngine);
if (!value)
return QScriptValue();
QScriptValuePrivate *p_value = new QScriptValuePrivate();
- p_value->engine = q;
+ p_value->engine = this;
p_value->initFrom(value);
return QScriptValuePrivate::get(p_value);
}
@@ -864,9 +863,8 @@ JSC::JSValue QScriptEnginePrivate::scriptValueToJSCValue(const QScriptValue &val
if (!vv)
return JSC::JSValue();
if (vv->type != QScriptValuePrivate::JSC) {
- Q_Q(QScriptEngine);
- Q_ASSERT(!vv->engine || vv->engine == q);
- vv->engine = q;
+ Q_ASSERT(!vv->engine || vv->engine == this);
+ vv->engine = this;
if (vv->type == QScriptValuePrivate::Number) {
vv->initFrom(JSC::jsNumber(currentFrame, vv->numberValue));
} else { //QScriptValuePrivate::String