Bug 1341754: Provide a valid triggeringPrincipal when calling SetURI in Location

This commit is contained in:
janekptacijarabaci 2018-04-30 23:11:43 +02:00 committed by Roy Tam
commit e45bad2c54
2 changed files with 14 additions and 6 deletions

View file

@ -2521,8 +2521,13 @@ nsGlobalWindow::WouldReuseInnerWindow(nsIDocument* aNewDocument)
return false;
}
NS_ASSERTION(NS_IsAboutBlank(mDoc->GetDocumentURI()),
"How'd this happen?");
#ifdef DEBUG
{
nsCOMPtr<nsIURI> uri;
mDoc->GetDocumentURI()->CloneIgnoringRef(getter_AddRefs(uri));
NS_ASSERTION(NS_IsAboutBlank(uri), "How'd this happen?");
}
#endif
// Great, we're the original document, check for one of the other
// conditions.