Closed Bug 476967 Opened 15 years ago Closed 15 years ago
Strict warning "assignment to undeclared variable" does not work in browser (works in js shell)
This warning is pretty important for finding potential compatibility bugs in Firefox, extensions, and Greasemonkey scripts. mrbkap explained to me why it doesn't work in the browser and has ideas about how to make it work again.
Summary: "assignment to undeclared variable" does not work in browser (works in js shell) → Strict warning "assignment to undeclared variable" does not work in browser (works in js shell)
I noticed that we're swallowing strict warnings right now. The check in NS_ScriptErrorReporter eagerly reports warnings that would otherwise be swallowed.
It turned out that the warning *was* being correctly reported all along. We don't have to do any additional work there, just report warnings eagerly.
Comment on attachment 361390 [details] [diff] [review] patch v2 This could use some manual testing both with strict warnings enabled and not before landing...
http://hg.mozilla.org/mozilla-central/rev/66c6469a7c92 Note that there are a few strict warnings in chrome that are now being reported that were previously suppressed. They will need their own investigation and resolution.
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
OS: Mac OS X → All
Hardware: x86 → All
You need to log in before you can comment on or make changes to this bug.