зеркало из https://github.com/mozilla/pjs.git
In remove set int key value to 0 so a new key with the same slot would get initial 0 after put(int, Object)
This commit is contained in:
Родитель
66c0e18306
Коммит
52fa3848f7
|
@ -172,7 +172,10 @@ class UintMap implements Serializable {
|
|||
if (0 <= index) {
|
||||
keys[index] = DELETED;
|
||||
--keyCount;
|
||||
// Allow to GC value and make sure that new key with the deleted
|
||||
// slot shall get proper default values
|
||||
if (values != null) { values[index] = null; }
|
||||
if (ivaluesShift != 0) { keys[ivaluesShift + index] = 0; }
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче