diff options
author | Lars Knoll <lars.knoll@theqtcompany.com> | 2014-11-18 21:22:44 +0100 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@digia.com> | 2014-12-20 15:16:39 +0100 |
commit | e7b66a60584b3fcb1436a7dbe8396b71cb69fe1b (patch) | |
tree | 4ff62f582408df5e948063c18420f61b262c7334 /src/qml/jsruntime/qv4functionobject.cpp | |
parent | 74c658bb631fd5bab433b9867ff2e568a56ec082 (diff) |
Make Managed inherit Value
This completes the first milestone towards being able to move
objects across the GC heap.
Change-Id: I8e6ce90254ea767188a31f0dc85b133534c87eb0
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/jsruntime/qv4functionobject.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4functionobject.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/qml/jsruntime/qv4functionobject.cpp b/src/qml/jsruntime/qv4functionobject.cpp index 6fabedec95..4b6e4358df 100644 --- a/src/qml/jsruntime/qv4functionobject.cpp +++ b/src/qml/jsruntime/qv4functionobject.cpp @@ -586,8 +586,9 @@ ReturnedValue BuiltinFunction::call(Managed *that, CallData *callData) ctx.strictMode = f->scope()->strictMode; // ### needed? scope or parent context? ctx.callData = callData; Q_ASSERT(v4->currentContext() == &ctx); + Scoped<CallContext> sctx(scope, &ctx); - return f->d()->code(reinterpret_cast<CallContext *>(&ctx)); + return f->d()->code(sctx); } ReturnedValue IndexedBuiltinFunction::call(Managed *that, CallData *callData) @@ -605,8 +606,9 @@ ReturnedValue IndexedBuiltinFunction::call(Managed *that, CallData *callData) ctx.strictMode = f->scope()->strictMode; // ### needed? scope or parent context? ctx.callData = callData; Q_ASSERT(v4->currentContext() == &ctx); + Scoped<CallContext> sctx(scope, &ctx); - return f->d()->code(reinterpret_cast<CallContext *>(&ctx), f->d()->index); + return f->d()->code(sctx, f->d()->index); } DEFINE_OBJECT_VTABLE(IndexedBuiltinFunction); |