Hold a strong ref to the URI while we're using it. Bug 387968, r+sr=jst

This commit is contained in:
bzbarsky@mit.edu 2007-07-13 21:27:08 -07:00
Родитель ce91ad91c1
Коммит d936fb370d
1 изменённых файлов: 1 добавлений и 1 удалений

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

@ -865,7 +865,7 @@ nsWebShell::OnLinkClickSync(nsIContent *aContent,
nsCOMPtr<nsIDocument> refererDoc(do_QueryInterface(refererOwnerDoc));
NS_ENSURE_TRUE(refererDoc, NS_ERROR_UNEXPECTED);
nsIURI *referer = refererDoc->GetDocumentURI();
nsCOMPtr<nsIURI> referer = refererDoc->GetDocumentURI();
// referer could be null here in some odd cases, but that's ok,
// we'll just load the link w/o sending a referer in those cases.