aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/compiler/qqmlirbuilder.cpp
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2019-05-13 11:07:39 +0200
committerUlf Hermann <ulf.hermann@qt.io>2019-05-17 10:34:31 +0000
commitae1c2375f596258c878933adc46a19a541a43a6c (patch)
treee5559a91634354657c270fed2ae59ca92f1552cc /src/qml/compiler/qqmlirbuilder.cpp
parentf228af06c2c712302ee1dcdaf761cd24504b473e (diff)
Add abstraction for temporarily setting StaticData when saving
The StaticData flag needs to be saved to disk, but removed again afterwards so that we can free() the malloc'd data. This also allows us to avoid copying all the data into a byte array before saving. Change-Id: I96513f8d98acf0ea0b4514d96376b487e8444917 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/compiler/qqmlirbuilder.cpp')
-rw-r--r--src/qml/compiler/qqmlirbuilder.cpp3
1 files changed, 0 insertions, 3 deletions
diff --git a/src/qml/compiler/qqmlirbuilder.cpp b/src/qml/compiler/qqmlirbuilder.cpp
index e63aa3b66d..6f46648572 100644
--- a/src/qml/compiler/qqmlirbuilder.cpp
+++ b/src/qml/compiler/qqmlirbuilder.cpp
@@ -1565,9 +1565,6 @@ void QmlUnitGenerator::generate(Document &output, const QV4::CompiledData::Depen
break;
}
}
- // This unit's memory was allocated with malloc on the heap, so it's
- // definitely not suitable for StaticData access.
- createdUnit->flags &= ~QV4::CompiledData::Unit::StaticData;
if (dependencyHasher) {
const QByteArray checksum = dependencyHasher();