Remove mutator functions from nsIURI and derived interfaces

NEW
Assigned to

Status

()

P3
normal
3 years ago
a year ago

People

(Reporter: sicking, Assigned: sicking)

Tracking

(Blocks: 1 bug)

Firefox Tracking Flags

(Not tracked)

Details

(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.