Bug 1032045 - Fix jshint errors via function inlining R=alexgyoshev