aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime
diff options
context:
space:
mode:
authorOleg Shparber <trollixx@gmail.com>2014-12-31 10:37:47 -0800
committerOleg Shparber <trollixx@gmail.com>2015-01-03 23:29:57 +0100
commit2fe82c505d09fdf372f1d4c5992a3a0b0dc98f33 (patch)
tree3961702f98d9f553e4c90e9eb074a8096c48ad05 /src/qml/jsruntime
parent4a9ed3de7d92809cf575f245f55d4f422b4983c3 (diff)
Use QV4::ScopedObject typedef instead of actual type
Change-Id: I0b68c534ea513a7c230b12114f6b42b069f9864b Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/jsruntime')
-rw-r--r--src/qml/jsruntime/qv4arrayobject.cpp16
-rw-r--r--src/qml/jsruntime/qv4engine.cpp12
-rw-r--r--src/qml/jsruntime/qv4functionobject.cpp4
-rw-r--r--src/qml/jsruntime/qv4jsonobject.cpp4
-rw-r--r--src/qml/jsruntime/qv4lookup.cpp2
-rw-r--r--src/qml/jsruntime/qv4object_p.h2
-rw-r--r--src/qml/jsruntime/qv4objectproto.cpp50
-rw-r--r--src/qml/jsruntime/qv4qobjectwrapper.cpp4
-rw-r--r--src/qml/jsruntime/qv4runtime.cpp14
-rw-r--r--src/qml/jsruntime/qv4script.cpp2
-rw-r--r--src/qml/jsruntime/qv4sequenceobject.cpp4
-rw-r--r--src/qml/jsruntime/qv4serialize.cpp2
-rw-r--r--src/qml/jsruntime/qv4string.cpp4
13 files changed, 60 insertions, 60 deletions
diff --git a/src/qml/jsruntime/qv4arrayobject.cpp b/src/qml/jsruntime/qv4arrayobject.cpp
index e2ff0b46e2..2d6955efc9 100644
--- a/src/qml/jsruntime/qv4arrayobject.cpp
+++ b/src/qml/jsruntime/qv4arrayobject.cpp
@@ -438,7 +438,7 @@ ReturnedValue ArrayPrototype::method_slice(CallContext *ctx)
ReturnedValue ArrayPrototype::method_sort(CallContext *ctx)
{
Scope scope(ctx);
- Scoped<Object> instance(scope, ctx->d()->callData->thisObject.toObject(scope.engine));
+ ScopedObject instance(scope, ctx->d()->callData->thisObject.toObject(scope.engine));
if (!instance)
return Encode::undefined();
@@ -684,7 +684,7 @@ ReturnedValue ArrayPrototype::method_lastIndexOf(CallContext *ctx)
ReturnedValue ArrayPrototype::method_every(CallContext *ctx)
{
Scope scope(ctx);
- Scoped<Object> instance(scope, ctx->d()->callData->thisObject.toObject(scope.engine));
+ ScopedObject instance(scope, ctx->d()->callData->thisObject.toObject(scope.engine));
if (!instance)
return Encode::undefined();
@@ -718,7 +718,7 @@ ReturnedValue ArrayPrototype::method_every(CallContext *ctx)
ReturnedValue ArrayPrototype::method_some(CallContext *ctx)
{
Scope scope(ctx);
- Scoped<Object> instance(scope, ctx->d()->callData->thisObject.toObject(scope.engine));
+ ScopedObject instance(scope, ctx->d()->callData->thisObject.toObject(scope.engine));
if (!instance)
return Encode::undefined();
@@ -752,7 +752,7 @@ ReturnedValue ArrayPrototype::method_some(CallContext *ctx)
ReturnedValue ArrayPrototype::method_forEach(CallContext *ctx)
{
Scope scope(ctx);
- Scoped<Object> instance(scope, ctx->d()->callData->thisObject.toObject(scope.engine));
+ ScopedObject instance(scope, ctx->d()->callData->thisObject.toObject(scope.engine));
if (!instance)
return Encode::undefined();
@@ -783,7 +783,7 @@ ReturnedValue ArrayPrototype::method_forEach(CallContext *ctx)
ReturnedValue ArrayPrototype::method_map(CallContext *ctx)
{
Scope scope(ctx);
- Scoped<Object> instance(scope, ctx->d()->callData->thisObject.toObject(scope.engine));
+ ScopedObject instance(scope, ctx->d()->callData->thisObject.toObject(scope.engine));
if (!instance)
return Encode::undefined();
@@ -820,7 +820,7 @@ ReturnedValue ArrayPrototype::method_map(CallContext *ctx)
ReturnedValue ArrayPrototype::method_filter(CallContext *ctx)
{
Scope scope(ctx);
- Scoped<Object> instance(scope, ctx->d()->callData->thisObject.toObject(scope.engine));
+ ScopedObject instance(scope, ctx->d()->callData->thisObject.toObject(scope.engine));
if (!instance)
return Encode::undefined();
@@ -861,7 +861,7 @@ ReturnedValue ArrayPrototype::method_filter(CallContext *ctx)
ReturnedValue ArrayPrototype::method_reduce(CallContext *ctx)
{
Scope scope(ctx);
- Scoped<Object> instance(scope, ctx->d()->callData->thisObject.toObject(scope.engine));
+ ScopedObject instance(scope, ctx->d()->callData->thisObject.toObject(scope.engine));
if (!instance)
return Encode::undefined();
@@ -911,7 +911,7 @@ ReturnedValue ArrayPrototype::method_reduce(CallContext *ctx)
ReturnedValue ArrayPrototype::method_reduceRight(CallContext *ctx)
{
Scope scope(ctx);
- Scoped<Object> instance(scope, ctx->d()->callData->thisObject.toObject(scope.engine));
+ ScopedObject instance(scope, ctx->d()->callData->thisObject.toObject(scope.engine));
if (!instance)
return Encode::undefined();
diff --git a/src/qml/jsruntime/qv4engine.cpp b/src/qml/jsruntime/qv4engine.cpp
index 239a799a29..092b113cc3 100644
--- a/src/qml/jsruntime/qv4engine.cpp
+++ b/src/qml/jsruntime/qv4engine.cpp
@@ -1056,14 +1056,14 @@ ReturnedValue ExecutionEngine::throwError(const QString &message)
ReturnedValue ExecutionEngine::throwSyntaxError(const QString &message, const QString &fileName, int line, int column)
{
Scope scope(this);
- Scoped<Object> error(scope, newSyntaxErrorObject(message, fileName, line, column));
+ ScopedObject error(scope, newSyntaxErrorObject(message, fileName, line, column));
return throwError(error);
}
ReturnedValue ExecutionEngine::throwSyntaxError(const QString &message)
{
Scope scope(this);
- Scoped<Object> error(scope, newSyntaxErrorObject(message));
+ ScopedObject error(scope, newSyntaxErrorObject(message));
return throwError(error);
}
@@ -1071,14 +1071,14 @@ ReturnedValue ExecutionEngine::throwSyntaxError(const QString &message)
ReturnedValue ExecutionEngine::throwTypeError()
{
Scope scope(this);
- Scoped<Object> error(scope, newTypeErrorObject(QStringLiteral("Type error")));
+ ScopedObject error(scope, newTypeErrorObject(QStringLiteral("Type error")));
return throwError(error);
}
ReturnedValue ExecutionEngine::throwTypeError(const QString &message)
{
Scope scope(this);
- Scoped<Object> error(scope, newTypeErrorObject(message));
+ ScopedObject error(scope, newTypeErrorObject(message));
return throwError(error);
}
@@ -1087,7 +1087,7 @@ ReturnedValue ExecutionEngine::throwReferenceError(const ValueRef value)
Scope scope(this);
ScopedString s(scope, value->toString(this));
QString msg = s->toQString() + QStringLiteral(" is not defined");
- Scoped<Object> error(scope, newReferenceErrorObject(msg));
+ ScopedObject error(scope, newReferenceErrorObject(msg));
return throwError(error);
}
@@ -1095,7 +1095,7 @@ ReturnedValue ExecutionEngine::throwReferenceError(const QString &message, const
{
Scope scope(this);
QString msg = message;
- Scoped<Object> error(scope, newReferenceErrorObject(msg, fileName, line, column));
+ ScopedObject error(scope, newReferenceErrorObject(msg, fileName, line, column));
return throwError(error);
}
diff --git a/src/qml/jsruntime/qv4functionobject.cpp b/src/qml/jsruntime/qv4functionobject.cpp
index 4879b7db24..081321e956 100644
--- a/src/qml/jsruntime/qv4functionobject.cpp
+++ b/src/qml/jsruntime/qv4functionobject.cpp
@@ -148,7 +148,7 @@ void FunctionObject::init(String *n, bool createProto)
ensureMemberIndex(s.engine, Heap::FunctionObject::Index_Prototype);
if (createProto) {
- Scoped<Object> proto(s, scope()->engine->newObject(s.engine->protoClass, s.engine->objectPrototype.asObject()));
+ ScopedObject proto(s, scope()->engine->newObject(s.engine->protoClass, s.engine->objectPrototype.asObject()));
proto->ensureMemberIndex(s.engine, Heap::FunctionObject::Index_ProtoConstructor);
proto->memberData()->data[Heap::FunctionObject::Index_ProtoConstructor] = this->asReturnedValue();
memberData()->data[Heap::FunctionObject::Index_Prototype] = proto.asReturnedValue();
@@ -502,7 +502,7 @@ ReturnedValue SimpleScriptFunction::construct(Managed *that, CallData *callData)
}
Q_ASSERT(v4->currentContext() == &ctx);
- Scoped<Object> result(scope, Q_V4_PROFILE(v4, f->function()));
+ ScopedObject result(scope, Q_V4_PROFILE(v4, f->function()));
if (f->function()->compiledFunction->hasQmlDependencies())
QmlContextWrapper::registerQmlDependencies(v4, f->function()->compiledFunction);
diff --git a/src/qml/jsruntime/qv4jsonobject.cpp b/src/qml/jsruntime/qv4jsonobject.cpp
index 53f9d36eac..f320630181 100644
--- a/src/qml/jsruntime/qv4jsonobject.cpp
+++ b/src/qml/jsruntime/qv4jsonobject.cpp
@@ -914,7 +914,7 @@ ReturnedValue JsonObject::method_stringify(CallContext *ctx)
Stringify stringify(ctx);
- Scoped<Object> o(scope, ctx->argument(1));
+ ScopedObject o(scope, ctx->argument(1));
if (o) {
stringify.replacerFunction = o->asFunctionObject();
if (o->isArrayObject()) {
@@ -999,7 +999,7 @@ QJsonValue JsonObject::toJsonValue(const ValueRef value,
QV4::ReturnedValue JsonObject::fromJsonObject(ExecutionEngine *engine, const QJsonObject &object)
{
Scope scope(engine);
- Scoped<Object> o(scope, engine->newObject());
+ ScopedObject o(scope, engine->newObject());
ScopedString s(scope);
ScopedValue v(scope);
for (QJsonObject::const_iterator it = object.begin(); it != object.end(); ++it) {
diff --git a/src/qml/jsruntime/qv4lookup.cpp b/src/qml/jsruntime/qv4lookup.cpp
index 8a9a6c39e1..c0297696db 100644
--- a/src/qml/jsruntime/qv4lookup.cpp
+++ b/src/qml/jsruntime/qv4lookup.cpp
@@ -120,7 +120,7 @@ ReturnedValue Lookup::indexedGetterFallback(Lookup *l, const ValueRef object, co
Scope scope(l->engine);
uint idx = index->asArrayIndex();
- Scoped<Object> o(scope, object);
+ ScopedObject o(scope, object);
if (!o) {
if (idx < UINT_MAX) {
if (String *str = object->asString()) {
diff --git a/src/qml/jsruntime/qv4object_p.h b/src/qml/jsruntime/qv4object_p.h
index 084bd85fc5..c256b1f34b 100644
--- a/src/qml/jsruntime/qv4object_p.h
+++ b/src/qml/jsruntime/qv4object_p.h
@@ -202,7 +202,7 @@ public:
inline bool protoHasArray() {
Scope scope(engine());
- Scoped<Object> p(scope, this);
+ ScopedObject p(scope, this);
while ((p = p->prototype()))
if (p->arrayData())
diff --git a/src/qml/jsruntime/qv4objectproto.cpp b/src/qml/jsruntime/qv4objectproto.cpp
index 096647d425..34a9b9cb64 100644
--- a/src/qml/jsruntime/qv4objectproto.cpp
+++ b/src/qml/jsruntime/qv4objectproto.cpp
@@ -61,8 +61,8 @@ ReturnedValue ObjectCtor::construct(Managed *that, CallData *callData)
Scope scope(v4);
ObjectCtor *ctor = static_cast<ObjectCtor *>(that);
if (!callData->argc || callData->args[0].isUndefined() || callData->args[0].isNull()) {
- Scoped<Object> obj(scope, v4->newObject());
- Scoped<Object> proto(scope, ctor->get(v4->id_prototype));
+ ScopedObject obj(scope, v4->newObject());
+ ScopedObject proto(scope, ctor->get(v4->id_prototype));
if (!!proto)
obj->setPrototype(proto);
return obj.asReturnedValue();
@@ -118,18 +118,18 @@ void ObjectPrototype::init(ExecutionEngine *v4, Object *ctor)
ReturnedValue ObjectPrototype::method_getPrototypeOf(CallContext *ctx)
{
Scope scope(ctx);
- Scoped<Object> o(scope, ctx->argument(0));
+ ScopedObject o(scope, ctx->argument(0));
if (!o)
return ctx->engine()->throwTypeError();
- Scoped<Object> p(scope, o->prototype());
+ ScopedObject p(scope, o->prototype());
return !!p ? p->asReturnedValue() : Encode::null();
}
ReturnedValue ObjectPrototype::method_getOwnPropertyDescriptor(CallContext *ctx)
{
Scope scope(ctx);
- Scoped<Object> O(scope, ctx->argument(0));
+ ScopedObject O(scope, ctx->argument(0));
if (!O)
return ctx->engine()->throwTypeError();
@@ -163,7 +163,7 @@ ReturnedValue ObjectPrototype::method_create(CallContext *ctx)
if (!O->isObject() && !O->isNull())
return ctx->engine()->throwTypeError();
- Scoped<Object> newObject(scope, ctx->d()->engine->newObject());
+ ScopedObject newObject(scope, ctx->d()->engine->newObject());
newObject->setPrototype(O->asObject());
if (ctx->d()->callData->argc > 1 && !ctx->d()->callData->args[1].isUndefined()) {
@@ -177,7 +177,7 @@ ReturnedValue ObjectPrototype::method_create(CallContext *ctx)
ReturnedValue ObjectPrototype::method_defineProperty(CallContext *ctx)
{
Scope scope(ctx);
- Scoped<Object> O(scope, ctx->argument(0));
+ ScopedObject O(scope, ctx->argument(0));
if (!O)
return ctx->engine()->throwTypeError();
@@ -201,11 +201,11 @@ ReturnedValue ObjectPrototype::method_defineProperty(CallContext *ctx)
ReturnedValue ObjectPrototype::method_defineProperties(CallContext *ctx)
{
Scope scope(ctx);
- Scoped<Object> O(scope, ctx->argument(0));
+ ScopedObject O(scope, ctx->argument(0));
if (!O)
return ctx->engine()->throwTypeError();
- Scoped<Object> o(scope, ctx->argument(1), Scoped<Object>::Convert);
+ ScopedObject o(scope, ctx->argument(1), ScopedObject::Convert);
if (scope.engine->hasException)
return Encode::undefined();
ScopedValue val(scope);
@@ -240,7 +240,7 @@ ReturnedValue ObjectPrototype::method_defineProperties(CallContext *ctx)
ReturnedValue ObjectPrototype::method_seal(CallContext *ctx)
{
Scope scope(ctx);
- Scoped<Object> o(scope, ctx->argument(0));
+ ScopedObject o(scope, ctx->argument(0));
if (!o)
return ctx->engine()->throwTypeError();
@@ -262,7 +262,7 @@ ReturnedValue ObjectPrototype::method_seal(CallContext *ctx)
ReturnedValue ObjectPrototype::method_freeze(CallContext *ctx)
{
Scope scope(ctx);
- Scoped<Object> o(scope, ctx->argument(0));
+ ScopedObject o(scope, ctx->argument(0));
if (!o)
return ctx->engine()->throwTypeError();
@@ -288,7 +288,7 @@ ReturnedValue ObjectPrototype::method_freeze(CallContext *ctx)
ReturnedValue ObjectPrototype::method_preventExtensions(CallContext *ctx)
{
Scope scope(ctx);
- Scoped<Object> o(scope, ctx->argument(0));
+ ScopedObject o(scope, ctx->argument(0));
if (!o)
return ctx->engine()->throwTypeError();
@@ -299,7 +299,7 @@ ReturnedValue ObjectPrototype::method_preventExtensions(CallContext *ctx)
ReturnedValue ObjectPrototype::method_isSealed(CallContext *ctx)
{
Scope scope(ctx);
- Scoped<Object> o(scope, ctx->argument(0));
+ ScopedObject o(scope, ctx->argument(0));
if (!o)
return ctx->engine()->throwTypeError();
@@ -328,7 +328,7 @@ ReturnedValue ObjectPrototype::method_isSealed(CallContext *ctx)
ReturnedValue ObjectPrototype::method_isFrozen(CallContext *ctx)
{
Scope scope(ctx);
- Scoped<Object> o(scope, ctx->argument(0));
+ ScopedObject o(scope, ctx->argument(0));
if (!o)
return ctx->engine()->throwTypeError();
@@ -357,7 +357,7 @@ ReturnedValue ObjectPrototype::method_isFrozen(CallContext *ctx)
ReturnedValue ObjectPrototype::method_isExtensible(CallContext *ctx)
{
Scope scope(ctx);
- Scoped<Object> o(scope, ctx->argument(0));
+ ScopedObject o(scope, ctx->argument(0));
if (!o)
return ctx->engine()->throwTypeError();
@@ -367,7 +367,7 @@ ReturnedValue ObjectPrototype::method_isExtensible(CallContext *ctx)
ReturnedValue ObjectPrototype::method_keys(CallContext *ctx)
{
Scope scope(ctx);
- Scoped<Object> o(scope, ctx->argument(0));
+ ScopedObject o(scope, ctx->argument(0));
if (!o)
return ctx->engine()->throwTypeError();
@@ -428,7 +428,7 @@ ReturnedValue ObjectPrototype::method_hasOwnProperty(CallContext *ctx)
ScopedString P(scope, ctx->argument(0), ScopedString::Convert);
if (scope.engine->hasException)
return Encode::undefined();
- Scoped<Object> O(scope, ctx->d()->callData->thisObject, Scoped<Object>::Convert);
+ ScopedObject O(scope, ctx->d()->callData->thisObject, ScopedObject::Convert);
if (scope.engine->hasException)
return Encode::undefined();
bool r = O->hasOwnProperty(P);
@@ -440,14 +440,14 @@ ReturnedValue ObjectPrototype::method_hasOwnProperty(CallContext *ctx)
ReturnedValue ObjectPrototype::method_isPrototypeOf(CallContext *ctx)
{
Scope scope(ctx);
- Scoped<Object> V(scope, ctx->argument(0));
+ ScopedObject V(scope, ctx->argument(0));
if (!V)
return Encode(false);
- Scoped<Object> O(scope, ctx->d()->callData->thisObject, Scoped<Object>::Convert);
+ ScopedObject O(scope, ctx->d()->callData->thisObject, ScopedObject::Convert);
if (scope.engine->hasException)
return Encode::undefined();
- Scoped<Object> proto(scope, V->prototype());
+ ScopedObject proto(scope, V->prototype());
while (proto) {
if (O->d() == proto->d())
return Encode(true);
@@ -463,7 +463,7 @@ ReturnedValue ObjectPrototype::method_propertyIsEnumerable(CallContext *ctx)
if (scope.engine->hasException)
return Encode::undefined();
- Scoped<Object> o(scope, ctx->d()->callData->thisObject, Scoped<Object>::Convert);
+ ScopedObject o(scope, ctx->d()->callData->thisObject, ScopedObject::Convert);
if (scope.engine->hasException)
return Encode::undefined();
PropertyAttributes attrs;
@@ -485,7 +485,7 @@ ReturnedValue ObjectPrototype::method_defineGetter(CallContext *ctx)
if (scope.engine->hasException)
return Encode::undefined();
- Scoped<Object> o(scope, ctx->d()->callData->thisObject);
+ ScopedObject o(scope, ctx->d()->callData->thisObject);
if (!o) {
if (!ctx->d()->callData->thisObject.isUndefined())
return Encode::undefined();
@@ -513,7 +513,7 @@ ReturnedValue ObjectPrototype::method_defineSetter(CallContext *ctx)
if (scope.engine->hasException)
return Encode::undefined();
- Scoped<Object> o(scope, ctx->d()->callData->thisObject);
+ ScopedObject o(scope, ctx->d()->callData->thisObject);
if (!o) {
if (!ctx->d()->callData->thisObject.isUndefined())
return Encode::undefined();
@@ -540,7 +540,7 @@ ReturnedValue ObjectPrototype::method_get_proto(CallContext *ctx)
ReturnedValue ObjectPrototype::method_set_proto(CallContext *ctx)
{
Scope scope(ctx);
- Scoped<Object> o(scope, ctx->d()->callData->thisObject);
+ ScopedObject o(scope, ctx->d()->callData->thisObject);
if (!o || !ctx->d()->callData->argc)
return ctx->engine()->throwTypeError();
@@ -549,7 +549,7 @@ ReturnedValue ObjectPrototype::method_set_proto(CallContext *ctx)
return Encode::undefined();
}
- Scoped<Object> p(scope, ctx->d()->callData->args[0]);
+ ScopedObject p(scope, ctx->d()->callData->args[0]);
bool ok = false;
if (!!p) {
if (o->prototype() == p->d()) {
diff --git a/src/qml/jsruntime/qv4qobjectwrapper.cpp b/src/qml/jsruntime/qv4qobjectwrapper.cpp
index 021b864c0f..9355f31115 100644
--- a/src/qml/jsruntime/qv4qobjectwrapper.cpp
+++ b/src/qml/jsruntime/qv4qobjectwrapper.cpp
@@ -340,7 +340,7 @@ ReturnedValue QObjectWrapper::getProperty(QObject *object, ExecutionContext *ctx
Q_ASSERT(vmemo);
return vmemo->vmeMethod(property->coreIndex);
} else if (property->isV4Function()) {
- QV4::Scoped<QV4::Object> qmlcontextobject(scope, ctx->d()->engine->qmlContextObject());
+ QV4::ScopedObject qmlcontextobject(scope, ctx->d()->engine->qmlContextObject());
ScopedContext global(scope, scope.engine->rootContext());
return QV4::QObjectMethod::create(global, object, property->coreIndex, qmlcontextobject);
} else if (property->isSignalHandler()) {
@@ -601,7 +601,7 @@ ReturnedValue QObjectWrapper::wrap(ExecutionEngine *engine, QObject *object)
} else {
// If this object is tainted, we have to check to see if it is in our
// tainted object list
- Scoped<Object> alternateWrapper(scope, (Object *)0);
+ ScopedObject alternateWrapper(scope, (Object *)0);
if (engine->m_multiplyWrappedQObjects && ddata->hasTaintedV8Object)
alternateWrapper = engine->m_multiplyWrappedQObjects->value(object);
diff --git a/src/qml/jsruntime/qv4runtime.cpp b/src/qml/jsruntime/qv4runtime.cpp
index c045655da9..a77604fe5c 100644
--- a/src/qml/jsruntime/qv4runtime.cpp
+++ b/src/qml/jsruntime/qv4runtime.cpp
@@ -573,7 +573,7 @@ ReturnedValue Runtime::getElement(ExecutionEngine *engine, const ValueRef object
Scope scope(engine);
uint idx = index->asArrayIndex();
- Scoped<Object> o(scope, object);
+ ScopedObject o(scope, object);
if (!o) {
if (idx < UINT_MAX) {
if (String *str = object->asString()) {
@@ -638,7 +638,7 @@ void Runtime::setElement(ExecutionEngine *engine, const ValueRef object, const V
ReturnedValue Runtime::foreachIterator(ExecutionEngine *engine, const ValueRef in)
{
Scope scope(engine);
- Scoped<Object> o(scope, (Object *)0);
+ ScopedObject o(scope, (Object *)0);
if (!in->isNullOrUndefined())
o = in->toObject(engine);
return engine->newForEachIteratorObject(o)->asReturnedValue();
@@ -668,7 +668,7 @@ ReturnedValue Runtime::getProperty(ExecutionEngine *engine, const ValueRef objec
Scope scope(engine);
ScopedString name(scope, engine->currentContext()->compilationUnit->runtimeStrings[nameIndex]);
- Scoped<Object> o(scope, object);
+ ScopedObject o(scope, object);
if (o)
return o->get(name);
@@ -952,7 +952,7 @@ ReturnedValue Runtime::callProperty(ExecutionEngine *engine, int nameIndex, Call
{
Scope scope(engine);
ScopedString name(scope, engine->currentContext()->compilationUnit->runtimeStrings[nameIndex]);
- Scoped<Object> baseObject(scope, callData->thisObject);
+ ScopedObject baseObject(scope, callData->thisObject);
if (!baseObject) {
Q_ASSERT(!callData->thisObject.isEmpty());
if (callData->thisObject.isNullOrUndefined()) {
@@ -1018,7 +1018,7 @@ ReturnedValue Runtime::constructGlobalLookup(ExecutionEngine *engine, uint index
Q_ASSERT(callData->thisObject.isUndefined());
Lookup *l = engine->currentContext()->lookups + index;
- Scoped<Object> f(scope, l->globalGetter(l, engine));
+ ScopedObject f(scope, l->globalGetter(l, engine));
if (!f)
return engine->throwTypeError();
@@ -1059,7 +1059,7 @@ ReturnedValue Runtime::constructProperty(ExecutionEngine *engine, int nameIndex,
if (scope.engine->hasException)
return Encode::undefined();
- Scoped<Object> f(scope, thisObject->get(name));
+ ScopedObject f(scope, thisObject->get(name));
if (!f)
return engine->throwTypeError();
@@ -1200,7 +1200,7 @@ ReturnedValue Runtime::objectLiteral(ExecutionEngine *engine, const QV4::Value *
{
Scope scope(engine);
QV4::InternalClass *klass = engine->currentContext()->compilationUnit->runtimeClasses[classId];
- Scoped<Object> o(scope, engine->newObject(klass, engine->objectPrototype.asObject()));
+ ScopedObject o(scope, engine->newObject(klass, engine->objectPrototype.asObject()));
{
bool needSparseArray = arrayGetterSetterCountAndFlags >> 30;
diff --git a/src/qml/jsruntime/qv4script.cpp b/src/qml/jsruntime/qv4script.cpp
index d4eb388d6e..e696dc838c 100644
--- a/src/qml/jsruntime/qv4script.cpp
+++ b/src/qml/jsruntime/qv4script.cpp
@@ -279,7 +279,7 @@ void Script::parse()
if (!vmFunction) {
// ### FIX file/line number
- Scoped<Object> error(valueScope, v4->newSyntaxErrorObject(QStringLiteral("Syntax error")));
+ ScopedObject error(valueScope, v4->newSyntaxErrorObject(QStringLiteral("Syntax error")));
v4->throwError(error);
}
}
diff --git a/src/qml/jsruntime/qv4sequenceobject.cpp b/src/qml/jsruntime/qv4sequenceobject.cpp
index 3c8b83545f..fa6af4501e 100644
--- a/src/qml/jsruntime/qv4sequenceobject.cpp
+++ b/src/qml/jsruntime/qv4sequenceobject.cpp
@@ -590,7 +590,7 @@ bool SequencePrototype::isSequenceType(int sequenceTypeId)
#define NEW_REFERENCE_SEQUENCE(ElementType, ElementTypeName, SequenceType, unused) \
if (sequenceType == qMetaTypeId<SequenceType>()) { \
- QV4::Scoped<QV4::Object> obj(scope, engine->memoryManager->alloc<QQml##ElementTypeName##List>(engine, object, propertyIndex)); \
+ QV4::ScopedObject obj(scope, engine->memoryManager->alloc<QQml##ElementTypeName##List>(engine, object, propertyIndex)); \
return obj.asReturnedValue(); \
} else
@@ -608,7 +608,7 @@ ReturnedValue SequencePrototype::newSequence(QV4::ExecutionEngine *engine, int s
#define NEW_COPY_SEQUENCE(ElementType, ElementTypeName, SequenceType, unused) \
if (sequenceType == qMetaTypeId<SequenceType>()) { \
- QV4::Scoped<QV4::Object> obj(scope, engine->memoryManager->alloc<QQml##ElementTypeName##List>(engine, v.value<SequenceType >())); \
+ QV4::ScopedObject obj(scope, engine->memoryManager->alloc<QQml##ElementTypeName##List>(engine, v.value<SequenceType >())); \
return obj.asReturnedValue(); \
} else
diff --git a/src/qml/jsruntime/qv4serialize.cpp b/src/qml/jsruntime/qv4serialize.cpp
index 3d368375bd..2b5513fa96 100644
--- a/src/qml/jsruntime/qv4serialize.cpp
+++ b/src/qml/jsruntime/qv4serialize.cpp
@@ -323,7 +323,7 @@ ReturnedValue Serialize::deserialize(const char *&data, ExecutionEngine *engine)
case WorkerObject:
{
quint32 size = headersize(header);
- Scoped<Object> o(scope, engine->newObject());
+ ScopedObject o(scope, engine->newObject());
ScopedValue name(scope);
ScopedString n(scope);
ScopedValue value(scope);
diff --git a/src/qml/jsruntime/qv4string.cpp b/src/qml/jsruntime/qv4string.cpp
index e6a7a2f7a7..52756734c5 100644
--- a/src/qml/jsruntime/qv4string.cpp
+++ b/src/qml/jsruntime/qv4string.cpp
@@ -178,7 +178,7 @@ void String::put(Managed *m, String *name, const ValueRef value)
if (scope.hasException())
return;
ScopedString that(scope, static_cast<String *>(m));
- Scoped<Object> o(scope, that->engine()->newStringObject(that));
+ ScopedObject o(scope, that->engine()->newStringObject(that));
o->put(name, value);
}
@@ -189,7 +189,7 @@ void String::putIndexed(Managed *m, uint index, const ValueRef value)
return;
ScopedString that(scope, static_cast<String *>(m));
- Scoped<Object> o(scope, that->engine()->newStringObject(that));
+ ScopedObject o(scope, that->engine()->newStringObject(that));
o->putIndexed(index, value);
}