Bug 779118 - Try to be more robust about waiting for compression to finish. r=luke
authorBenjamin Peterson <benjamin@python.org>
Sat, 13 Oct 2012 09:24:13 -0400
changeset 110276 97a10c2ac350a9981d88634fb53aab7845f98d36
parent 110275 31b3592edb37a1d234302dc95689101d3c32731e
child 110277 4ee4e3aa9ea6d133e9e29af1668ce21a5f98876c
push id93
push usernmatsakis@mozilla.com
push dateWed, 31 Oct 2012 21:26:57 +0000
reviewersluke
bugs779118
milestone19.0a1
Bug 779118 - Try to be more robust about waiting for compression to finish. r=luke
js/src/jsscript.cpp
--- a/js/src/jsscript.cpp
+++ b/js/src/jsscript.cpp
@@ -997,17 +997,17 @@ SourceCompressorThread::compress(SourceC
     PR_Unlock(lock);
 }
 
 void
 SourceCompressorThread::waitOnCompression(SourceCompressionToken *userTok)
 {
     JS_ASSERT(userTok == tok);
     PR_Lock(lock);
-    if (state == COMPRESSING)
+    while (state == COMPRESSING)
         PR_WaitCondVar(done, PR_INTERVAL_NO_TIMEOUT);
     JS_ASSERT(state == IDLE);
     SourceCompressionToken *saveTok = tok;
     tok = NULL;
     PR_Unlock(lock);
 
     JS_ASSERT(!saveTok->ss->ready());
 #ifdef DEBUG