From e2ed4bd637d40879b7b820862fd8647c32389228 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Tue, 28 Apr 2015 19:18:40 +0200 Subject: Make QV4::Script GC safe Change-Id: I559458278cb6a0bbbc4da441034115aa4c72b058 Reviewed-by: Simon Hausmann --- src/qml/jsruntime/qv4script_p.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/qml/jsruntime/qv4script_p.h') diff --git a/src/qml/jsruntime/qv4script_p.h b/src/qml/jsruntime/qv4script_p.h index d2d2b89d16..59a589a624 100644 --- a/src/qml/jsruntime/qv4script_p.h +++ b/src/qml/jsruntime/qv4script_p.h @@ -111,11 +111,11 @@ struct Q_QML_EXPORT QmlBindingWrapper : FunctionObject { struct Q_QML_EXPORT Script { Script(ExecutionContext *scope, const QString &sourceCode, const QString &source = QString(), int line = 1, int column = 0) : sourceFile(source), line(line), column(column), sourceCode(sourceCode) - , scope(scope->d()), strictMode(false), inheritContext(false), parsed(false) + , scope(scope), strictMode(false), inheritContext(false), parsed(false) , vmFunction(0), parseAsBinding(false) {} Script(ExecutionEngine *engine, Object *qml, const QString &sourceCode, const QString &source = QString(), int line = 1, int column = 0) : sourceFile(source), line(line), column(column), sourceCode(sourceCode) - , scope(engine->rootContext()->d()), strictMode(false), inheritContext(true), parsed(false) + , scope(engine->rootContext()), strictMode(false), inheritContext(true), parsed(false) , qml(engine, qml), vmFunction(0), parseAsBinding(true) {} Script(ExecutionEngine *engine, Object *qml, CompiledData::CompilationUnit *compilationUnit); ~Script(); @@ -123,8 +123,7 @@ struct Q_QML_EXPORT Script { int line; int column; QString sourceCode; - // ### GC - Heap::ExecutionContext *scope; + ExecutionContext *scope; bool strictMode; bool inheritContext; bool parsed; -- cgit v1.2.3