aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4regexpobject.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@theqtcompany.com>2014-11-07 18:51:19 +0100
committerSimon Hausmann <simon.hausmann@digia.com>2014-11-12 12:13:26 +0100
commit31084c37f60a54d0d1ab2e07a79e070268540498 (patch)
tree598bf007edb899f6c0965e82b904bf7ba557d362 /src/qml/jsruntime/qv4regexpobject.cpp
parent73a8f5f4845d34d74470b5a524d655be9eaf6dfc (diff)
Convert methods in RuntimeHelpers to take an engine pointer
This is safer and cleaner than to use a context pointer. Change-Id: Id5ef4e6667571897cd029125a0bdc18ce299da6d Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/jsruntime/qv4regexpobject.cpp')
-rw-r--r--src/qml/jsruntime/qv4regexpobject.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qml/jsruntime/qv4regexpobject.cpp b/src/qml/jsruntime/qv4regexpobject.cpp
index 85ab712a09..a1a0104d7a 100644
--- a/src/qml/jsruntime/qv4regexpobject.cpp
+++ b/src/qml/jsruntime/qv4regexpobject.cpp
@@ -269,7 +269,7 @@ ReturnedValue RegExpCtor::construct(Managed *m, CallData *callData)
bool ignoreCase = false;
bool multiLine = false;
if (!f->isUndefined()) {
- f = RuntimeHelpers::toString(ctx, f);
+ f = RuntimeHelpers::toString(scope.engine, f);
if (scope.hasException())
return Encode::undefined();
QString str = f->stringValue()->toQString();
@@ -356,7 +356,7 @@ ReturnedValue RegExpPrototype::method_exec(CallContext *ctx)
return ctx->engine()->throwTypeError();
ScopedValue arg(scope, ctx->argument(0));
- arg = RuntimeHelpers::toString(ctx, arg);
+ arg = RuntimeHelpers::toString(scope.engine, arg);
if (scope.hasException())
return Encode::undefined();
QString s = arg->stringValue()->toQString();