summaryrefslogtreecommitdiffstats
path: root/src/script/api
diff options
context:
space:
mode:
authorJanne Anttila <janne.anttila@digia.com>2010-02-03 09:45:35 (GMT)
committerJanne Anttila <janne.anttila@digia.com>2010-02-03 09:45:35 (GMT)
commit1965885fe96eb50add6c0c9fc85a12497a6052bc (patch)
treeed428843609ae6b4d743ac2858ad89be36b63254 /src/script/api
parent2a8d20453926082062246fc4cc788f88ea3c59ae (diff)
parentad46fadbe343e1b6caf94823237064551ab53c52 (diff)
downloadQt-1965885fe96eb50add6c0c9fc85a12497a6052bc.zip
Qt-1965885fe96eb50add6c0c9fc85a12497a6052bc.tar.gz
Qt-1965885fe96eb50add6c0c9fc85a12497a6052bc.tar.bz2
Merge branch '4.6' of git@scm.dev.troll.no:qt/qt-s60-public into 4.6
Diffstat (limited to 'src/script/api')
-rw-r--r--src/script/api/qscriptvalue.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/script/api/qscriptvalue.cpp b/src/script/api/qscriptvalue.cpp
index 1db2e1b..5bfe46a 100644
--- a/src/script/api/qscriptvalue.cpp
+++ b/src/script/api/qscriptvalue.cpp
@@ -1148,10 +1148,15 @@ bool QScriptValue::strictlyEquals(const QScriptValue &other) const
}
if (d->type != other.d_ptr->type) {
- if (d->type == QScriptValuePrivate::JavaScriptCore)
- return JSC::JSValue::strictEqual(d->jscValue, d->engine->scriptValueToJSCValue(other));
- else if (other.d_ptr->type == QScriptValuePrivate::JavaScriptCore)
- return JSC::JSValue::strictEqual(other.d_ptr->engine->scriptValueToJSCValue(*this), other.d_ptr->jscValue);
+ if (d->type == QScriptValuePrivate::JavaScriptCore) {
+ QScriptEnginePrivate *eng_p = d->engine ? d->engine : other.d_ptr->engine;
+ if (eng_p)
+ return JSC::JSValue::strictEqual(d->jscValue, eng_p->scriptValueToJSCValue(other));
+ } else if (other.d_ptr->type == QScriptValuePrivate::JavaScriptCore) {
+ QScriptEnginePrivate *eng_p = other.d_ptr->engine ? other.d_ptr->engine : d->engine;
+ if (eng_p)
+ return JSC::JSValue::strictEqual(eng_p->scriptValueToJSCValue(*this), other.d_ptr->jscValue);
+ }
return false;
}