From afbf1f74af678af0eda76035133406aa8883408a Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Tue, 11 Nov 2014 15:08:30 +0100 Subject: Ported ExecutionEngine::newString and newIdentifier to Heap::String Avoid the use of Returned for newString and changed the identifier table to use Heap::String. This required moving some code back into Heap::String, but that's code that doesn't call back into the GC, so allocations and therefore future object moves aren't possible. Change-Id: I1dca3e9c12a9c56f09419af8cc8cba39fe04f720 Reviewed-by: Lars Knoll --- src/qml/jsruntime/qv4internalclass.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/qml/jsruntime/qv4internalclass.cpp') diff --git a/src/qml/jsruntime/qv4internalclass.cpp b/src/qml/jsruntime/qv4internalclass.cpp index 0f8eb2bfff..7247228091 100644 --- a/src/qml/jsruntime/qv4internalclass.cpp +++ b/src/qml/jsruntime/qv4internalclass.cpp @@ -310,7 +310,8 @@ InternalClass *InternalClass::addMemberImpl(String *string, PropertyAttributes d // The incoming string can come from anywhere, so make sure to // store a string in the nameMap that's guaranteed to get // marked properly during GC. - String *name = engine->newIdentifier(string->toQString()); + // #### GC + String *name = reinterpret_cast(engine->newIdentifier(string->toQString())); newClass->nameMap.add(newClass->size, name); newClass->propertyData.add(newClass->size, data); ++newClass->size; -- cgit v1.2.3