Bug 838955 (part 1) - Fix rooting hazards in jsstr.cpp identified by static analysis.  r=sfink.

--HG--
extra : rebase_source : cc45015a1840ccb1c3146e0b4ad81f2226dac985