Hi everyone, Yesterday, Nightly was broken on Linux and MacOS because of a typo in JS code [1]. If I understand correctly, this triggered the usual "undefined is not a function", which was
1/ uncaught during testing, as these things often are; 2/ basically impossible to diagnose in the wild, because there was no error message of any kind. I remember that we had bugs of this kind lurking for years in our codebase, in code that was triggered daily and that everybody believed to be tested. I'd like to think that there is a better way to handle these bugs, without waiting for them to explode in our user's face. Opening this thread to see if we can find a way to somehow "solve" these bugs, either by making them impossible, or by making them much easier to solve. I have one proposal. Could we change the behavior of the JS VM as follows? - The changes affect only Nightly. - The changes affect only mozilla chrome code (including system add-ons but not user add-ons or test code). - Any programmer error (e.g. SyntaxError) causes a crash a crash that displays (and attaches to the CrashReporter) both the JS stack in and the native stack. - Any SyntaxError is a programmer error. - Any TypeError is a programmer error. I expect that this will find a number of lurking errorsy, so we may want to migrate code progressively, using a directive, say "use strict moz-platform" and static analysis to help encourage using this directive. What do you think? Cheers, David [1] https://bugzilla.mozilla.org/show_bug.cgi?id=1407351#c28 _______________________________________________ dev-platform mailing list [email protected] https://lists.mozilla.org/listinfo/dev-platform

