diff options
author | Lars Knoll <[email protected]> | 2014-11-13 12:14:09 +0100 |
---|---|---|
committer | Simon Hausmann <[email protected]> | 2014-11-21 16:36:24 +0100 |
commit | b943d80dd90dec1a8b7802b826ad89e924cead05 (patch) | |
tree | a7edf71a76757a6dcb623e4929419a57a58a5523 /src/qml/jsruntime/qv4regexpobject.cpp | |
parent | cf7bd35a93f220cb1348f7654df9c6f27b590790 (diff) |
Remove the executioncontext in a few more places where it's not needed
Change-Id: I4c92c7bc9d94d8265e306f45d863fdc080a5e2a6
Reviewed-by: Simon Hausmann <[email protected]>
Diffstat (limited to 'src/qml/jsruntime/qv4regexpobject.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4regexpobject.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
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(); } |