Bug 914026 - Check mDocShell before use. r=khuey
Fix bug 916404. r=mccr8