Bug 830948, null check mDocshell before using it, r=bz

--HG--
extra : rebase_source : ea20dabe0ec39b3b98fab07e72b0f1f51f9d32a8