Closed Bug 791372 Opened 13 years ago Closed 13 years ago

Navigator::MozIsLocallyAvailable doesn't associate its docshell with a load group

Categories

(Core :: DOM: Core & HTML, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla18

People

(Reporter: ehsan.akhgari, Assigned: ehsan.akhgari)

References

Details

Attachments

(1 file, 1 obsolete file)

Attached patch Patch (v1) (obsolete) — Splinter Review
Assignee: nobody → ehsan
Status: NEW → ASSIGNED
Attachment #661369 - Flags: review?(bzbarsky)
Comment on attachment 661369 [details] [diff] [review] Patch (v1) >Bug 791372 - Navigator::MozIsLocallyAvailable doesn't associate its docshell with a load group; r=bzbarsky s/docshell/channel/ ? >+++ b/dom/base/Navigator.cpp >+ if (win) { Shouldn't we just return false or something and not even do the network request if !win? Otherwise it seems like holding on to a navigator object from a closed window will let people call into necko here with a null loadgroup. That said, I'm not sure why this change matters. This is a sync load guaranteed to not hit the network. Why does it need to be in a loadgroup?
(In reply to Boris Zbarsky (:bz) from comment #2) > Comment on attachment 661369 [details] [diff] [review] > Patch (v1) > > >Bug 791372 - Navigator::MozIsLocallyAvailable doesn't associate its docshell with a load group; r=bzbarsky > > s/docshell/channel/ ? Heh, good point. > >+++ b/dom/base/Navigator.cpp > >+ if (win) { > > Shouldn't we just return false or something and not even do the network > request if !win? Otherwise it seems like holding on to a navigator object > from a closed window will let people call into necko here with a null > loadgroup. Sure, sounds good. > That said, I'm not sure why this change matters. This is a sync load > guaranteed to not hit the network. Why does it need to be in a loadgroup? Good point. I'm interested in doing this here even though it doesn't matter in practice right now since in the future we might use this information for loads that don't hit the network too, so it's best to make sure we're covering all grounds right now.
Attached patch Patch (v2)Splinter Review
Attachment #661369 - Attachment is obsolete: true
Attachment #661369 - Flags: review?(bzbarsky)
Attachment #661864 - Flags: review?(bzbarsky)
Comment on attachment 661864 [details] [diff] [review] Patch (v2) OK, r=me with the previous caveats.
Attachment #661864 - Flags: review?(bzbarsky) → review+
Er, you already applied the caveats. Just r=me. ;)
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: