B2G/gecko/content/base/src/CSPUtils.jsm
/**
   * Sends a warning message to the error console and web developer console.
   * @param aMsg
   *        The message to send
   * @param aSource (optional)
   *        The URL of the file in which the error occurred
   * @param aScriptLine (optional)
   *        The line in the source file which the error occurred
   * @param aLineNum (optional)
   *        The number of the line where the error occurred
   */
Sends a warning message to the error console and web developer console.
@param aMsg
The message to send
@param aSource (optional)
The URL of the file in which the error occurred
@param aScriptLine (optional)
The line in the source file which the error occurred
@param aLineNum (optional)
The number of the line where the error occurred
Sends a warning message to the error console and web developer console . @param aMsg The message to send @param aSource ( optional ) The URL of the file in which the error occurred @param aScriptLine ( optional ) The line in the source file which the error occurred @param aLineNum ( optional ) The number of the line where the error occurred
function cspd_warn(aMsg, aSource, aScriptLine, aLineNum) {
    var textMessage = 'CSP WARN:  ' + aMsg + "\n";
    var consoleMsg = Components.classes["@mozilla.org/scripterror;1"]
                               .createInstance(Ci.nsIScriptError);
    if (this._innerWindowID) {
      consoleMsg.initWithWindowID(textMessage, aSource, aScriptLine, aLineNum,
                                  0, Ci.nsIScriptError.warningFlag,
                                  "Content Security Policy",
                                  this._innerWindowID);
    } else {
      consoleMsg.init(textMessage, aSource, aScriptLine, aLineNum, 0,
                      Ci.nsIScriptError.warningFlag,
                      "Content Security Policy");
    }
    Components.classes["@mozilla.org/consoleservice;1"]
              .getService(Ci.nsIConsoleService).logMessage(consoleMsg);
  }
function cspd_warn ( aMsg , aSource , aScriptLine , aLineNum ) { var textMessage = 'CSP WARN:  ' + aMsg + "\n" ; var consoleMsg = Components . classes [ "@mozilla.org/scripterror;1" ] . createInstance ( Ci . nsIScriptError ) ; if ( this . _innerWindowID ) { consoleMsg . initWithWindowID ( textMessage , aSource , aScriptLine , aLineNum , 0 , Ci . nsIScriptError . warningFlag , "Content Security Policy" , this . _innerWindowID ) ; } else { consoleMsg . init ( textMessage , aSource , aScriptLine , aLineNum , 0 , Ci . nsIScriptError . warningFlag , "Content Security Policy" ) ; } Components . classes [ "@mozilla.org/consoleservice;1" ] . getService ( Ci . nsIConsoleService ) . logMessage ( consoleMsg ) ; }
Sends a warning message to the error console and web developer console.
Sends a warning message to the error console and web developer console .