aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4globalobject.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2017-10-23 10:10:28 +0200
committerLars Knoll <lars.knoll@qt.io>2017-11-13 08:56:04 +0000
commita2142203ad6cdb54ec063e259b40171e13c5d4bd (patch)
tree5da2bc88d9015b5f938e7dcd118bd9c5a93c3e5c /src/qml/jsruntime/qv4globalobject.cpp
parent4d2763e425828ac35c2a03c0e675b83fa8dad668 (diff)
Finally get rid of the QV4::Function pointer in the context
Change-Id: Iad6018f67faa956d385087865fca9d73419e363e Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4globalobject.cpp')
-rw-r--r--src/qml/jsruntime/qv4globalobject.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/qml/jsruntime/qv4globalobject.cpp b/src/qml/jsruntime/qv4globalobject.cpp
index a015461c47..9ba65b2ce1 100644
--- a/src/qml/jsruntime/qv4globalobject.cpp
+++ b/src/qml/jsruntime/qv4globalobject.cpp
@@ -359,7 +359,7 @@ ReturnedValue EvalFunction::evalCall(const Value *, const Value *argv, int argc,
return argv[0].asReturnedValue();
const QString code = scode->toQString();
- bool inheritContext = !ctx->d()->v4Function->isStrict();
+ bool inheritContext = !isStrict;
Script script(ctx, QV4::Compiler::EvalCode, code, QStringLiteral("eval code"));
script.strictMode = (directCall && isStrict);
@@ -372,7 +372,7 @@ ReturnedValue EvalFunction::evalCall(const Value *, const Value *argv, int argc,
if (!function)
return Encode::undefined();
- if (function->isStrict() || (ctx->d()->v4Function->isStrict())) {
+ if (function->isStrict() || isStrict) {
ScopedFunctionObject e(scope, FunctionObject::createScriptFunction(ctx, function));
JSCallData jsCallData(scope, 0);
if (directCall)
@@ -382,11 +382,6 @@ ReturnedValue EvalFunction::evalCall(const Value *, const Value *argv, int argc,
return e->call(jsCallData);
}
- ContextStateSaver stateSaver(scope, ctx);
-
- // set the correct v4 function for the context
- ctx->d()->v4Function = function;
-
JSCallData jsCallData(scope);
*jsCallData->thisObject = scope.engine->currentStackFrame->thisObject();
CallData *cData = jsCallData.callData();