summaryrefslogtreecommitdiff
path: root/dom/fetch/Response.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'dom/fetch/Response.cpp')
-rw-r--r--dom/fetch/Response.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/dom/fetch/Response.cpp b/dom/fetch/Response.cpp
index 100a0204c3..42b25ae1d9 100644
--- a/dom/fetch/Response.cpp
+++ b/dom/fetch/Response.cpp
@@ -65,7 +65,8 @@ Response::Redirect(const GlobalObject& aGlobal, const nsAString& aUrl,
if (NS_IsMainThread()) {
nsCOMPtr<nsIURI> baseURI;
- nsIDocument* doc = GetEntryDocument();
+ nsCOMPtr<nsPIDOMWindowInner> inner(do_QueryInterface(aGlobal.GetAsSupports()));
+ nsIDocument* doc = inner ? inner->GetExtantDoc() : nullptr;
if (doc) {
baseURI = doc->GetBaseURI();
}