mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-03 22:38:41 +09:00
Bug 1432272 - Make Fetch API use the global's base URL instead of the entry document's base URL
This commit is contained in:
parent
1ac1e90b6a
commit
62e2fbc4e9
2 changed files with 6 additions and 3 deletions
|
|
@ -313,7 +313,8 @@ Request::Constructor(const GlobalObject& aGlobal,
|
|||
nsAutoString requestURL;
|
||||
nsCString fragment;
|
||||
if (NS_IsMainThread()) {
|
||||
nsIDocument* doc = GetEntryDocument();
|
||||
nsCOMPtr<nsPIDOMWindowInner> inner(do_QueryInterface(global));
|
||||
nsIDocument* doc = inner ? inner->GetExtantDoc() : nullptr;
|
||||
if (doc) {
|
||||
GetRequestURLFromDocument(doc, input, requestURL, fragment, aRv);
|
||||
} else {
|
||||
|
|
@ -362,7 +363,8 @@ Request::Constructor(const GlobalObject& aGlobal,
|
|||
} else {
|
||||
nsAutoString referrerURL;
|
||||
if (NS_IsMainThread()) {
|
||||
nsIDocument* doc = GetEntryDocument();
|
||||
nsCOMPtr<nsPIDOMWindowInner> inner(do_QueryInterface(global));
|
||||
nsIDocument* doc = inner ? inner->GetExtantDoc() : nullptr;
|
||||
nsCOMPtr<nsIURI> uri;
|
||||
if (doc) {
|
||||
uri = ParseURLFromDocument(doc, referrer, aRv);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue