Hello,

In my Firefox DP extension, I have a javascript component, called
at app-startup, in which I use the "@mozilla.org/security/hash;1"
component. I create an instance of the CryptoHash component and
assign it to a global at the beginning of my module code, like so,

const nsICryptoHash = Components.interfaces.nsICryptoHash;
var gHashComp = Components.classes["@mozilla.org/security/hash;1"].
               createInstance(nsICryptoHash);

then use the global later in the actual component. When I do this, however,
then open a dialog window with radio elements, it results in a "memory
cannot be read" error in XPCOM:Event Receiver at shutdown.
(Sounds crazy, but I when I remove the radio elements from my
test window, there is no subsequent error. Any window with radio
elements, not just my test window, causes this problem.)

I've worked around the problem by instantiating the CryptoHash
component locally, when it's needed. Still, I'm curious about what
might be causing the problem. Also, I see this component used as
both a service and as an instance in the mozilla codebase. Does it
make a difference?

Thanks,

Charles




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

Reply via email to