- Timestamp:
- Nov 8, 2023 5:57:57 PM (16 months ago)
- Location:
- trunk/src/libs/xpcom18a4/xpcom/ds
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/libs/xpcom18a4/xpcom/ds/nsHashtable.cpp
r101975 r101997 49 49 #include <string.h> 50 50 #include "prmem.h" 51 #include "prlog.h"52 51 #include "nsHashtable.h" 53 52 #include "nsReadableUtils.h" … … 221 220 222 221 // shouldn't be adding an item during enumeration 223 PR_ASSERT(!mEnumerating);222 Assert(!mEnumerating); 224 223 225 224 HTEntry* entry = … … 267 266 268 267 // shouldn't be adding an item during enumeration 269 PR_ASSERT(!mEnumerating);268 Assert(!mEnumerating); 270 269 271 270 -
trunk/src/libs/xpcom18a4/xpcom/ds/pldhash.c
r49491 r101997 47 47 #include "prbit.h" 48 48 #include "pldhash.h" 49 #include "prlog.h" /* for PR_ASSERT */50 49 51 50 #ifdef PL_DHASHMETER … … 58 57 #endif 59 58 #ifdef VBOX_USE_IPRT_IN_XPCOM 59 # include <iprt/assert.h> 60 60 # include <iprt/mem.h> 61 61 #endif … … 273 273 * buggy caller intended. 274 274 */ 275 PR_ASSERT(0.5 <= maxAlpha && maxAlpha < 1 && 0 <= minAlpha);275 Assert(0.5 <= maxAlpha && maxAlpha < 1 && 0 <= minAlpha); 276 276 if (maxAlpha < 0.5 || 1 <= maxAlpha || minAlpha < 0) 277 277 return; … … 282 282 * size and the precision limit of maxAlphaFrac's fixed point format. 283 283 */ 284 PR_ASSERT(PL_DHASH_MIN_SIZE - (maxAlpha * PL_DHASH_MIN_SIZE) >= 1);284 Assert(PL_DHASH_MIN_SIZE - (maxAlpha * PL_DHASH_MIN_SIZE) >= 1); 285 285 if (PL_DHASH_MIN_SIZE - (maxAlpha * PL_DHASH_MIN_SIZE) < 1) { 286 286 maxAlpha = (float) … … 294 294 * (8-bit fixed point format). 295 295 */ 296 PR_ASSERT(minAlpha < maxAlpha / 2);296 Assert(minAlpha < maxAlpha / 2); 297 297 if (minAlpha >= maxAlpha / 2) { 298 298 size = PL_DHASH_TABLE_SIZE(table); … … 388 388 389 389 METER(table->stats.searches++); 390 PR_ASSERT(!(keyHash & COLLISION_FLAG));390 Assert(!(keyHash & COLLISION_FLAG)); 391 391 392 392 /* Compute the primary hash address. */ … … 464 464 465 465 #ifdef VBOX /* HACK ALERT! generation == PR_UINT32_MAX during enumeration. */ 466 PR_ASSERT(table->generation != PR_UINT32_MAX);466 Assert(table->generation != PR_UINT32_MAX); 467 467 if (table->generation == PR_UINT32_MAX) 468 468 return PR_FALSE; … … 506 506 newEntry = SearchTable(table, getKey(table, oldEntry), 507 507 oldEntry->keyHash, PL_DHASH_ADD); 508 PR_ASSERT(PL_DHASH_ENTRY_IS_FREE(newEntry));508 Assert(PL_DHASH_ENTRY_IS_FREE(newEntry)); 509 509 moveEntry(table, oldEntry, newEntry); 510 510 newEntry->keyHash = oldEntry->keyHash; … … 615 615 616 616 default: 617 PR_ASSERT(0);617 AssertFailed(); 618 618 entry = NULL; 619 619 } … … 627 627 PLDHashNumber keyHash; /* load first in case clearEntry goofs it */ 628 628 629 PR_ASSERT(PL_DHASH_ENTRY_IS_LIVE(entry));629 Assert(PL_DHASH_ENTRY_IS_LIVE(entry)); 630 630 keyHash = entry->keyHash; 631 631 table->ops->clearEntry(table, entry); … … 675 675 op = etor(table, entry, i++, arg); 676 676 #ifdef VBOX /* HACK ALERT! generation == PR_UINT32_MAX during enumeration. */ 677 PR_ASSERT(table->generation == PR_UINT32_MAX);677 Assert(table->generation == PR_UINT32_MAX); 678 678 #endif 679 679 if (op & PL_DHASH_REMOVE) {
Note:
See TracChangeset
for help on using the changeset viewer.