Hi,
I have a C++ browser application that embeds Mozilla. I am using the nsIInputStream, nsIStreamListener, nsIHttpChannel interfaces to make streaming operations. Until now, my application was single-threaded, and it worked fine. But now I need the streaming to be done on some background thread. So, I opened a new thread (by calling NS_NewThread) and executed nsIHttpChannel::asyncOpen() on that thread. As I read in Mozilla docs, the thread from which asyncOpen is called, is the thread on which the streaming will be done. I've run my code with a debug build of Mozilla 1.9.1.2 and noticed that when the streaming is not done on the main thread, I get many thread safety assertions such as: "###!!! ASSERTION: nsDocShellTreeOwner not thread-safe: '_mOwningThread.GetThread() == PR_GetCurrentThread()' "###!!! ASSERTION: nsWebBrowser not thread-safe: '_mOwningThread.GetThread() == PR_GetCurrentThread()' It seems that the nsIHttpChannel doesn't support multi-threaded streaming. Are there any other thread-safe versions of these streaming interfaces? Thanks, Annie _______________________________________________ dev-embedding mailing list [email protected] https://lists.mozilla.org/listinfo/dev-embedding
