зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1513304 - check that the nsIURI pointer is not null - r=baku
Verify that the script URI is not null before using it. If it's the case, we can't really continue because that url identifies the worker in the metrics. Differential Revision: https://phabricator.services.mozilla.com/D15187 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
5dc04f9f8d
Коммит
aa665262ce
|
@ -458,6 +458,11 @@ RefPtr<PerformanceInfoPromise> WorkerDebugger::ReportPerformanceInfo() {
|
||||||
|
|
||||||
// getting the worker URL
|
// getting the worker URL
|
||||||
RefPtr<nsIURI> scriptURI = mWorkerPrivate->GetResolvedScriptURI();
|
RefPtr<nsIURI> scriptURI = mWorkerPrivate->GetResolvedScriptURI();
|
||||||
|
if (NS_WARN_IF(!scriptURI)) {
|
||||||
|
// This can happen at shutdown, let's stop here.
|
||||||
|
return PerformanceInfoPromise::CreateAndReject(NS_ERROR_FAILURE,
|
||||||
|
__func__);
|
||||||
|
}
|
||||||
nsCString url = scriptURI->GetSpecOrDefault();
|
nsCString url = scriptURI->GetSpecOrDefault();
|
||||||
|
|
||||||
// Workers only produce metrics for a single category -
|
// Workers only produce metrics for a single category -
|
||||||
|
|
Загрузка…
Ссылка в новой задаче