From e56eeee9902ffc341506040e637654b2b0451209 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Mon, 23 Jul 2018 10:40:41 +0200 Subject: Encapsulate the unit data in CompilationUnit This allows updating the constants table when the unit data is set / changes and removes the tie to the engine. Change-Id: Ice553650390589e30e18421c4e55422a55d0df89 Reviewed-by: Lars Knoll --- src/qml/compiler/qqmlirbuilder.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/qml/compiler/qqmlirbuilder.cpp') diff --git a/src/qml/compiler/qqmlirbuilder.cpp b/src/qml/compiler/qqmlirbuilder.cpp index 04a7854d56..0461299866 100644 --- a/src/qml/compiler/qqmlirbuilder.cpp +++ b/src/qml/compiler/qqmlirbuilder.cpp @@ -1584,7 +1584,7 @@ QV4::CompiledData::Unit *QmlUnitGenerator::generate(Document &output, const QV4: char *data = (char*)malloc(totalSize); memcpy(data, jsUnit, unitSize); memset(data + unitSize, 0, totalSize - unitSize); - if (jsUnit != compilationUnit->data) + if (jsUnit != compilationUnit->unitData()) free(jsUnit); jsUnit = nullptr; -- cgit v1.2.3