Neil Stansbury wrote:
In the onAssert() method I have in an RDF observer, I have the line:

var nsIRDFContainer = Components.classes["@mozilla.org/rdf/container;1"].getService(Components.interfaces.nsIRDFContainer);


Periodically Firefox produces lots of js Console errors:

"Components is not defined"

Interestingly at the same time I also get errors about other global constants that should be fine.

What kind of object is your observer? If the observer is an object that has a chrome window as its global scope, and the chrome window has gone away, then the global scope object is no longer valid and you will see this error. If your observer is implemented as a JS component, this would normally not be an issue.


You should make sure that you unregister any observers before/when your chrome page goes out of scope, or else you will probably end up leaking DOM windows and many objects that are attached to them.

--BDS
_______________________________________________
Mozilla-xpcom mailing list
[email protected]
http://mail.mozilla.org/listinfo/mozilla-xpcom

Reply via email to