From 002a5d4303b3b182ae4abc4a752c49787c1c2821 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Thu, 15 Jan 2015 11:36:57 +0100 Subject: Get rid of most uses of ValueRef Instead pass a const Value & into the functions With our new inheritance structure, we can get rid of ValueRef and instead simply pass a pointer to a Value again. Pointers to Values are safe to use again now, as they are now guaranteed to be in a place where the GC knows about them. Change-Id: I44c606fde764db3993b8128fd6fb781d3a298e53 Reviewed-by: Simon Hausmann --- src/qml/jsruntime/qv4script_p.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (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 f2fd9cb7fc..1c17b75186 100644 --- a/src/qml/jsruntime/qv4script_p.h +++ b/src/qml/jsruntime/qv4script_p.h @@ -118,7 +118,7 @@ struct Q_QML_EXPORT Script { 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()), strictMode(false), inheritContext(true), parsed(false) - , qml(engine, qml->asReturnedValue()), vmFunction(0), parseAsBinding(true) {} + , qml(engine, qml), vmFunction(0), parseAsBinding(true) {} Script(ExecutionEngine *engine, Object *qml, CompiledData::CompilationUnit *compilationUnit); ~Script(); QString sourceFile; -- cgit v1.2.3