From: Lars Knoll Date: Wed, 12 Dec 2012 07:22:06 +0000 (+0100) Subject: Don't allow this as LHS operand X-Git-Tag: upstream/5.2.1~669^2~659^2~718 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=834d0b72dcb4f785699d2b9b476bc9a78f5574fb;p=platform%2Fupstream%2Fqtdeclarative.git Don't allow this as LHS operand Change-Id: I18a16721312b07485d0671bf072da27dc97490a8 Reviewed-by: Simon Hausmann --- diff --git a/qmljs_environment.cpp b/qmljs_environment.cpp index 9f900f9..caf8915 100644 --- a/qmljs_environment.cpp +++ b/qmljs_environment.cpp @@ -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); }