From 054729bb59001c52309a4c195f010421f280208e Mon Sep 17 00:00:00 2001 From: Ben Turner Date: Thu, 12 Jan 2012 08:55:44 -0800 Subject: [PATCH] Bug 717173 - 'Crash @ JS_ReportPendingException'. r=khuey. --- dom/workers/WorkerPrivate.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dom/workers/WorkerPrivate.cpp b/dom/workers/WorkerPrivate.cpp index f1fe9211015..a7b0faf06d4 100644 --- a/dom/workers/WorkerPrivate.cpp +++ b/dom/workers/WorkerPrivate.cpp @@ -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); }