Bug 941969 - optimize JS for system app

https://bugzilla.mozilla.org/show_bug.cgi?id=941969