* 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
return mate::CreateHandle(isolate, new AutoUpdater(isolate));
}
void AutoUpdater::BuildPrototype(
    v8::Isolate* isolate, v8::Local<v8::FunctionTemplate> prototype) {
  prototype->SetClassName(mate::StringToV8(isolate, "AutoUpdater"));
  mate::ObjectTemplateBuilder(isolate, prototype->PrototypeTemplate())
      .SetMethod("checkForUpdates", &auto_updater::AutoUpdater::CheckForUpdates)
      .SetMethod("getFeedURL", &auto_updater::AutoUpdater::GetFeedURL)
      .SetMethod("setFeedURL", &AutoUpdater::SetFeedURL)
      .SetMethod("quitAndInstall", &AutoUpdater::QuitAndInstall);
}
}  
}  
namespace {
using atom::api::AutoUpdater;
void Initialize(v8::Local<v8::Object> exports, v8::Local<v8::Value> unused,
                v8::Local<v8::Context> context, void* priv) {
  v8::Isolate* isolate = context->GetIsolate();
  mate::Dictionary dict(isolate, exports);
  dict.Set("autoUpdater", AutoUpdater::Create(isolate));
  dict.Set("AutoUpdater", AutoUpdater::GetConstructor(isolate)->GetFunction());
}
}  
NODE_MODULE_CONTEXT_AWARE_BUILTIN(atom_browser_auto_updater, Initialize)