> Why not just call toggleSidebar and let browser.js take care of all this for us?

`sidebar.docShell.createAboutBlankContentViewer(null)` below causes Firefox to crash, I logged [bug 881011](https://bugzilla.mozilla.org/show_bug.cgi?id=881011) about it.