diff options
author | Lars Knoll <lars.knoll@theqtcompany.com> | 2015-01-15 11:36:57 +0100 |
---|---|---|
committer | Lars Knoll <lars.knoll@digia.com> | 2015-01-23 08:07:32 +0100 |
commit | 002a5d4303b3b182ae4abc4a752c49787c1c2821 (patch) | |
tree | 69c7666ed1061c7acacee1d76597c06405459c80 /src/qml/qml/v8 | |
parent | fddc75e862032163af36d2282051758647b62d15 (diff) |
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 <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/qml/v8')
-rw-r--r-- | src/qml/qml/v8/qv8engine.cpp | 2 | ||||
-rw-r--r-- | src/qml/qml/v8/qv8engine_p.h | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/qml/qml/v8/qv8engine.cpp b/src/qml/qml/v8/qv8engine.cpp index 73113be9ba..154b3830ef 100644 --- a/src/qml/qml/v8/qv8engine.cpp +++ b/src/qml/qml/v8/qv8engine.cpp @@ -223,7 +223,7 @@ void QV8Engine::initializeGlobal() } } -void QV8Engine::freezeObject(const QV4::ValueRef value) +void QV8Engine::freezeObject(const QV4::Value &value) { QV4::Scope scope(m_v4Engine); QV4::ScopedFunctionObject f(scope, m_freezeObject.value()); diff --git a/src/qml/qml/v8/qv8engine_p.h b/src/qml/qml/v8/qv8engine_p.h index 1d3e427877..25f599ca72 100644 --- a/src/qml/qml/v8/qv8engine_p.h +++ b/src/qml/qml/v8/qv8engine_p.h @@ -130,7 +130,7 @@ private: QQmlV4Function &operator=(const QQmlV4Function &); QQmlV4Function(QV4::CallData *callData, QV4::ValueRef retVal, - const QV4::ValueRef global, QQmlContextData *c, QV4::ExecutionEngine *e) + const QV4::Value &global, QQmlContextData *c, QV4::ExecutionEngine *e) : callData(callData), retVal(retVal), ctx(c), e(e) { callData->thisObject.val = global.asReturnedValue(); @@ -194,7 +194,7 @@ public: QQmlContextData *callingContext(); - void freezeObject(const QV4::ValueRef value); + void freezeObject(const QV4::Value &value); // Return the network access manager for this engine. By default this returns the network // access manager of the QQmlEngine. It is overridden in the case of a threaded v8 |