Update NSPR to NSPR_4_10_7_BETA3 to fix bug 1034415 and bug 979278
authorEhsan Akhgari <ehsan@mozilla.com>
Mon, 07 Jul 2014 11:13:29 -0400
changeset 214601 51895ae51261625cd663f1a6acffc7b8153f765f
parent 214600 1d82bd7c2c977dd412d8e1ad414c453d7871b284
child 214602 b2535c273dc4b2e532831f81a8339ec33728fcbd
push id515
push userraliiev@mozilla.com
push dateMon, 06 Oct 2014 12:51:51 +0000
treeherdermozilla-release@267c7a481bef [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1034415, 979278
milestone33.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Update NSPR to NSPR_4_10_7_BETA3 to fix bug 1034415 and bug 979278
nsprpub/TAG-INFO
nsprpub/config/prdepend.h
nsprpub/configure
nsprpub/configure.in
nsprpub/pr/src/threads/prtpd.c
--- a/nsprpub/TAG-INFO
+++ b/nsprpub/TAG-INFO
@@ -1,1 +1,1 @@
-NSPR_4_10_7_BETA2
+NSPR_4_10_7_BETA3
--- 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/configure
+++ b/nsprpub/configure
@@ -7094,18 +7094,16 @@ tools are selected during the Xcode/Deve
         CC="$CC -mwindows"
         CXX="$CXX -mwindows"
         DLL_SUFFIX=dll
         MKSHLIB='$(CC) -shared -Wl,--export-all-symbols -Wl,--out-implib -Wl,$(IMPORT_LIBRARY) $(DLLBASE) -o $(subst $(OBJDIR)/,,$(SHARED_LIBRARY))'
         RC=$WINDRES
         # Use temp file for windres (bug 213281)
         RCFLAGS='-O coff --use-temp-file'
     else
-        CC=cl
-        CXX=cl
         LD=link
         AR='lib -NOLOGO -OUT:"$@"'
         AR_FLAGS=
         RANLIB='echo not_ranlib'
         STRIP='echo not_strip'
         RC=rc.exe
         GARBAGE='$(OBJDIR)/vc20.pdb $(OBJDIR)/vc40.pdb'
         OBJ_SUFFIX=obj
--- a/nsprpub/configure.in
+++ b/nsprpub/configure.in
@@ -1910,18 +1910,16 @@ tools are selected during the Xcode/Deve
         CC="$CC -mwindows"
         CXX="$CXX -mwindows"
         DLL_SUFFIX=dll
         MKSHLIB='$(CC) -shared -Wl,--export-all-symbols -Wl,--out-implib -Wl,$(IMPORT_LIBRARY) $(DLLBASE) -o $(subst $(OBJDIR)/,,$(SHARED_LIBRARY))'
         RC=$WINDRES
         # Use temp file for windres (bug 213281)
         RCFLAGS='-O coff --use-temp-file'
     else
-        CC=cl
-        CXX=cl
         LD=link
         AR='lib -NOLOGO -OUT:"$@"'
         AR_FLAGS=
         RANLIB='echo not_ranlib'
         STRIP='echo not_strip'
         RC=rc.exe
         GARBAGE='$(OBJDIR)/vc20.pdb $(OBJDIR)/vc40.pdb'
         OBJ_SUFFIX=obj
--- a/nsprpub/pr/src/threads/prtpd.c
+++ b/nsprpub/pr/src/threads/prtpd.c
@@ -125,38 +125,42 @@ PR_IMPLEMENT(PRStatus) PR_NewThreadPriva
 ** Define some per-thread-private data.
 **     "index" is an index into the per-thread private data table
 **     "priv" is the per-thread-private data 
 **
 ** If the per-thread private data table has a previously registered
 ** destructor function and a non-NULL per-thread-private data value,
 ** the destructor function is invoked.
 **
-** This can return PR_FAILURE if index is invalid (ie., beyond the current
-** high water mark) or memory is insufficient to allocate an exanded vector.
+** This can return PR_FAILURE if index is invalid (ie., beyond the limit
+** on the TPD slots) or memory is insufficient to allocate an expanded
+** vector.
 */
 
 PR_IMPLEMENT(PRStatus) PR_SetThreadPrivate(PRUintn index, void *priv)
 {
     PRThread *self = PR_GetCurrentThread();
 
     /*
-    ** The index being set might not have a sufficient vector in this
-    ** thread. But if the index has been allocated, it's okay to go
-    ** ahead and extend this one now.
+    ** To improve performance, we don't check if the index has been
+    ** allocated.
     */
-    if ((index >= _PR_TPD_LIMIT) || (index >= _pr_tpd_highwater))
+    if (index >= _PR_TPD_LIMIT)
     {
         PR_SetError(PR_TPD_RANGE_ERROR, 0);
         return PR_FAILURE;
     }
 
     PR_ASSERT(((NULL == self->privateData) && (0 == self->tpdLength))
         || ((NULL != self->privateData) && (0 != self->tpdLength)));
 
+    /*
+    ** If this thread does not have a sufficient vector for the index
+    ** being set, go ahead and extend this vector now.
+    */
     if ((NULL == self->privateData) || (self->tpdLength <= index))
     {
         void *extension = PR_CALLOC(_pr_tpd_length * sizeof(void*));
         if (NULL == extension)
         {
             PR_SetError(PR_OUT_OF_MEMORY_ERROR, 0);
             return PR_FAILURE;
         }