Closed Bug 1398646 Opened 7 years ago Closed 7 years ago

DNS service synchronous resolution methods should not work on the main thread

Categories

(Core :: Networking: DNS, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla57
Tracking Status
firefox57 --- fixed

People

(Reporter: kmag, Assigned: kmag)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

I just reviewed a patch that tried to use synchronous DNS resolution on the main thread. The fact that is even possible is a major performance footgun that should be fixed.
Thanks for looking into this. I think this might even fix a recent bug - that connecting to slow DNS servers blocks startup.
Blocks: 1394093
Comment on attachment 8906430 [details]
Bug 1398646: Forbid sync DNS resolution on the main thread.

https://reviewboard.mozilla.org/r/178148/#review183222
Attachment #8906430 - Flags: review?(valentin.gosu) → review+
https://hg.mozilla.org/mozilla-central/rev/963bf9d85732
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
This has caused a regression. See bug #1400288.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Comment on attachment 8906430 [details]
Bug 1398646: Forbid sync DNS resolution on the main thread.

https://reviewboard.mozilla.org/r/178148/#review186238

Let's add a comment to nsIDNSService mentioning that resolveNative returns an error if called on the main thread.
r=me
Target Milestone: mozilla57 → ---
https://hg.mozilla.org/mozilla-central/rev/1303bbfb017d
Status: REOPENED → RESOLVED
Closed: 7 years ago7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
Duplicate of this bug: 766973
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: