Closed Bug 1216370 Opened 4 years ago Closed 4 years ago

For safety and searchability, define the nsHostResolver::RES_* enum in terms of nsIDNSService::RESOLVE_* enum

Categories

(Core :: Networking: DNS, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla44
Tracking Status
firefox44 --- fixed

People

(Reporter: jwatt, Assigned: jwatt)

Details

Attachments

(1 file)

(Spinning off from the result of the answer to the question posed in bug 87717 comment 59.)

At least some of the nsIDNSService::RESOLVE_* enum values seem to be set but never checked. It turns out this is because they are checked as nsHostResolver::RES_* enum values. There isn't even any mention in nsIDNSService.idl of nsHostResolver or the RES_* values making it unlikely that anyone will manage to figure out what's going on.

The obvious way to fix this issue would be to get rid of the nsHostResolver enum and make current consumers use the nsIDNSService enum. Presumably there is a reason for not doing that though.

More likely to be less objectionable would be defining the nsHostResolver::RES_* enum values using the corresponding nsIDNSService::RESOLVE_* enum values.
Attached patch patchSplinter Review
Attachment #8675975 - Flags: review?(honzab.moz)
Attachment #8675975 - Flags: review?(honzab.moz) → review+
https://hg.mozilla.org/mozilla-central/rev/0416fbbd3a63
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla44
You need to log in before you can comment on or make changes to this bug.