Status

()

Toolkit
XUL Widgets
13 years ago
10 years ago

People

(Reporter: Gavin, Unassigned)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 2 obsolete attachments)

For creating, verifying scheme, etc. This is done multiple places in-tree in many different ways, and could benefit from having a consistent and stable set of helpers.

(This is not a widgets bug, there's no better component)
Status: NEW → ASSIGNED
Created attachment 202865 [details] [diff] [review]
uriUtils.js

I'm just dumping what I have so far in case anyone wants to comment.

Comment 2

13 years ago
Drive by comment: getSchemeFromString could use nsIIOService::extractScheme.
Created attachment 203223 [details] [diff] [review]
still needs cleaning

Patch that makes browser.js use some of the introduced helpers. I think some of the provided functions (e.g. getBaseURL) won't be used very much, so I think I'll end up removing them. Also fixes getSchemeFromString per Darin's comment. I've barely tested this, it's probably buggy.
Attachment #202865 - Attachment is obsolete: true
Created attachment 203690 [details] [diff] [review]
still needs cleaning v2
Attachment #203223 - Attachment is obsolete: true
Priority: -- → P1
Priority: P1 → P2
Ways of dealing with nsIURI/URI strings sounds like something that should probably be considered for inclusion in FUEL at some point, the stuff in the patch here may be a good starting point.
Bug 380813 adds | IO.newURI |

Can the IO code be used or extended a bit to support the URI helpers?

Perhaps the "offline" code in your patch could be moved to FUEL (Application.offline)
Assignee: gavin.sharp → nobody
Status: ASSIGNED → NEW
Priority: P2 → --
Target Milestone: mozilla1.9alpha1 → ---
You need to log in before you can comment on or make changes to this bug.