Bug 717173 - 'Crash @ JS_ReportPendingException'. r=khuey.

This commit is contained in:
Ben Turner 2012-01-12 08:55:44 -08:00
parent 50cbb4cd5b
commit 2011976f88

View File

@ -1528,7 +1528,7 @@ WorkerRunnable::PreDispatch(JSContext* aCx, WorkerPrivate* aWorkerPrivate)
}
#endif
if (mBusyBehavior == ModifyBusyCount) {
if (mBusyBehavior == ModifyBusyCount && aCx) {
return aWorkerPrivate->ModifyBusyCount(aCx, true);
}
@ -1616,7 +1616,7 @@ WorkerRunnable::PostDispatch(JSContext* aCx, WorkerPrivate* aWorkerPrivate,
}
#endif
if (!aDispatchResult) {
if (!aDispatchResult && aCx) {
if (mBusyBehavior == ModifyBusyCount) {
aWorkerPrivate->ModifyBusyCount(aCx, false);
}