зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1457073 - Fix a leak in WorkerEventTarget::Dispatch() about how already_AddRefed<> params are handled, r=smaug
This commit is contained in:
Родитель
50050d6ff7
Коммит
1fb956b640
|
@ -101,14 +101,14 @@ NS_IMETHODIMP
|
|||
WorkerEventTarget::Dispatch(already_AddRefed<nsIRunnable> aRunnable,
|
||||
uint32_t aFlags)
|
||||
{
|
||||
nsCOMPtr<nsIRunnable> runnable(aRunnable);
|
||||
|
||||
MutexAutoLock lock(mMutex);
|
||||
|
||||
if (!mWorkerPrivate) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIRunnable> runnable(aRunnable);
|
||||
|
||||
if (mBehavior == Behavior::Hybrid) {
|
||||
RefPtr<WorkerRunnable> r =
|
||||
mWorkerPrivate->MaybeWrapAsWorkerRunnable(runnable.forget());
|
||||
|
|
Загрузка…
Ссылка в новой задаче