aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4context.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2017-08-06 12:05:39 +0200
committerLars Knoll <lars.knoll@qt.io>2017-08-08 18:59:13 +0000
commit488402c2dadce673ac23f3fa44055819acc08cc9 (patch)
tree6855aa01b459382f8c35f47d23f774b4dba43004 /src/qml/jsruntime/qv4context.cpp
parent64a20f9277f5461640e531a6dc1ca28ae91afa39 (diff)
Remove dead code
Context::getProperty and friends will never get called with 'this' as the name. Change-Id: I715996ce4ce6508e4734d2b3bdb1a4ad44208eeb Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4context.cpp')
-rw-r--r--src/qml/jsruntime/qv4context.cpp8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/qml/jsruntime/qv4context.cpp b/src/qml/jsruntime/qv4context.cpp
index 22278e0405..57ae10a459 100644
--- a/src/qml/jsruntime/qv4context.cpp
+++ b/src/qml/jsruntime/qv4context.cpp
@@ -344,7 +344,7 @@ void ExecutionContext::setProperty(String *name, const Value &value)
}
}
- if (d()->strictMode || name->equals(engine()->id_this())) {
+ if (d()->strictMode) {
ScopedValue n(scope, name->asReturnedValue());
engine()->throwReferenceError(n);
return;
@@ -358,9 +358,6 @@ ReturnedValue ExecutionContext::getProperty(String *name)
ScopedValue v(scope);
name->makeIdentifier();
- if (name->equals(engine()->id_this()))
- return thisObject().asReturnedValue();
-
ScopedContext ctx(scope, this);
for (; ctx; ctx = ctx->d()->outer) {
switch (ctx->d()->type) {
@@ -414,9 +411,6 @@ ReturnedValue ExecutionContext::getPropertyAndBase(String *name, Value *base)
base->setM(0);
name->makeIdentifier();
- if (name->equals(engine()->id_this()))
- return thisObject().asReturnedValue();
-
ScopedContext ctx(scope, this);
for (; ctx; ctx = ctx->d()->outer) {
switch (ctx->d()->type) {