https://bugzilla.wikimedia.org/show_bug.cgi?id=28626

             Bug #: 28626
           Summary: JS syntax errors affect other modules in
                    ResourceLoader
           Product: MediaWiki
           Version: 1.18-svn
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: Unprioritized
         Component: Resource Loader
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected]
    Classification: Unclassified


When ResourceLoader combines multiple .js scripts into a single bundle, they're
given separate function contexts (thus separate local variable namespaces) and
are executed separately with try/catch wrappers to isolate faults.

However, a JavaScript syntax error will cause the entire batch of modules to
fail, as nothing will be executed in the first place...

This can let a broken gadget for instance break important parts of the UI if
they end up getting bundled together:

  unmatched ) in regular expression <- syntax err in a gadget
  addButton is not defined <- editing widgets haven't been loaded either

A syntax validity check might be a good thing to throw in before (or after?)
minification.

-- 
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
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to