https://bugzilla.wikimedia.org/show_bug.cgi?id=28626
--- Comment #25 from Brion Vibber <br...@wikimedia.org> 2011-07-06 21:51:40 UTC --- Ok r91591 adds JSMin+ to libs and uses its parser on the minifier unit tests (now tweaked to be valid JS programs). r91608 adds a $wgResourceLoaderValidateJs option (on by default) and uses JSMin+'s parser to validate JS coming from files or wiki pages into ResourceLoader. On parse error, the bad script chunk is replaced with a JS exception throw which lists the file/page name, line number, and parse error. This ought to do the job, but I recommend some more thorough testing to make sure it doesn't break anything & some performance testing -- it does look like JSParser is a bit sluggish but I haven't really solidly compared its behavior. Advantage of using a real parser here is of course that we can report errors based on the original line numbers rather than forcing people to switch to debug mode just to get a location. -- Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug. _______________________________________________ Wikibugs-l mailing list Wikibugs-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikibugs-l