aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4managed_p.h
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@digia.com>2013-09-18 16:36:02 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-09-22 01:06:20 +0200
commitdf5edd28bc4258b89d9d5ffdddf837f339a17aad (patch)
tree2a5939d5e3c49928aadf43337832d3ef5a58df08 /src/qml/jsruntime/qv4managed_p.h
parent700ba1bcb39e082049c96fafdfaccfe5d83cd77e (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/qv4managed_p.h')
-rw-r--r--src/qml/jsruntime/qv4managed_p.h12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/qml/jsruntime/qv4managed_p.h b/src/qml/jsruntime/qv4managed_p.h
index 71b3573922..00ad52a9ef 100644
--- a/src/qml/jsruntime/qv4managed_p.h
+++ b/src/qml/jsruntime/qv4managed_p.h
@@ -99,14 +99,14 @@ struct ManagedVTable
bool (*hasInstance)(Managed *, const Value &value);
ReturnedValue (*get)(Managed *, const StringRef name, bool *hasProperty);
ReturnedValue (*getIndexed)(Managed *, uint index, bool *hasProperty);
- void (*put)(Managed *, String *name, const Value &value);
+ void (*put)(Managed *, const StringRef name, const ValueRef value);
void (*putIndexed)(Managed *, uint index, const Value &value);
PropertyAttributes (*query)(const Managed *, String *name);
PropertyAttributes (*queryIndexed)(const Managed *, uint index);
bool (*deleteProperty)(Managed *m, String *name);
bool (*deleteIndexedProperty)(Managed *m, uint index);
ReturnedValue (*getLookup)(Managed *m, Lookup *l);
- void (*setLookup)(Managed *m, Lookup *l, const Value &v);
+ void (*setLookup)(Managed *m, Lookup *l, const ValueRef v);
bool (*isEqualTo)(Managed *m, Managed *other);
Property *(*advanceIterator)(Managed *m, ObjectIterator *it, String **name, uint *index, PropertyAttributes *attributes);
const char *className;
@@ -265,8 +265,7 @@ public:
ReturnedValue call(CallData *d);
ReturnedValue get(const StringRef name, bool *hasProperty = 0);
ReturnedValue getIndexed(uint index, bool *hasProperty = 0);
- void put(String *name, const Value &value)
- { vtbl->put(this, name, value); }
+ void put(const StringRef name, const ValueRef value);
void putIndexed(uint index, const Value &value)
{ vtbl->putIndexed(this, index, value); }
PropertyAttributes query(String *name) const
@@ -280,8 +279,7 @@ public:
{ return vtbl->deleteIndexedProperty(this, index); }
ReturnedValue getLookup(Lookup *l)
{ return vtbl->getLookup(this, l); }
- void setLookup(Lookup *l, const Value &v)
- { vtbl->setLookup(this, l, v); }
+ void setLookup(Lookup *l, const ValueRef v);
bool isEqualTo(Managed *other)
{ return vtbl->isEqualTo(this, other); }
@@ -293,7 +291,7 @@ public:
static ReturnedValue construct(Managed *m, CallData *d);
static ReturnedValue call(Managed *m, CallData *);
static ReturnedValue getLookup(Managed *m, Lookup *);
- static void setLookup(Managed *m, Lookup *l, const Value &v);
+ static void setLookup(Managed *m, Lookup *l, const ValueRef v);
static bool isEqualTo(Managed *m, Managed *other);
uint internalType() const {