Changeset 11275 in vbox for trunk/src/libs/xpcom18a4/xpcom
- Timestamp:
- Aug 8, 2008 7:41:13 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/libs/xpcom18a4/xpcom/ds/pldhash.c
r1 r11275 607 607 PLDHashEntryHdr *entry; 608 608 PLDHashOperator op; 609 609 #ifdef VBOX 610 PRUint32 generation; 611 char *entryStore; 612 613 generation = table->generation; 614 entryStore = table->entryStore; 615 #endif 610 616 entryAddr = table->entryStore; 611 617 entrySize = table->entrySize; … … 618 624 if (ENTRY_IS_LIVE(entry)) { 619 625 op = etor(table, entry, i++, arg); 626 #ifdef VBOX 627 /* 628 * Adjust pointers if entryStore was reallocated as a result 629 * of an add or remove performed by the enumerator. It is 630 * probably not supposed to do this, but since it does we'll 631 * simply deal with it. 632 * 633 * This happens during ipcDConnectService::OnClientStateChange() 634 * / ipcDConnectService::DeleteInstance() now. 635 */ 636 if (generation != table->generation) 637 { 638 entryAddr += table->entryStore - entryStore; 639 entryStore = table->entryStore; 640 entry = (PLDHashEntryHdr *)entryAddr; 641 capacity = PL_DHASH_TABLE_SIZE(table); 642 entryLimit = table->entryStore + capacity * entrySize; 643 } 644 645 #endif 620 646 if (op & PL_DHASH_REMOVE) { 621 647 METER(table->stats.removeEnums++);
Note:
See TracChangeset
for help on using the changeset viewer.