I am having a hard time with figuring out why my custom content listener
is no longer called after some time.
...
I instantiate my component from my overlay file.
After some time, the isPreferred stopped being called.
...
Can the "@mozilla.org/uriloader;1" component forget about my listener ?
I think i found my problem.
For the records, i instantiated my component using:
Components.classes["@xxx.net/dummy-handler;1"].
createInstance(Components.interfaces.nsIURIContentListener);
without keeping a reference to the instance.
Apparently, registering the content listener component through the uri
loader is not enough to keep it alive.
Now i do:
Components.classes["@xxx.net/dummy-handler;1"].
getService(Components.interfaces.nsIURIContentListener);
and it works much better, at least so far :)
_______________________________________________
dev-tech-network mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-network