diff options
author | Lars Knoll <lars.knoll@theqtcompany.com> | 2015-01-15 21:54:12 +0100 |
---|---|---|
committer | Lars Knoll <lars.knoll@digia.com> | 2015-01-23 12:30:38 +0100 |
commit | ef6b4938b9ec309d5faf0c966cb2b58f3de2ca77 (patch) | |
tree | 3d946ad66defb1ec5c60a50e16b6e7883ec33862 /src/qml/jsruntime/qv4arraybuffer.cpp | |
parent | 3dbf4e9a6979802fff55e2f5e6aa54a14280e128 (diff) |
Cleanups
Simplify some code in BooleanObject
Simplify access to call arguments and thisObject
Change-Id: I2f8e844019bc587385608beb02f05b15f827535c
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/jsruntime/qv4arraybuffer.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4arraybuffer.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/qml/jsruntime/qv4arraybuffer.cpp b/src/qml/jsruntime/qv4arraybuffer.cpp index 5d2c95bed4..e288023b80 100644 --- a/src/qml/jsruntime/qv4arraybuffer.cpp +++ b/src/qml/jsruntime/qv4arraybuffer.cpp @@ -123,7 +123,7 @@ void ArrayBufferPrototype::init(ExecutionEngine *engine, Object *ctor) ReturnedValue ArrayBufferPrototype::method_get_byteLength(CallContext *ctx) { Scope scope(ctx); - Scoped<ArrayBuffer> v(scope, ctx->d()->callData->thisObject); + Scoped<ArrayBuffer> v(scope, ctx->thisObject()); if (!v) return scope.engine->throwTypeError(); @@ -133,13 +133,13 @@ ReturnedValue ArrayBufferPrototype::method_get_byteLength(CallContext *ctx) ReturnedValue ArrayBufferPrototype::method_slice(CallContext *ctx) { Scope scope(ctx); - Scoped<ArrayBuffer> a(scope, ctx->d()->callData->thisObject); + Scoped<ArrayBuffer> a(scope, ctx->thisObject()); if (!a) return scope.engine->throwTypeError(); - double start = ctx->d()->callData->argc > 0 ? ctx->d()->callData->args[0].toInteger() : 0; - double end = (ctx->d()->callData->argc < 2 || ctx->d()->callData->args[1].isUndefined()) ? - a->d()->data->size : ctx->d()->callData->args[1].toInteger(); + double start = ctx->argc() > 0 ? ctx->args()[0].toInteger() : 0; + double end = (ctx->argc() < 2 || ctx->args()[1].isUndefined()) ? + a->d()->data->size : ctx->args()[1].toInteger(); if (scope.engine->hasException) return Encode::undefined(); |