зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1871374 - add keepalive setters and getters in InternalRequest. r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D204896
This commit is contained in:
Родитель
85b00417e6
Коммит
af4b1f34a6
|
@ -263,6 +263,10 @@ class InternalRequest final : public AtomicSafeRefCounted<InternalRequest> {
|
|||
mIntegrity.Assign(aIntegrity);
|
||||
}
|
||||
|
||||
bool GetKeepalive() const { return mKeepalive; }
|
||||
|
||||
void SetKeepalive(const bool aKeepalive) { mKeepalive = aKeepalive; }
|
||||
|
||||
bool MozErrors() const { return mMozErrors; }
|
||||
|
||||
void SetMozErrors() { mMozErrors = true; }
|
||||
|
@ -454,6 +458,7 @@ class InternalRequest final : public AtomicSafeRefCounted<InternalRequest> {
|
|||
RequestRedirect mRedirectMode;
|
||||
RequestPriority mPriorityMode = RequestPriority::Auto;
|
||||
nsString mIntegrity;
|
||||
bool mKeepalive = false;
|
||||
bool mMozErrors = false;
|
||||
nsCString mFragment;
|
||||
bool mSkipServiceWorker = false;
|
||||
|
|
|
@ -517,7 +517,7 @@ SafeRefPtr<Request> Request::Constructor(nsIGlobalObject* aGlobal,
|
|||
}
|
||||
|
||||
if (aInit.mKeepalive.WasPassed()) {
|
||||
// place holder to set keepalive
|
||||
request->SetKeepalive(aInit.mKeepalive.Value());
|
||||
}
|
||||
|
||||
if (aInit.mMozErrors.WasPassed() && aInit.mMozErrors.Value()) {
|
||||
|
|
|
@ -59,7 +59,7 @@ class Request final : public FetchBody<Request>, public nsWrapperCache {
|
|||
aIntegrity = mRequest->GetIntegrity();
|
||||
}
|
||||
|
||||
bool Keepalive() const { return false; }
|
||||
bool Keepalive() const { return mRequest->GetKeepalive(); }
|
||||
|
||||
bool MozErrors() const { return mRequest->MozErrors(); }
|
||||
|
||||
|
|
|
@ -1,12 +1,10 @@
|
|||
prefs: [dom.fetchKeepalive.enabled:true]
|
||||
[request-keepalive.any.sharedworker.html]
|
||||
expected:
|
||||
if (os == "android") and fission: [OK, TIMEOUT]
|
||||
[keepalive flag with stream body]
|
||||
expected: FAIL
|
||||
|
||||
[keepalive flag]
|
||||
expected: FAIL
|
||||
|
||||
|
||||
[request-keepalive.any.worker.html]
|
||||
expected:
|
||||
|
@ -14,21 +12,12 @@
|
|||
[keepalive flag with stream body]
|
||||
expected: FAIL
|
||||
|
||||
[keepalive flag]
|
||||
expected: FAIL
|
||||
|
||||
|
||||
[request-keepalive.any.serviceworker.html]
|
||||
[keepalive flag with stream body]
|
||||
expected: FAIL
|
||||
|
||||
[keepalive flag]
|
||||
expected: FAIL
|
||||
|
||||
|
||||
[request-keepalive.any.html]
|
||||
[keepalive flag with stream body]
|
||||
expected: FAIL
|
||||
|
||||
[keepalive flag]
|
||||
expected: FAIL
|
||||
|
|
Загрузка…
Ссылка в новой задаче