Bug 1132006 - "Restore all crashed tabs" doesn't restore all tabs in all windows
STR:

1) Install TabCrasher[1] or CrashMe[2] to get tab crashing powers
2) Open two windows, and add tabs in each browsed to some web content
3) In one of the windows, crash the tabs (both add-ons add buttons to crash the content process)
4) In one of the crashed windows, choose "Restore All Crashed Tabs"

ER:

All crashed tabs across all windows should be restored

AR:

Only the crashed tabs in the window where the user clicked "Restore All Crashed Tabs" are restored.


[1]: https://addons.mozilla.org/en-US/firefox/addon/tab-crasher/
[2]: http://people.mozilla.org/~tmielczarek/crashme/


The problem here appears to be that the crashed browsers for the non-selected window don't have <xul:browser>'s where the permanent key is in the WeakSet. What the hell?

And when I try to Restore All Crashed Tabs in the second window, THEN the permanentKeys are in there. WHAT?

There should only be one SessionStore.jsm. Only one. What is going on here?

WeakSet's don't allow me to easily inspect these thingsā€¦ so I'll switch to a standard Set for now.

Ah - I see what was going on. Despite iterating over all windows, we only iterated over the tabs of the currently selected window for restoration.

Fixed!