diff options
author | Lars Knoll <lars.knoll@digia.com> | 2013-09-18 16:36:02 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-09-22 01:06:20 +0200 |
commit | df5edd28bc4258b89d9d5ffdddf837f339a17aad (patch) | |
tree | 2a5939d5e3c49928aadf43337832d3ef5a58df08 /src/qml/jsruntime/qv4object_p.h | |
parent | 700ba1bcb39e082049c96fafdfaccfe5d83cd77e (diff) |
convert Managed::put() API to be GC safe
Change-Id: I09198ce372fa545372db389fac26828d21ad5731
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/jsruntime/qv4object_p.h')
-rw-r--r-- | src/qml/jsruntime/qv4object_p.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/qml/jsruntime/qv4object_p.h b/src/qml/jsruntime/qv4object_p.h index b17146c64a..dd75187cc2 100644 --- a/src/qml/jsruntime/qv4object_p.h +++ b/src/qml/jsruntime/qv4object_p.h @@ -148,7 +148,7 @@ struct Q_QML_EXPORT Object: Managed { // // helpers // - void put(ExecutionContext *ctx, const QString &name, const Value &value); + void put(ExecutionContext *ctx, const QString &name, const ValueRef value); static ReturnedValue getValue(const Value &thisObject, const Property *p, PropertyAttributes attrs); ReturnedValue getValue(const Property *p, PropertyAttributes attrs) const { @@ -292,7 +292,7 @@ public: { return vtbl->get(this, name, hasProperty); } inline ReturnedValue getIndexed(uint idx, bool *hasProperty = 0) { return vtbl->getIndexed(this, idx, hasProperty); } - inline void put(String *name, const Value &v) + inline void put(const StringRef name, const ValueRef v) { vtbl->put(this, name, v); } inline void putIndexed(uint idx, const Value &v) { vtbl->putIndexed(this, idx, v); } @@ -312,21 +312,21 @@ protected: static void markObjects(Managed *that); static ReturnedValue get(Managed *m, const StringRef name, bool *hasProperty); static ReturnedValue getIndexed(Managed *m, uint index, bool *hasProperty); - static void put(Managed *m, String *name, const Value &value); + static void put(Managed *m, const StringRef name, const ValueRef value); static void putIndexed(Managed *m, uint index, const Value &value); static PropertyAttributes query(const Managed *m, String *name); static PropertyAttributes queryIndexed(const Managed *m, uint index); static bool deleteProperty(Managed *m, String *name); static bool deleteIndexedProperty(Managed *m, uint index); static ReturnedValue getLookup(Managed *m, Lookup *l); - static void setLookup(Managed *m, Lookup *l, const Value &v); + static void setLookup(Managed *m, Lookup *l, const ValueRef v); static Property *advanceIterator(Managed *m, ObjectIterator *it, String **name, uint *index, PropertyAttributes *attributes); private: ReturnedValue internalGet(const StringRef name, bool *hasProperty); ReturnedValue internalGetIndexed(uint index, bool *hasProperty); - void internalPut(const StringRef name, const Value &value); + void internalPut(const StringRef name, const ValueRef value); void internalPutIndexed(uint index, const Value &value); bool internalDeleteProperty(String *name); bool internalDeleteIndexedProperty(uint index); |