projects
/
platform
/
upstream
/
qtdeclarative.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4b63f9b
)
Fix uninitialized return value for QQmlJavaScriptExpression::evaluate
author
Simon Hausmann
<simon.hausmann@digia.com>
Sat, 1 Jun 2013 12:25:32 +0000
(14:25 +0200)
committer
Lars Knoll
<lars.knoll@digia.com>
Sun, 2 Jun 2013 13:11:46 +0000
(15:11 +0200)
In case of an exception, we'd return an uninitialized value.
(visible when running tst_qqmlecmascript in valgrind)
Change-Id: I2c95a112b09ba527e61088904fa7daff003be05d
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
src/qml/qml/qqmljavascriptexpression.cpp
patch
|
blob
|
history
diff --git
a/src/qml/qml/qqmljavascriptexpression.cpp
b/src/qml/qml/qqmljavascriptexpression.cpp
index
1d4bba6
..
863432b
100644
(file)
--- a/
src/qml/qml/qqmljavascriptexpression.cpp
+++ b/
src/qml/qml/qqmljavascriptexpression.cpp
@@
-154,7
+154,7
@@
QQmlJavaScriptExpression::evaluate(QQmlContextData *context,
// incase we have been deleted.
DeleteWatcher watcher(this);
- QV4::Value result;
+ QV4::Value result
= QV4::Value::undefinedValue()
;
QV4::ExecutionEngine *v4 = QV8Engine::getV4(ep->v8engine());
QV4::ExecutionContext *ctx = v4->current;
try {