aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4engine.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@digia.com>2013-08-30 11:22:00 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-09-02 17:27:36 +0200
commit4dbb2ab600930d476a6f279dc73befdf56220359 (patch)
treeced1a9a71ad7e7b1679f2beed0ffe3051bb40477 /src/qml/jsruntime/qv4engine.cpp
parent3bf081203e713330aa1e5e92bc8b30fcc420e228 (diff)
Remove more usages of Object::setPrototype()
Change-Id: I33383baf14e764ce79252a100a6d769bde75331a Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/jsruntime/qv4engine.cpp')
-rw-r--r--src/qml/jsruntime/qv4engine.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/qml/jsruntime/qv4engine.cpp b/src/qml/jsruntime/qv4engine.cpp
index b7215d06a2..e6a4932c2d 100644
--- a/src/qml/jsruntime/qv4engine.cpp
+++ b/src/qml/jsruntime/qv4engine.cpp
@@ -136,7 +136,7 @@ ExecutionEngine::ExecutionEngine(QQmlJS::EvalISelFactory *factory)
id_uintMax = newIdentifier(QStringLiteral("4294967295"));
id_name = newIdentifier(QStringLiteral("name"));
- objectPrototype = new (memoryManager) ObjectPrototype(emptyClass);
+ ObjectPrototype *objectPrototype = new (memoryManager) ObjectPrototype(emptyClass);
objectClass = emptyClass->changePrototype(objectPrototype);
arrayClass = objectClass->addMember(id_length, Attr_NotConfigurable|Attr_NotEnumerable);
@@ -182,8 +182,11 @@ ExecutionEngine::ExecutionEngine(QQmlJS::EvalISelFactory *factory)
URIErrorPrototype *uRIErrorPrototype = new (memoryManager) URIErrorPrototype(errorClass);
uriErrorClass = emptyClass->changePrototype(uRIErrorPrototype);
- variantPrototype = new (memoryManager) VariantPrototype(objectClass);
- sequencePrototype = new (memoryManager) SequencePrototype(arrayClass->changePrototype(arrayPrototype));
+ VariantPrototype *variantPrototype = new (memoryManager) VariantPrototype(objectClass);
+ variantClass = emptyClass->changePrototype(variantPrototype);
+
+ SequencePrototype *sequencePrototype = new (memoryManager) SequencePrototype(arrayClass->changePrototype(arrayPrototype));
+ sequenceClass = emptyClass->changePrototype(sequencePrototype);
objectCtor = Value::fromObject(new (memoryManager) ObjectCtor(rootContext));
stringCtor = Value::fromObject(new (memoryManager) StringCtor(rootContext));
@@ -670,11 +673,6 @@ void ExecutionEngine::markObjects()
typeErrorCtor.mark();
uRIErrorCtor.mark();
- objectPrototype->mark();
-
- variantPrototype->mark();
- sequencePrototype->mark();
-
if (m_qmlExtensions)
m_qmlExtensions->markObjects();