newEntry = SearchTable(table, (*findEntry == oldEntry) ? key : getKey(table, oldEntry),
newEntry = SearchTable(table, getKey(table, oldEntry),
ChangeTable(PLDHashTable *table, int deltaLog2, const void *key, PLDHashEntryHdr **findEntry){    int oldLog2, newLog2;    PRUint32 oldCapacity, newCapacity;    char *newEntryStore, *oldEntryStore, *oldEntryAddr;    PRUint32 entrySize, i, nbytes;    PLDHashEntryHdr *oldEntry, *newEntry;    PLDHashGetKey getKey;    PLDHashMoveEntry moveEntry;    /* Look, but don't touch, until we succeed in getting new entry store. */    oldLog2 = table->sizeLog2;    newLog2 = oldLog2 + deltaLog2;    oldCapacity = PR_BIT(oldLog2);    newCapacity = PR_BIT(newLog2);    entrySize = table->entrySize;    nbytes = newCapacity * entrySize;    newEntryStore = table->ops->allocTable(table, nbytes);    if (!newEntryStore)        return PR_FALSE;    /* We can't fail from here on, so update table parameters. */    table->hashShift = PL_DHASH_BITS - newLog2;    table->sizeLog2 = newLog2;    table->sizeMask = PR_BITMASK(newLog2);    table->removedCount = 0;    /* Assign the new entry store to table. */    memset(newEntryStore, 0, nbytes);    oldEntryAddr = oldEntryStore = table->entryStore;    table->entryStore = newEntryStore;    getKey = table->ops->getKey;    moveEntry = table->ops->moveEntry;    /* Copy only live entries, leaving removed ones behind. */    for (i = 0; i < oldCapacity; i++) {        oldEntry = (PLDHashEntryHdr *)oldEntryAddr;        if (ENTRY_IS_LIVE(oldEntry)) {            newEntry = SearchTable(table,                                   (*findEntry == oldEntry)                                   ? key                                   : getKey(table, oldEntry),                                   oldEntry->keyHash);            PR_ASSERT(PL_DHASH_ENTRY_IS_FREE(newEntry));            moveEntry(table, oldEntry, newEntry);            newEntry->keyHash = oldEntry->keyHash;            if (findEntry && *findEntry == oldEntry)                *findEntry = newEntry;        }        oldEntryAddr += entrySize;    }    table->ops->freeTable(table, oldEntryStore);    return PR_TRUE;}