Don't allow this as LHS operand
authorLars Knoll <lars.knoll@digia.com>
Wed, 12 Dec 2012 07:22:06 +0000 (08:22 +0100)
committerSimon Hausmann <simon.hausmann@digia.com>
Wed, 12 Dec 2012 08:07:35 +0000 (09:07 +0100)
Change-Id: I18a16721312b07485d0671bf072da27dc97490a8
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
qmljs_environment.cpp

index 9f900f9..caf8915 100644 (file)
@@ -260,7 +260,7 @@ void ExecutionContext::setProperty(String *name, Value value)
         if (ctx->setMutableBinding(this, name, value))
             return;
     }
-    if (strictMode)
+    if (strictMode || name == engine->id_this)
         throwReferenceError(Value::fromString(name));
     engine->globalObject.objectValue()->__put__(this, name, value);
 }