aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/qml/jsruntime/qv4context.cpp8
-rw-r--r--tests/manual/v4/fact.2.js2
2 files changed, 2 insertions, 8 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) {
diff --git a/tests/manual/v4/fact.2.js b/tests/manual/v4/fact.2.js
index d8f750b5a1..1696e8b80d 100644
--- a/tests/manual/v4/fact.2.js
+++ b/tests/manual/v4/fact.2.js
@@ -3,6 +3,6 @@ function fact(n) {
return n > 1 ? n * fact(n - 1) : 1
}
-for (var i = 0; i < 1000000; i = i + 1)
+for (var i = 0; i < 100000; i = i + 1)
fact(12)