aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@digia.com>2013-08-30 13:13:28 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-09-02 17:27:36 +0200
commit2bd74245fadb69922132f7ca2ae98e645f67742b (patch)
treedd4705fcf10037e50eaea7b1258032473d65b176 /src
parent4dbb2ab600930d476a6f279dc73befdf56220359 (diff)
Fix a small bug in ExecutionContext::getPropertyAndBase
Don't return the activation object as base, as it's only a helper for mutable properties in regular call contexts Change-Id: I2c36a4aff9cf82d87f80e541b4ec21ef17e18e8d Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src')
-rw-r--r--src/qml/jsruntime/qv4context.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/qml/jsruntime/qv4context.cpp b/src/qml/jsruntime/qv4context.cpp
index 7d7f5dda25..29fdc333f8 100644
--- a/src/qml/jsruntime/qv4context.cpp
+++ b/src/qml/jsruntime/qv4context.cpp
@@ -572,7 +572,8 @@ Value ExecutionContext::getPropertyAndBase(String *name, Object **base)
bool hasProperty = false;
Value v = c->activation->get(name, &hasProperty);
if (hasProperty) {
- *base = c->activation;
+ if (ctx->type == Type_QmlContext)
+ *base = c->activation;
return v;
}
}