aboutsummaryrefslogtreecommitdiffstats
path: root/qmljs_engine.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@digia.com>2012-12-09 05:16:04 +0100
committerLars Knoll <lars.knoll@digia.com>2012-12-10 20:08:21 +0100
commitdf458859f443c6c559c39c667952bcb85f277e9a (patch)
tree5388ff9fe0a638dc6511f94bd489537456d8db57 /qmljs_engine.cpp
parentf7408295611f61a7c607430e4ffa7e6a37f4c6c3 (diff)
Return the this object if we ask for it
This makes expressions such as typeof(this) work correctly. Change-Id: I44270f877fdee648e69ae44089ffc8fb57243401 Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
Diffstat (limited to 'qmljs_engine.cpp')
-rw-r--r--qmljs_engine.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/qmljs_engine.cpp b/qmljs_engine.cpp
index b0a964ff90..a694d3ecf0 100644
--- a/qmljs_engine.cpp
+++ b/qmljs_engine.cpp
@@ -84,6 +84,7 @@ ExecutionEngine::ExecutionEngine(MemoryManager *memoryManager, EvalISelFactory *
id_prototype = identifier(QStringLiteral("prototype"));
id_constructor = identifier(QStringLiteral("constructor"));
id_arguments = identifier(QStringLiteral("arguments"));
+ id_this = identifier(QStringLiteral("this"));
id___proto__ = identifier(QStringLiteral("__proto__"));
id_enumerable = identifier(QStringLiteral("enumerable"));
id_configurable = identifier(QStringLiteral("configurable"));