Status

()

Core
Networking
RESOLVED DUPLICATE of bug 922464
a year ago
a year ago

People

(Reporter: bkelly, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

a year ago
In the past we have required nsIURI to be used on main thread for a couple reasons:

1) URL parsing can be implemented in addon javascript
2) nsIURI are mutable and perhaps a bit of a foot-gun for cross-thread access

In my mind (1) is a much bigger hurdle to clear.  We are almost there, though.  Now that legacy addons have been deprecated and web extensions will be the only public API we may no longer have to support js parsing of URLs.  With that in mind we may want to put some effort into designing OMT URL parsing.

For option (2), I think code can work around the issue using Clone().  We could also introduce an immutable URI type that has accessors, but no mutators.  Or we could just use locking within the URI.

It would be really great to fix this because it forces us to main thread for many things:

1) Running `new URL(s)` in a worker freezes the worker thread while we parse on the main thread.
2) All security checks must be performed on the main thread because nsIPrincipal is built on top of nsIURI
3) Network code must go through the main thread to parse URLs
4) Any other code that needs to parse URLs (which is a lot), etc
(Reporter)

Updated

a year ago
See Also: → bug 1271553
Isn't this a dupe of bug 1228115?
(Reporter)

Updated

a year ago
Status: NEW → RESOLVED
Last Resolved: a year ago
Resolution: --- → DUPLICATE
Duplicate of bug: 922464
You need to log in before you can comment on or make changes to this bug.