B2G/gecko/content/base/src/CSPUtils.jsm
/**
   * Sends an error message to the error console and web developer console.
   * @param aMsg
   *        The message to send
   */
Sends an error message to the error console and web developer console.
@param aMsg
The message to send
Sends an error message to the error console and web developer console . @param aMsg The message to send
function cspsd_error(aMsg) {
    var textMessage = 'CSP ERROR:  ' + aMsg + "\n";
    var consoleMsg = Components.classes["@mozilla.org/scripterror;1"]
                               .createInstance(Ci.nsIScriptError);
    if (this._innerWindowID) {
      consoleMsg.initWithWindowID(textMessage, null, null, 0, 0,
                                  Ci.nsIScriptError.errorFlag,
                                  "Content Security Policy",
                                  this._innerWindowID);
    }
    else {
      consoleMsg.init(textMessage, null, null, 0, 0,
                      Ci.nsIScriptError.errorFlag, "Content Security Policy");
    }
    Components.classes["@mozilla.org/consoleservice;1"]
              .getService(Ci.nsIConsoleService).logMessage(consoleMsg);
  }
function cspsd_error ( aMsg ) { var textMessage = 'CSP ERROR:  ' + aMsg + "\n" ; var consoleMsg = Components . classes [ "@mozilla.org/scripterror;1" ] . createInstance ( Ci . nsIScriptError ) ; if ( this . _innerWindowID ) { consoleMsg . initWithWindowID ( textMessage , null , null , 0 , 0 , Ci . nsIScriptError . errorFlag , "Content Security Policy" , this . _innerWindowID ) ; } else { consoleMsg . init ( textMessage , null , null , 0 , 0 , Ci . nsIScriptError . errorFlag , "Content Security Policy" ) ; } Components . classes [ "@mozilla.org/consoleservice;1" ] . getService ( Ci . nsIConsoleService ) . logMessage ( consoleMsg ) ; }
Sends an error message to the error console and web developer console.
Sends an error message to the error console and web developer console .