Closed Bug 1195415 Opened 10 years ago Closed 10 years ago

Use nsIURI.hostPort instead of manually writing host/port logic in nsPrincipal.origin logic

Categories

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

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla43
Tracking Status
firefox43 --- fixed

People

(Reporter: nika, Assigned: nika)

References

Details

Attachments

(1 file, 1 obsolete file)

Comment on attachment 8648960 [details] [diff] [review] Add asciiHostPort field to nsIURI, and use it in the implementation of nsPrincipal::GetOriginForURI Review of attachment 8648960 [details] [diff] [review]: ----------------------------------------------------------------- ::: netwerk/base/nsSimpleURI.cpp @@ +529,5 @@ > > NS_IMETHODIMP > +nsSimpleURI::GetAsciiHostPort(nsACString &result) > +{ > + return NS_ERROR_FAILURE; Maybe add a comment in GetPort() indicating that we need to fix that method we should fix this one too? ::: netwerk/base/nsStandardURL.cpp @@ +1107,5 @@ > + result = Hostport(); > + return NS_OK; > + } > + > + // this doesn't fail This comment is probably infer-able from the expression that follows it. ::: netwerk/test/unit/test_bug1195415.js @@ +1,1 @@ > +// Test for bug 1195415 This is awesome. Can you check .origin for these cases too while you're at it? Or did that happen for the other bug?
Attachment #8648960 - Flags: review?(bobbyholley) → review+
This is an updated version of the patch which actually updates the UUIDs, and acknowledges the hack in nsBinaryStream.
Attachment #8648960 - Attachment is obsolete: true
Attachment #8649422 - Flags: review?(bobbyholley)
Attachment #8649422 - Flags: review?(bobbyholley) → review+
Status: NEW → RESOLVED
Closed: 10 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla43
Blocks: 1196422
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: