diff options
-rw-r--r-- | dom/workers/WorkerPrivate.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/dom/workers/WorkerPrivate.cpp b/dom/workers/WorkerPrivate.cpp index 51ab67f708..98f153ea89 100644 --- a/dom/workers/WorkerPrivate.cpp +++ b/dom/workers/WorkerPrivate.cpp @@ -241,6 +241,7 @@ private: WorkerRun(JSContext* aCx, WorkerPrivate* aWorkerPrivate) override { nsresult rv = mWrappedRunnable->Run(); + mWrappedRunnable = nullptr; if (NS_FAILED(rv)) { if (!JS_IsExceptionPending(aCx)) { Throw(aCx, rv); @@ -259,6 +260,7 @@ private: MOZ_ASSERT(cancelable); // We checked this earlier! rv = cancelable->Cancel(); nsresult rv2 = WorkerRunnable::Cancel(); + mWrappedRunnable = nullptr; return NS_FAILED(rv) ? rv : rv2; } }; |