Run TestSelectWindow under pifirefox a few dozen times. Eventually the test will hang. Looking through the logs, this happens when a pop-up window is closing but fails to send back the onUnload "Window closing" message that PI requires to know whether the window has closed.
Specifically, since the code never receives the "closed" message, we incorrectly send new messages to closed windows. They never respond and the test locks up.
I think this is probably related to SRC-169. Attempting to update the JS vars asynchronously is probably failing for much the same reason: the window is closing and so the extra XHRs aren't necessarily getting sent.