aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlengine.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/qml/qqmlengine.cpp')
-rw-r--r--src/qml/qml/qqmlengine.cpp21
1 files changed, 9 insertions, 12 deletions
diff --git a/src/qml/qml/qqmlengine.cpp b/src/qml/qml/qqmlengine.cpp
index 673fbfefbb..be1c28c62b 100644
--- a/src/qml/qml/qqmlengine.cpp
+++ b/src/qml/qml/qqmlengine.cpp
@@ -503,12 +503,12 @@ The \c status property will be updated as the operation progresses.
If provided, \a callback is invoked when the operation completes. The callback is passed
the same object as is returned from the Qt.include() call.
*/
-// Qt.include() is implemented in qv8include.cpp
+// Qt.include() is implemented in qv4include.cpp
QQmlEnginePrivate::QQmlEnginePrivate(QQmlEngine *e)
: propertyCapture(0), rootContext(0), isDebugging(false),
- outputWarningsToStdErr(true), sharedContext(0), sharedScope(0),
+ outputWarningsToStdErr(true),
cleanup(0), erroredBindings(0), inProgressCreations(0),
workerScriptEngine(0), activeVME(0),
networkAccessManager(0), networkAccessManagerFactory(0), urlInterceptor(0),
@@ -742,7 +742,7 @@ void QQmlEnginePrivate::init()
qRegisterMetaType<QQmlComponent::Status>();
qRegisterMetaType<QList<QObject*> >();
qRegisterMetaType<QList<int> >();
- qRegisterMetaType<QQmlV8Handle>();
+ qRegisterMetaType<QQmlV4Handle>();
v8engine()->setEngine(q);
@@ -1608,11 +1608,7 @@ void QQmlData::destroyed(QObject *object)
delete extendedData;
// Dispose the handle.
- // We don't simply clear it (and wait for next gc cycle to dispose
- // via the weak qobject reference callback) as this affects the
- // outcomes of v8's gc statistical analysis heuristics, which can
- // cause unnecessary growth of the old pointer space js heap area.
- qPersistentDispose(v8object);
+ jsWrapper = QV4::Value::undefinedValue();
if (ownMemory)
delete this;
@@ -1726,7 +1722,7 @@ void QQmlEnginePrivate::warning(const QList<QQmlError> &errors)
void QQmlEnginePrivate::warning(QQmlDelayedError *error)
{
Q_Q(QQmlEngine);
- warning(error->error(q));
+ warning(error->error());
}
void QQmlEnginePrivate::warning(QQmlEngine *engine, const QQmlError &error)
@@ -1750,7 +1746,7 @@ void QQmlEnginePrivate::warning(QQmlEngine *engine, QQmlDelayedError *error)
if (engine)
QQmlEnginePrivate::get(engine)->warning(error);
else
- dumpwarning(error->error(0));
+ dumpwarning(error->error());
}
void QQmlEnginePrivate::warning(QQmlEnginePrivate *engine, const QQmlError &error)
@@ -1796,9 +1792,10 @@ void QQmlEnginePrivate::dereferenceScarceResources()
// note that the actual SRD is owned by the JS engine,
// so we cannot delete the SRD; but we can free the
// memory used by the variant in the SRD.
- while (ScarceResourceData *sr = scarceResources.first()) {
+ QV4::ExecutionEngine *engine = QV8Engine::getV4(v8engine());
+ while (QV4::ExecutionEngine::ScarceResourceData *sr = engine->scarceResources.first()) {
sr->data = QVariant();
- scarceResources.remove(sr);
+ engine->scarceResources.remove(sr);
}
}
}