Fix bug in property table
authorSimon Hausmann <simon.hausmann@digia.com>
Tue, 22 Jan 2013 13:53:46 +0000 (14:53 +0100)
committerLars Knoll <lars.knoll@digia.com>
Tue, 22 Jan 2013 14:04:45 +0000 (15:04 +0100)
When inserting a new entry in the property table and we're reusing
an entry from the free-list, make sure to assign the name correctly
to ensure we calculate the correct bucket according to the _new_
name and not the name from the old re-used property.

Also removed unused isEmpty() method that doesn't return the
correct thing anyway (_propertyCount is never decreased).

Change-Id: Ifc4f2f6b1c5fe975e30bdc81386061d6215ad3e3
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
qv4propertytable.h
tests/TestExpectations

index 6ee7f92..3bd4767 100644 (file)
@@ -87,8 +87,6 @@ public:
         delete[] _buckets;
     }
 
-    inline bool isEmpty() const { return _propertyCount == 0; }
-
     typedef PropertyTableEntry **iterator;
     inline iterator begin() const { return _properties; }
     inline iterator end() const { return _properties + _propertyCount; }
@@ -156,6 +154,7 @@ public:
         PropertyTableEntry *prop;
         if (_freeList) {
             prop = _freeList;
+            prop->name = name;
             _freeList = _freeList->next;
         } else {
             prop = new PropertyTableEntry(name);
index dfbf08b..fe7f7b8 100644 (file)
@@ -106,7 +106,6 @@ S11.3.2_A4_T4 failing
 11.4.1-5-2 failing
 S11.4.1_A1 failing
 S11.4.1_A2.1 failing
-S11.4.1_A3.3 failing
 11.4.4-2-1-s failing
 11.4.4-2-2-s failing
 11.4.5-2-1-s failing
@@ -499,7 +498,6 @@ S15.1.3.2_A5.3 failing
 15.2.3.3-4-13 failing
 15.2.3.3-4-9 failing
 15.2.3.6-2-17-1 failing
-15.2.3.5-4-315 failing
 15.2.3.6-4-291-1 failing
 15.2.3.6-4-292-1 failing
 15.2.3.6-4-293-2 failing
@@ -512,7 +510,6 @@ S15.1.3.2_A5.3 failing
 15.2.3.6-4-300-1 failing
 15.2.3.6-4-360-3 failing
 15.2.3.6-4-360-7 failing
-15.2.3.7-6-a-110 failing
 15.2.3.7-6-a-280 failing
 15.2.3.7-6-a-286 failing
 15.2.3.7-6-a-288 failing