No bug. Fix a spelling mistake in a function name and avoid a compile warning. r=terrence.
authorNicholas Nethercote <nnethercote@mozilla.com>
Wed, 22 Aug 2012 17:48:35 -0700
changeset 105124 6dc02881f1b640a8f5a3342660ae5a0eea6a5704
parent 105123 fdc76cb3b523191deb357accab5b24f2e22dad26
child 105125 df43ad6d04c1b0f8e72a376377e3acbef6b9cdaa
push id55
push usershu@rfrn.org
push dateThu, 30 Aug 2012 01:33:09 +0000
reviewersterrence
milestone17.0a1
No bug. Fix a spelling mistake in a function name and avoid a compile warning. r=terrence.
js/src/jsgc.cpp
--- a/js/src/jsgc.cpp
+++ b/js/src/jsgc.cpp
@@ -2837,29 +2837,29 @@ SweepBackgroundThings(JSRuntime* rt, boo
     }
 
     while (JSCompartment *c = rt->gcSweepingCompartments) {
         rt->gcSweepingCompartments = c->gcNextCompartment;
         c->gcNextCompartment = NULL;
     }
 }
 
+#ifdef JS_THREADSAFE
 static void
-AssertBackgroundSweepingFinshed(JSRuntime *rt)
+AssertBackgroundSweepingFinished(JSRuntime *rt)
 {
     for (CompartmentsIter c(rt); !c.done(); c.next()) {
         JS_ASSERT(!c->gcNextCompartment);
         for (unsigned i = 0 ; i < FINALIZE_LIMIT ; ++i) {
             JS_ASSERT(!c->arenas.arenaListsToSweep[i]);
             JS_ASSERT(c->arenas.doneBackgroundFinalize(AllocKind(i)));
         }
     }
 }
 
-#ifdef JS_THREADSAFE
 static unsigned
 GetCPUCount()
 {
     static unsigned ncpus = 0;
     if (ncpus == 0) {
 # ifdef XP_WIN
         SYSTEM_INFO sysinfo;
         GetSystemInfo(&sysinfo);
@@ -3035,33 +3035,33 @@ GCHelperThread::startBackgroundShrink()
 void
 GCHelperThread::waitBackgroundSweepEnd()
 {
 #ifdef JS_THREADSAFE
     AutoLockGC lock(rt);
     while (state == SWEEPING)
         PR_WaitCondVar(done, PR_INTERVAL_NO_TIMEOUT);
     if (rt->gcIncrementalState == NO_INCREMENTAL)
-        AssertBackgroundSweepingFinshed(rt);
+        AssertBackgroundSweepingFinished(rt);
 #else
     JS_ASSERT(state == IDLE);
 #endif /* JS_THREADSAFE */
 }
 
 void
 GCHelperThread::waitBackgroundSweepOrAllocEnd()
 {
 #ifdef JS_THREADSAFE
     AutoLockGC lock(rt);
     if (state == ALLOCATING)
         state = CANCEL_ALLOCATION;
     while (state == SWEEPING || state == CANCEL_ALLOCATION)
         PR_WaitCondVar(done, PR_INTERVAL_NO_TIMEOUT);
     if (rt->gcIncrementalState == NO_INCREMENTAL)
-        AssertBackgroundSweepingFinshed(rt);
+        AssertBackgroundSweepingFinished(rt);
 #else
     JS_ASSERT(state == IDLE);
 #endif /* JS_THREADSAFE */
 }
 
 /* Must be called with the GC lock taken. */
 inline void
 GCHelperThread::startBackgroundAllocationIfIdle()