Add a classID check in generateNSGetFactory, from bug 568691 comment 62.

This commit is contained in:
Benjamin Smedberg 2010-06-27 21:05:47 -04:00
parent d49707c7de
commit a4bcbea743

View File

@ -131,6 +131,9 @@ var XPCOMUtils = {
generateNSGetFactory: function XPCU_generateNSGetFactory(componentsArray) {
let classes = {};
for each (let component in componentsArray) {
if (!(component.prototype.classID instanceof Components.ID))
throw Error("In generateNSGetFactory, classID missing or incorrect for component " + component);
classes[component.prototype.classID] = this._getFactory(component);
}
return function NSGetFactory(cid) {