зеркало из 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();
|
aWorkerPrivate->AssertIsOnWorkerThread();
|
||||||
|
|
||||||
RefPtr<Performance> performance =
|
RefPtr<WorkerGlobalScope> scope = aWorkerPrivate->GlobalScope();
|
||||||
aWorkerPrivate->GlobalScope()->GetPerformanceIfExists();
|
RefPtr<Performance> performance = scope ? scope->GetPerformanceIfExists()
|
||||||
|
: nullptr;
|
||||||
if (performance) {
|
if (performance) {
|
||||||
size_t userEntries = performance->SizeOfUserEntries(JsWorkerMallocSizeOf);
|
size_t userEntries = performance->SizeOfUserEntries(JsWorkerMallocSizeOf);
|
||||||
size_t resourceEntries =
|
size_t resourceEntries =
|
||||||
|
|
Загрузка…
Ссылка в новой задаче