fi wrote:
Registered how?

Exactly as Michel suggested:

var uriLoader =
Components.classes["@mozilla.org/uriloader;
1"].getService(Components.interf­aces.nsIURILoader);
var contentListener = Components.classes["@your-component-id;1"].
createInstance(Components.interfaces.nsIURIContentListener);
uriLoader.registerContentListener(contentListener);

Are you keeping your listener alive somehow? Notice that the URILoader holds a _weak_ reference to the listener, which means it doesn't make sure the listener stays alive, and if the listener goes away it'll just pretend it was never registered (the weak reference will claim to be null).

This should probably be better documented, and I'm not really sure why this is a weak reference to start with, but...

-Boris
_______________________________________________
dev-tech-xpcom mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-xpcom

Reply via email to