diff options
author | Lars Knoll <lars.knoll@digia.com> | 2013-09-11 13:55:01 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-09-18 13:13:18 +0200 |
commit | 1a2a83f80ba4ecc28eba72af57c81bd43a45946c (patch) | |
tree | c2e4eb4d9bb57873ca340f6bbbf2342b36c91452 /src/qml/jsruntime/qv4globalobject.cpp | |
parent | 826550af450b39f47a3c00ec316acf1e317f12c6 (diff) | |
download | qtdeclarative-1a2a83f80ba4ecc28eba72af57c81bd43a45946c.tar.gz |
Use a ReturnedValue for Managed::call()
Change-Id: Ief2d75e9789dd367c603d90dc0fe5316a0d055e3
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/jsruntime/qv4globalobject.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4globalobject.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/qml/jsruntime/qv4globalobject.cpp b/src/qml/jsruntime/qv4globalobject.cpp index 6176893d68..e6f3de712d 100644 --- a/src/qml/jsruntime/qv4globalobject.cpp +++ b/src/qml/jsruntime/qv4globalobject.cpp @@ -354,10 +354,10 @@ EvalFunction::EvalFunction(ExecutionContext *scope) defineReadonlyProperty(scope->engine->id_length, Value::fromInt32(1)); } -Value EvalFunction::evalCall(Value /*thisObject*/, Value *args, int argc, bool directCall) +ReturnedValue EvalFunction::evalCall(Value /*thisObject*/, Value *args, int argc, bool directCall) { if (argc < 1) - return Value::undefinedValue(); + return Value::undefinedValue().asReturnedValue(); ExecutionContext *parentContext = engine()->current; ExecutionEngine *engine = parentContext->engine; @@ -371,7 +371,7 @@ Value EvalFunction::evalCall(Value /*thisObject*/, Value *args, int argc, bool d } if (!args[0].isString()) - return args[0]; + return args[0].asReturnedValue(); const QString code = args[0].stringValue()->toQString(); bool inheritContext = !ctx->strictMode; @@ -383,7 +383,7 @@ Value EvalFunction::evalCall(Value /*thisObject*/, Value *args, int argc, bool d Function *function = script.function(); if (!function) - return Value::undefinedValue(); + return Value::undefinedValue().asReturnedValue(); strictMode = function->isStrict() || (ctx->strictMode); @@ -436,11 +436,11 @@ Value EvalFunction::evalCall(Value /*thisObject*/, Value *args, int argc, bool d while (engine->current != parentContext) engine->popContext(); - return result; + return result.asReturnedValue(); } -Value EvalFunction::call(Managed *that, CallData *callData) +ReturnedValue EvalFunction::call(Managed *that, CallData *callData) { // indirect call // ### const_cast |