aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4internalclass_p.h
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@theqtcompany.com>2015-09-07 15:47:18 +0200
committerLars Knoll <lars.knoll@theqtcompany.com>2015-09-25 08:38:00 +0000
commit81f8e599112471ee802d7fd7b0b79b7330348be6 (patch)
tree86c79674e79c26a7f25ea1fdca1bc7ff2531d195 /src/qml/jsruntime/qv4internalclass_p.h
parente255fdf207891765aa550709e084614242aebeec (diff)
Speed up QQmlEngine constructor
Freezing the global object using a script is pretty slow, esp. given that the script needs to be compiled as well. Rather do it programmatically. The old code actually had a bug that would only cause the global object to be frozen, not it's children. The new code fixes this, but doesn't completely freeze the objects. Instead it makes all the existing properties of the global object and it's children readonly, but still allows extending existing objects with new properties. Change-Id: I0d7331cdc89a0ac717b8ed3b1a490b2a3742de02 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Diffstat (limited to 'src/qml/jsruntime/qv4internalclass_p.h')
-rw-r--r--src/qml/jsruntime/qv4internalclass_p.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/qml/jsruntime/qv4internalclass_p.h b/src/qml/jsruntime/qv4internalclass_p.h
index 80590fe72e..342870fcd6 100644
--- a/src/qml/jsruntime/qv4internalclass_p.h
+++ b/src/qml/jsruntime/qv4internalclass_p.h
@@ -233,6 +233,7 @@ struct InternalClass : public QQmlJS::Managed {
InternalClass *sealed();
InternalClass *frozen();
+ InternalClass *propertiesFrozen() const;
void destroy();