Changeset 28346 in webkit for trunk/JavaScriptCore/kjs/array_instance.cpp
- Timestamp:
- Dec 3, 2007, 7:46:14 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/kjs/array_instance.cpp
r28110 r28346 152 152 } 153 153 } else if (SparseArrayValueMap* map = storage->m_sparseValueMap) { 154 SparseArrayValueMap::iterator it = map->find(i); 155 if (it != map->end()) { 156 slot.setValueSlot(this, &it->second); 157 return true; 154 if (i >= sparseArrayCutoff) { 155 SparseArrayValueMap::iterator it = map->find(i); 156 if (it != map->end()) { 157 slot.setValueSlot(this, &it->second); 158 return true; 159 } 158 160 } 159 161 } … … 319 321 320 322 if (SparseArrayValueMap* map = storage->m_sparseValueMap) { 321 SparseArrayValueMap::iterator it = map->find(i); 322 if (it != map->end()) { 323 map->remove(it); 324 return true; 323 if (i >= sparseArrayCutoff) { 324 SparseArrayValueMap::iterator it = map->find(i); 325 if (it != map->end()) { 326 map->remove(it); 327 return true; 328 } 325 329 } 326 330 }
Note:
See TracChangeset
for help on using the changeset viewer.