diff options
author | Lars Knoll <lars.knoll@digia.com> | 2013-09-11 15:09:25 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-09-18 13:13:30 +0200 |
commit | 8d26084ae56ba5aedd73ab733553dbf9cb3eb672 (patch) | |
tree | c0c14b3fdb87bdb23d5612de77605b98aa03dd52 /src/qml/jsruntime/qv4regexpobject.cpp | |
parent | 4691396f96cf8468a9ee4fbb339cc94e339928a7 (diff) |
Use ReturnedValue for Managed::construct()
Change-Id: I9e702d60c4e1b7ba19a699ff7a8d53876d6cd5f7
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/jsruntime/qv4regexpobject.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4regexpobject.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/qml/jsruntime/qv4regexpobject.cpp b/src/qml/jsruntime/qv4regexpobject.cpp index 90ab558d7a..4ad8c4a0a1 100644 --- a/src/qml/jsruntime/qv4regexpobject.cpp +++ b/src/qml/jsruntime/qv4regexpobject.cpp @@ -229,7 +229,7 @@ RegExpCtor::RegExpCtor(ExecutionContext *scope) vtbl = &static_vtbl; } -Value RegExpCtor::construct(Managed *m, CallData *callData) +ReturnedValue RegExpCtor::construct(Managed *m, CallData *callData) { ExecutionContext *ctx = m->engine()->current; Scope scope(ctx); @@ -241,7 +241,7 @@ Value RegExpCtor::construct(Managed *m, CallData *callData) ctx->throwTypeError(); RegExpObject *o = ctx->engine->newRegExpObject(re->value, re->global); - return Value::fromObject(o); + return Value::fromObject(o).asReturnedValue(); } QString pattern; @@ -272,7 +272,7 @@ Value RegExpCtor::construct(Managed *m, CallData *callData) ctx->throwSyntaxError(0); RegExpObject *o = ctx->engine->newRegExpObject(re, global); - return Value::fromObject(o); + return Value::fromObject(o).asReturnedValue(); } ReturnedValue RegExpCtor::call(Managed *that, CallData *callData) @@ -282,7 +282,7 @@ ReturnedValue RegExpCtor::call(Managed *that, CallData *callData) return callData->args[0].asReturnedValue(); } - return construct(that, callData).asReturnedValue(); + return construct(that, callData); } void RegExpPrototype::init(ExecutionContext *ctx, const Value &ctor) @@ -366,7 +366,7 @@ Value RegExpPrototype::method_compile(SimpleCallContext *ctx) ScopedCallData callData(scope, ctx->argumentCount); memcpy(callData->args, ctx->arguments, ctx->argumentCount*sizeof(Value)); - RegExpObject *re = ctx->engine->regExpCtor.asFunctionObject()->construct(callData).as<RegExpObject>(); + RegExpObject *re = Value::fromReturnedValue(ctx->engine->regExpCtor.asFunctionObject()->construct(callData)).as<RegExpObject>(); r->value = re->value; r->global = re->global; |