aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime
diff options
context:
space:
mode:
authorOleg Shparber <trollixx@gmail.com>2014-12-31 10:42:15 -0800
committerOleg Shparber <trollixx@gmail.com>2015-01-02 21:29:41 +0100
commit2fadffdc4630eca35d775d973a368feae2630bd9 (patch)
treeb4af3d95e75655573cd2466d6807d3ae78feb47a /src/qml/jsruntime
parent29c0102adb8b800f4947e4e7962ca414fe576866 (diff)
Use QV4::ScopedFunctionObject typedef instead of actual type
Change-Id: I6b4effaa5bef992b4ae9402eea7fe655bc7b18f0 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/jsruntime')
-rw-r--r--src/qml/jsruntime/qv4arraybuffer.cpp2
-rw-r--r--src/qml/jsruntime/qv4arrayobject.cpp14
-rw-r--r--src/qml/jsruntime/qv4functionobject.cpp2
-rw-r--r--src/qml/jsruntime/qv4jsonobject.cpp2
-rw-r--r--src/qml/jsruntime/qv4object.cpp4
-rw-r--r--src/qml/jsruntime/qv4objectproto.cpp6
-rw-r--r--src/qml/jsruntime/qv4runtime.cpp4
-rw-r--r--src/qml/jsruntime/qv4stringobject.cpp4
-rw-r--r--src/qml/jsruntime/qv4typedarray.cpp2
9 files changed, 20 insertions, 20 deletions
diff --git a/src/qml/jsruntime/qv4arraybuffer.cpp b/src/qml/jsruntime/qv4arraybuffer.cpp
index 9fc3114751..f54161ea18 100644
--- a/src/qml/jsruntime/qv4arraybuffer.cpp
+++ b/src/qml/jsruntime/qv4arraybuffer.cpp
@@ -147,7 +147,7 @@ ReturnedValue ArrayBufferPrototype::method_slice(CallContext *ctx)
double first = (start < 0) ? qMax(a->d()->data->size + start, 0.) : qMin(start, (double)a->d()->data->size);
double final = (end < 0) ? qMax(a->d()->data->size + end, 0.) : qMin(end, (double)a->d()->data->size);
- Scoped<FunctionObject> constructor(scope, a->get(scope.engine->id_constructor));
+ ScopedFunctionObject constructor(scope, a->get(scope.engine->id_constructor));
if (!constructor)
return scope.engine->throwTypeError();
diff --git a/src/qml/jsruntime/qv4arrayobject.cpp b/src/qml/jsruntime/qv4arrayobject.cpp
index f6e676de2c..d388875e3b 100644
--- a/src/qml/jsruntime/qv4arrayobject.cpp
+++ b/src/qml/jsruntime/qv4arrayobject.cpp
@@ -690,7 +690,7 @@ ReturnedValue ArrayPrototype::method_every(CallContext *ctx)
uint len = instance->getLength();
- Scoped<FunctionObject> callback(scope, ctx->argument(0));
+ ScopedFunctionObject callback(scope, ctx->argument(0));
if (!callback)
return ctx->engine()->throwTypeError();
@@ -724,7 +724,7 @@ ReturnedValue ArrayPrototype::method_some(CallContext *ctx)
uint len = instance->getLength();
- Scoped<FunctionObject> callback(scope, ctx->argument(0));
+ ScopedFunctionObject callback(scope, ctx->argument(0));
if (!callback)
return ctx->engine()->throwTypeError();
@@ -758,7 +758,7 @@ ReturnedValue ArrayPrototype::method_forEach(CallContext *ctx)
uint len = instance->getLength();
- Scoped<FunctionObject> callback(scope, ctx->argument(0));
+ ScopedFunctionObject callback(scope, ctx->argument(0));
if (!callback)
return ctx->engine()->throwTypeError();
@@ -789,7 +789,7 @@ ReturnedValue ArrayPrototype::method_map(CallContext *ctx)
uint len = instance->getLength();
- Scoped<FunctionObject> callback(scope, ctx->argument(0));
+ ScopedFunctionObject callback(scope, ctx->argument(0));
if (!callback)
return ctx->engine()->throwTypeError();
@@ -826,7 +826,7 @@ ReturnedValue ArrayPrototype::method_filter(CallContext *ctx)
uint len = instance->getLength();
- Scoped<FunctionObject> callback(scope, ctx->argument(0));
+ ScopedFunctionObject callback(scope, ctx->argument(0));
if (!callback)
return ctx->engine()->throwTypeError();
@@ -867,7 +867,7 @@ ReturnedValue ArrayPrototype::method_reduce(CallContext *ctx)
uint len = instance->getLength();
- Scoped<FunctionObject> callback(scope, ctx->argument(0));
+ ScopedFunctionObject callback(scope, ctx->argument(0));
if (!callback)
return ctx->engine()->throwTypeError();
@@ -917,7 +917,7 @@ ReturnedValue ArrayPrototype::method_reduceRight(CallContext *ctx)
uint len = instance->getLength();
- Scoped<FunctionObject> callback(scope, ctx->argument(0));
+ ScopedFunctionObject callback(scope, ctx->argument(0));
if (!callback)
return ctx->engine()->throwTypeError();
diff --git a/src/qml/jsruntime/qv4functionobject.cpp b/src/qml/jsruntime/qv4functionobject.cpp
index 4b6e4358df..4879b7db24 100644
--- a/src/qml/jsruntime/qv4functionobject.cpp
+++ b/src/qml/jsruntime/qv4functionobject.cpp
@@ -361,7 +361,7 @@ ReturnedValue FunctionPrototype::method_call(CallContext *ctx)
ReturnedValue FunctionPrototype::method_bind(CallContext *ctx)
{
Scope scope(ctx);
- Scoped<FunctionObject> target(scope, ctx->d()->callData->thisObject);
+ ScopedFunctionObject target(scope, ctx->d()->callData->thisObject);
if (!target)
return ctx->engine()->throwTypeError();
diff --git a/src/qml/jsruntime/qv4jsonobject.cpp b/src/qml/jsruntime/qv4jsonobject.cpp
index a34faeed1a..0bd4cec336 100644
--- a/src/qml/jsruntime/qv4jsonobject.cpp
+++ b/src/qml/jsruntime/qv4jsonobject.cpp
@@ -707,7 +707,7 @@ QString Stringify::Str(const QString &key, ValueRef v)
ScopedObject o(scope, value);
if (o) {
ScopedString s(scope, ctx->d()->engine->newString(QStringLiteral("toJSON")));
- Scoped<FunctionObject> toJSON(scope, o->get(s));
+ ScopedFunctionObject toJSON(scope, o->get(s));
if (!!toJSON) {
ScopedCallData callData(scope, 1);
callData->thisObject = value;
diff --git a/src/qml/jsruntime/qv4object.cpp b/src/qml/jsruntime/qv4object.cpp
index 9f53a9b2d5..cc7171de72 100644
--- a/src/qml/jsruntime/qv4object.cpp
+++ b/src/qml/jsruntime/qv4object.cpp
@@ -137,7 +137,7 @@ void Object::defineDefaultProperty(const QString &name, ReturnedValue (*code)(Ca
Scope scope(e);
ScopedString s(scope, e->newIdentifier(name));
ScopedContext global(scope, e->rootContext());
- Scoped<FunctionObject> function(scope, BuiltinFunction::create(global, s, code));
+ ScopedFunctionObject function(scope, BuiltinFunction::create(global, s, code));
function->defineReadonlyProperty(e->id_length, Primitive::fromInt32(argumentCount));
defineDefaultProperty(s, function);
}
@@ -147,7 +147,7 @@ void Object::defineDefaultProperty(String *name, ReturnedValue (*code)(CallConte
ExecutionEngine *e = engine();
Scope scope(e);
ScopedContext global(scope, e->rootContext());
- Scoped<FunctionObject> function(scope, BuiltinFunction::create(global, name, code));
+ ScopedFunctionObject function(scope, BuiltinFunction::create(global, name, code));
function->defineReadonlyProperty(e->id_length, Primitive::fromInt32(argumentCount));
defineDefaultProperty(name, function);
}
diff --git a/src/qml/jsruntime/qv4objectproto.cpp b/src/qml/jsruntime/qv4objectproto.cpp
index 3a6ddee55b..4e90f652e4 100644
--- a/src/qml/jsruntime/qv4objectproto.cpp
+++ b/src/qml/jsruntime/qv4objectproto.cpp
@@ -405,7 +405,7 @@ ReturnedValue ObjectPrototype::method_toLocaleString(CallContext *ctx)
ScopedObject o(scope, ctx->d()->callData->thisObject.toObject(scope.engine));
if (!o)
return Encode::undefined();
- Scoped<FunctionObject> f(scope, o->get(ctx->d()->engine->id_toString));
+ ScopedFunctionObject f(scope, o->get(ctx->d()->engine->id_toString));
if (!f)
return ctx->engine()->throwTypeError();
ScopedCallData callData(scope);
@@ -477,7 +477,7 @@ ReturnedValue ObjectPrototype::method_defineGetter(CallContext *ctx)
return ctx->engine()->throwTypeError();
Scope scope(ctx);
- Scoped<FunctionObject> f(scope, ctx->argument(1));
+ ScopedFunctionObject f(scope, ctx->argument(1));
if (!f)
return ctx->engine()->throwTypeError();
@@ -505,7 +505,7 @@ ReturnedValue ObjectPrototype::method_defineSetter(CallContext *ctx)
return ctx->engine()->throwTypeError();
Scope scope(ctx);
- Scoped<FunctionObject> f(scope, ctx->argument(1));
+ ScopedFunctionObject f(scope, ctx->argument(1));
if (!f)
return ctx->engine()->throwTypeError();
diff --git a/src/qml/jsruntime/qv4runtime.cpp b/src/qml/jsruntime/qv4runtime.cpp
index 9b8912fecb..079b147840 100644
--- a/src/qml/jsruntime/qv4runtime.cpp
+++ b/src/qml/jsruntime/qv4runtime.cpp
@@ -905,7 +905,7 @@ ReturnedValue Runtime::callGlobalLookup(ExecutionEngine *engine, uint index, Cal
Q_ASSERT(callData->thisObject.isUndefined());
Lookup *l = engine->currentContext()->lookups + index;
- Scoped<FunctionObject> o(scope, l->globalGetter(l, engine));
+ ScopedFunctionObject o(scope, l->globalGetter(l, engine));
if (!o)
return engine->throwTypeError();
@@ -966,7 +966,7 @@ ReturnedValue Runtime::callProperty(ExecutionEngine *engine, int nameIndex, Call
callData->thisObject = baseObject.asReturnedValue();
}
- Scoped<FunctionObject> o(scope, baseObject->get(name));
+ ScopedFunctionObject o(scope, baseObject->get(name));
if (!o) {
QString error = QStringLiteral("Property '%1' of object %2 is not a function").arg(name->toQString(), callData->thisObject.toQStringNoThrow());
return engine->throwTypeError(error);
diff --git a/src/qml/jsruntime/qv4stringobject.cpp b/src/qml/jsruntime/qv4stringobject.cpp
index 4dd4d5a8d4..df6c8c44a5 100644
--- a/src/qml/jsruntime/qv4stringobject.cpp
+++ b/src/qml/jsruntime/qv4stringobject.cpp
@@ -387,7 +387,7 @@ ReturnedValue StringPrototype::method_match(CallContext *context)
// ### use the standard builtin function, not the one that might be redefined in the proto
ScopedString execString(scope, scope.engine->newString(QStringLiteral("exec")));
- Scoped<FunctionObject> exec(scope, scope.engine->regExpPrototype.asObject()->get(execString));
+ ScopedFunctionObject exec(scope, scope.engine->regExpPrototype.asObject()->get(execString));
ScopedCallData callData(scope, 1);
callData->thisObject = rx;
@@ -536,7 +536,7 @@ ReturnedValue StringPrototype::method_replace(CallContext *ctx)
QString result;
ScopedValue replacement(scope);
ScopedValue replaceValue(scope, ctx->argument(1));
- Scoped<FunctionObject> searchCallback(scope, replaceValue);
+ ScopedFunctionObject searchCallback(scope, replaceValue);
if (!!searchCallback) {
result.reserve(string.length() + 10*numStringMatches);
ScopedCallData callData(scope, numCaptures + 2);
diff --git a/src/qml/jsruntime/qv4typedarray.cpp b/src/qml/jsruntime/qv4typedarray.cpp
index 088c5e1bf8..74adc2e38b 100644
--- a/src/qml/jsruntime/qv4typedarray.cpp
+++ b/src/qml/jsruntime/qv4typedarray.cpp
@@ -560,7 +560,7 @@ ReturnedValue TypedArrayPrototype::method_subarray(CallContext *ctx)
int newLen = end - begin;
- Scoped<FunctionObject> constructor(scope, a->get(scope.engine->id_constructor));
+ ScopedFunctionObject constructor(scope, a->get(scope.engine->id_constructor));
if (!constructor)
return scope.engine->throwTypeError();