aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4globalobject.cpp
diff options
context:
space:
mode:
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();