aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4script.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@digia.com>2013-09-25 15:24:50 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-09-28 13:33:39 +0200
commit150731fc68bcf823bec40729285813d902990cb7 (patch)
tree7af619f4bc8fac030bc162ce6ead2e2a7be86783 /src/qml/jsruntime/qv4script.cpp
parentc79cc3f30d395c94d4f14b978903d7db4ad871dc (diff)
Remove more direct QV4::Value usage
Remove Value::fromString(String *), and make Encode safe against encoding raw Managed * pointers. Change-Id: Ibca4668e1cbeaf85c78169d14386281659d33ef6 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/jsruntime/qv4script.cpp')
-rw-r--r--src/qml/jsruntime/qv4script.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/qml/jsruntime/qv4script.cpp b/src/qml/jsruntime/qv4script.cpp
index d358c8948c..432e3b4b47 100644
--- a/src/qml/jsruntime/qv4script.cpp
+++ b/src/qml/jsruntime/qv4script.cpp
@@ -271,7 +271,8 @@ ReturnedValue Script::qmlBinding()
ExecutionEngine *v4 = scope->engine;
Scope valueScope(v4);
ScopedObject qmlObj(valueScope, qml.value());
- return Value::fromObject(new (v4->memoryManager) QmlBindingWrapper(scope, vmFunction, qmlObj.getPointer())).asReturnedValue();
+ ScopedObject v(valueScope, new (v4->memoryManager) QmlBindingWrapper(scope, vmFunction, qmlObj.getPointer()));
+ return v.asReturnedValue();
}
QV4::ReturnedValue Script::evaluate(ExecutionEngine *engine, const QString &script, ObjectRef scopeObject)