mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-03-05 08:09:15 +00:00
Bug 328106: Removal of HT_ENUMERATE_UNHASH. Its implementation had a bug
for 11 years which is a good demonstration that it has never been used.
This commit is contained in:
parent
1ce5986f6b
commit
11e703be51
@ -361,12 +361,10 @@ JS_HashTableEnumerateEntries(JSHashTable *ht, JSHashEnumerator f, void *arg)
|
||||
while ((he = *hep) != NULL) {
|
||||
rv = f(he, n, arg);
|
||||
n++;
|
||||
if (rv & (HT_ENUMERATE_REMOVE | HT_ENUMERATE_UNHASH)) {
|
||||
if (rv & HT_ENUMERATE_REMOVE) {
|
||||
*hep = he->next;
|
||||
if (rv & HT_ENUMERATE_REMOVE) {
|
||||
he->next = todo;
|
||||
todo = he;
|
||||
}
|
||||
he->next = todo;
|
||||
todo = he;
|
||||
} else {
|
||||
hep = &he->next;
|
||||
}
|
||||
|
@ -64,7 +64,6 @@ typedef intN (* JS_DLL_CALLBACK JSHashEnumerator)(JSHashEntry *he, intN i, void
|
||||
#define HT_ENUMERATE_NEXT 0 /* continue enumerating entries */
|
||||
#define HT_ENUMERATE_STOP 1 /* stop enumerating entries */
|
||||
#define HT_ENUMERATE_REMOVE 2 /* remove and free the current entry */
|
||||
#define HT_ENUMERATE_UNHASH 4 /* just unhash the current entry */
|
||||
|
||||
typedef struct JSHashAllocOps {
|
||||
void * (*allocTable)(void *pool, size_t size);
|
||||
|
Loading…
x
Reference in New Issue
Block a user