diff options
author | Lars Knoll <lars.knoll@digia.com> | 2013-09-05 13:22:23 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-09-11 13:01:50 +0200 |
commit | 6e8e5d16e16d6ee683a5c06a24f8f202ed5239ff (patch) | |
tree | fa8e710ad0ee4ff6cc9738fa717883c74d452b95 /src/qml/jsruntime/qv4regexpobject.cpp | |
parent | 736afb8e9b3694efb8ca1fa8f3a8eeeaef530da2 (diff) |
Move CallData onto the JS stack
Change-Id: I22e853acfd2da337344b581bb0412c5f9930c510
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/jsruntime/qv4regexpobject.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4regexpobject.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/qml/jsruntime/qv4regexpobject.cpp b/src/qml/jsruntime/qv4regexpobject.cpp index c213c78aeb..ed4d3e3d17 100644 --- a/src/qml/jsruntime/qv4regexpobject.cpp +++ b/src/qml/jsruntime/qv4regexpobject.cpp @@ -45,6 +45,7 @@ #include "qv4objectproto_p.h" #include "qv4stringobject_p.h" #include "qv4mm_p.h" +#include "qv4scopedvalue_p.h" #include <private/qqmljsengine_p.h> #include <private/qqmljslexer_p.h> @@ -358,10 +359,9 @@ Value RegExpPrototype::method_compile(SimpleCallContext *ctx) if (!r) ctx->throwTypeError(); - CallData d; - d.args = ctx->arguments; - d.argc = ctx->argumentCount; - RegExpObject *re = ctx->engine->regExpCtor.asFunctionObject()->construct(d).as<RegExpObject>(); + ScopedCallData callData(ctx->engine, ctx->argumentCount); + memcpy(callData->args, ctx->arguments, ctx->argumentCount*sizeof(Value)); + RegExpObject *re = ctx->engine->regExpCtor.asFunctionObject()->construct(callData).as<RegExpObject>(); r->value = re->value; r->global = re->global; |