From b943d80dd90dec1a8b7802b826ad89e924cead05 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Thu, 13 Nov 2014 12:14:09 +0100 Subject: Remove the executioncontext in a few more places where it's not needed Change-Id: I4c92c7bc9d94d8265e306f45d863fdc080a5e2a6 Reviewed-by: Simon Hausmann --- src/qml/jsruntime/qv4regexpobject.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'src/qml/jsruntime/qv4regexpobject.cpp') diff --git a/src/qml/jsruntime/qv4regexpobject.cpp b/src/qml/jsruntime/qv4regexpobject.cpp index ce9970459c..c327437bdf 100644 --- a/src/qml/jsruntime/qv4regexpobject.cpp +++ b/src/qml/jsruntime/qv4regexpobject.cpp @@ -178,10 +178,9 @@ void RegExpObject::markObjects(Heap::Base *that, ExecutionEngine *e) Object::markObjects(that, e); } -Property *RegExpObject::lastIndexProperty(ExecutionContext *ctx) +Property *RegExpObject::lastIndexProperty() { - Q_UNUSED(ctx); - Q_ASSERT(0 == internalClass()->find(ctx->d()->engine->id_lastIndex)); + Q_ASSERT(0 == internalClass()->find(engine()->id_lastIndex)); return propertyAt(0); } @@ -362,9 +361,9 @@ ReturnedValue RegExpPrototype::method_exec(CallContext *ctx) return Encode::undefined(); QString s = arg->stringValue()->toQString(); - int offset = r->global() ? r->lastIndexProperty(ctx)->value.toInt32() : 0; + int offset = r->global() ? r->lastIndexProperty()->value.toInt32() : 0; if (offset < 0 || offset > s.length()) { - r->lastIndexProperty(ctx)->value = Primitive::fromInt32(0); + r->lastIndexProperty()->value = Primitive::fromInt32(0); return Encode::null(); } @@ -375,7 +374,7 @@ ReturnedValue RegExpPrototype::method_exec(CallContext *ctx) regExpCtor->d()->clearLastMatch(); if (result == -1) { - r->lastIndexProperty(ctx)->value = Primitive::fromInt32(0); + r->lastIndexProperty()->value = Primitive::fromInt32(0); return Encode::null(); } @@ -401,7 +400,7 @@ ReturnedValue RegExpPrototype::method_exec(CallContext *ctx) dd->lastMatchEnd = matchOffsets[1]; if (r->global()) - r->lastIndexProperty(ctx)->value = Primitive::fromInt32(matchOffsets[1]); + r->lastIndexProperty()->value = Primitive::fromInt32(matchOffsets[1]); return array.asReturnedValue(); } -- cgit v1.2.3