aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2017-08-09 15:30:05 +0200
committerLars Knoll <lars.knoll@qt.io>2017-08-10 08:19:54 +0000
commit5571b666e6b9534a55347adcd249fa07b2e25c01 (patch)
treeea13960350e7a777095f44b1dfe34fe097f95400 /src
parentfdc031530ea84b150b008ffad58fafe1302b6483 (diff)
Fix a bug in new Function()
The strict mode of the generated function should not depend on the strict mode of the surrounding context. Change-Id: I15a0c8f89f8cb19a3cd14622fa03187411e00cbf Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/qml/jsruntime/qv4functionobject.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qml/jsruntime/qv4functionobject.cpp b/src/qml/jsruntime/qv4functionobject.cpp
index 95f8084607..3549c6b9ea 100644
--- a/src/qml/jsruntime/qv4functionobject.cpp
+++ b/src/qml/jsruntime/qv4functionobject.cpp
@@ -214,7 +214,7 @@ ReturnedValue FunctionCtor::construct(const Managed *that, CallData *callData)
Compiler::Module module(scope.engine->debugger() != 0);
Compiler::JSUnitGenerator jsGenerator(&module);
- RuntimeCodegen cg(scope.engine, &jsGenerator, f->strictMode());
+ RuntimeCodegen cg(scope.engine, &jsGenerator, false);
cg.generateFromFunctionExpression(QString(), function, fe, &module);
QQmlRefPointer<CompiledData::CompilationUnit> compilationUnit = cg.generateCompilationUnit();