return &tmpProperty;
}
+bool StringObject::deleteIndexedProperty(Managed *m, ExecutionContext *ctx, uint index)
+{
+ StringObject *o = m->asStringObject();
+ if (!o)
+ ctx->throwTypeError();
+
+ if (index < o->value.stringValue()->toQString().length()) {
+ if (ctx->strictMode)
+ ctx->throwTypeError();
+ return false;
+ }
+ return true;
+}
+
Property *StringObject::advanceIterator(Managed *m, ObjectIterator *it, String **name, uint *index, PropertyAttributes *attrs)
{
StringObject *s = static_cast<StringObject *>(m);
namespace QV4 {
struct StringObject: Object {
+ Q_MANAGED
+
Value value;
mutable Property tmpProperty;
StringObject(ExecutionEngine *engine, const Value &value);
Property *getIndex(uint index) const;
+ static bool deleteIndexedProperty(Managed *m, ExecutionContext *ctx, uint index);
+
protected:
static Property *advanceIterator(Managed *m, ObjectIterator *it, String **name, uint *index, PropertyAttributes *attrs);
- static const ManagedVTable static_vtbl;
static void markObjects(Managed *that);
};
return false;
ExecutionEngine *engine = d->engine();
- String *s = engine->newIdentifier(name);
+ String *s = engine->newString(name);
return o->deleteProperty(engine->current, s);
}