Closed Bug 1688239 Opened 3 years ago Closed 3 years ago

Move mozilla::net::ResolverMode into nsIDNSService and use it consistently

Categories

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

task

Tracking

()

RESOLVED FIXED
87 Branch
Tracking Status
firefox87 --- fixed

People

(Reporter: nhnt11, Assigned: nhnt11)

References

(Blocks 1 open bug)

Details

(Whiteboard: [necko-triaged])

Attachments

(1 file)

For some reason, the TRR service declares mMode as a uint32_t instead of nsIRequest::TRRMode or the wrapper nsHostResolver:ResolverMode (which is used fairly consistently elsewhere).

It'd be nice to explicitly type mMode for consistency. We are even setting the value from the ResolverMode constants already.

Summary: Track TRR mode as nsIRequest::TRRMode instead of uint32_t in the TRR Service → Track TRR mode as nsHostResolver::ResolverMode instead of uint32_t in the TRR Service
Summary: Track TRR mode as nsHostResolver::ResolverMode instead of uint32_t in the TRR Service → Track TRR mode as mozilla::net::ResolverMode instead of uint32_t in the TRR Service

So... I took a poke at this and it turns out that TRRServiceBase.h ends up getting included when building UnifiedProtocols*.cpp due to the TRR service now living in the socket process and the way the IPC is implemented. This works because TRRServiceBase.h is exported into mozilla/net in netwerk/dns/moz.build. But we can't include nsHostResolver.h to get access to the ResolverMode name without also exporting nsHostResolver.h and everything that it includes into mozilla/net as well.

I think the right solution here would be to move the enum declaration into somewhere like nsIDNSService.idl (since GetCurrentTRRMode needs it) and use it from there.

Summary: Track TRR mode as mozilla::net::ResolverMode instead of uint32_t in the TRR Service → Move mozilla::net::ResolverMode into nsIDNSService and use it consistently
Assignee: nobody → nhnt11
Status: NEW → ASSIGNED
Severity: -- → S3
Priority: -- → P2
Whiteboard: [necko-triaged]
Pushed by nhnt11@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/048813c76685
Move mozilla::net::ResolverMode into nsIDNSService and use it consistently. r=necko-reviewers,valentin
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 87 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: