b=477735; fix XPCOMUtils.generateQI to handle null/undef members in array; r=sayrer
--- a/js/src/xpconnect/loader/XPCOMUtils.jsm
+++ b/js/src/xpconnect/loader/XPCOMUtils.jsm
@@ -107,17 +107,17 @@ const Cr = Components.results;
var XPCOMUtils = {
/**
* Generate a QueryInterface implementation. The returned function must be
* assigned to the 'QueryInterface' property of a JS object. When invoked on
* that object, it checks if the given iid is listed in the |interfaces|
* param, and if it is, returns |this| (the object it was called on).
*/
generateQI: function(interfaces) {
- return makeQI([i.name for each(i in interfaces)]);
+ return makeQI([i.name for each (i in interfaces) if (i)]);
},
/**
* Generate the NSGetModule function (along with the module definition).
* See the parameters to generateModule.
*/
generateNSGetModule: function(componentsArray, postRegister, preUnregister) {
return function NSGetModule(compMgr, fileSpec) {