From 3815302230bc043f98667c1ee0de6dee15969034 Mon Sep 17 00:00:00 2001 From: janekptacijarabaci Date: Thu, 5 Jul 2018 13:09:18 +0200 Subject: Bug 1331564 - XHR SyncTeardownRunnable must run also when the worker is in killing state --- dom/xhr/XMLHttpRequestWorker.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'dom/xhr') diff --git a/dom/xhr/XMLHttpRequestWorker.cpp b/dom/xhr/XMLHttpRequestWorker.cpp index b5f853a50..c9e892f26 100644 --- a/dom/xhr/XMLHttpRequestWorker.cpp +++ b/dom/xhr/XMLHttpRequestWorker.cpp @@ -1633,12 +1633,10 @@ XMLHttpRequestWorker::ReleaseProxy(ReleaseType aType) new SyncTeardownRunnable(mWorkerPrivate, mProxy); mProxy = nullptr; - ErrorResult forAssertionsOnly; + IgnoredErrorResult forAssertionsOnly; // This runnable _must_ be executed. - runnable->Dispatch(Killing, forAssertionsOnly); - if (forAssertionsOnly.Failed()) { - NS_ERROR("Failed to dispatch teardown runnable!"); - } + runnable->Dispatch(Dead, forAssertionsOnly); + MOZ_DIAGNOSTIC_ASSERT(!forAssertionsOnly.Failed()); } } } -- cgit v1.2.3