Phil H�hn wrote:I'm actually modifying the code in contentAreaUtils.js - when I started this message thread I thought I'd try to leave out stuff like that to simplify the question but maybe I made it worse ;-)
sorry :-) ... the line of code I have is
this.linkChecker = Components.classes["@mozilla.org/network/urichecker;1"].createInstance(Components.interfaces.nsIURIChecker);
after a couple of things are set, the code calls: this.linkChecker.asyncCheck(this, null); (I.e as in 'save page as' code in contentAreaUtils.js)
If that's all you're doing, please ignore everything I said about components and contract ids.
So you do this twice, I assume? With different values of "this"? Or with the same "this"? What exactly goes wrong?
-Boris
Anyway... So in this code it creates a nsHeaderSniffer() object (which creates the instance of urichecker), i.e
var sniffer = new nsHeaderSniffer(aURL, foundHeaderInfo, data);
So the 'this' value is (should be!) a different nsHeaderSniffer object in each case.
The problem (what goes wrong) is unpredicatable - sometimes it happens, sometimes not, and breakpoints make a difference (because I assume interrupting execution changes how much CPU callbacks get). So sometimes it seems the nsIRequestObserver::onStopRequest(...) - which the nsHeaderSniffer object implements - is only serviced once, by the latter instance that is created. This is a huge problem because the onStopRequest(...) is responsible for initiating the file-saving processing. Dang!
_______________________________________________
Mozilla-netlib mailing list
[EMAIL PROTECTED]
http://mail.mozilla.org/listinfo/mozilla-netlib
