From 71e6952456e044fef8cd4ab2e1d1b972011a051e Mon Sep 17 00:00:00 2001 From: janekptacijarabaci Date: Mon, 30 Apr 2018 23:11:43 +0200 Subject: Bug 1341754: Provide a valid triggeringPrincipal when calling SetURI in Location --- dom/base/nsGlobalWindow.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'dom') diff --git a/dom/base/nsGlobalWindow.cpp b/dom/base/nsGlobalWindow.cpp index 738703ef1..4ffccde9d 100644 --- a/dom/base/nsGlobalWindow.cpp +++ b/dom/base/nsGlobalWindow.cpp @@ -2521,8 +2521,13 @@ nsGlobalWindow::WouldReuseInnerWindow(nsIDocument* aNewDocument) return false; } - NS_ASSERTION(NS_IsAboutBlank(mDoc->GetDocumentURI()), - "How'd this happen?"); +#ifdef DEBUG +{ + nsCOMPtr 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. -- cgit v1.2.3