Yes, that is definitely something we want to fix, but not very
straightforward. We have quite a few URI implementations, and a bunch more
protocol handlers.

https://github.com/valenting/gecko/wiki/Threadsafe-URIs-progress#protocol-handler-implementations


On 26 March 2018 at 15:24, Ben Kelly <bke...@mozilla.com> wrote:

> Do we have any plan to be able to use NS_NewURI() off-main-thread?  I
> thought that was included here, but I see now that it is not.  The initial
> URL parse OMT is important for truly being able to remove all our "bounce
> to the main thread for URL stuff" legacy code.
>
> On Fri, Mar 23, 2018 at 8:25 AM, Valentin Gosu <valentin.g...@gmail.com>
> wrote:
>
>> Hello everyone,
>>
>> I would like to announce that with the landing of bug 1447194, all nsIURI
>> implementations in Gecko are now threadsafe, as well as immutable. As a
>> consequence, you no longer have to clone a URI when you pass it around, as
>> it's guaranteed not to change, and now it's OK to release them off the
>> main
>> thread.
>>
>> If you need to change a nsIURI, you should use the nsIURIMutator interface
>> (in JavaScript - just call .mutate() on the URI) or the NS_MutateURI
>> <https://searchfox.org/mozilla-central/source/netwerk/test/g
>> test/TestURIMutator.cpp#22>
>> helper class (in C++).
>>
>> More info here:
>> https://wiki.mozilla.org/Necko/nsIURI
>>
>> If you find any bugs, make them block bug 922464 (OMT-nsIURI)
>>
>> I'd like to thank everyone who helped review the patches, especially Honza
>> Bambas who reviewed most of my patches.
>>
>> Cheers!
>> _______________________________________________
>> dev-platform mailing list
>> dev-platform@lists.mozilla.org
>> https://lists.mozilla.org/listinfo/dev-platform
>>
>
>
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to