Bug 839376 (part 14) - More exact rooting in shell/js.cpp.  r=sfink.

--HG--
extra : rebase_source : 5dbacfb158ff5ea3935c0378f1c691006cb013a8