Bug 1680977 - Add a null-check.

aLink might be null in the parent process, and even though it's only
null when getting URIs via IPC (which should never hit this code path in
a correct execution), we don't trust the child process so this is safer.

Differential Revision: https://phabricator.services.mozilla.com/D99703
This commit is contained in:
Emilio Cobos Álvarez 2020-12-14 18:01:39 +00:00
Родитель 82eb97087c
Коммит f0dd52653f
1 изменённых файлов: 4 добавлений и 1 удалений

Просмотреть файл

@ -80,7 +80,10 @@ void BaseHistory::RegisterVisitedCallback(nsIURI* aURI, Link* aLink) {
}
if (!CanStore(aURI)) {
return aLink->VisitedQueryFinished(/* visited = */ false);
if (aLink) {
aLink->VisitedQueryFinished(/* visited = */ false);
}
return;
}
// Obtain our array of observers for this URI.