Closed Bug 1700076 Opened 4 years ago Closed 4 years ago

Clean up some DNS code

Categories

(Core :: Networking: DNS, task, P2)

task

Tracking

()

RESOLVED FIXED
89 Branch
Tracking Status
firefox89 --- fixed

People

(Reporter: valentin, Assigned: valentin)

References

(Blocks 1 open bug)

Details

(Whiteboard: [necko-triaged])

Attachments

(16 files)

(deleted), text/x-phabricator-request
Details
(deleted), text/x-phabricator-request
Details
(deleted), text/x-phabricator-request
Details
(deleted), text/x-phabricator-request
Details
(deleted), text/x-phabricator-request
Details
(deleted), text/x-phabricator-request
Details
(deleted), text/x-phabricator-request
Details
(deleted), text/x-phabricator-request
Details
(deleted), text/x-phabricator-request
Details
(deleted), text/x-phabricator-request
Details
(deleted), text/x-phabricator-request
Details
(deleted), text/x-phabricator-request
Details
(deleted), text/x-phabricator-request
Details
(deleted), text/x-phabricator-request
Details
(deleted), text/x-phabricator-request
Details
(deleted), text/x-phabricator-request
Details
No description provided.

The reason this worked previously is that we initialized recPtr = rec; in
the for loop iterating through callbacks.
Records that were in the evictionQ did not have any callbacks, so we never
entered this block.

This patch consists of the changes generated by running
./mach static-analysis check --fix on netwerk/dns after adding the
modernize-use-default-member-init clang-tidy lint.
Some additional changes were made by hand to ensure consistent results.
This patch ensures that all member variables are initialized in the header,
so when adding or changing constructors we don't miss one resulting in
uninitialized memory.

Depends on D109338

A TRR request is created and dispatched to the handling thread.
If we want to cancel it, we may do so before the runnable has been handled
and there's no HTTP channel - so the cancel was a NO-OP.
Here we add mCancelled which is consulted in SendHTTPRequest to check
if the request has already been cancelled.

Depends on D109589

Depends on D109591

Depends on D109593

Depends on D109596

Depends on D109597

Depends on D109599

Depends on D109600

Pushed by valentin.gosu@gmail.com: https://hg.mozilla.org/integration/autoland/rev/fb3f2329ca37 Handle nsHostResolver::CancelAsyncRequest being called for records in the eviction queue r=necko-reviewers,dragana https://hg.mozilla.org/integration/autoland/rev/f36e9cb05851 Fix modernize-use-default-member-init clang-tidy warnings in netwerk/dns/ r=necko-reviewers,dragana https://hg.mozilla.org/integration/autoland/rev/8dc21acb87f9 Allow nsHostResolver::FlushCache to clear Type records from the cache r=kershaw,necko-reviewers https://hg.mozilla.org/integration/autoland/rev/26dc88b74377 Add ability to count number of DoH requests that reach the TRRServer r=necko-reviewers,dragana https://hg.mozilla.org/integration/autoland/rev/c085324cb20e Add ability to cancel TRR requests before they're dispatched r=necko-reviewers,dragana https://hg.mozilla.org/integration/autoland/rev/016c856573da Make TRRDNSListener handle for type records resolves r=necko-reviewers,dragana https://hg.mozilla.org/integration/autoland/rev/bc92b34e5d71 Clean up test_httpssvc_priority.js r=necko-reviewers,kershaw https://hg.mozilla.org/integration/autoland/rev/2b8d8d63cacd Clean up test_httpssvc_https_upgrade.js r=necko-reviewers,kershaw https://hg.mozilla.org/integration/autoland/rev/776c44be95f5 Clean up test_httpssvc_iphint.js r=necko-reviewers,kershaw https://hg.mozilla.org/integration/autoland/rev/1315c00d2137 Clean up test_httpssvc_retry_with_ech.js r=necko-reviewers,kershaw https://hg.mozilla.org/integration/autoland/rev/753f4df63689 Clean up test_httpssvc_retry_without_ech.js r=necko-reviewers,kershaw https://hg.mozilla.org/integration/autoland/rev/fcf27f3c7b69 Clean up test_trr_https_fallback.js r=necko-reviewers,kershaw https://hg.mozilla.org/integration/autoland/rev/9bc2539a1f5d Clean up test_trr_httpssvc.js r=necko-reviewers,kershaw https://hg.mozilla.org/integration/autoland/rev/8094a7ffc6a4 Clean up unit_ipc/test_dns_by_type_resolve_wrap.js r=necko-reviewers,kershaw https://hg.mozilla.org/integration/autoland/rev/fcf92dd5158a Clean up test_dns_by_type_resolve.js r=necko-reviewers,kershaw https://hg.mozilla.org/integration/autoland/rev/d89075d72c83 Clean up test_http3_fast_fallback.js r=necko-reviewers,kershaw
Flags: needinfo?(valentin.gosu)
Pushed by valentin.gosu@gmail.com: https://hg.mozilla.org/integration/autoland/rev/050ea2cafe11 Handle nsHostResolver::CancelAsyncRequest being called for records in the eviction queue r=necko-reviewers,dragana https://hg.mozilla.org/integration/autoland/rev/8b18a2ef9994 Fix modernize-use-default-member-init clang-tidy warnings in netwerk/dns/ r=necko-reviewers,dragana https://hg.mozilla.org/integration/autoland/rev/5f509655c215 Allow nsHostResolver::FlushCache to clear Type records from the cache r=kershaw,necko-reviewers https://hg.mozilla.org/integration/autoland/rev/60897816589a Add ability to count number of DoH requests that reach the TRRServer r=necko-reviewers,dragana https://hg.mozilla.org/integration/autoland/rev/454a28c52dea Add ability to cancel TRR requests before they're dispatched r=necko-reviewers,dragana https://hg.mozilla.org/integration/autoland/rev/932669e39fee Make TRRDNSListener handle for type records resolves r=necko-reviewers,dragana https://hg.mozilla.org/integration/autoland/rev/de03852907a9 Clean up test_httpssvc_priority.js r=necko-reviewers,kershaw https://hg.mozilla.org/integration/autoland/rev/5f229ee8e18e Clean up test_httpssvc_https_upgrade.js r=necko-reviewers,kershaw https://hg.mozilla.org/integration/autoland/rev/a613ba2c47ce Clean up test_httpssvc_iphint.js r=necko-reviewers,kershaw https://hg.mozilla.org/integration/autoland/rev/46d002eac860 Clean up test_httpssvc_retry_with_ech.js r=necko-reviewers,kershaw https://hg.mozilla.org/integration/autoland/rev/966cdbee3d9a Clean up test_httpssvc_retry_without_ech.js r=necko-reviewers,kershaw https://hg.mozilla.org/integration/autoland/rev/4ae857f4eb1c Clean up test_trr_https_fallback.js r=necko-reviewers,kershaw https://hg.mozilla.org/integration/autoland/rev/831b2508adb8 Clean up test_trr_httpssvc.js r=necko-reviewers,kershaw https://hg.mozilla.org/integration/autoland/rev/e72097442c6e Clean up unit_ipc/test_dns_by_type_resolve_wrap.js r=necko-reviewers,kershaw https://hg.mozilla.org/integration/autoland/rev/4d02b3bf9c38 Clean up test_dns_by_type_resolve.js r=necko-reviewers,kershaw https://hg.mozilla.org/integration/autoland/rev/fcbcbedc28f4 Clean up test_http3_fast_fallback.js r=necko-reviewers,kershaw
Regressions: 1703478
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: