summaryrefslogtreecommitdiffstats
path: root/dom/fetch/Request.h
diff options
context:
space:
mode:
Diffstat (limited to 'dom/fetch/Request.h')
-rw-r--r--dom/fetch/Request.h18
1 files changed, 8 insertions, 10 deletions
diff --git a/dom/fetch/Request.h b/dom/fetch/Request.h
index ee8deffe5a..d4d10a2deb 100644
--- a/dom/fetch/Request.h
+++ b/dom/fetch/Request.h
@@ -21,7 +21,7 @@ namespace mozilla::dom {
class Headers;
class InternalHeaders;
-class RequestOrUSVString;
+class RequestOrUTF8String;
class Request final : public FetchBody<Request>, public nsWrapperCache {
NS_DECL_ISUPPORTS_INHERITED
@@ -37,12 +37,7 @@ class Request final : public FetchBody<Request>, public nsWrapperCache {
return Request_Binding::Wrap(aCx, this, aGivenProto);
}
- void GetUrl(nsAString& aUrl) const {
- nsAutoCString url;
- mRequest->GetURL(url);
- CopyUTF8toUTF16(url, aUrl);
- }
-
+ void GetUrl(nsACString& aUrl) const { mRequest->GetURL(aUrl); }
void GetMethod(nsCString& aMethod) const { aMethod = mRequest->mMethod; }
RequestMode Mode() const { return mRequest->mMode; }
@@ -59,6 +54,8 @@ class Request final : public FetchBody<Request>, public nsWrapperCache {
aIntegrity = mRequest->GetIntegrity();
}
+ bool Keepalive() const { return mRequest->GetKeepalive(); }
+
bool MozErrors() const { return mRequest->MozErrors(); }
RequestDestination Destination() const { return mRequest->Destination(); }
@@ -72,7 +69,7 @@ class Request final : public FetchBody<Request>, public nsWrapperCache {
return mRequest->IsContentPolicyTypeOverridden();
}
- void GetReferrer(nsAString& aReferrer) const {
+ void GetReferrer(nsACString& aReferrer) const {
mRequest->GetReferrer(aReferrer);
}
@@ -103,14 +100,15 @@ class Request final : public FetchBody<Request>, public nsWrapperCache {
const nsAString& BodyLocalPath() const { return mRequest->BodyLocalPath(); }
static SafeRefPtr<Request> Constructor(const GlobalObject& aGlobal,
- const RequestOrUSVString& aInput,
+ const RequestOrUTF8String& aInput,
const RequestInit& aInit,
ErrorResult& rv);
static SafeRefPtr<Request> Constructor(nsIGlobalObject* aGlobal,
JSContext* aCx,
- const RequestOrUSVString& aInput,
+ const RequestOrUTF8String& aInput,
const RequestInit& aInit,
+ const CallerType aCallerType,
ErrorResult& rv);
nsIGlobalObject* GetParentObject() const { return mOwner; }