Bug 1278443 - Part 2: Continue to run the worker even if BackgroundChild fails to create. r?mrbkap
MozReview-Commit-ID: LBBN4hfXigf
--- a/dom/workers/RuntimeService.cpp
+++ b/dom/workers/RuntimeService.cpp
@@ -2783,17 +2783,18 @@ WorkerThreadPrimaryRunnable::Run()
profiler_register_thread(threadName.get(), &stackBaseGuess);
// Note: SynchronouslyCreateForCurrentThread() must be called prior to
// mWorkerPrivate->SetThread() in order to avoid accidentally consuming
// worker messages here.
if (NS_WARN_IF(!BackgroundChild::SynchronouslyCreateForCurrentThread())) {
// XXX need to fire an error at parent.
- return NS_ERROR_UNEXPECTED;
+ // Failed in creating BackgroundChild: probably in shutdown. Continue to run
+ // without BackgroundChild created.
}
class MOZ_STACK_CLASS SetThreadHelper final
{
// Raw pointer: this class is on the stack.
WorkerPrivate* mWorkerPrivate;
public: