aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4functionobject.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2018-05-03 15:59:35 +0200
committerLars Knoll <lars.knoll@qt.io>2018-05-03 20:05:22 +0000
commit7b0cb855edcfdeb04e7d0d1c2545958877481ecc (patch)
tree9546d8975f8d0ff6872df59eda4ce21b391be820 /src/qml/jsruntime/qv4functionobject.cpp
parent1f9fdd1af7b2376a1b031b3dadb366eb530e75c0 (diff)
name anonymous functions that way
Function and Generator objects created through the Functon or GeneratorObject constructors are supposed to have the name "anonymous" (ref. section 19.2.1.1.1 in the ES8 spec) Change-Id: I1eff4abce882b9508f8e161de1de9efaca1a5129 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4functionobject.cpp')
-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 6382a6e862..c556bdb008 100644
--- a/src/qml/jsruntime/qv4functionobject.cpp
+++ b/src/qml/jsruntime/qv4functionobject.cpp
@@ -229,7 +229,7 @@ QQmlRefPointer<CompiledData::CompilationUnit> FunctionCtor::parse(ExecutionEngin
if (engine->hasException)
return nullptr;
- QString function = (t == Type_Function ? QLatin1String("function(") : QLatin1String("function*(")) + arguments + QLatin1String("){") + body + QLatin1Char('}');
+ QString function = (t == Type_Function ? QLatin1String("function anonymous(") : QLatin1String("function* anonymous(")) + arguments + QLatin1String("){") + body + QLatin1Char('}');
QQmlJS::Engine ee;
QQmlJS::Lexer lexer(&ee);