diff options
author | Andreas Kling <andreas.kling@nokia.com> | 2010-02-02 11:46:53 (GMT) |
---|---|---|
committer | Andreas Kling <andreas.kling@nokia.com> | 2010-02-02 11:46:53 (GMT) |
commit | 56b910a838e93d849ec260f4c3db9a716beecdc0 (patch) | |
tree | 50b9cb09e3ea7780e144bb02f42475dcf740f297 /src/script/api | |
parent | 84f826b764acecc0a93fcfd643719f6447b5d47c (diff) | |
parent | 7ced77b654eb46af1221a55e315795c1be1753a0 (diff) | |
download | Qt-56b910a838e93d849ec260f4c3db9a716beecdc0.zip Qt-56b910a838e93d849ec260f4c3db9a716beecdc0.tar.gz Qt-56b910a838e93d849ec260f4c3db9a716beecdc0.tar.bz2 |
Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.6
Diffstat (limited to 'src/script/api')
-rw-r--r-- | src/script/api/qscriptvalue.cpp | 13 |
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; } |