зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1494430 - Handle torn-down Render thread when getting memory reports. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D6994 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
f18ceae200
Коммит
58c4192a77
|
@ -159,7 +159,13 @@ RenderThread::AccumulateMemoryReport(MemoryReport aInitial)
|
|||
{
|
||||
RefPtr<MemoryReportPromise::Private> p = new MemoryReportPromise::Private(__func__);
|
||||
MOZ_ASSERT(!IsInRenderThread());
|
||||
MOZ_ASSERT(Get());
|
||||
if (!Get() || !Get()->Loop()) {
|
||||
// Seems to happen sometimes, see bug 1494430.
|
||||
NS_WARNING("No render thread, returning empty memory report");
|
||||
p->Resolve(aInitial, __func__);
|
||||
return p;
|
||||
}
|
||||
|
||||
Get()->Loop()->PostTask(
|
||||
NewRunnableMethod<MemoryReport, RefPtr<MemoryReportPromise::Private>>(
|
||||
"wr::RenderThread::DoAccumulateMemoryReport",
|
||||
|
|
Загрузка…
Ссылка в новой задаче