Closed Bug 1171234 Opened 10 years ago Closed 9 years ago

Include triggering node in load info when doing prefetching

Categories

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

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla41
Tracking Status
firefox41 --- fixed

People

(Reporter: billm, Assigned: billm)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Attached patch patch (deleted) — Splinter Review
When we see a <link rel="prefetch">, we don't associate the <link> node with the LoadInfo when we do the prefetch. I'm not sure if there's a reason why we don't, but it would be nice for add-ons. Chrome's webRequest extension API associates these prefetched loads with the frame that included the <link> element, so this change would make us more compatible with Chrome.
Attachment #8614947 - Flags: review?(mozilla)
Comment on attachment 8614947 [details] [diff] [review] patch Review of attachment 8614947 [details] [diff] [review]: ----------------------------------------------------------------- ::: uriloader/prefetch/nsPrefetchService.cpp @@ +199,1 @@ > Thanks for looking at this. In fact that sounds like a great change to me. I am always happy to accept changes where we can replace the systemPrincipal with some more precise info. The loadingNode and the loadingPrincipal must match however, see [1]. But that's an easy fix: nsresult rv = NS_NewChannelInternal(getter_AddRefs(mChannel), mURI, source, source->NodePrincipal(), nullptr, //aTriggeringPrincipal ... That should do it. [1] http://mxr.mozilla.org/mozilla-central/source/netwerk/base/LoadInfo.cpp#39
Attachment #8614947 - Flags: review?(mozilla) → review+
Please fix the indentation to not use tabs?
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla41
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: