From 941a161781d1238a3264ef9ef7edbfa07d0741fb Mon Sep 17 00:00:00 2001 From: Brian Hackett Date: Thu, 13 Dec 2012 15:27:07 -0700 Subject: [PATCH] Bug 821216 - Don't trigger off thread compilation with no threads available, r=dvander. --- js/src/jsworkers.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/src/jsworkers.cpp b/js/src/jsworkers.cpp index 59e70b27a05..34bc6ef78b1 100644 --- a/js/src/jsworkers.cpp +++ b/js/src/jsworkers.cpp @@ -20,7 +20,7 @@ using mozilla::DebugOnly; bool js::OffThreadCompilationAvailable(JSContext *cx) { - return cx->runtime->useHelperThreads(); + return cx->runtime->useHelperThreads() && cx->runtime->helperThreadCount() > 0; } bool