Remove mutator functions from nsIURI and derived interfaces

Assigned to



3 years ago
a year ago


(Reporter: sicking, Assigned: sicking)


(Blocks: 1 bug)

Firefox Tracking Flags

(Not tracked)


(Whiteboard: [necko-backlog])

The fact that nsIURIs can be mutated makes them impossible to safely use on multiple threads.

It also means that they are actually unsafe for a whole set of other things. Currently we mainly solve this by "being careful".

So we should replace the various setters with createCloneWithDifferentX functions. I.e. replace the host setter with a createCloneWithDifferentHost(nsCAString& aHost) function (or with an appropriate name).

We should probably do this as a two-step process where we first add the createClone functions, and then give addon authors a release or two to update their code, and then remove the setters.
Whiteboard: [necko-backlog]
You need to log in before you can comment on or make changes to this bug.