aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4context.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2017-08-07 14:43:03 +0200
committerLars Knoll <lars.knoll@qt.io>2017-08-10 08:18:50 +0000
commiteb2c08f57493aa12850e6cddff2cc3527e7cbfd7 (patch)
treebe917321e6025a8ca8983881a1f07d1a0fd7680c /src/qml/jsruntime/qv4context.cpp
parente9a8252305fa5e3b3cd4a18261990820975a79da (diff)
Get rid of ExecutionContext::strictMode
This should be done by generating different byte code for the strict/non strict cases. For now the VME has a workaround checking the isStrict() flag of QV4::Function. Change-Id: I2faa9e9184ffc5274491067e67f665d6989b54c2 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4context.cpp')
-rw-r--r--src/qml/jsruntime/qv4context.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/qml/jsruntime/qv4context.cpp b/src/qml/jsruntime/qv4context.cpp
index 6a6f80827f..e18d8bce83 100644
--- a/src/qml/jsruntime/qv4context.cpp
+++ b/src/qml/jsruntime/qv4context.cpp
@@ -68,7 +68,6 @@ Heap::CallContext *ExecutionContext::newCallContext(Function *function, CallData
c->v4Function = function;
- c->strictMode = function->isStrict();
c->outer.set(v4, this->d());
const CompiledData::Function *compiledFunction = function->compiledFunction;
@@ -159,7 +158,6 @@ void Heap::CatchContext::init(ExecutionContext *outerContext, String *exceptionV
{
Heap::ExecutionContext::init(Heap::ExecutionContext::Type_CatchContext);
outer.set(internalClass->engine, outerContext);
- strictMode = outer->strictMode;
callData = outer->callData;
v4Function = outer->v4Function;
@@ -259,7 +257,6 @@ ReturnedValue QV4::ExecutionContext::simpleCall(ExecutionEngine *engine, CallDat
CallContext::Data *ctx = engine->memoryManager->allocSimpleCallContext();
- ctx->strictMode = function->isStrict();
ctx->callData = callData;
ctx->v4Function = function;
ctx->outer.set(engine, this->d());
@@ -341,7 +338,7 @@ bool ExecutionContext::setProperty(String *name, const Value &value)
}
- if (d()->strictMode)
+ if (d()->v4Function->isStrict())
return false;
return engine()->globalObject->put(name, value);
}