зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1389184 Avoid crashing in worker MemoryReporter if the GlobalScope is nullptr. r=asuth
This commit is contained in:
Родитель
cc3f3645bc
Коммит
4364d9066e
|
@ -2598,8 +2598,9 @@ WorkerPrivate::MemoryReporter::CollectReportsRunnable::WorkerRun(JSContext* aCx,
|
|||
{
|
||||
aWorkerPrivate->AssertIsOnWorkerThread();
|
||||
|
||||
RefPtr<Performance> performance =
|
||||
aWorkerPrivate->GlobalScope()->GetPerformanceIfExists();
|
||||
RefPtr<WorkerGlobalScope> scope = aWorkerPrivate->GlobalScope();
|
||||
RefPtr<Performance> performance = scope ? scope->GetPerformanceIfExists()
|
||||
: nullptr;
|
||||
if (performance) {
|
||||
size_t userEntries = performance->SizeOfUserEntries(JsWorkerMallocSizeOf);
|
||||
size_t resourceEntries =
|
||||
|
|
Загрузка…
Ссылка в новой задаче