adobe/brackets — pull request #4156 by njx (2013-06-07 21:46:17+00:00)
Title: Ensure that inline widgets only have onClosed() called once

Also centralized the close logic in `_removeInlineWidgetInternal()` and made sure everyone bottlenecks through that. This looks safe because all the existing calls to `_removeInlineWidgetInternal()` already called `onClosed()`, and the one place where we were calling `onClosed()` by itself wouldn't be harmed by doing the other stuff that's in `_removeInlineWidgetInternal()` (which is just cleaning up the widget from our internal array).