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

git-svn-id: svn://10.0.0.236/trunk@229942 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
bzbarsky%mit.edu
2007-07-14 04:27:08 +00:00
parent efc47027ad
commit 1420b2bffc

View File

@@ -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.