When adding a SHistoryListener in the Session Store test frame script we were creating an intermediate global variable that was rooting the docshell. This prevented things from being GC'd properly. I've removed this intermediate variable and we should no longer keep the docshell alive. This will probably also fix Bug 1036031.