Closed
Bug 788923
Opened 13 years ago
Closed 13 years ago
Link prefetching needs to open its channel with the correct loadgroup for the document it belongs to
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
FIXED
mozilla18
People
(Reporter: ehsan.akhgari, Assigned: ehsan.akhgari)
References
Details
Attachments
(2 files, 2 obsolete files)
|
Part 1: When prefetching a document using a Link header, use the document element as the source node
2.41 KB,
patch
|
Details | Diff | Splinter Review | |
|
1.86 KB,
patch
|
bzbarsky
:
review+
|
Details | Diff | Splinter Review |
Boris, can nsPrefetchNode::OpenChannel use the load group for mSource->OwnerDoc()?
| Assignee | ||
Updated•13 years ago
|
tracking-firefox18:
--- → +
Comment 1•13 years ago
|
||
I'm 99.9% sure mSource is always null in practice.
If that were fixed, then yes, it could.
| Assignee | ||
Comment 2•13 years ago
|
||
(In reply to comment #1)
> I'm 99.9% sure mSource is always null in practice.
>
> If that were fixed, then yes, it could.
I'm new to this code, but as far as I can tell, prefetching is triggered from here <http://mxr.mozilla.org/mozilla-central/source/content/base/src/nsContentSink.cpp#834>, and the only call site which passes in null is: <http://mxr.mozilla.org/mozilla-central/source/content/base/src/nsContentSink.cpp#691>, which seems to be triggered from here: <http://mxr.mozilla.org/mozilla-central/source/content/base/src/nsContentSink.cpp#353>. Does the link element exist when that code is called? If not, I don't see how this can be (easily) fixed...
| Assignee | ||
Comment 3•13 years ago
|
||
Hmm, we could also modify the prefetch service to accept a source document, and just grab the load context from the document directly. Would that be a better solution?
Comment 4•13 years ago
|
||
Oh, we no longer go through ProcessLink for <link> elements, apparently!
In that case, the only case mSource will be null in is an HTTP <link> header. In which case, we should arguably pass in the document node as the source node. And then use the loadgroup of mSource->OwnerDoc().
| Assignee | ||
Comment 5•13 years ago
|
||
Attachment #659038 -
Flags: review?(bzbarsky)
| Assignee | ||
Comment 6•13 years ago
|
||
Attachment #659047 -
Flags: review?
| Assignee | ||
Updated•13 years ago
|
Attachment #659047 -
Flags: review? → review?(bzbarsky)
Comment 7•13 years ago
|
||
Comment on attachment 659038 [details] [diff] [review]
Part 1: When prefetching a document using a Link header, use the document element as the source node
I'd prefer it if we changed PrefetchHref to take an nsINode and passed in mDocument here, perhaps. But this is OK too.
Attachment #659038 -
Flags: review?(bzbarsky) → review+
Comment 8•13 years ago
|
||
Comment on attachment 659047 [details] [diff] [review]
Part 2: Use the load group of the document that the source node belongs to when prefetching links
I think if !source we should just not prefetch. Thoughts?
| Assignee | ||
Comment 9•13 years ago
|
||
(In reply to Boris Zbarsky (:bz) from comment #8)
> Comment on attachment 659047 [details] [diff] [review]
> Part 2: Use the load group of the document that the source node belongs to
> when prefetching links
>
> I think if !source we should just not prefetch. Thoughts?
Hmm, that makes sense. I'll do that in a new version of this patch.
| Assignee | ||
Comment 10•13 years ago
|
||
Attachment #659038 -
Attachment is obsolete: true
| Assignee | ||
Comment 11•13 years ago
|
||
Attachment #659047 -
Attachment is obsolete: true
Attachment #659047 -
Flags: review?(bzbarsky)
Attachment #659297 -
Flags: review?(bzbarsky)
Comment 12•13 years ago
|
||
Comment on attachment 659297 [details] [diff] [review]
Part 2: Use the load group of the document that the source node belongs to when prefetching links
r=me
Attachment #659297 -
Flags: review?(bzbarsky) → review+
| Assignee | ||
Comment 13•13 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/e1e9a9400f07
https://hg.mozilla.org/integration/mozilla-inbound/rev/672a11af05c3
Target Milestone: --- → mozilla18
Comment 14•13 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/e1e9a9400f07
https://hg.mozilla.org/mozilla-central/rev/672a11af05c3
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Updated•13 years ago
|
status-firefox18:
--- → fixed
Updated•7 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•