mozilla / positron

a experimental, Electron-compatible runtime on top of Gecko
Other
569 stars 64 forks source link

ensure browserWindow on domwindowclosed #27

Closed mykmelez closed 8 years ago

mykmelez commented 8 years ago

After merging @jryans's devtools branch, I noticed this error when quitting the "hello world" app: JavaScript error: … resource:///modules/gecko/atom_browser_window.js, line 71: TypeError: browserWindow is undefined. Presumably it's because the observer gets a notification about the devtools window closing, but that window isn't a BrowserWindow, so it isn't found in browserWindows. Thus this branch ensures browserWindow before trying to use it.

jryans commented 8 years ago

This seems like a reasonable fix for the issue to me. We can always adjust it as we learn more.