aboutsummaryrefslogtreecommitdiffstats
path: root/qmljs_objects.h
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@digia.com>2012-12-14 10:25:27 +0100
committerSimon Hausmann <simon.hausmann@digia.com>2012-12-14 13:01:37 +0100
commit3a9321de688e2d81fd16e7d4710325810840a6ea (patch)
tree17b5e04920be25622ffac61635eae7d39ccd3285 /qmljs_objects.h
parent445b4e240210b08679e12ef155163ab2782af6a6 (diff)
Cleanup getPropertyDescriptor and arguments object
The only place where getProepertyDescriptor was still being used outside of Object itself was the arguments object. Fixed that by reimplementing get, hasProperty, put and canPut in the arguments object. Change-Id: Ie44c7acf857321c65bc0f58915de0353231459c0 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'qmljs_objects.h')
-rw-r--r--qmljs_objects.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/qmljs_objects.h b/qmljs_objects.h
index 9e3edebd71..ab309718a0 100644
--- a/qmljs_objects.h
+++ b/qmljs_objects.h
@@ -442,7 +442,7 @@ struct Object: Managed {
virtual Value __get__(ExecutionContext *ctx, String *name, bool *hasProperty = 0);
virtual PropertyDescriptor *__getOwnProperty__(ExecutionContext *ctx, String *name);
- virtual PropertyDescriptor *__getPropertyDescriptor__(ExecutionContext *ctx, String *name, PropertyDescriptor *to_fill);
+ PropertyDescriptor *__getPropertyDescriptor__(ExecutionContext *ctx, String *name);
virtual void __put__(ExecutionContext *ctx, String *name, Value value);
virtual bool __canPut__(ExecutionContext *ctx, String *name);
virtual bool __hasProperty__(const ExecutionContext *ctx, String *name) const;
@@ -707,11 +707,12 @@ struct URIErrorObject: ErrorObject {
struct ArgumentsObject: Object {
ExecutionContext *context;
- ArgumentsObject(ExecutionContext *context): context(context) {}
+ ArgumentsObject(ExecutionContext *context);
virtual QString className() { return QStringLiteral("Arguments"); }
virtual ArgumentsObject *asArgumentsObject() { return this; }
virtual Value __get__(ExecutionContext *ctx, String *name, bool *hasProperty);
- virtual PropertyDescriptor *__getPropertyDescriptor__(ExecutionContext *ctx, String *name, PropertyDescriptor *to_fill);
+ virtual void __put__(ExecutionContext *ctx, String *name, Value value);
+ virtual bool __canPut__(ExecutionContext *ctx, String *name);
};
} // namespace VM