Bug 841067 - Fix up CertUtils. r=bz

This is yet another piece of broken code that relies on the "find the |this|
object" behavior that we're removing. Moreover, it's not caught by our compat
hack, because Components.utils is a bizarre object that implements
nsIXPCScriptable (giving it a custom JSClass->name that's not XPCWN_NoHelper)
while not implementing nsIClassInfo (which would have put the method on the
prototype and made this never work in the first place). We _could_ add special
support for the Cu JSClass name in our compat hack, but I think we should just
fix it here and assume this pattern is not particularly common in external
consumers.
This commit is contained in:
Bobby Holley 2013-02-14 10:40:15 +01:00
parent b0206bf82e
commit f23b550748

View File

@ -108,7 +108,7 @@ this.validateCert =
}
if (error) {
errors.forEach(Cu.reportError);
errors.forEach(Cu.reportError.bind(Cu));
const certCheckErr = "Certificate checks failed. See previous errors " +
"for details.";
Cu.reportError(certCheckErr);