Backed out 2 changesets (bug 1649127) for perma failures on test_trr.js. CLOSED TREE

Backed out changeset d967c48fa147 (bug 1649127)
Backed out changeset 17e5b3f78f03 (bug 1649127)
This commit is contained in:
Razvan Maries 2020-07-04 18:30:54 +03:00
Родитель 73101fe616
Коммит 9da7f3cb73
4 изменённых файлов: 4 добавлений и 19 удалений

Просмотреть файл

@ -410,13 +410,6 @@ nsresult TRR::SendHTTPRequest() {
return rv;
}
// If the asyncOpen succeeded we can say that we actually attempted to
// use the TRR connection.
RefPtr<AddrHostRecord> addrRec = do_QueryObject(mRec);
if (addrRec) {
addrRec->mTRRUsed = true;
}
NS_NewTimerWithCallback(getter_AddRefs(mTimeout), this,
gTRRService->GetRequestTimeout(),
nsITimer::TYPE_ONE_SHOT);

Просмотреть файл

@ -277,8 +277,7 @@ nsresult TRRService::ReadPrefs(const char* name) {
nsAutoCString old(mConfirmationNS);
Preferences::GetCString(TRR_PREF("confirmationNS"), mConfirmationNS);
if (name && !old.IsEmpty() && !mConfirmationNS.Equals(old) &&
(mConfirmationState > CONFIRM_TRYING) &&
(mMode == MODE_TRRFIRST || mMode == MODE_TRRONLY)) {
(mConfirmationState > CONFIRM_TRYING)) {
LOG(("TRR::ReadPrefs: restart confirmationNS state\n"));
mConfirmationState = CONFIRM_TRYING;
MaybeConfirm_locked();

Просмотреть файл

@ -1309,6 +1309,7 @@ nsresult nsHostResolver::TrrLookup(nsHostRecord* aRec, TRR* pushedTRR) {
if (addrRec) {
addrRec->mTRRSuccess = 0; // bump for each successful TRR response
addrRec->mTrrStart = TimeStamp::Now();
addrRec->mTRRUsed = true; // this record gets TRR treatment
addrRec->mTrrAUsed = AddrHostRecord::INIT;
addrRec->mTrrAAAAUsed = AddrHostRecord::INIT;
@ -1567,15 +1568,6 @@ nsresult nsHostResolver::NameLookup(nsHostRecord* rec) {
if (!rec->IsAddrRecord()) {
return rv;
}
#ifdef DEBUG
// If we use this branch then the mTRRUsed flag should not be set
// Even if we did call TrrLookup above, the fact that it failed sync-ly
// means that we didn't actually succeed in opening the channel.
RefPtr<AddrHostRecord> addrRec = do_QueryObject(rec);
MOZ_ASSERT(addrRec && !addrRec->mTRRUsed);
#endif
rv = NativeLookup(rec);
}

Просмотреть файл

@ -206,9 +206,10 @@ class AddrHostRecord final : public nsHostRecord {
size_t SizeOfIncludingThis(mozilla::MallocSizeOf mallocSizeOf) const override;
bool IsTRR() { return mTRRUsed; }
private:
friend class nsHostResolver;
friend class mozilla::net::TRR;
explicit AddrHostRecord(const nsHostKey& key);
~AddrHostRecord();