From c9778d2e9c41036cbd59976c51927d746bb78bcc Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Fri, 24 Jan 2025 15:30:16 +0100 Subject: QtQml: Fix assignment of fileName and URL during compilation We need to assign them right away when creating the module. If we do it later on, there are a lot of different code paths to cover and in fact we were missing some. Pick-to: 6.9 6.8 Task-number: QTBUG-133053 Change-Id: I57e381c787f504eb9bcd8c2041e41b4f1d1f8b53 Reviewed-by: Fabian Kosmale --- src/qml/jsruntime/qv4functionobject.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/qml/jsruntime/qv4functionobject.cpp') diff --git a/src/qml/jsruntime/qv4functionobject.cpp b/src/qml/jsruntime/qv4functionobject.cpp index e9f91fbc06..1a812790b4 100644 --- a/src/qml/jsruntime/qv4functionobject.cpp +++ b/src/qml/jsruntime/qv4functionobject.cpp @@ -236,11 +236,11 @@ QQmlRefPointer FunctionCtor::parse(ExecutionEngine *e return nullptr; } - Compiler::Module module(engine->debugger() != nullptr); + Compiler::Module module(QString(), QString(), engine->debugger() != nullptr); Compiler::JSUnitGenerator jsGenerator(&module); RuntimeCodegen cg(engine, &jsGenerator, false); - cg.generateFromFunctionExpression(QString(), function, fe, &module); + cg.generateFromFunctionExpression(function, fe, &module); if (engine->hasException) return nullptr; -- cgit v1.2.3