Relax comments restricting Operate calls from enumerator to allow lookups (no bug, comment change only).

This commit is contained in:
brendan%mozilla.org 2002-11-26 00:32:07 +00:00
parent a80340423e
commit 5380b54b0e
4 changed files with 6 additions and 6 deletions

View File

@ -616,7 +616,7 @@ JS_DHashTableEnumerate(JSDHashTable *table, JSDHashEnumerator etor, void *arg)
* if the table is underloaded according to the configured minimum alpha,
* and is not minimal-size already. Do this only if we removed above, so
* non-removing enumerations can count on stable table->entryStore until
* the next Operate or removing-Enumerate.
* the next non-lookup-Operate or removing-Enumerate.
*/
if (didRemove &&
(table->removedCount >= capacity >> 2 ||

View File

@ -522,8 +522,8 @@ JS_DHashTableRawRemove(JSDHashTable *table, JSDHashEntryHdr *entry);
* that were enumerated so far. Return the total number of live entries when
* enumeration completes normally.
*
* If etor calls JS_DHashTableOperate on table, it must return JS_DHASH_STOP;
* otherwise undefined behavior results.
* If etor calls JS_DHashTableOperate on table with op != JS_DHASH_LOOKUP, it
* must return JS_DHASH_STOP; otherwise undefined behavior results.
*
* If any enumerator returns JS_DHASH_REMOVE, table->entryStore may be shrunk
* or compressed after enumeration, but before JS_DHashTableEnumerate returns.

View File

@ -617,7 +617,7 @@ PL_DHashTableEnumerate(PLDHashTable *table, PLDHashEnumerator etor, void *arg)
* if the table is underloaded according to the configured minimum alpha,
* and is not minimal-size already. Do this only if we removed above, so
* non-removing enumerations can count on stable table->entryStore until
* the next Operate or removing-Enumerate.
* the next non-lookup-Operate or removing-Enumerate.
*/
if (didRemove &&
(table->removedCount >= capacity >> 2 ||

View File

@ -523,8 +523,8 @@ PL_DHashTableRawRemove(PLDHashTable *table, PLDHashEntryHdr *entry);
* that were enumerated so far. Return the total number of live entries when
* enumeration completes normally.
*
* If etor calls PL_DHashTableOperate on table, it must return PL_DHASH_STOP;
* otherwise undefined behavior results.
* If etor calls PL_DHashTableOperate on table with op != PL_DHASH_LOOKUP, it
* must return PL_DHASH_STOP; otherwise undefined behavior results.
*
* If any enumerator returns PL_DHASH_REMOVE, table->entryStore may be shrunk
* or compressed after enumeration, but before PL_DHashTableEnumerate returns.