summaryrefslogtreecommitdiffstats
path: root/src/script
diff options
context:
space:
mode:
authorOlivier Goffart <olivier.goffart@nokia.com>2010-07-27 08:23:46 (GMT)
committerOlivier Goffart <olivier.goffart@nokia.com>2010-07-27 10:30:22 (GMT)
commit47857453767a0ec2c7b75a555658dd166bd7d3d4 (patch)
tree4708e03bd497f4893fab1f373e8c76b10e6265bf /src/script
parentbd89fe50408452ed343715f3ef28c5d3e106715c (diff)
downloadQt-47857453767a0ec2c7b75a555658dd166bd7d3d4.zip
Qt-47857453767a0ec2c7b75a555658dd166bd7d3d4.tar.gz
Qt-47857453767a0ec2c7b75a555658dd166bd7d3d4.tar.bz2
QScriptValue::objectId(): do not assert if the value is not a cell
JSC::JSValue::asCell asserts if it is not a cell Reviewed-by: Jedrzej Nowacki
Diffstat (limited to 'src/script')
-rw-r--r--src/script/api/qscriptvalue_p.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/script/api/qscriptvalue_p.h b/src/script/api/qscriptvalue_p.h
index 853c6c8..8f286db 100644
--- a/src/script/api/qscriptvalue_p.h
+++ b/src/script/api/qscriptvalue_p.h
@@ -103,7 +103,7 @@ public:
qint64 objectId()
{
- if ( (type == JavaScriptCore) && (engine) )
+ if ( (type == JavaScriptCore) && (engine) && jscValue.isCell() )
return (qint64)jscValue.asCell();
else
return -1;