~QQmlSqlDatabaseWrapper() {
}
- static Value getIndexed(Managed *m, ExecutionContext *ctx, uint index, bool *hasProperty);
+ static Value getIndexed(Managed *m, uint index, bool *hasProperty);
static void destroy(Managed *that) {
static_cast<QQmlSqlDatabaseWrapper *>(that)->~QQmlSqlDatabaseWrapper();
}
}
}
-Value QQmlSqlDatabaseWrapper::getIndexed(Managed *m, ExecutionContext *ctx, uint index, bool *hasProperty)
+Value QQmlSqlDatabaseWrapper::getIndexed(Managed *m, uint index, bool *hasProperty)
{
QQmlSqlDatabaseWrapper *r = m->as<QQmlSqlDatabaseWrapper>();
if (!r || r->type != QQmlSqlDatabaseWrapper::Rows)
- return Object::getIndexed(m, ctx, index, hasProperty);
+ return Object::getIndexed(m, index, hasProperty);
- return qmlsqldatabase_rows_index(r, ctx->engine, index, hasProperty);
+ return qmlsqldatabase_rows_index(r, m->engine(), index, hasProperty);
}
static Value qmlsqldatabase_rows_item(SimpleCallContext *ctx)
uint idx = name->asArrayIndex();
if (idx != UINT_MAX)
- return getIndexed(m, ctx, idx, hasProperty);
+ return getIndexed(m, idx, hasProperty);
return Value::undefinedValue();
}
-Value QmlListWrapper::getIndexed(Managed *m, ExecutionContext *ctx, uint index, bool *hasProperty)
+Value QmlListWrapper::getIndexed(Managed *m, uint index, bool *hasProperty)
{
+ QV4::ExecutionEngine *e = m->engine();
QmlListWrapper *w = m->as<QmlListWrapper>();
if (!w)
- ctx->throwTypeError();
+ e->current->throwTypeError();
quint32 count = w->property.count ? w->property.count(&w->property) : 0;
if (index < count && w->property.at)
- return QV4::QObjectWrapper::wrap(ctx->engine, w->property.at(&w->property, index));
+ return QV4::QObjectWrapper::wrap(e, w->property.at(&w->property, index));
return Value::undefinedValue();
}
QVariant toVariant() const;
static Value get(Managed *m, ExecutionContext *ctx, String *name, bool *hasProperty);
- static Value getIndexed(Managed *m, ExecutionContext *ctx, uint index, bool *hasProperty);
+ static Value getIndexed(Managed *m, uint index, bool *hasProperty);
static void put(Managed *m, ExecutionContext *ctx, String *name, const Value &value);
static Property *advanceIterator(Managed *m, ObjectIterator *it, String **name, uint *index, PropertyAttributes *attributes);
static void destroy(Managed *that);
that->as<NamedNodeMap>()->~NamedNodeMap();
}
static Value get(Managed *m, ExecutionContext *ctx, String *name, bool *hasProperty);
- static Value getIndexed(Managed *m, ExecutionContext *ctx, uint index, bool *hasProperty);
+ static Value getIndexed(Managed *m, uint index, bool *hasProperty);
QList<NodeImpl *> list; // Only used in NamedNodeMap
NodeImpl *d;
that->as<NodeList>()->~NodeList();
}
static Value get(Managed *m, ExecutionContext *ctx, String *name, bool *hasProperty);
- static Value getIndexed(Managed *m, ExecutionContext *ctx, uint index, bool *hasProperty);
+ static Value getIndexed(Managed *m, uint index, bool *hasProperty);
// C++ API
static Value create(QV8Engine *, NodeImpl *);
return d == 0;
}
-Value NamedNodeMap::getIndexed(Managed *m, ExecutionContext *ctx, uint index, bool *hasProperty)
+Value NamedNodeMap::getIndexed(Managed *m, uint index, bool *hasProperty)
{
+ QV4::ExecutionEngine *v4 = m->engine();
NamedNodeMap *r = m->as<NamedNodeMap>();
if (!r)
- ctx->throwTypeError();
+ v4->current->throwTypeError();
- QV8Engine *engine = ctx->engine->v8Engine;
+ QV8Engine *engine = v4->v8Engine;
if ((int)index < r->list.count()) {
if (hasProperty)
return Value::fromObject(instance);
}
-Value NodeList::getIndexed(Managed *m, ExecutionContext *ctx, uint index, bool *hasProperty)
+Value NodeList::getIndexed(Managed *m, uint index, bool *hasProperty)
{
+ QV4::ExecutionEngine *v4 = m->engine();
NodeList *r = m->as<NodeList>();
if (!r)
- ctx->throwTypeError();
+ v4->current->throwTypeError();
- QV8Engine *engine = ctx->engine->v8Engine;
+ QV8Engine *engine = v4->v8Engine;
if ((int)index < r->d->children.count()) {
if (hasProperty)
if (i)
R += r4;
- Value e = a->getIndexed(ctx, i);
+ Value e = a->getIndexed(i);
if (! (e.isUndefined() || e.isNull()))
R += e.toString(ctx)->toQString();
}
return Value::undefinedValue();
}
- Value result = instance->getIndexed(ctx, len - 1);
+ Value result = instance->getIndexed(len - 1);
instance->deleteIndexedProperty(len - 1);
if (instance->isArrayObject())
for (; lo < hi; ++lo, --hi) {
bool loExists, hiExists;
- Value lval = instance->getIndexed(ctx, lo, &loExists);
- Value hval = instance->getIndexed(ctx, hi, &hiExists);
+ Value lval = instance->getIndexed(lo, &loExists);
+ Value hval = instance->getIndexed(hi, &hiExists);
if (hiExists)
instance->putIndexed(ctx, lo, hval);
else
// do it the slow way
for (uint k = 1; k < len; ++k) {
bool exists;
- Value v = instance->getIndexed(ctx, k, &exists);
+ Value v = instance->getIndexed(k, &exists);
if (exists)
instance->putIndexed(ctx, k - 1, v);
else
uint n = 0;
for (uint i = start; i < end; ++i) {
bool exists;
- Value v = o->getIndexed(ctx, i, &exists);
+ Value v = o->getIndexed(i, &exists);
if (exists) {
result->arraySet(n, v);
}
newArray->arrayReserve(deleteCount);
Property *pd = newArray->arrayData;
for (uint i = 0; i < deleteCount; ++i) {
- pd->value = instance->getIndexed(ctx, start + i);
+ pd->value = instance->getIndexed(start + i);
++pd;
}
newArray->arrayDataLen = deleteCount;
if (itemCount < deleteCount) {
for (uint k = start; k < len - deleteCount; ++k) {
bool exists;
- Value v = instance->getIndexed(ctx, k + deleteCount, &exists);
+ Value v = instance->getIndexed(k + deleteCount, &exists);
if (exists)
instance->putIndexed(k + itemCount, v);
else
uint k = len - deleteCount;
while (k > start) {
bool exists;
- Value v = instance->getIndexed(ctx, k + deleteCount - 1, &exists);
+ Value v = instance->getIndexed(k + deleteCount - 1, &exists);
if (exists)
instance->putIndexed(k + itemCount - 1, v);
else
} else {
for (uint k = len; k > 0; --k) {
bool exists;
- Value v = instance->getIndexed(ctx, k - 1, &exists);
+ Value v = instance->getIndexed(k - 1, &exists);
if (exists)
instance->putIndexed(ctx, k + ctx->argumentCount - 1, v);
else
if (instance->isStringObject()) {
for (uint k = fromIndex; k < len; ++k) {
bool exists;
- Value v = instance->getIndexed(ctx, k, &exists);
+ Value v = instance->getIndexed(k, &exists);
if (exists && __qmljs_strict_equal(v, searchValue))
return Value::fromDouble(k);
}
for (uint k = fromIndex; k > 0;) {
--k;
bool exists;
- Value v = instance->getIndexed(ctx, k, &exists);
+ Value v = instance->getIndexed(k, &exists);
if (exists && __qmljs_strict_equal(v, searchValue))
return Value::fromDouble(k);
}
bool ok = true;
for (uint k = 0; ok && k < len; ++k) {
bool exists;
- Value v = instance->getIndexed(ctx, k, &exists);
+ Value v = instance->getIndexed(k, &exists);
if (!exists)
continue;
for (uint k = 0; k < len; ++k) {
bool exists;
- Value v = instance->getIndexed(ctx, k, &exists);
+ Value v = instance->getIndexed(k, &exists);
if (!exists)
continue;
for (uint k = 0; k < len; ++k) {
bool exists;
- Value v = instance->getIndexed(ctx, k, &exists);
+ Value v = instance->getIndexed(k, &exists);
if (!exists)
continue;
for (uint k = 0; k < len; ++k) {
bool exists;
- Value v = instance->getIndexed(ctx, k, &exists);
+ Value v = instance->getIndexed(k, &exists);
if (!exists)
continue;
uint to = 0;
for (uint k = 0; k < len; ++k) {
bool exists;
- Value v = instance->getIndexed(ctx, k, &exists);
+ Value v = instance->getIndexed(k, &exists);
if (!exists)
continue;
} else {
bool kPresent = false;
while (k < len && !kPresent) {
- Value v = instance->getIndexed(ctx, k, &kPresent);
+ Value v = instance->getIndexed(k, &kPresent);
if (kPresent)
acc = v;
++k;
while (k < len) {
bool kPresent;
- Value v = instance->getIndexed(ctx, k, &kPresent);
+ Value v = instance->getIndexed(k, &kPresent);
if (kPresent) {
Value args[4];
args[0] = acc;
} else {
bool kPresent = false;
while (k > 0 && !kPresent) {
- Value v = instance->getIndexed(ctx, k - 1, &kPresent);
+ Value v = instance->getIndexed(k - 1, &kPresent);
if (kPresent)
acc = v;
--k;
while (k > 0) {
bool kPresent;
- Value v = instance->getIndexed(ctx, k - 1, &kPresent);
+ Value v = instance->getIndexed(k - 1, &kPresent);
if (kPresent) {
Value args[4];
args[0] = acc;
if (Object *arr = arg.asObject()) {
quint32 len = arr->get(ctx, ctx->engine->id_length).toUInt32();
for (quint32 i = 0; i < len; ++i) {
- Value a = arr->getIndexed(ctx, i);
+ Value a = arr->getIndexed(i);
args.append(a);
}
} else if (!(arg.isUndefined() || arg.isNull())) {
uint len = a->arrayLength();
for (uint i = 0; i < len; ++i) {
bool exists;
- Value v = a->getIndexed(ctx, i, &exists);
+ Value v = a->getIndexed(i, &exists);
if (!exists) {
partial += QStringLiteral("null");
continue;
if (o->isArrayObject()) {
uint arrayLen = o->arrayLength();
for (uint i = 0; i < arrayLen; ++i) {
- Value v = o->getIndexed(ctx, i);
+ Value v = o->getIndexed(i);
if (v.asNumberObject() || v.asStringObject() || v.isNumber())
v = __qmljs_to_string(v, ctx);
if (v.isString()) {
return vtbl->get(this, ctx, name, hasProperty);
}
-Value Managed::getIndexed(ExecutionContext *ctx, uint index, bool *hasProperty)
+Value Managed::getIndexed(uint index, bool *hasProperty)
{
- return vtbl->getIndexed(this, ctx, index, hasProperty);
+ return vtbl->getIndexed(this, index, hasProperty);
}
void (*collectDeletables)(Managed *, GCDeletable **deletable);
bool (*hasInstance)(Managed *, const Value &value);
Value (*get)(Managed *, ExecutionContext *ctx, String *name, bool *hasProperty);
- Value (*getIndexed)(Managed *, ExecutionContext *ctx, uint index, bool *hasProperty);
+ Value (*getIndexed)(Managed *, uint index, bool *hasProperty);
void (*put)(Managed *, ExecutionContext *ctx, String *name, const Value &value);
void (*putIndexed)(Managed *, ExecutionContext *ctx, uint index, const Value &value);
PropertyAttributes (*query)(const Managed *, String *name);
Value construct(ExecutionContext *context, Value *args, int argc);
Value call(ExecutionContext *context, const Value &thisObject, Value *args, int argc);
Value get(ExecutionContext *ctx, String *name, bool *hasProperty = 0);
- Value getIndexed(ExecutionContext *ctx, uint index, bool *hasProperty = 0);
+ Value getIndexed(uint index, bool *hasProperty = 0);
void put(ExecutionContext *ctx, String *name, const Value &value)
{ vtbl->put(this, ctx, name, value); }
void putIndexed(ExecutionContext *ctx, uint index, const Value &value)
uint idx = index.asArrayIndex();
if (idx < UINT_MAX) {
bool hasProperty = false;
- Value v = getIndexed(ctx, idx, &hasProperty);
+ Value v = getIndexed(idx, &hasProperty);
Value result;
op(ctx, &result, v, rhs);
putIndexed(ctx, idx, result);
return static_cast<Object *>(m)->internalGet(ctx, name, hasProperty);
}
-Value Object::getIndexed(Managed *m, ExecutionContext *ctx, uint index, bool *hasProperty)
+Value Object::getIndexed(Managed *m, uint index, bool *hasProperty)
{
- return static_cast<Object *>(m)->internalGetIndexed(ctx, index, hasProperty);
+ return static_cast<Object *>(m)->internalGetIndexed(index, hasProperty);
}
void Object::put(Managed *m, ExecutionContext *ctx, String *name, const Value &value)
{
uint idx = name->asArrayIndex();
if (idx != UINT_MAX)
- return getIndexed(ctx, idx, hasProperty);
+ return getIndexed(idx, hasProperty);
name->makeIdentifier(ctx);
return Value::undefinedValue();
}
-Value Object::internalGetIndexed(ExecutionContext *ctx, uint index, bool *hasProperty)
+Value Object::internalGetIndexed(uint index, bool *hasProperty)
{
Property *pd = 0;
PropertyAttributes attrs = Attr_Data;
if (pd) {
if (hasProperty)
*hasProperty = true;
- return getValue(ctx, pd, attrs);
+ return getValue(engine()->current, pd, attrs);
}
if (hasProperty)
// lets be safe and slow
for (uint i = fromIndex; i < endIndex; ++i) {
bool exists;
- Value value = o->getIndexed(ctx, i, &exists);
+ Value value = o->getIndexed(i, &exists);
if (exists && __qmljs_strict_equal(value, v))
return Value::fromDouble(i);
}
if (other->arrayAttributes) {
for (int i = 0; i < arrayDataLen; ++i) {
bool exists;
- arrayData[oldSize + i].value = const_cast<ArrayObject *>(other)->getIndexed(internalClass->engine->current, i, &exists);
+ arrayData[oldSize + i].value = const_cast<ArrayObject *>(other)->getIndexed(i, &exists);
if (arrayAttributes)
arrayAttributes[oldSize + i] = Attr_Data;
if (!exists) {
uint32_t length = arrayLength();
for (uint32_t i = 0; i < length; ++i)
- result.append(const_cast<ArrayObject *>(this)->getIndexed(engine->current, i).toString(engine->current)->toQString());
+ result.append(const_cast<ArrayObject *>(this)->getIndexed(i).toString(engine->current)->toQString());
return result;
}
inline Value get(String *name)
{ return vtbl->get(this, engine()->current, name, 0); }
- inline Value getIndexed(uint idx)
- { return vtbl->getIndexed(this, engine()->current, idx, 0); }
+ inline Value getIndexed(uint idx, bool *hasProperty = 0)
+ { return vtbl->getIndexed(this, idx, hasProperty); }
inline void put(String *name, const Value &v)
{ vtbl->put(this, engine()->current, name, v); }
inline void putIndexed(uint idx, const Value &v)
static void destroy(Managed *that);
static void markObjects(Managed *that);
static Value get(Managed *m, ExecutionContext *ctx, String *name, bool *hasProperty);
- static Value getIndexed(Managed *m, ExecutionContext *ctx, uint index, bool *hasProperty);
+ static Value getIndexed(Managed *m, uint index, bool *hasProperty);
static void put(Managed *m, ExecutionContext *ctx, String *name, const Value &value);
static void putIndexed(Managed *m, ExecutionContext *ctx, uint index, const Value &value);
static PropertyAttributes query(const Managed *m, String *name);
private:
Value internalGet(ExecutionContext *ctx, String *name, bool *hasProperty);
- Value internalGetIndexed(ExecutionContext *ctx, uint index, bool *hasProperty);
+ Value internalGetIndexed(uint index, bool *hasProperty);
void internalPut(ExecutionContext *ctx, String *name, const Value &value);
void internalPutIndexed(ExecutionContext *ctx, uint index, const Value &value);
bool internalDeleteProperty(String *name);
return Value::undefinedValue();
}
-Value RegExp::getIndexed(Managed *m, ExecutionContext *ctx, uint index, bool *hasProperty)
+Value RegExp::getIndexed(Managed *m, uint index, bool *hasProperty)
{
return Value::undefinedValue();
}
static void destroy(Managed *that);
static void markObjects(Managed *that);
static Value get(Managed *m, ExecutionContext *ctx, String *name, bool *hasProperty);
- static Value getIndexed(Managed *m, ExecutionContext *ctx, uint index, bool *hasProperty);
+ static Value getIndexed(Managed *m, uint index, bool *hasProperty);
static void put(Managed *m, ExecutionContext *ctx, String *name, const Value &value);
static void putIndexed(Managed *m, ExecutionContext *ctx, uint index, const Value &value);
static PropertyAttributes query(const Managed *m, String *name);
}
}
- Value res = o->getIndexed(ctx, idx);
+ Value res = o->getIndexed(idx);
if (result)
*result = res;
return;
return __qmljs_builtin_post_increment_member(context, result, base, s);
}
- Value v = o->getIndexed(context, idx);
+ Value v = o->getIndexed(idx);
if (v.isInteger() && v.integerValue() < INT_MAX) {
if (result)
return __qmljs_builtin_post_decrement_member(context, result, base, s);
}
- Value v = o->getIndexed(context, idx);
+ Value v = o->getIndexed(idx);
if (v.isInteger() && v.integerValue() > INT_MIN) {
if (result)
defineAccessorProperty(engine, QStringLiteral("length"), method_get_length, method_set_length);
}
- QV4::Value containerGetIndexed(QV4::ExecutionContext *ctx, uint index, bool *hasProperty)
+ QV4::Value containerGetIndexed(uint index, bool *hasProperty)
{
/* Qt containers have int (rather than uint) allowable indexes. */
if (index > INT_MAX) {
- generateWarning(ctx, QLatin1String("Index out of range during indexed get"));
+ generateWarning(engine()->current, QLatin1String("Index out of range during indexed get"));
if (hasProperty)
*hasProperty = false;
return QV4::Value::undefinedValue();
if (signedIdx < m_container.count()) {
if (hasProperty)
*hasProperty = true;
- return convertElementToValue(ctx->engine, m_container.at(signedIdx));
+ return convertElementToValue(engine(), m_container.at(signedIdx));
}
if (hasProperty)
*hasProperty = false;
int m_propertyIndex;
bool m_isReference;
- static QV4::Value getIndexed(QV4::Managed *that, QV4::ExecutionContext *ctx, uint index, bool *hasProperty)
- { return static_cast<QQmlSequence<Container> *>(that)->containerGetIndexed(ctx, index, hasProperty); }
+ static QV4::Value getIndexed(QV4::Managed *that, uint index, bool *hasProperty)
+ { return static_cast<QQmlSequence<Container> *>(that)->containerGetIndexed(index, hasProperty); }
static void putIndexed(Managed *that, QV4::ExecutionContext *ctx, uint index, const QV4::Value &value)
{ static_cast<QQmlSequence<Container> *>(that)->containerPutIndexed(ctx, index, value); }
static QV4::PropertyAttributes queryIndexed(const QV4::Managed *that, uint index)
return ctx->engine->stringPrototype->getValue(Value::fromString(that), ctx, pd, attrs);
}
-Value String::getIndexed(Managed *m, ExecutionContext *ctx, uint index, bool *hasProperty)
+Value String::getIndexed(Managed *m, uint index, bool *hasProperty)
{
String *that = static_cast<String *>(m);
+ ExecutionEngine *engine = that->engine();
if (index < that->_text.length()) {
if (hasProperty)
*hasProperty = true;
- return Value::fromString(ctx, that->toQString().mid(index, 1));
+ return Value::fromString(engine->newString(that->toQString().mid(index, 1)));
}
PropertyAttributes attrs;
- Property *pd = ctx->engine->stringPrototype->__getPropertyDescriptor__(index, &attrs);
+ Property *pd = engine->stringPrototype->__getPropertyDescriptor__(index, &attrs);
if (!pd || attrs.isGeneric()) {
if (hasProperty)
*hasProperty = false;
}
if (hasProperty)
*hasProperty = true;
- return ctx->engine->stringPrototype->getValue(Value::fromString(that), ctx, pd, attrs);
+ return engine->stringPrototype->getValue(Value::fromString(that), engine->current, pd, attrs);
}
void String::put(Managed *m, ExecutionContext *ctx, String *name, const Value &value)
protected:
static void destroy(Managed *);
static Value get(Managed *m, ExecutionContext *ctx, String *name, bool *hasProperty);
- static Value getIndexed(Managed *m, ExecutionContext *ctx, uint index, bool *hasProperty);
+ static Value getIndexed(Managed *m, uint index, bool *hasProperty);
static void put(Managed *m, ExecutionContext *ctx, String *name, const Value &value);
static void putIndexed(Managed *m, ExecutionContext *ctx, uint index, const Value &value);
static PropertyAttributes query(const Managed *m, String *name);
} else {
previousLastIndex = thisIndex;
}
- Value matchStr = result.objectValue()->getIndexed(context, 0, (bool *)0);
+ Value matchStr = result.objectValue()->getIndexed(0);
a->arraySet(n, matchStr);
++n;
}
ExecutionEngine *engine = d->engine;
QV4::ExecutionContext *ctx = engine->current;
try {
- QV4::Value v = arrayIndex == UINT_MAX ? o->get(ctx, engine->id_uintMax) : o->getIndexed(ctx, arrayIndex);
+ QV4::Value v = arrayIndex == UINT_MAX ? o->get(ctx, engine->id_uintMax) : o->getIndexed(arrayIndex);
return new QJSValuePrivate(engine, v);
} catch (QV4::Exception &e) {
e.accept(ctx);
QList<QObject *> list;
uint32_t length = a->arrayLength();
for (uint32_t ii = 0; ii < length; ++ii) {
- QV4::Value arrayItem = a->getIndexed(m_v4Engine->current, ii);
+ QV4::Value arrayItem = a->getIndexed(ii);
if (QV4::QObjectWrapper *qobjectWrapper = arrayItem.as<QV4::QObjectWrapper>()) {
list << qobjectWrapper->object();
} else {
int length = a->arrayLength();
for (int ii = 0; ii < length; ++ii)
- rv << toVariant(a->getIndexed(m_v4Engine->current, ii), -1);
+ rv << toVariant(a->getIndexed(ii), -1);
return rv;
}
if (!value.asFunctionObject())
virtual quint32 count() const = 0;
virtual const QQmlChangeSet::Change &at(int index) const = 0;
- static QV4::Value getIndexed(QV4::Managed *m, QV4::ExecutionContext *ctx, uint index, bool *hasProperty)
+ static QV4::Value getIndexed(QV4::Managed *m, uint index, bool *hasProperty)
{
+ QV4::ExecutionEngine *v4 = m->engine();
QQmlDelegateModelGroupChangeArray *array = m->as<QQmlDelegateModelGroupChangeArray>();
if (!array)
- ctx->throwTypeError();
+ v4->current->throwTypeError();
if (index >= array->count()) {
if (hasProperty)
const QQmlChangeSet::Change &change = array->at(index);
- QV4::Object *changeProto = engineData(array->engine()->v8Engine)->changeProto.value().asObject();
- QV4::ExecutionEngine *v4 = changeProto->engine();
+ QV4::Object *changeProto = engineData(v4->v8Engine)->changeProto.value().asObject();
QQmlDelegateModelGroupChange *object = new (v4->memoryManager) QQmlDelegateModelGroupChange(v4);
object->prototype = changeProto;
object->change = change;
static void destroy(QV4::Managed *that) {
static_cast<QQuickJSContext2DPixelData *>(that)->~QQuickJSContext2DPixelData();
}
- static QV4::Value getIndexed(QV4::Managed *m, QV4::ExecutionContext *ctx, uint index, bool *hasProperty);
+ static QV4::Value getIndexed(QV4::Managed *m, uint index, bool *hasProperty);
static void putIndexed(QV4::Managed *m, QV4::ExecutionContext *ctx, uint index, const QV4::Value &value);
static QV4::Value proto_get_length(QV4::SimpleCallContext *ctx);
return QV4::Value::fromInt32(r->image.width() * r->image.height() * 4);
}
-QV4::Value QQuickJSContext2DPixelData::getIndexed(QV4::Managed *m, QV4::ExecutionContext *ctx, uint index, bool *hasProperty)
+QV4::Value QQuickJSContext2DPixelData::getIndexed(QV4::Managed *m, uint index, bool *hasProperty)
{
QQuickJSContext2DPixelData *r = m->as<QQuickJSContext2DPixelData>();
if (!m)
- ctx->throwTypeError();
+ m->engine()->current->throwTypeError();
if (r && index < static_cast<quint32>(r->image.width() * r->image.height() * 4)) {
if (hasProperty)