On 5/6/14, 3:29 PM, Bill McCloskey wrote:
----- Original Message -----
From: "Chris Peterson" <cpeter...@mozilla.com>
To: dev-platform@lists.mozilla.org
Sent: Tuesday, May 6, 2014 3:11:40 PM
Subject: Re: Disabling strict warnings as errors in xpcshell
btw, I believe the JS team now uses the term "extra warnings" to
differentiate SpiderMonkey's non-standard "strict warnings"
(javascript.options.strict pref) from ES5's "strict mode".
Does anyone actually want these strict/extra warnings? Can we just
remove this misfeature from SpiderMonkey?
I find this feature extremely useful. When chrome code contains a typo, without
extraWarnings we often just produce no error at all. The most common case is
that Firefox opens to a blank window (i.e., no content is drawn) and no output.
To solve these bugs, I've had to bisect my own code to find the typo. When it
turns out to be something as simple as a typo, it's extremely frustrating. The
extraWarnings option makes it very easy to quickly identify these sorts of bugs.
Perhaps a more extensible solution would be the option to turn the extra
warnings on/off for different test suites. Could we just flip the
javascript.options.strict.debug pref off in our xpcshell head.js to
disable the extra warnings for our test suite?
These strict/extra warnings are also enabled in Firefox's debug builds
(javascript.options.strict.debug pref), which can cause Firefox features
to misbehave differently in debug and release builds.
As far as I know, the warnings never change behavior. They just cause us to
print warnings.
At least in the devtools xpcshell tests, we listen for console error
messages and fail tests when we receive them. We do this because the
xpcshell tests have historically swallowed up a lot of our errors
resulting in enigmatic timeouts with no clues as to why they timed out.
This is very valuable to us, but unfortunately the extra warnings are
greatly reducing its value.
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform