summaryrefslogtreecommitdiff
path: root/src/qml/jsruntime/qv4globalobject.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2017-08-07 11:46:41 +0200
committerLars Knoll <lars.knoll@qt.io>2017-08-10 08:18:26 +0000
commit026ec5feee4d6fac4d7b0530fce6da649a1ee27d (patch)
treeaddc54b9e8697334dd732891404c898dd7a85cd5 /src/qml/jsruntime/qv4globalobject.cpp
parent475f4559d97dca4e85e6601f77593b354193393d (diff)
downloadqtdeclarative-026ec5feee4d6fac4d7b0530fce6da649a1ee27d.tar.gz
Reduce usage of the strictMode flag in ExecutionContext
The goal is to completely get rid of it, and replace it by calling strict/sloppy versions of runtime functions in the generated code. Change-Id: Icd516d924136109abaf0dc9f3ef0e771a709485d Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4globalobject.cpp')
-rw-r--r--src/qml/jsruntime/qv4globalobject.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/qml/jsruntime/qv4globalobject.cpp b/src/qml/jsruntime/qv4globalobject.cpp
index 71140e5386..179c4120ae 100644
--- a/src/qml/jsruntime/qv4globalobject.cpp
+++ b/src/qml/jsruntime/qv4globalobject.cpp
@@ -360,10 +360,10 @@ ReturnedValue EvalFunction::evalCall(CallData *callData, bool directCall) const
return callData->args[0].asReturnedValue();
const QString code = scode->toQString();
- bool inheritContext = !ctx->d()->strictMode;
+ bool inheritContext = !ctx->d()->v4Function->isStrict();
Script script(ctx, code, QStringLiteral("eval code"));
- script.strictMode = (directCall && currentContext->d()->strictMode);
+ script.strictMode = (directCall && currentContext->d()->v4Function->isStrict());
script.inheritContext = inheritContext;
script.parse();
if (v4->hasException)
@@ -373,7 +373,7 @@ ReturnedValue EvalFunction::evalCall(CallData *callData, bool directCall) const
if (!function)
return Encode::undefined();
- if (function->isStrict() || (ctx->d()->strictMode)) {
+ if (function->isStrict() || (ctx->d()->v4Function->isStrict())) {
ScopedFunctionObject e(scope, FunctionObject::createScriptFunction(ctx, function));
ScopedCallData callData(scope, 0);
callData->thisObject = ctx->thisObject();