* Electron version: 1.6.2
* Operating system: macOS

### Expected behavior

<!-- What do you think should happen? -->
Exit the entire application.

### Actual behavior

<!-- What actually happens? -->
It remains a window can not close.

### How to reproduce

Use Electron start the following code.

Then `Command+Q`, the app will not be exited, it left a window and it won't be closed.

However, comment the line 47 or line 48 makes the `app.exit(0)` works fine.

```js
const electron = require('electron')
const app = electron.app
const Menu = electron.Menu
const BrowserWindow = electron.BrowserWindow

function createMain () {
    let mainWindow = new BrowserWindow({
        width: 1000,
        height: 800
    })
    mainWindow.loadURL('https://github.com')
}
function createSecond () {
    let secondWindow = new BrowserWindow({
        width: 1000,
        height: 800
    })
    secondWindow.loadURL('https://stackoverflow.com')
}
function createThird() {
    let thirdWindow = new BrowserWindow({
        width: 1000,
        height: 800
    })
    thirdWindow.loadURL('https://google.com')
}
function setupMenu() {
    menu = Menu.buildFromTemplate([
        {
            label: 'Options',
            submenu: [
                {
                    label: 'Exit',
                    accelerator: 'CmdOrCtrl+Q',
                    click: () => app.exit(0)
                }
            ]
        }
    ])
    Menu.setApplicationMenu(menu)
}
app.on('ready', () => {
    createMain();
    createSecond();

    // comment either the following two line makes app.exit(0) work fine
    createThird();
    setupMenu();    
})
```
atom/browser/api/atom_api_auto_updater.cc
const std::string& release_name,
                                     const base::Time& release_date,
                                     const std::string& url) {
  Emit("update-downloaded", release_notes, release_name, release_date, url,
       
       base::Bind(&AutoUpdater::QuitAndInstall, base::Unretained(this)));
}
void AutoUpdater::OnWindowAllClosed() {
  QuitAndInstall();
}
void AutoUpdater::SetFeedURL(const std::string& url, mate::Arguments* args) {
  auto_updater::AutoUpdater::HeaderMap headers;
  args->GetNext(&headers);
  auto_updater::AutoUpdater::SetFeedURL(url, headers);
}
void AutoUpdater::QuitAndInstall() {
  
  WindowList* window_list = WindowList::GetInstance();
  if (window_list->empty()) {
    auto_updater::AutoUpdater::QuitAndInstall();
    return;
  }
  
  window_list->AddObserver(this);
  for (NativeWindow* window : *window_list)
    window->Close();
}
mate::Handle<AutoUpdater> AutoUpdater::Create(v8::Isolate* isolate) {