This commit is contained in:
Aiden Liu 2026-08-25 14:04:13 -04:00 committed by GitHub
commit 3e9d361ba5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1365,8 +1365,16 @@ const { CommandLineOptions } = ChromeUtils.importESModule("chrome://zotero/conte
/*
* Log a message to the Mozilla JS error console
*
* |type| is a string with one of the flag types in nsIScriptError:
* 'error', 'warning', 'exception', 'strict'
* |type| is a string matching one of the flag constants on nsIScriptError.
* As of Firefox 140 ESR only three are defined:
* 'error' -> errorFlag (0x0, default)
* 'warning' -> warningFlag (0x1)
* 'info' -> infoFlag (0x8)
* The legacy 'exception' and 'strict' values have been removed upstream;
* passing them yields an undefined flag and silently falls back to errorFlag.
*
* |sourceLine| is no longer accepted by nsIScriptError.init(), but is kept
* in the signature for compatibility with older Zotero.log() callers.
*/
this.log = function (message, type, sourceName, sourceLine, lineNumber, columnNumber) {
var scriptError = Components.classes["@mozilla.org/scripterror;1"]
@ -1380,7 +1388,6 @@ const { CommandLineOptions } = ChromeUtils.importESModule("chrome://zotero/conte
scriptError.init(
message,
sourceName ? sourceName : null,
sourceLine != undefined ? sourceLine : null,
lineNumber != undefined ? lineNumber : null,
columnNumber != undefined ? columnNumber : null,
flags,