summaryrefslogtreecommitdiffstats
path: root/src/script
diff options
context:
space:
mode:
authorKent Hansen <khansen@trolltech.com>2009-07-16 15:03:45 (GMT)
committerKent Hansen <khansen@trolltech.com>2009-07-16 15:03:45 (GMT)
commit15c5e257adc78e4a441f46438e351c6177338af6 (patch)
tree4befc675a8a8c015dd677fee59f6e544728d04b0 /src/script
parent898437f97e3f3bbb96b501148d5f883d099133f7 (diff)
downloadQt-15c5e257adc78e4a441f46438e351c6177338af6.zip
Qt-15c5e257adc78e4a441f46438e351c6177338af6.tar.gz
Qt-15c5e257adc78e4a441f46438e351c6177338af6.tar.bz2
do the correct prototype check
There was a bug in commit 1d56e14605d74aefb955bdd81ee4083131252c9e
Diffstat (limited to 'src/script')
-rw-r--r--src/script/api/qscriptengine.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/script/api/qscriptengine.cpp b/src/script/api/qscriptengine.cpp
index af09572..5ffb04e 100644
--- a/src/script/api/qscriptengine.cpp
+++ b/src/script/api/qscriptengine.cpp
@@ -2220,7 +2220,6 @@ QScriptValue QScriptEngine::create(int type, const void *ptr)
QScriptValue QScriptEnginePrivate::create(int type, const void *ptr)
{
- Q_Q(QScriptEngine);
Q_ASSERT(ptr != 0);
QScriptValue result;
QScriptTypeInfo *info = m_typeInfos.value(type);
@@ -2335,7 +2334,7 @@ QScriptValue QScriptEnginePrivate::create(int type, const void *ptr)
}
}
if (result.isObject() && info && info->prototype
- && result.prototype().strictlyEquals(q->globalObject().property(QLatin1String("prototype")))) {
+ && JSC::JSValue::strictEqual(scriptValueToJSCValue(result.prototype()), globalObject->objectPrototype())) {
result.setPrototype(scriptValueFromJSCValue(info->prototype));
}
return result;