aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4typedarray.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@theqtcompany.com>2015-01-11 16:30:29 +0100
committerLars Knoll <lars.knoll@digia.com>2015-01-21 13:18:55 +0100
commit47fbcb47771a36ab9fd0a4d5ede7b7504ab1410d (patch)
tree57f058746bcc842e2dda628ab5daa5d3096fae71 /src/qml/jsruntime/qv4typedarray.cpp
parent36662b60b09f636c3623057f8116e862f94ff440 (diff)
Get rid of all uses of Managed::engine()
Change-Id: I596f14554d81f5e9af9996294d96047f2e810bef Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/jsruntime/qv4typedarray.cpp')
-rw-r--r--src/qml/jsruntime/qv4typedarray.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/qml/jsruntime/qv4typedarray.cpp b/src/qml/jsruntime/qv4typedarray.cpp
index 11b675646d..2277d37876 100644
--- a/src/qml/jsruntime/qv4typedarray.cpp
+++ b/src/qml/jsruntime/qv4typedarray.cpp
@@ -201,7 +201,7 @@ Heap::TypedArrayCtor::TypedArrayCtor(QV4::ExecutionContext *scope, TypedArray::T
ReturnedValue TypedArrayCtor::construct(Managed *m, CallData *callData)
{
- Scope scope(m->engine());
+ Scope scope(static_cast<Object *>(m)->engine());
Scoped<TypedArrayCtor> that(scope, static_cast<TypedArrayCtor *>(m));
if (!callData->argc || !callData->args[0].isObject()) {
@@ -346,7 +346,7 @@ void TypedArray::markObjects(Heap::Base *that, ExecutionEngine *e)
ReturnedValue TypedArray::getIndexed(Managed *m, uint index, bool *hasProperty)
{
- Scope scope(m->engine());
+ Scope scope(static_cast<Object *>(m)->engine());
Scoped<TypedArray> a(scope, static_cast<TypedArray *>(m));
uint bytesPerElement = a->d()->type->bytesPerElement;
@@ -363,10 +363,11 @@ ReturnedValue TypedArray::getIndexed(Managed *m, uint index, bool *hasProperty)
void TypedArray::putIndexed(Managed *m, uint index, const ValueRef value)
{
- if (m->engine()->hasException)
+ ExecutionEngine *v4 = static_cast<Object *>(m)->engine();
+ if (v4->hasException)
return;
- Scope scope(m->engine());
+ Scope scope(v4);
Scoped<TypedArray> a(scope, static_cast<TypedArray *>(m));
uint bytesPerElement = a->d()->type->bytesPerElement;