Closed Bug 822428 Opened 13 years ago Closed 9 years ago

JS warning "variable message redeclares argument" reported variable "message" in G_DebugService.prototype.reportScriptError_()

Categories

(Toolkit :: Safe Browsing, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: dholbert, Unassigned)

References

Details

Due to recent (I think?) increased strictness about our internal-JS-parsing, I'm now seeing this spammed to my terminal when running a debug m-c build: { JS Component Loader: WARNING file:///scratch/work/builds/mozilla-central/mozilla-central-11-11-01.13-56/obj/dist/bin/components/nsUrlClassifierLib.js:970 variable message redeclares argument } This corresponds to this chunk of code: > 604 /** > 605 * Private helper to report an nsIScriptError instance to the log/console. > 606 */ > 607 G_DebugService.prototype.reportScriptError_ = function(message, sourceName, > 608 lineNumber, label) { > 609 var message = "\n------------------------------------------------------------\n" + > 610 label + ": " + message + > 611 "\nlocation: " + sourceName + ", " + "line: " + lineNumber + > 612 "\n------------------------------------------------------------\n\n"; > 613 > 614 dump(message); > 615 this.maybeDumpToFile(message); > 616 } https://mxr.mozilla.org/mozilla-central/source/toolkit/components/url-classifier/content/moz/debug.js#604 We've had this issue since this code was added in bug 333062 (in a different file). We should just rename the local variable, to e.g. "fullMessage".
Product: Firefox → Toolkit
Fixed in bug 822548.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.