Improved, re:  Regarding: https://bugzilla.mozilla.org/show_bug.cgi?id=1092375

You do these in both cases.  How about pulling them out of the switch, and converting it to an if?