From 488402c2dadce673ac23f3fa44055819acc08cc9 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Sun, 6 Aug 2017 12:05:39 +0200 Subject: Remove dead code Context::getProperty and friends will never get called with 'this' as the name. Change-Id: I715996ce4ce6508e4734d2b3bdb1a4ad44208eeb Reviewed-by: Simon Hausmann --- src/qml/jsruntime/qv4context.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'src/qml/jsruntime/qv4context.cpp') 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) { -- cgit v1.2.3