зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1263392 - Console should reset the state of ConsoleCallData if the worker runnables are not correctly dispatched, r=smaug
This commit is contained in:
Родитель
25af6e92e8
Коммит
330d61a4ae
|
@ -407,14 +407,23 @@ private:
|
|||
MOZ_ASSERT(aRunnable);
|
||||
}
|
||||
|
||||
// If something goes wrong, we still need to release the ConsoleCallData
|
||||
// object. For this reason we have a custom Cancel method.
|
||||
NS_IMETHOD
|
||||
Cancel() override
|
||||
{
|
||||
mRunnable->ReleaseData();
|
||||
mRunnable->mConsole = nullptr;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
virtual bool
|
||||
WorkerRun(JSContext* aCx, workers::WorkerPrivate* aWorkerPrivate) override
|
||||
{
|
||||
MOZ_ASSERT(aWorkerPrivate);
|
||||
aWorkerPrivate->AssertIsOnWorkerThread();
|
||||
|
||||
mRunnable->ReleaseData();
|
||||
mRunnable->mConsole = nullptr;
|
||||
Cancel();
|
||||
|
||||
aWorkerPrivate->RemoveFeature(mRunnable);
|
||||
return true;
|
||||
|
|
Загрузка…
Ссылка в новой задаче