Boris Zbarsky wrote: > ksachdeva wrote: > > That is true but for me it is a different protocol which is not a > > networking protocol but a protocol for a security device. > > Why does that matter, if it implements nsIProtocolHandler?
hmm, excellent point, I now see why you mentioned other protocols. I quickly looked in the code of nsXmlHttpRequest.cpp and I see lot of references of nsIHttpChannel. Doesn't this imply dependence on Http channel and how does this work with ftp and file ?. I have not used these protocols in XmlHttpRequest but I am taking your word as you are the guru here :). On the positive side in the header file for XmlHttpRequest the type used is IChannel and I can see in various places QI on channel expecting httpchannel is properly checked in the code. I am going to give my protocol handler a try from the XmlHttpRequest but I have doubts after seeing the dependence on HttpChannel. Thanks Boris, I would post shortly in this thread about the result. > > > I was basically copying GetScriptContextFromJSContext(cx) code from > > nsXmlHttpRequest.cpp which is further called by the GetLoadGroup() > > method. I need LoadGroup for the same reasons as XmlHttpRequest i.e to > > automatically abort the pending requests if user leaves the page and > > pass it to the NS_NewChannel method. Is there any other way to obtain > > the LoadGroup ? > > Not in a frozen way, no.... > > -Boris _______________________________________________ dev-tech-xpcom mailing list [email protected] https://lists.mozilla.org/listinfo/dev-tech-xpcom
