I have several problems in development of my extension. Problems
occure in javascript part of implementation.
1)I would like to asynchronously open channel (nsIHttpChannel) in
another than ui-thread. Problem is, that when I tried that, I got
NS_ERROR_NOT_AVAILABLE. I found somewhere on the net, that it's only
possible to open it in main thread. I just want to know whether there
really isn't way how to bypass that and if yes, then how?
2)For this moment I just do that from main thread. With channel I have
registered listener for notification callbacks which collect some
informations about it for next processing. Here I'm coming to problem.
Informations I obtain are going to be processed in new thread (utility
for processing of informations blocks main thread for a while). When
it's done, I would like to call method of proxied object
(UI_THREAD_EVENT_QUEUE) from same thread that will handle them (write
them to document, to file,...). Problem is, that firefox just hangs,
even when body of that method is empty. UI is not totally freezed,
but when i click something it hangs completely. The worst is that it
falls down almost every time on different URI.And also it works fine
for a while and hangs after 6th, 10th,... URI.

-everything works fine if I do all job on main thread, but UI is
blocked for 1s every time I'm processing new URI and with 100 and more
URIs it's pretty annoying
-I wonder if proxied object is automatically thread-safe (probably
not) and whether it should be made new proxy for each thread or there
should be only one proxied object called by multiple threads
-I spent with this problem already few days and haven't found any
solution in my head nor on the internet

Sorry for my english, if something or all is obscure, just ask. Any
suggestions are welcome