Add GetExtendedOrigin method to nsILoadContext

RESOLVED FIXED in mozilla17

Status

()

Core
General
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: jduell, Assigned: jduell)

Tracking

unspecified
mozilla17
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 2 obsolete attachments)

Created attachment 644498 [details] [diff] [review]
v1

Jonas suggests we make it easy for channels on the parent to get the ExtendedOrigin while keeping the code centralized.  I saw 3 ways of doing it

1) Having nsNetUtil (or other necko code) call into nsScriptSecurityManager::GetExtendedOrigin.   But necko doesn't currently know about nsScriptSecurityManager, and biesi is not happy about changing that.

2) moving the logic from nsScriptSecurityManager::GetExtendedOrigin to nsNetUtil.h.  Mounir is opposed on the principle that this is security code, not necko logic.  And there are some nsScriptSecurityManager constants that the method uses, so we'd still have to include nsScriptSecurityManager.h, or dupe the constant definitions.

3) Adding a GetExtendedOrigin method to nsILoadContext (it can't be an attribute, as it needs to take a Channel/URI for the origin). We've already got the infrastructure to send nsILoadContext fields across IPDL to the parent (to this will be another string across the wire).  Biesi seems to prefer this. And that's what this patch does.  (minus the IPDL parts--that patch would be a separate bug)
Attachment #644498 - Flags: superreview?(jonas)
Attachment #644498 - Flags: review?(justin.lebar+bug)
(Assignee)

Comment 1

5 years ago
Created attachment 644535 [details] [diff] [review]
v2: pass URI instead of channel

Turns out nsIWebSocket is not an nsIChannel, so this needs to take the URI directly.
Assignee: nobody → jduell.mcbugs
Attachment #644498 - Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #644498 - Flags: superreview?(jonas)
Attachment #644498 - Flags: review?(justin.lebar+bug)
Attachment #644535 - Flags: superreview?(jonas)
Attachment #644535 - Flags: review?(justin.lebar+bug)
(Assignee)

Comment 2

5 years ago
Created attachment 644536 [details] [diff] [review]
v3: forgot to run qref
Attachment #644535 - Attachment is obsolete: true
Attachment #644535 - Flags: superreview?(jonas)
Attachment #644535 - Flags: review?(justin.lebar+bug)
Attachment #644536 - Flags: superreview?(jonas)
Attachment #644536 - Flags: review?(justin.lebar+bug)
(Assignee)

Updated

5 years ago
Blocks: 776176
Attachment #644536 - Flags: superreview?(jonas) → superreview+
Attachment #644536 - Flags: review?(justin.lebar+bug) → review+
(Assignee)

Comment 3

5 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/e7f9ffc61ef7
https://hg.mozilla.org/mozilla-central/rev/e7f9ffc61ef7
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla17
Depends on: 779123
(Assignee)

Updated

5 years ago
Blocks: 780818
You need to log in before you can comment on or make changes to this bug.