Bug 807883: Update NSPR to NSPR 4.9.6 Beta 2. This adds 'const' to the
authorWan-Teh Chang <wtc@google.com>
Mon, 11 Feb 2013 17:35:56 -0800
changeset 121581 9a6bef63fdc05d756079ec9d725a32ca822949a6
parent 121573 bd883f16f17f2823bd2aa3cd157ccc46dfa9b98f
child 121582 d1b8047ed4dba5ff8669b69534a4e4c416871591
push idunknown
push userunknown
push dateunknown
bugs807883
milestone21.0a1
Bug 807883: Update NSPR to NSPR 4.9.6 Beta 2. This adds 'const' to the 'pool' input parameter of PL_SizeOfArenaPoolExcludingPool. r=n.nethercote.
nsprpub/TAG-INFO
nsprpub/config/prdepend.h
nsprpub/lib/ds/plarena.c
nsprpub/lib/ds/plarenas.h
--- a/nsprpub/TAG-INFO
+++ b/nsprpub/TAG-INFO
@@ -1,1 +1,1 @@
-NSPR_4_9_6_BETA1
+NSPR_4_9_6_BETA2
--- a/nsprpub/config/prdepend.h
+++ b/nsprpub/config/prdepend.h
@@ -5,9 +5,8 @@
 
 /*
  * A dummy header file that is a dependency for all the object files.
  * Used to force a full recompilation of NSPR in Mozilla's Tinderbox
  * depend builds.  See comments in rules.mk.
  */
 
 #error "Do not include this header file."
-
--- a/nsprpub/lib/ds/plarena.c
+++ b/nsprpub/lib/ds/plarena.c
@@ -341,24 +341,24 @@ PR_IMPLEMENT(void) PL_ArenaFinish(void)
     if (arenaLock) {
         PR_DestroyLock(arenaLock);
         arenaLock = NULL;
     }
     once = pristineCallOnce;
 }
 
 PR_IMPLEMENT(size_t) PL_SizeOfArenaPoolExcludingPool(
-    PLArenaPool *pool, PLMallocSizeFn mallocSizeOf)
+    const PLArenaPool *pool, PLMallocSizeFn mallocSizeOf)
 {
     /*
      * The first PLArena is within |pool|, so don't measure it.  Subsequent
-     * PLArenas are separate and must measured.
+     * PLArenas are separate and must be measured.
      */
     size_t size = 0;
-    PLArena *arena = pool->first.next;
+    const PLArena *arena = pool->first.next;
     while (arena) {
         size += mallocSizeOf(arena);
         arena = arena->next;
     }
     return size;
 }
 
 #ifdef PL_ARENAMETER
--- a/nsprpub/lib/ds/plarenas.h
+++ b/nsprpub/lib/ds/plarenas.h
@@ -56,23 +56,23 @@ PR_EXTERN(void *) PL_ArenaGrow(
 PR_EXTERN(void) PL_ArenaRelease(PLArenaPool *pool, char *mark);
 
 /*
 ** memset contents of all arenas in pool to pattern
 */
 PR_EXTERN(void) PL_ClearArenaPool(PLArenaPool *pool, PRInt32 pattern);
 
 /*
-** A function like malloc_size() or malloc_usable_size() that returns the
+** A function like malloc_size() or malloc_usable_size() that measures the
 ** size of a heap block.
 */
 typedef size_t (*PLMallocSizeFn)(const void *ptr);
 
 /*
-** Return all memory used by a PLArenaPool, excluding the PLArenaPool
+** Measure all memory used by a PLArenaPool, excluding the PLArenaPool
 ** structure.
 */
 PR_EXTERN(size_t) PL_SizeOfArenaPoolExcludingPool(
-    PLArenaPool *pool, PLMallocSizeFn mallocSizeOf);
+    const PLArenaPool *pool, PLMallocSizeFn mallocSizeOf);
 
 PR_END_EXTERN_C
 
 #endif /* PLARENAS_H */