aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4regexpobject.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@theqtcompany.com>2014-11-11 15:08:30 +0100
committerSimon Hausmann <simon.hausmann@digia.com>2014-11-12 20:44:13 +0100
commitafbf1f74af678af0eda76035133406aa8883408a (patch)
tree2bc7b93256cad8691baa0079e60ba4cf2d52fa93 /src/qml/jsruntime/qv4regexpobject.cpp
parentfaf13a3aa0c97b7386e44d02f323a9156a733c9f (diff)
Ported ExecutionEngine::newString and newIdentifier to Heap::String
Avoid the use of Returned<String> for newString and changed the identifier table to use Heap::String. This required moving some code back into Heap::String, but that's code that doesn't call back into the GC, so allocations and therefore future object moves aren't possible. Change-Id: I1dca3e9c12a9c56f09419af8cc8cba39fe04f720 Reviewed-by: Lars Knoll <lars.knoll@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 44a8b3531e..a73c25c567 100644
--- a/src/qml/jsruntime/qv4regexpobject.cpp
+++ b/src/qml/jsruntime/qv4regexpobject.cpp
@@ -181,7 +181,7 @@ void RegExpObject::markObjects(Heap::Base *that, ExecutionEngine *e)
Property *RegExpObject::lastIndexProperty(ExecutionContext *ctx)
{
Q_UNUSED(ctx);
- Q_ASSERT(0 == internalClass()->find(ctx->d()->engine->newIdentifier(QStringLiteral("lastIndex"))));
+ Q_ASSERT(0 == internalClass()->find(ctx->d()->engine->id_lastIndex));
return propertyAt(0);
}
@@ -262,7 +262,7 @@ ReturnedValue RegExpCtor::construct(Managed *m, CallData *callData)
QString pattern;
if (!r->isUndefined())
- pattern = r->toString(ctx)->toQString();
+ pattern = r->toQString();
if (scope.hasException())
return Encode::undefined();