Brian Teh wrote: > Currently, my extension uses the NSS library which is coded in C++. > But due to 6-week release cycle for Thunderbird, I am wondering > whether are there examples on how to use Mozilla NSS for > JavaScript-XPCOM, to avoid the need for re-compiling the binary > components?
Currently, you should not use jsctypes or other JS-to-C++ bridges to access NSS in Gecko. One reason is that "proper" use of NSS in Gecko requires you to extend the native C++ nsNSSShutDownObject class in many (most? all?) circumstances. The second reason is that we (Mozilla) have found it to be surprisingly difficult to correctly use jsctypes with NSS. In particular, you must be very careful that the garbage collector will not garbage collect your native code objects. This is one of the reasons I always recommend people to avoid jsctypes completely. That said, I heard that Thunderbird is going to be based on the Gecko 17 Extended Support Release for the next 11 months or so. That may mean you may not need to recompile your binary addons for Thunderbird so frequently any more, but I am not sure. I have CC'd Mark Banner to get clarification about that. Cheers, Brian -- dev-tech-crypto mailing list dev-tech-crypto@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-tech-crypto