adobe/brackets-shell — pull request #97 by redmunds (2012-09-05 16:47:36+00:00)
Title: detect when sending message fails during shutdown

Problem that I was able to trap for this issue is that the close window message fails and the browser stays in the list, so we get into an infinite loop sending same message to same browser. We now detect that case and remove browser from queue.

The recipe I was using to trap problem is to run InlineEditorProvider unit tests. It seems to happen more frequently when I switch to another app and do something else while the unit tests are running.

This problem is intermittent and only happens in Release mode, so there may be room for improvement in this fix. This may cause a memory leak, but it's during shutdown, so as long as shutdown succeeds, it's a very temporary leak.