mozilla/addon-sdk — pull request #1260 by Mossop (2013-10-08 22:55:57+00:00)
Title: Bug 924500: Use outer-window-destroyed to detect when a window has been completely closed.

Rather than using the setImmediate hack added by bug 874502 wait for the window to close completely. A minor API change here, we can't resolve the promise with the window because it is now dead and any attempt to use it throws an exception. All tests seem to pass with this change though.