Closed
Bug 1623383
Opened 5 years ago
Closed 5 years ago
Cleanup URIFixup.jsm
Categories
(Core :: DOM: Navigation, task, P3)
Core
DOM: Navigation
Tracking
()
Tracking | Status | |
---|---|---|
firefox78 | --- | fixed |
People
(Reporter: mak, Assigned: mak)
References
Details
Attachments
(2 files)
The initial implementation of URIFixup.jsm from bug 1496578 is in large chunks a direct port of the cpp code, it contains some string loops and inefficiencies that were not modified to avoid introducing too many risks of regressions at once.
Once that lands, we can move on with cleaning up the code to use proper js.
A few things that come to my mind:
- strings walking, most of it can be replaced with regex or other string functions
- one of the loops uses a custom NOT_FOUND value because the cpp code was overflowing kNotFound (-1) into an unsigned integer and all the code was based on that
Assignee | ||
Comment 1•5 years ago
|
||
Another thing to cleanup would be to check if the following else can be merged into the previous if (... || !possiblyHostPortRegex.test(uriString))
else {
// If the given URL has a user:password we can't just pass it to the
// external protocol handler; we'll try using it with http instead
// later
info.fixedURI = null;
}
Assignee | ||
Comment 2•5 years ago
|
||
Updated•5 years ago
|
Assignee: nobody → mak
Status: NEW → ASSIGNED
Assignee | ||
Comment 3•5 years ago
|
||
Depends on D73687
Assignee | ||
Updated•5 years ago
|
Iteration: --- → 78.1 - May 4 - May 17
Assignee | ||
Updated•5 years ago
|
Points: --- → 2
Pushed by mak77@bonardo.net:
https://hg.mozilla.org/integration/autoland/rev/cad2659a1a16
Cleanup URIFixup.jsm. r=harry
https://hg.mozilla.org/integration/autoland/rev/ffa35c5164f9
Merge some conditions in URIFixup.jsm. r=harry
Comment 5•5 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/cad2659a1a16
https://hg.mozilla.org/mozilla-central/rev/ffa35c5164f9
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
status-firefox78:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla78
You need to log in
before you can comment on or make changes to this bug.
Description
•