aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/imports/localstorage/plugin.cpp6
-rw-r--r--src/qml/compiler/qv4isel_masm.cpp2
-rw-r--r--src/qml/jsapi/qjsvalue.cpp6
-rw-r--r--src/qml/jsruntime/qv4argumentsobject.cpp2
-rw-r--r--src/qml/jsruntime/qv4arrayobject.cpp20
-rw-r--r--src/qml/jsruntime/qv4context.cpp2
-rw-r--r--src/qml/jsruntime/qv4dateobject.cpp4
-rw-r--r--src/qml/jsruntime/qv4errorobject.cpp2
-rw-r--r--src/qml/jsruntime/qv4functionobject.cpp18
-rw-r--r--src/qml/jsruntime/qv4globalobject.cpp2
-rw-r--r--src/qml/jsruntime/qv4include.cpp2
-rw-r--r--src/qml/jsruntime/qv4jsonobject.cpp4
-rw-r--r--src/qml/jsruntime/qv4lookup.cpp16
-rw-r--r--src/qml/jsruntime/qv4numberobject.cpp2
-rw-r--r--src/qml/jsruntime/qv4object.cpp18
-rw-r--r--src/qml/jsruntime/qv4objectproto.cpp2
-rw-r--r--src/qml/jsruntime/qv4qobjectwrapper.cpp4
-rw-r--r--src/qml/jsruntime/qv4regexpobject.cpp6
-rw-r--r--src/qml/jsruntime/qv4runtime.cpp38
-rw-r--r--src/qml/jsruntime/qv4runtime_p.h4
-rw-r--r--src/qml/jsruntime/qv4scopedvalue_p.h16
-rw-r--r--src/qml/jsruntime/qv4script.cpp4
-rw-r--r--src/qml/jsruntime/qv4sequenceobject.cpp2
-rw-r--r--src/qml/jsruntime/qv4sparsearray.cpp2
-rw-r--r--src/qml/jsruntime/qv4stringobject.cpp10
-rw-r--r--src/qml/jsruntime/qv4value.cpp6
-rw-r--r--src/qml/qml/qqmlcomponent.cpp8
-rw-r--r--src/qml/qml/qqmljavascriptexpression.cpp2
-rw-r--r--src/qml/qml/qqmlvmemetaobject.cpp2
-rw-r--r--src/qml/qml/qqmlxmlhttprequest.cpp2
-rw-r--r--src/qml/qml/v8/qv8engine.cpp2
-rw-r--r--src/qml/types/qquickworkerscript.cpp6
-rw-r--r--src/quick/items/context2d/qquickcanvasitem.cpp2
-rw-r--r--tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp6
34 files changed, 115 insertions, 115 deletions
diff --git a/src/imports/localstorage/plugin.cpp b/src/imports/localstorage/plugin.cpp
index f485032a35..2cb62eb5c0 100644
--- a/src/imports/localstorage/plugin.cpp
+++ b/src/imports/localstorage/plugin.cpp
@@ -315,7 +315,7 @@ static Value qmlsqldatabase_changeVersion(SimpleCallContext *ctx)
if (ctx->argumentCount < 2)
return Value::undefinedValue();
- ValueScope scope(ctx);
+ Scope scope(ctx);
QQmlSqlDatabaseWrapper *r = ctx->thisObject.as<QQmlSqlDatabaseWrapper>();
if (!r || r->type != QQmlSqlDatabaseWrapper::Database)
@@ -379,7 +379,7 @@ static Value qmlsqldatabase_transaction_shared(SimpleCallContext *ctx, bool read
if (!r || r->type != QQmlSqlDatabaseWrapper::Database)
V4THROW_REFERENCE("Not a SQLDatabase object");
- ValueScope scope(ctx);
+ Scope scope(ctx);
QV8Engine *engine = ctx->engine->v8Engine;
FunctionObject *callback = ctx->argumentCount ? ctx->arguments[0].asFunctionObject() : 0;
@@ -681,7 +681,7 @@ void QQuickLocalStorage::openDatabaseSync(QQmlV4Function *args)
db->version = version;
if (created && dbcreationCallback) {
- ValueScope scope(ctx);
+ Scope scope(ctx);
ScopedCallData callData(scope, 1);
callData->thisObject = engine->global();
callData->args[0] = Value::fromObject(db);
diff --git a/src/qml/compiler/qv4isel_masm.cpp b/src/qml/compiler/qv4isel_masm.cpp
index b1230c079a..9cdeab3036 100644
--- a/src/qml/compiler/qv4isel_masm.cpp
+++ b/src/qml/compiler/qv4isel_masm.cpp
@@ -788,7 +788,7 @@ static void *tryWrapper(ExecutionContext *context, void *localsPtr, MiddleOfFunc
ex.accept(context);
*exceptionVar = ex.value();
try {
- QV4::ValueScope scope(context);
+ QV4::Scope scope(context);
QV4::ScopedValue exception(scope, ex.value());
ExecutionContext *catchContext = __qmljs_builtin_push_catch_scope(exceptionVarName, exception, context);
addressToContinueAt = catchBody(catchContext, localsPtr);
diff --git a/src/qml/jsapi/qjsvalue.cpp b/src/qml/jsapi/qjsvalue.cpp
index 96e318fafb..7325cf8035 100644
--- a/src/qml/jsapi/qjsvalue.cpp
+++ b/src/qml/jsapi/qjsvalue.cpp
@@ -506,7 +506,7 @@ QJSValue QJSValue::call(const QJSValueList &args)
ExecutionEngine *engine = d->engine;
assert(engine);
- ValueScope scope(engine);
+ Scope scope(engine);
ScopedCallData callData(scope, args.length());
callData->thisObject = Value::fromObject(engine->globalObject);
for (int i = 0; i < args.size(); ++i) {
@@ -557,7 +557,7 @@ QJSValue QJSValue::callWithInstance(const QJSValue &instance, const QJSValueList
ExecutionEngine *engine = d->engine;
assert(engine);
- ValueScope scope(engine);
+ Scope scope(engine);
if (!instance.d->checkEngine(engine)) {
qWarning("QJSValue::call() failed: cannot call function with thisObject created in a different engine");
@@ -613,7 +613,7 @@ QJSValue QJSValue::callAsConstructor(const QJSValueList &args)
ExecutionEngine *engine = d->engine;
assert(engine);
- ValueScope scope(engine);
+ Scope scope(engine);
ScopedCallData callData(scope, args.size());
for (int i = 0; i < args.size(); ++i) {
if (!args.at(i).d->checkEngine(engine)) {
diff --git a/src/qml/jsruntime/qv4argumentsobject.cpp b/src/qml/jsruntime/qv4argumentsobject.cpp
index 9a2c38ebea..f4ee1143c9 100644
--- a/src/qml/jsruntime/qv4argumentsobject.cpp
+++ b/src/qml/jsruntime/qv4argumentsobject.cpp
@@ -106,7 +106,7 @@ void ArgumentsObject::destroy(Managed *that)
bool ArgumentsObject::defineOwnProperty(ExecutionContext *ctx, uint index, const Property &desc, PropertyAttributes attrs)
{
- ValueScope scope(ctx);
+ Scope scope(ctx);
uint pidx = propertyIndexFromArrayIndex(index);
Property *pd = arrayData + pidx;
Property map;
diff --git a/src/qml/jsruntime/qv4arrayobject.cpp b/src/qml/jsruntime/qv4arrayobject.cpp
index e8cb5284c8..d0eae3d241 100644
--- a/src/qml/jsruntime/qv4arrayobject.cpp
+++ b/src/qml/jsruntime/qv4arrayobject.cpp
@@ -138,7 +138,7 @@ Value ArrayPrototype::method_toString(SimpleCallContext *ctx)
QV4::Object *o = ctx->thisObject.toObject(ctx);
FunctionObject *f = o->get(ctx->engine->newString("join")).asFunctionObject();
if (f) {
- ValueScope scope(ctx);
+ Scope scope(ctx);
ScopedCallData d(scope, 0);
d->thisObject = ctx->thisObject;
return Value::fromReturnedValue(f->call(d));
@@ -547,7 +547,7 @@ Value ArrayPrototype::method_unshift(SimpleCallContext *ctx)
Value ArrayPrototype::method_indexOf(SimpleCallContext *ctx)
{
- ValueScope scope(ctx);
+ Scope scope(ctx);
Object *instance = ctx->thisObject.toObject(ctx);
uint len = getLength(ctx, instance);
@@ -587,7 +587,7 @@ Value ArrayPrototype::method_indexOf(SimpleCallContext *ctx)
Value ArrayPrototype::method_lastIndexOf(SimpleCallContext *ctx)
{
- ValueScope scope(ctx);
+ Scope scope(ctx);
Object *instance = ctx->thisObject.toObject(ctx);
uint len = getLength(ctx, instance);
@@ -627,7 +627,7 @@ Value ArrayPrototype::method_lastIndexOf(SimpleCallContext *ctx)
Value ArrayPrototype::method_every(SimpleCallContext *ctx)
{
- ValueScope scope(ctx);
+ Scope scope(ctx);
Object *instance = ctx->thisObject.toObject(ctx);
uint len = getLength(ctx, instance);
@@ -660,7 +660,7 @@ Value ArrayPrototype::method_every(SimpleCallContext *ctx)
Value ArrayPrototype::method_some(SimpleCallContext *ctx)
{
- ValueScope scope(ctx);
+ Scope scope(ctx);
Object *instance = ctx->thisObject.toObject(ctx);
uint len = getLength(ctx, instance);
@@ -690,7 +690,7 @@ Value ArrayPrototype::method_some(SimpleCallContext *ctx)
Value ArrayPrototype::method_forEach(SimpleCallContext *ctx)
{
- ValueScope scope(ctx);
+ Scope scope(ctx);
Object *instance = ctx->thisObject.toObject(ctx);
uint len = getLength(ctx, instance);
@@ -718,7 +718,7 @@ Value ArrayPrototype::method_forEach(SimpleCallContext *ctx)
Value ArrayPrototype::method_map(SimpleCallContext *ctx)
{
- ValueScope scope(ctx);
+ Scope scope(ctx);
Object *instance = ctx->thisObject.toObject(ctx);
uint len = getLength(ctx, instance);
@@ -754,7 +754,7 @@ Value ArrayPrototype::method_map(SimpleCallContext *ctx)
Value ArrayPrototype::method_filter(SimpleCallContext *ctx)
{
- ValueScope scope(ctx);
+ Scope scope(ctx);
Object *instance = ctx->thisObject.toObject(ctx);
uint len = getLength(ctx, instance);
@@ -793,7 +793,7 @@ Value ArrayPrototype::method_filter(SimpleCallContext *ctx)
Value ArrayPrototype::method_reduce(SimpleCallContext *ctx)
{
- ValueScope scope(ctx);
+ Scope scope(ctx);
Object *instance = ctx->thisObject.toObject(ctx);
uint len = getLength(ctx, instance);
@@ -839,7 +839,7 @@ Value ArrayPrototype::method_reduce(SimpleCallContext *ctx)
Value ArrayPrototype::method_reduceRight(SimpleCallContext *ctx)
{
- ValueScope scope(ctx);
+ Scope scope(ctx);
Object *instance = ctx->thisObject.toObject(ctx);
uint len = getLength(ctx, instance);
diff --git a/src/qml/jsruntime/qv4context.cpp b/src/qml/jsruntime/qv4context.cpp
index a8cdf30b16..0bcee14064 100644
--- a/src/qml/jsruntime/qv4context.cpp
+++ b/src/qml/jsruntime/qv4context.cpp
@@ -596,7 +596,7 @@ ReturnedValue ExecutionContext::getPropertyAndBase(String *name, Object **base)
void ExecutionContext::throwError(const Value &value)
{
- ValueScope scope(this);
+ Scope scope(this);
ScopedValue v(scope, value);
__qmljs_throw(this, v);
}
diff --git a/src/qml/jsruntime/qv4dateobject.cpp b/src/qml/jsruntime/qv4dateobject.cpp
index 7dc922c3a8..01325aef76 100644
--- a/src/qml/jsruntime/qv4dateobject.cpp
+++ b/src/qml/jsruntime/qv4dateobject.cpp
@@ -662,7 +662,7 @@ Value DateCtor::construct(Managed *m, CallData *callData)
t = currentTime();
else if (callData->argc == 1) {
- ValueScope scope(m->engine());
+ Scope scope(m->engine());
ScopedValue arg(scope, callData->args[0]);
if (DateObject *d = arg->asDateObject())
arg = d->value;
@@ -1291,7 +1291,7 @@ Value DatePrototype::method_toISOString(SimpleCallContext *ctx)
Value DatePrototype::method_toJSON(SimpleCallContext *ctx)
{
- ValueScope scope(ctx);
+ Scope scope(ctx);
ScopedValue O(scope, __qmljs_to_object(ctx, ValueRef(&ctx->thisObject)));
ScopedValue tv(scope, __qmljs_to_primitive(O, NUMBER_HINT));
diff --git a/src/qml/jsruntime/qv4errorobject.cpp b/src/qml/jsruntime/qv4errorobject.cpp
index 0f08d6e758..a02966369f 100644
--- a/src/qml/jsruntime/qv4errorobject.cpp
+++ b/src/qml/jsruntime/qv4errorobject.cpp
@@ -327,7 +327,7 @@ void ErrorPrototype::init(ExecutionEngine *engine, const Value &ctor, Object *ob
Value ErrorPrototype::method_toString(SimpleCallContext *ctx)
{
- ValueScope scope(ctx);
+ Scope scope(ctx);
Object *o = ctx->thisObject.asObject();
if (!o)
diff --git a/src/qml/jsruntime/qv4functionobject.cpp b/src/qml/jsruntime/qv4functionobject.cpp
index 4e08ede286..cb5d4c22e5 100644
--- a/src/qml/jsruntime/qv4functionobject.cpp
+++ b/src/qml/jsruntime/qv4functionobject.cpp
@@ -124,7 +124,7 @@ FunctionObject::~FunctionObject()
Value FunctionObject::newInstance()
{
- ValueScope scope(engine());
+ Scope scope(engine());
ScopedCallData callData(scope, 0);
return construct(callData);
}
@@ -289,7 +289,7 @@ Value FunctionPrototype::method_toString(SimpleCallContext *ctx)
Value FunctionPrototype::method_apply(SimpleCallContext *ctx)
{
- ValueScope scope(ctx);
+ Scope scope(ctx);
FunctionObject *o = ctx->thisObject.asFunctionObject();
if (!o)
ctx->throwTypeError();
@@ -331,7 +331,7 @@ Value FunctionPrototype::method_apply(SimpleCallContext *ctx)
Value FunctionPrototype::method_call(SimpleCallContext *ctx)
{
- ValueScope scope(ctx);
+ Scope scope(ctx);
Value thisArg = ctx->argument(0);
FunctionObject *o = ctx->thisObject.asFunctionObject();
@@ -409,7 +409,7 @@ Value ScriptFunction::construct(Managed *that, CallData *callData)
{
ScriptFunction *f = static_cast<ScriptFunction *>(that);
ExecutionEngine *v4 = f->engine();
- ValueScope scope(v4);
+ Scope scope(v4);
InternalClass *ic = v4->objectClass;
Value proto = f->memberData[Index_Prototype].value;
@@ -442,7 +442,7 @@ ReturnedValue ScriptFunction::call(Managed *that, CallData *callData)
ScriptFunction *f = static_cast<ScriptFunction *>(that);
void *stackSpace;
ExecutionContext *context = f->engine()->current;
- ValueScope scope(context);
+ Scope scope(context);
CallContext *ctx = context->newCallContext(f, callData);
if (!f->strictMode && !callData->thisObject.isObject()) {
@@ -505,7 +505,7 @@ Value SimpleScriptFunction::construct(Managed *that, CallData *callData)
{
SimpleScriptFunction *f = static_cast<SimpleScriptFunction *>(that);
ExecutionEngine *v4 = f->engine();
- ValueScope scope(v4);
+ Scope scope(v4);
InternalClass *ic = v4->objectClass;
Value proto = f->memberData[Index_Prototype].value;
@@ -539,7 +539,7 @@ ReturnedValue SimpleScriptFunction::call(Managed *that, CallData *callData)
SimpleScriptFunction *f = static_cast<SimpleScriptFunction *>(that);
void *stackSpace = alloca(requiredMemoryForExecutionContectSimple(f));
ExecutionContext *context = f->engine()->current;
- ValueScope scope(context);
+ Scope scope(context);
ExecutionContext *ctx = context->newCallContext(stackSpace, f, callData);
if (!f->strictMode && !callData->thisObject.isObject()) {
@@ -667,7 +667,7 @@ void BoundFunction::destroy(Managed *that)
ReturnedValue BoundFunction::call(Managed *that, CallData *dd)
{
BoundFunction *f = static_cast<BoundFunction *>(that);
- ValueScope scope(f->scope->engine);
+ Scope scope(f->scope->engine);
ScopedCallData callData(scope, f->boundArgs.size() + dd->argc);
callData->thisObject = f->boundThis;
@@ -679,7 +679,7 @@ ReturnedValue BoundFunction::call(Managed *that, CallData *dd)
Value BoundFunction::construct(Managed *that, CallData *dd)
{
BoundFunction *f = static_cast<BoundFunction *>(that);
- ValueScope scope(f->scope->engine);
+ Scope scope(f->scope->engine);
ScopedCallData callData(scope, f->boundArgs.size() + dd->argc);
memcpy(callData->args, f->boundArgs.constData(), f->boundArgs.size()*sizeof(Value));
memcpy(callData->args + f->boundArgs.size(), dd->args, dd->argc*sizeof(Value));
diff --git a/src/qml/jsruntime/qv4globalobject.cpp b/src/qml/jsruntime/qv4globalobject.cpp
index e72de4ccd3..b6748b17af 100644
--- a/src/qml/jsruntime/qv4globalobject.cpp
+++ b/src/qml/jsruntime/qv4globalobject.cpp
@@ -362,7 +362,7 @@ ReturnedValue EvalFunction::evalCall(Value /*thisObject*/, Value *args, int argc
ExecutionContext *parentContext = engine()->current;
ExecutionEngine *engine = parentContext->engine;
ExecutionContext *ctx = parentContext;
- ValueScope scope(ctx);
+ Scope scope(ctx);
if (!directCall) {
// the context for eval should be the global scope, so we fake a root
diff --git a/src/qml/jsruntime/qv4include.cpp b/src/qml/jsruntime/qv4include.cpp
index c01619c816..4da351dede 100644
--- a/src/qml/jsruntime/qv4include.cpp
+++ b/src/qml/jsruntime/qv4include.cpp
@@ -104,7 +104,7 @@ void QV4Include::callback(const QV4::Value &callback, const QV4::Value &status)
return;
QV4::ExecutionContext *ctx = f->engine()->current;
- QV4::ValueScope scope(ctx);
+ QV4::Scope scope(ctx);
try {
QV4::ScopedCallData callData(scope, 1);
callData->thisObject = QV4::Value::fromObject(f->engine()->globalObject);
diff --git a/src/qml/jsruntime/qv4jsonobject.cpp b/src/qml/jsruntime/qv4jsonobject.cpp
index 12508d77cd..56e8d1ffe7 100644
--- a/src/qml/jsruntime/qv4jsonobject.cpp
+++ b/src/qml/jsruntime/qv4jsonobject.cpp
@@ -698,7 +698,7 @@ static QString quote(const QString &str)
QString Stringify::Str(const QString &key, Value value)
{
- ValueScope scope(ctx);
+ Scope scope(ctx);
QString result;
if (Object *o = value.asObject()) {
@@ -887,7 +887,7 @@ Value JsonObject::method_parse(SimpleCallContext *ctx)
Value JsonObject::method_stringify(SimpleCallContext *ctx)
{
- ValueScope scope(ctx);
+ Scope scope(ctx);
Stringify stringify(ctx);
diff --git a/src/qml/jsruntime/qv4lookup.cpp b/src/qml/jsruntime/qv4lookup.cpp
index 6ad617c4d6..35aaa1918a 100644
--- a/src/qml/jsruntime/qv4lookup.cpp
+++ b/src/qml/jsruntime/qv4lookup.cpp
@@ -198,7 +198,7 @@ void Lookup::getterAccessor0(Lookup *l, Value *result, const Value &object)
{
if (Object *o = object.asObject()) {
if (l->classList[0] == o->internalClass) {
- ValueScope scope(o->engine());
+ Scope scope(o->engine());
Value res;
FunctionObject *getter = o->memberData[l->index].getter();
if (!getter) {
@@ -222,7 +222,7 @@ void Lookup::getterAccessor1(Lookup *l, Value *result, const Value &object)
if (Object *o = object.asObject()) {
if (l->classList[0] == o->internalClass &&
l->classList[1] == o->prototype()->internalClass) {
- ValueScope scope(o->engine());
+ Scope scope(o->engine());
Value res;
FunctionObject *getter = o->prototype()->memberData[l->index].getter();
if (!getter) {
@@ -249,7 +249,7 @@ void Lookup::getterAccessor2(Lookup *l, Value *result, const Value &object)
if (l->classList[1] == o->internalClass) {
o = o->prototype();
if (l->classList[2] == o->internalClass) {
- ValueScope scope(o->engine());
+ Scope scope(o->engine());
Value res;
FunctionObject *getter = o->memberData[l->index].getter();
if (!getter) {
@@ -305,7 +305,7 @@ void Lookup::primitiveGetterAccessor0(Lookup *l, Value *result, const Value &obj
if (object.type() == l->type) {
Object *o = l->proto;
if (l->classList[0] == o->internalClass) {
- ValueScope scope(o->engine());
+ Scope scope(o->engine());
Value res;
FunctionObject *getter = o->memberData[l->index].getter();
if (!getter) {
@@ -330,7 +330,7 @@ void Lookup::primitiveGetterAccessor1(Lookup *l, Value *result, const Value &obj
Object *o = l->proto;
if (l->classList[0] == o->internalClass &&
l->classList[1] == o->prototype()->internalClass) {
- ValueScope scope(o->engine());
+ Scope scope(o->engine());
Value res;
FunctionObject *getter = o->prototype()->memberData[l->index].getter();
if (!getter) {
@@ -436,7 +436,7 @@ void Lookup::globalGetterAccessor0(Lookup *l, ExecutionContext *ctx, Value *resu
{
Object *o = ctx->engine->globalObject;
if (l->classList[0] == o->internalClass) {
- ValueScope scope(o->engine());
+ Scope scope(o->engine());
FunctionObject *getter = o->memberData[l->index].getter();
if (!getter) {
*result = Value::undefinedValue();
@@ -456,7 +456,7 @@ void Lookup::globalGetterAccessor1(Lookup *l, ExecutionContext *ctx, Value *resu
Object *o = ctx->engine->globalObject;
if (l->classList[0] == o->internalClass &&
l->classList[1] == o->prototype()->internalClass) {
- ValueScope scope(o->engine());
+ Scope scope(o->engine());
FunctionObject *getter = o->prototype()->memberData[l->index].getter();
if (!getter) {
*result = Value::undefinedValue();
@@ -479,7 +479,7 @@ void Lookup::globalGetterAccessor2(Lookup *l, ExecutionContext *ctx, Value *resu
if (l->classList[1] == o->internalClass) {
o = o->prototype();
if (l->classList[2] == o->internalClass) {
- ValueScope scope(o->engine());
+ Scope scope(o->engine());
FunctionObject *getter = o->memberData[l->index].getter();
if (!getter) {
*result = Value::undefinedValue();
diff --git a/src/qml/jsruntime/qv4numberobject.cpp b/src/qml/jsruntime/qv4numberobject.cpp
index ce80d599ae..2c5961f832 100644
--- a/src/qml/jsruntime/qv4numberobject.cpp
+++ b/src/qml/jsruntime/qv4numberobject.cpp
@@ -225,7 +225,7 @@ Value NumberPrototype::method_toExponential(SimpleCallContext *ctx)
Value NumberPrototype::method_toPrecision(SimpleCallContext *ctx)
{
- ValueScope scope(ctx);
+ Scope scope(ctx);
ScopedValue v(scope, thisNumberValue(ctx));
diff --git a/src/qml/jsruntime/qv4object.cpp b/src/qml/jsruntime/qv4object.cpp
index 288bf8b8d7..8b68b4811a 100644
--- a/src/qml/jsruntime/qv4object.cpp
+++ b/src/qml/jsruntime/qv4object.cpp
@@ -135,7 +135,7 @@ Value Object::getValue(const Value &thisObject, const Property *p, PropertyAttri
if (!getter)
return Value::undefinedValue();
- ValueScope scope(getter->engine());
+ Scope scope(getter->engine());
ScopedCallData callData(scope, 0);
callData->thisObject = thisObject;
return Value::fromReturnedValue(getter->call(callData));
@@ -145,7 +145,7 @@ void Object::putValue(Property *pd, PropertyAttributes attrs, const Value &value
{
if (attrs.isAccessor()) {
if (pd->set) {
- ValueScope scope(pd->set->engine());
+ Scope scope(pd->set->engine());
ScopedCallData callData(scope, 1);
callData->args[0] = value;
callData->thisObject = Value::fromObject(this);
@@ -169,7 +169,7 @@ void Object::putValue(Property *pd, PropertyAttributes attrs, const Value &value
void Object::inplaceBinOp(ExecutionContext *ctx, BinOp op, String *name, const ValueRef rhs)
{
- ValueScope scope(ctx);
+ Scope scope(ctx);
ScopedValue v(scope, get(name));
ScopedValue result(scope, op(v, rhs));
put(name, result);
@@ -177,7 +177,7 @@ void Object::inplaceBinOp(ExecutionContext *ctx, BinOp op, String *name, const V
void Object::inplaceBinOp(ExecutionContext *ctx, BinOp op, const ValueRef index, const ValueRef rhs)
{
- ValueScope scope(ctx);
+ Scope scope(ctx);
uint idx = index->asArrayIndex();
if (idx < UINT_MAX) {
bool hasProperty = false;
@@ -193,7 +193,7 @@ void Object::inplaceBinOp(ExecutionContext *ctx, BinOp op, const ValueRef index,
void Object::inplaceBinOp(ExecutionContext *ctx, BinOpContext op, String *name, const ValueRef rhs)
{
- ValueScope scope(ctx);
+ Scope scope(ctx);
ScopedValue v(scope, get(name));
ScopedValue result(scope, op(ctx, v, rhs));
put(name, result);
@@ -201,7 +201,7 @@ void Object::inplaceBinOp(ExecutionContext *ctx, BinOpContext op, String *name,
void Object::inplaceBinOp(ExecutionContext *ctx, BinOpContext op, const ValueRef index, const ValueRef rhs)
{
- ValueScope scope(ctx);
+ Scope scope(ctx);
uint idx = index->asArrayIndex();
if (idx < UINT_MAX) {
bool hasProperty = false;
@@ -776,7 +776,7 @@ void Object::internalPut(String *name, const Value &value)
if (pd && attrs.isAccessor()) {
assert(pd->setter() != 0);
- ValueScope scope(engine());
+ Scope scope(engine());
ScopedCallData callData(scope, 1);
callData->args[0] = value;
callData->thisObject = Value::fromObject(this);
@@ -855,7 +855,7 @@ void Object::internalPutIndexed(uint index, const Value &value)
if (pd && attrs.isAccessor()) {
assert(pd->setter() != 0);
- ValueScope scope(engine());
+ Scope scope(engine());
ScopedCallData callData(scope, 1);
callData->args[0] = value;
callData->thisObject = Value::fromObject(this);
@@ -1137,7 +1137,7 @@ void Object::copyArrayData(Object *other)
Value Object::arrayIndexOf(Value v, uint fromIndex, uint endIndex, ExecutionContext *ctx, Object *o)
{
- ValueScope scope(engine());
+ Scope scope(engine());
ScopedValue value(scope);
if (o->protoHasArray() || o->arrayAttributes) {
diff --git a/src/qml/jsruntime/qv4objectproto.cpp b/src/qml/jsruntime/qv4objectproto.cpp
index 8cab0d2d12..b851cc3903 100644
--- a/src/qml/jsruntime/qv4objectproto.cpp
+++ b/src/qml/jsruntime/qv4objectproto.cpp
@@ -381,7 +381,7 @@ Value ObjectPrototype::method_toString(SimpleCallContext *ctx)
Value ObjectPrototype::method_toLocaleString(SimpleCallContext *ctx)
{
- ValueScope scope(ctx);
+ Scope scope(ctx);
Object *o = ctx->thisObject.toObject(ctx);
Value ts = o->get(ctx->engine->newString(QStringLiteral("toString")));
FunctionObject *f = ts.asFunctionObject();
diff --git a/src/qml/jsruntime/qv4qobjectwrapper.cpp b/src/qml/jsruntime/qv4qobjectwrapper.cpp
index 31fb5dc221..2f3301e298 100644
--- a/src/qml/jsruntime/qv4qobjectwrapper.cpp
+++ b/src/qml/jsruntime/qv4qobjectwrapper.cpp
@@ -701,7 +701,7 @@ struct QObjectSlotDispatcher : public QtPrivate::QSlotObjectBase
QV4::ExecutionEngine *v4 = f->internalClass->engine;
QV4::ExecutionContext *ctx = v4->current;
- ValueScope scope(v4);
+ Scope scope(v4);
QV4::ScopedCallData callData(scope, argCount);
callData->thisObject = This->thisObject.isEmpty() ? Value::fromObject(v4->globalObject) : This->thisObject.value();
for (int ii = 0; ii < argCount; ++ii) {
@@ -741,7 +741,7 @@ struct QObjectSlotDispatcher : public QtPrivate::QSlotObjectBase
return;
}
- QV4::ValueScope scope(v4);
+ QV4::Scope scope(v4);
QV4::ScopedValue function(scope, *reinterpret_cast<QV4::Value*>(metaArgs[1]));
QV4::ScopedValue thisObject(scope, *reinterpret_cast<QV4::Value*>(metaArgs[2]));
QObject *receiverToDisconnect = reinterpret_cast<QObject*>(metaArgs[3]);
diff --git a/src/qml/jsruntime/qv4regexpobject.cpp b/src/qml/jsruntime/qv4regexpobject.cpp
index 1cee9ed67c..90ab558d7a 100644
--- a/src/qml/jsruntime/qv4regexpobject.cpp
+++ b/src/qml/jsruntime/qv4regexpobject.cpp
@@ -232,7 +232,7 @@ RegExpCtor::RegExpCtor(ExecutionContext *scope)
Value RegExpCtor::construct(Managed *m, CallData *callData)
{
ExecutionContext *ctx = m->engine()->current;
- ValueScope scope(ctx);
+ Scope scope(ctx);
ScopedValue r(scope, callData->argc > 0 ? callData->args[0] : Value::undefinedValue());
ScopedValue f(scope, callData->argc > 1 ? callData->args[1] : Value::undefinedValue());
@@ -298,7 +298,7 @@ void RegExpPrototype::init(ExecutionContext *ctx, const Value &ctor)
Value RegExpPrototype::method_exec(SimpleCallContext *ctx)
{
- ValueScope scope(ctx);
+ Scope scope(ctx);
RegExpObject *r = ctx->thisObject.as<RegExpObject>();
if (!r)
@@ -359,7 +359,7 @@ Value RegExpPrototype::method_toString(SimpleCallContext *ctx)
Value RegExpPrototype::method_compile(SimpleCallContext *ctx)
{
- ValueScope scope(ctx);
+ Scope scope(ctx);
RegExpObject *r = ctx->thisObject.as<RegExpObject>();
if (!r)
ctx->throwTypeError();
diff --git a/src/qml/jsruntime/qv4runtime.cpp b/src/qml/jsruntime/qv4runtime.cpp
index ad2ac19ea6..283246d25c 100644
--- a/src/qml/jsruntime/qv4runtime.cpp
+++ b/src/qml/jsruntime/qv4runtime.cpp
@@ -276,7 +276,7 @@ ReturnedValue __qmljs_delete_name(ExecutionContext *ctx, String *name)
QV4::ReturnedValue __qmljs_add_helper(ExecutionContext *ctx, const ValueRef left, const ValueRef right)
{
- ValueScope scope(ctx);
+ Scope scope(ctx);
ScopedValue pleft(scope, __qmljs_to_primitive(left, PREFERREDTYPE_HINT));
ScopedValue pright(scope, __qmljs_to_primitive(right, PREFERREDTYPE_HINT));
@@ -314,7 +314,7 @@ QV4::ReturnedValue __qmljs_in(ExecutionContext *ctx, const ValueRef left, const
static void inplaceBitOp(ExecutionContext *ctx, String *name, const ValueRef value, BinOp op)
{
- ValueScope scope(ctx);
+ Scope scope(ctx);
ScopedValue lhs(scope, ctx->getProperty(name));
ScopedValue result(scope, op(lhs, value));
ctx->setProperty(name, result);
@@ -338,7 +338,7 @@ void __qmljs_inplace_bit_xor_name(ExecutionContext *ctx, String *name, const Val
void __qmljs_inplace_add_name(ExecutionContext *ctx, String *name, const ValueRef value)
{
- ValueScope scope(ctx);
+ Scope scope(ctx);
ScopedValue lhs(scope, ctx->getProperty(name));
ScopedValue result(scope, __qmljs_add(ctx, lhs, value));
ctx->setProperty(name, result);
@@ -570,7 +570,7 @@ ReturnedValue __qmljs_object_default_value(Object *object, int typeHint)
qSwap(meth1, meth2);
ExecutionContext *ctx = engine->current;
- ValueScope scope(ctx);
+ Scope scope(ctx);
ScopedCallData callData(scope, 0);
callData->thisObject = Value::fromObject(object);
@@ -633,17 +633,17 @@ String *__qmljs_convert_to_string(ExecutionContext *ctx, const ValueRef value)
case Value::String_Type:
return value->stringValue();
case Value::Object_Type: {
- ValueScope scope(ctx);
+ Scope scope(ctx);
ScopedValue prim(scope, __qmljs_to_primitive(value, STRING_HINT));
return __qmljs_convert_to_string(ctx, prim);
}
case Value::Integer_Type: {
- ValueScope scope(ctx);
+ Scope scope(ctx);
ScopedValue dbl(scope, __qmljs_string_from_number(ctx, value->int_32));
return dbl->stringValue();
}
default: { // double
- ValueScope scope(ctx);
+ Scope scope(ctx);
ScopedValue dbl(scope, __qmljs_string_from_number(ctx, value->doubleValue()));
return dbl->stringValue();
}
@@ -697,7 +697,7 @@ ReturnedValue __qmljs_get_element(ExecutionContext *ctx, const ValueRef object,
void __qmljs_set_element(ExecutionContext *ctx, const ValueRef object, const ValueRef index, const ValueRef value)
{
- ValueScope scope(ctx);
+ Scope scope(ctx);
Object *o = object->toObject(ctx);
uint idx = index->asArrayIndex();
@@ -808,11 +808,11 @@ uint __qmljs_equal_helper(const ValueRef x, const ValueRef y)
Value ny = Value::fromDouble((double) y->booleanValue());
return __qmljs_cmp_eq(x, ValueRef(&ny));
} else if ((x->isNumber() || x->isString()) && y->isObject()) {
- ValueScope scope(y->objectValue()->engine());
+ Scope scope(y->objectValue()->engine());
ScopedValue py(scope, __qmljs_to_primitive(y, PREFERREDTYPE_HINT));
return __qmljs_cmp_eq(x, py);
} else if (x->isObject() && (y->isNumber() || y->isString())) {
- ValueScope scope(x->objectValue()->engine());
+ Scope scope(x->objectValue()->engine());
ScopedValue px(scope, __qmljs_to_primitive(x, PREFERREDTYPE_HINT));
return __qmljs_cmp_eq(px, y);
}
@@ -847,7 +847,7 @@ QV4::Bool __qmljs_cmp_gt(const QV4::ValueRef l, const QV4::ValueRef r)
if (l->isObject() || r->isObject()) {
QV4::ExecutionEngine *e = (l->isObject() ? l->objectValue() : r->objectValue())->engine();
- QV4::ValueScope scope(e);
+ QV4::Scope scope(e);
QV4::ScopedValue pl(scope, __qmljs_to_primitive(l, QV4::NUMBER_HINT));
QV4::ScopedValue pr(scope, __qmljs_to_primitive(r, QV4::NUMBER_HINT));
return __qmljs_cmp_gt(pl, pr);
@@ -870,7 +870,7 @@ QV4::Bool __qmljs_cmp_lt(const QV4::ValueRef l, const QV4::ValueRef r)
if (l->isObject() || r->isObject()) {
QV4::ExecutionEngine *e = (l->isObject() ? l->objectValue() : r->objectValue())->engine();
- QV4::ValueScope scope(e);
+ QV4::Scope scope(e);
QV4::ScopedValue pl(scope, __qmljs_to_primitive(l, QV4::NUMBER_HINT));
QV4::ScopedValue pr(scope, __qmljs_to_primitive(r, QV4::NUMBER_HINT));
return __qmljs_cmp_lt(pl, pr);
@@ -893,7 +893,7 @@ QV4::Bool __qmljs_cmp_ge(const QV4::ValueRef l, const QV4::ValueRef r)
if (l->isObject() || r->isObject()) {
QV4::ExecutionEngine *e = (l->isObject() ? l->objectValue() : r->objectValue())->engine();
- QV4::ValueScope scope(e);
+ QV4::Scope scope(e);
QV4::ScopedValue pl(scope, __qmljs_to_primitive(l, QV4::NUMBER_HINT));
QV4::ScopedValue pr(scope, __qmljs_to_primitive(r, QV4::NUMBER_HINT));
return __qmljs_cmp_ge(pl, pr);
@@ -916,7 +916,7 @@ QV4::Bool __qmljs_cmp_le(const QV4::ValueRef l, const QV4::ValueRef r)
if (l->isObject() || r->isObject()) {
QV4::ExecutionEngine *e = (l->isObject() ? l->objectValue() : r->objectValue())->engine();
- QV4::ValueScope scope(e);
+ QV4::Scope scope(e);
QV4::ScopedValue pl(scope, __qmljs_to_primitive(l, QV4::NUMBER_HINT));
QV4::ScopedValue pr(scope, __qmljs_to_primitive(r, QV4::NUMBER_HINT));
return __qmljs_cmp_le(pl, pr);
@@ -949,7 +949,7 @@ ReturnedValue __qmljs_call_global_lookup(ExecutionContext *context, uint index,
ReturnedValue __qmljs_call_activation_property(ExecutionContext *context, String *name, CallDataRef callData)
{
Q_ASSERT(callData->thisObject.isUndefined());
- ValueScope scope(context);
+ Scope scope(context);
Object *base;
ScopedValue func(scope, context->getPropertyAndBase(name, &base));
@@ -1049,7 +1049,7 @@ ReturnedValue __qmljs_construct_global_lookup(ExecutionContext *context, uint in
ReturnedValue __qmljs_construct_activation_property(ExecutionContext *context, String *name, CallDataRef callData)
{
- ValueScope scope(context);
+ Scope scope(context);
ScopedValue func(scope, context->getProperty(name));
Object *f = func->asObject();
if (!f)
@@ -1115,14 +1115,14 @@ ReturnedValue __qmljs_builtin_typeof(ExecutionContext *ctx, const ValueRef value
QV4::ReturnedValue __qmljs_builtin_typeof_name(ExecutionContext *context, String *name)
{
- ValueScope scope(context);
+ Scope scope(context);
ScopedValue prop(scope, context->getPropertyNoThrow(name));
return __qmljs_builtin_typeof(context, prop);
}
QV4::ReturnedValue __qmljs_builtin_typeof_member(ExecutionContext *context, const ValueRef base, String *name)
{
- ValueScope scope(context);
+ Scope scope(context);
Object *obj = base->toObject(context);
ScopedValue prop(scope, obj->get(name));
return __qmljs_builtin_typeof(context, prop);
@@ -1130,7 +1130,7 @@ QV4::ReturnedValue __qmljs_builtin_typeof_member(ExecutionContext *context, cons
QV4::ReturnedValue __qmljs_builtin_typeof_element(ExecutionContext *context, const ValueRef base, const ValueRef index)
{
- ValueScope scope(context);
+ Scope scope(context);
String *name = index->toString(context);
Object *obj = base->toObject(context);
ScopedValue prop(scope, obj->get(name));
diff --git a/src/qml/jsruntime/qv4runtime_p.h b/src/qml/jsruntime/qv4runtime_p.h
index 2d29c89056..4b15c1a17d 100644
--- a/src/qml/jsruntime/qv4runtime_p.h
+++ b/src/qml/jsruntime/qv4runtime_p.h
@@ -596,7 +596,7 @@ inline QV4::Bool __qmljs_cmp_instanceof(QV4::ExecutionContext *ctx, const QV4::V
{
TRACE2(left, right);
- ValueScope scope(ctx);
+ Scope scope(ctx);
QV4::ScopedValue v(scope, __qmljs_instanceof(ctx, left, right));
return v->booleanValue();
}
@@ -605,7 +605,7 @@ inline uint __qmljs_cmp_in(QV4::ExecutionContext *ctx, const QV4::ValueRef left,
{
TRACE2(left, right);
- ValueScope scope(ctx);
+ Scope scope(ctx);
QV4::ScopedValue v(scope, __qmljs_in(ctx, left, right));
return v->booleanValue();
}
diff --git a/src/qml/jsruntime/qv4scopedvalue_p.h b/src/qml/jsruntime/qv4scopedvalue_p.h
index d1b4a93aa3..7bb98e7a62 100644
--- a/src/qml/jsruntime/qv4scopedvalue_p.h
+++ b/src/qml/jsruntime/qv4scopedvalue_p.h
@@ -79,8 +79,8 @@ struct ScopedValueArray {
struct ScopedValue;
-struct ValueScope {
- ValueScope(ExecutionContext *ctx)
+struct Scope {
+ Scope(ExecutionContext *ctx)
: engine(ctx->engine)
#ifndef QT_NO_DEBUG
, size(0)
@@ -89,13 +89,13 @@ struct ValueScope {
mark = ctx->engine->jsStackTop;
}
- ValueScope(ExecutionEngine *e)
+ Scope(ExecutionEngine *e)
: engine(e)
{
mark = e->jsStackTop;
}
- ~ValueScope() {
+ ~Scope() {
Q_ASSERT(engine->jsStackTop >= mark);
engine->jsStackTop = mark;
}
@@ -112,7 +112,7 @@ struct ValueRef;
struct ScopedValue
{
- ScopedValue(const ValueScope &scope)
+ ScopedValue(const Scope &scope)
{
ptr = scope.engine->jsStackTop++;
#ifndef QT_NO_DEBUG
@@ -120,7 +120,7 @@ struct ScopedValue
#endif
}
- ScopedValue(const ValueScope &scope, const Value &v)
+ ScopedValue(const Scope &scope, const Value &v)
{
ptr = scope.engine->jsStackTop++;
*ptr = v;
@@ -129,7 +129,7 @@ struct ScopedValue
#endif
}
- ScopedValue(const ValueScope &scope, const ReturnedValue &v)
+ ScopedValue(const Scope &scope, const ReturnedValue &v)
{
ptr = scope.engine->jsStackTop++;
ptr->val = v;
@@ -171,7 +171,7 @@ struct ScopedValue
};
struct ScopedCallData {
- ScopedCallData(ValueScope &scope, int argc)
+ ScopedCallData(Scope &scope, int argc)
{
int size = qMax(argc, (int)QV4::Global::ReservedArgumentCount) + offsetof(QV4::CallData, args)/sizeof(QV4::Value);
ptr = reinterpret_cast<CallData *>(scope.engine->stackPush(size));
diff --git a/src/qml/jsruntime/qv4script.cpp b/src/qml/jsruntime/qv4script.cpp
index dd5a3e8a4f..64dce24c05 100644
--- a/src/qml/jsruntime/qv4script.cpp
+++ b/src/qml/jsruntime/qv4script.cpp
@@ -125,7 +125,7 @@ DEFINE_MANAGED_VTABLE(CompilationUnitHolder);
ReturnedValue QmlBindingWrapper::call(Managed *that, CallData *)
{
ExecutionEngine *engine = that->engine();
- ValueScope scope(engine);
+ Scope scope(engine);
QmlBindingWrapper *This = static_cast<QmlBindingWrapper *>(that);
CallContext *ctx = This->qmlContext;
@@ -212,7 +212,7 @@ Value Script::run()
return Value::undefinedValue();
QV4::ExecutionEngine *engine = scope->engine;
- QV4::ValueScope valueScope(engine);
+ QV4::Scope valueScope(engine);
if (qml.isEmpty()) {
TemporaryAssignment<Function*> savedGlobalCode(engine->globalCode, vmFunction);
diff --git a/src/qml/jsruntime/qv4sequenceobject.cpp b/src/qml/jsruntime/qv4sequenceobject.cpp
index d4d403de08..b1df8d95af 100644
--- a/src/qml/jsruntime/qv4sequenceobject.cpp
+++ b/src/qml/jsruntime/qv4sequenceobject.cpp
@@ -354,7 +354,7 @@ public:
bool operator()(typename Container::value_type lhs, typename Container::value_type rhs)
{
QV4::Managed *fun = this->m_compareFn.asManaged();
- ValueScope scope(fun->engine());
+ Scope scope(fun->engine());
ScopedCallData callData(scope, 2);
callData->args[0] = convertElementToValue(this->m_ctx->engine, lhs);
callData->args[1] = convertElementToValue(this->m_ctx->engine, rhs);
diff --git a/src/qml/jsruntime/qv4sparsearray.cpp b/src/qml/jsruntime/qv4sparsearray.cpp
index dee0d926b4..faa2f310ed 100644
--- a/src/qml/jsruntime/qv4sparsearray.cpp
+++ b/src/qml/jsruntime/qv4sparsearray.cpp
@@ -61,7 +61,7 @@ bool ArrayElementLessThan::operator()(const Property &p1, const Property &p2) co
if (p2.value.isUndefined())
return true;
if (Object *o = m_comparefn.asObject()) {
- ValueScope scope(o->engine());
+ Scope scope(o->engine());
ScopedValue result(scope);
ScopedCallData callData(scope, 2);
callData->thisObject = Value::undefinedValue();
diff --git a/src/qml/jsruntime/qv4stringobject.cpp b/src/qml/jsruntime/qv4stringobject.cpp
index d3a5f68aeb..9faa1ebeae 100644
--- a/src/qml/jsruntime/qv4stringobject.cpp
+++ b/src/qml/jsruntime/qv4stringobject.cpp
@@ -280,7 +280,7 @@ Value StringPrototype::method_charCodeAt(SimpleCallContext *context)
Value StringPrototype::method_concat(SimpleCallContext *context)
{
- ValueScope scope(context);
+ Scope scope(context);
QString value = getThisString(context, context->thisObject);
@@ -315,7 +315,7 @@ Value StringPrototype::method_indexOf(SimpleCallContext *context)
Value StringPrototype::method_lastIndexOf(SimpleCallContext *context)
{
- ValueScope scope(context);
+ Scope scope(context);
const QString value = getThisString(context, context->thisObject);
@@ -351,7 +351,7 @@ Value StringPrototype::method_match(SimpleCallContext *context)
if (context->thisObject.isUndefined() || context->thisObject.isNull())
context->throwTypeError();
- ValueScope scope(context);
+ Scope scope(context);
String *s = context->thisObject.toString(context);
Value regexp = context->argumentCount ? context->arguments[0] : Value::undefinedValue();
@@ -455,7 +455,7 @@ static void appendReplacementString(QString *result, const QString &input, const
Value StringPrototype::method_replace(SimpleCallContext *ctx)
{
- ValueScope scope(ctx);
+ Scope scope(ctx);
QString string;
if (StringObject *thisString = ctx->thisObject.asStringObject())
string = thisString->value.stringValue()->toQString();
@@ -566,7 +566,7 @@ Value StringPrototype::method_replace(SimpleCallContext *ctx)
Value StringPrototype::method_search(SimpleCallContext *ctx)
{
- ValueScope scope(ctx);
+ Scope scope(ctx);
QString string;
if (StringObject *thisString = ctx->thisObject.asStringObject())
string = thisString->value.stringValue()->toQString();
diff --git a/src/qml/jsruntime/qv4value.cpp b/src/qml/jsruntime/qv4value.cpp
index 6a717cde8d..d0857556b6 100644
--- a/src/qml/jsruntime/qv4value.cpp
+++ b/src/qml/jsruntime/qv4value.cpp
@@ -132,7 +132,7 @@ double Value::toNumber() const
return __qmljs_string_to_number(stringValue()->toQString());
case QV4::Value::Object_Type: {
ExecutionContext *ctx = objectValue()->internalClass->engine->current;
- ValueScope scope(ctx);
+ Scope scope(ctx);
ScopedValue prim(scope, __qmljs_to_primitive(ValueRef::fromRawValue(this), NUMBER_HINT));
return prim->toNumber();
}
@@ -157,7 +157,7 @@ QString Value::toQStringNoThrow() const
return stringValue()->toQString();
case Value::Object_Type: {
ExecutionContext *ctx = objectValue()->internalClass->engine->current;
- ValueScope scope(ctx);
+ Scope scope(ctx);
try {
ScopedValue prim(scope, __qmljs_to_primitive(ValueRef::fromRawValue(this), STRING_HINT));
if (prim->isPrimitive())
@@ -204,7 +204,7 @@ QString Value::toQString() const
return stringValue()->toQString();
case Value::Object_Type: {
ExecutionContext *ctx = objectValue()->internalClass->engine->current;
- ValueScope scope(ctx);
+ Scope scope(ctx);
ScopedValue prim(scope, __qmljs_to_primitive(ValueRef::fromRawValue(this), STRING_HINT));
return prim->toQString();
}
diff --git a/src/qml/qml/qqmlcomponent.cpp b/src/qml/qml/qqmlcomponent.cpp
index 2c9195a0ef..8cea3b6a69 100644
--- a/src/qml/qml/qqmlcomponent.cpp
+++ b/src/qml/qml/qqmlcomponent.cpp
@@ -1207,7 +1207,7 @@ void QQmlComponent::createObject(QQmlV4Function *args)
QV8Engine *v8engine = args->engine();
QV4::ExecutionEngine *v4engine = QV8Engine::getV4(v8engine);
- QV4::ValueScope scope(v4engine);
+ QV4::Scope scope(v4engine);
QQmlContext *ctxt = creationContext();
if (!ctxt) ctxt = d->engine->rootContext();
@@ -1367,7 +1367,7 @@ void QQmlComponentPrivate::initializeObjectWithInitialProperties(const QV4::Valu
QQmlEnginePrivate *ep = QQmlEnginePrivate::get(engine);
QV8Engine *v8engine = ep->v8engine();
QV4::ExecutionEngine *v4engine = QV8Engine::getV4(v8engine);
- QV4::ValueScope scope(v4engine);
+ QV4::Scope scope(v4engine);
QV4::Value object = QV4::QObjectWrapper::wrap(v4engine, toCreate);
Q_ASSERT(object.asObject());
@@ -1472,7 +1472,7 @@ void QmlIncubatorObject::setInitialState(QObject *o)
QQmlComponentExtension *e = componentExtension(v8);
QV4::ExecutionEngine *v4 = QV8Engine::getV4(v8);
- QV4::ValueScope scope(v4);
+ QV4::Scope scope(v4);
QV4::Value f = QV4::Script::evaluate(v4, QString::fromLatin1(INITIALPROPERTIES_SOURCE), qmlGlobal.asObject());
QV4::ScopedCallData callData(scope, 2);
@@ -1511,7 +1511,7 @@ void QmlIncubatorObject::statusChanged(Status s)
if (QV4::FunctionObject *f = callback.asFunctionObject()) {
QV4::ExecutionContext *ctx = f->engine()->current;
- QV4::ValueScope scope(ctx);
+ QV4::Scope scope(ctx);
try {
QV4::ScopedCallData callData(scope, 1);
callData->thisObject = QV4::Value::fromObject(this);
diff --git a/src/qml/qml/qqmljavascriptexpression.cpp b/src/qml/qml/qqmljavascriptexpression.cpp
index 37cbba0f02..4f67a1dd28 100644
--- a/src/qml/qml/qqmljavascriptexpression.cpp
+++ b/src/qml/qml/qqmljavascriptexpression.cpp
@@ -163,7 +163,7 @@ QQmlJavaScriptExpression::evaluate(QQmlContextData *context,
DeleteWatcher watcher(this);
QV4::ExecutionEngine *v4 = QV8Engine::getV4(ep->v8engine());
- QV4::ValueScope scope(v4);
+ QV4::Scope scope(v4);
QV4::ScopedValue result(scope, QV4::Value::undefinedValue());
QV4::ExecutionContext *ctx = v4->current;
try {
diff --git a/src/qml/qml/qqmlvmemetaobject.cpp b/src/qml/qml/qqmlvmemetaobject.cpp
index bf74ff6452..f8c2590a20 100644
--- a/src/qml/qml/qqmlvmemetaobject.cpp
+++ b/src/qml/qml/qqmlvmemetaobject.cpp
@@ -927,7 +927,7 @@ int QQmlVMEMetaObject::metaCall(QMetaObject::Call c, int _id, void **a)
QQmlVMEMetaData::MethodData *data = metaData->methodData() + id;
- QV4::ValueScope scope(function->engine());
+ QV4::Scope scope(function->engine());
QV4::ScopedCallData callData(scope, data->parameterCount);
callData->thisObject = ep->v8engine()->global();
diff --git a/src/qml/qml/qqmlxmlhttprequest.cpp b/src/qml/qml/qqmlxmlhttprequest.cpp
index 19619400f7..52e959f896 100644
--- a/src/qml/qml/qqmlxmlhttprequest.cpp
+++ b/src/qml/qml/qqmlxmlhttprequest.cpp
@@ -1461,7 +1461,7 @@ const QByteArray &QQmlXMLHttpRequest::rawResponseBody() const
void QQmlXMLHttpRequest::dispatchCallback(const Value &me)
{
ExecutionContext *ctx = v4->current;
- QV4::ValueScope scope(v4);
+ QV4::Scope scope(v4);
try {
Object *o = me.asObject();
if (!o)
diff --git a/src/qml/qml/v8/qv8engine.cpp b/src/qml/qml/v8/qv8engine.cpp
index b82d58ba0b..33447c3134 100644
--- a/src/qml/qml/v8/qv8engine.cpp
+++ b/src/qml/qml/v8/qv8engine.cpp
@@ -443,7 +443,7 @@ void QV8Engine::initializeGlobal()
void QV8Engine::freezeObject(const QV4::Value &value)
{
- QV4::ValueScope scope(m_v4Engine);
+ QV4::Scope scope(m_v4Engine);
QV4::ScopedCallData callData(scope, 1);
callData->args[0] = value;
callData->thisObject = QV4::Value::fromObject(m_v4Engine->globalObject);
diff --git a/src/qml/types/qquickworkerscript.cpp b/src/qml/types/qquickworkerscript.cpp
index 481bc110e8..6a7374c09e 100644
--- a/src/qml/types/qquickworkerscript.cpp
+++ b/src/qml/types/qquickworkerscript.cpp
@@ -228,7 +228,7 @@ void QQuickWorkerScriptEnginePrivate::WorkerEngine::init()
"}); "\
"})"
- QV4::ValueScope scope(m_v4Engine);
+ QV4::Scope scope(m_v4Engine);
onmessage = QV4::Script(m_v4Engine->rootContext, CALL_ONMESSAGE_SCRIPT).run();
QV4::Script createsendscript(m_v4Engine->rootContext, SEND_MESSAGE_CREATE_SCRIPT);
QV4::FunctionObject *createsendconstructor = createsendscript.run().asFunctionObject();
@@ -246,7 +246,7 @@ QV4::Value QQuickWorkerScriptEnginePrivate::WorkerEngine::sendFunction(int id)
{
QV4::FunctionObject *f = createsend.value().asFunctionObject();
QV4::ExecutionContext *ctx = f->engine()->current;
- QV4::ValueScope scope(ctx->engine);
+ QV4::Scope scope(ctx->engine);
QV4::ScopedValue v(scope);
try {
@@ -351,7 +351,7 @@ void QQuickWorkerScriptEnginePrivate::processMessage(int id, const QByteArray &d
QV4::FunctionObject *f = workerEngine->onmessage.value().asFunctionObject();
QV4::ExecutionContext *ctx = f->internalClass->engine->current;
- QV4::ValueScope scope(ctx);
+ QV4::Scope scope(ctx);
QV4::ScopedValue value(scope, QV4::Serialize::deserialize(data, workerEngine));
diff --git a/src/quick/items/context2d/qquickcanvasitem.cpp b/src/quick/items/context2d/qquickcanvasitem.cpp
index f38328da6d..054dac5afd 100644
--- a/src/quick/items/context2d/qquickcanvasitem.cpp
+++ b/src/quick/items/context2d/qquickcanvasitem.cpp
@@ -661,7 +661,7 @@ void QQuickCanvasItem::updatePolish()
d->animationCallbacks.clear();
QV4::ExecutionEngine *v4 = QQmlEnginePrivate::getV4Engine(qmlEngine(this));
- QV4::ValueScope scope(v4);
+ QV4::Scope scope(v4);
QV4::ScopedCallData callData(scope, 1);
callData->thisObject = QV4::QObjectWrapper::wrap(v4, this);
diff --git a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
index caff36cf0d..24478417d5 100644
--- a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
+++ b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
@@ -2273,7 +2273,7 @@ static inline bool evaluate_error(QV8Engine *engine, const QV4::Value &o, const
QV4::FunctionObject *function = program.run().asFunctionObject();
if (!function)
return false;
- QV4::ValueScope scope(ctx);
+ QV4::Scope scope(ctx);
QV4::ScopedCallData d(scope, 1);
d->args[0] = o;
d->thisObject = engine->global();
@@ -2299,7 +2299,7 @@ static inline bool evaluate_value(QV8Engine *engine, const QV4::Value &o,
QV4::FunctionObject *function = program.run().asFunctionObject();
if (!function)
return false;
- QV4::ValueScope scope(ctx);
+ QV4::Scope scope(ctx);
QV4::ScopedValue value(scope);
QV4::ScopedValue res(scope, result);
QV4::ScopedCallData d(scope, 1);
@@ -2326,7 +2326,7 @@ static inline QV4::Value evaluate(QV8Engine *engine, const QV4::Value & o,
QV4::FunctionObject *function = program.run().asFunctionObject();
if (!function)
return QV4::Value::emptyValue();
- QV4::ValueScope scope(ctx);
+ QV4::Scope scope(ctx);
QV4::ScopedCallData d(scope, 1);
d->args[0] = o;
d->thisObject = engine->global();