diff options
author | Lars Knoll <[email protected]> | 2013-09-19 09:58:50 +0200 |
---|---|---|
committer | The Qt Project <[email protected]> | 2013-09-22 01:06:20 +0200 |
commit | 383fa29f95a595be4d6f4da113dff3b0dca79343 (patch) | |
tree | c0158b37c56df5daa9be9d7222cce229d8afaa96 /src/qml/jsruntime/qv4object.cpp | |
parent | 332b870bd8f0fba6f09e539376a674d7a4413631 (diff) |
Convert the remaining vtable methods to be GC safe
Change-Id: I679d1833609c41d71e8436ec0ba8a4624f0c4dd0
Reviewed-by: Simon Hausmann <[email protected]>
Diffstat (limited to 'src/qml/jsruntime/qv4object.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4object.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/qml/jsruntime/qv4object.cpp b/src/qml/jsruntime/qv4object.cpp index 2a36371bdd..1e45334e3a 100644 --- a/src/qml/jsruntime/qv4object.cpp +++ b/src/qml/jsruntime/qv4object.cpp @@ -434,7 +434,7 @@ bool Object::__hasProperty__(const StringRef name) const const Object *o = this; while (o) { - if (!o->query(name.getPointer()).isEmpty()) + if (!o->query(name).isEmpty()) return true; o = o->prototype(); } @@ -477,14 +477,14 @@ void Object::putIndexed(Managed *m, uint index, const ValueRef value) static_cast<Object *>(m)->internalPutIndexed(index, value); } -PropertyAttributes Object::query(const Managed *m, String *name) +PropertyAttributes Object::query(const Managed *m, StringRef name) { uint idx = name->asArrayIndex(); if (idx != UINT_MAX) return queryIndexed(m, idx); const Object *o = static_cast<const Object *>(m); - idx = o->internalClass->find(name); + idx = o->internalClass->find(name.getPointer()); if (idx < UINT_MAX) return o->internalClass->propertyData[idx]; @@ -508,7 +508,7 @@ PropertyAttributes Object::queryIndexed(const Managed *m, uint index) return Attr_Invalid; } -bool Object::deleteProperty(Managed *m, String *name) +bool Object::deleteProperty(Managed *m, const StringRef name) { return static_cast<Object *>(m)->internalDeleteProperty(name); } @@ -874,7 +874,7 @@ void Object::internalPutIndexed(uint index, const ValueRef value) } // Section 8.12.7 -bool Object::internalDeleteProperty(String *name) +bool Object::internalDeleteProperty(const StringRef name) { uint idx = name->asArrayIndex(); if (idx != UINT_MAX) |