According to documentation when app.exit() is called the `will-quit` and `before-quit` events should not be fired. This is apparently not the case.
- Electron version: 0.36.5-0.36.9
- Operating system: OSX

atom/browser/browser.cc
if (is_quiting_)
    return;
  is_quiting_ = HandleBeforeQuit();
  if (!is_quiting_)
    return;
  atom::WindowList* window_list = atom::WindowList::GetInstance();
  if (window_list->size() == 0)
    NotifyAndShutdown();
  window_list->CloseAllWindows();
}
void Browser::Exit(int code) {
  if (!AtomBrowserMainParts::Get()->SetExitCode(code)) {
    
    exit(code);
  } else {
    
    is_quiting_ = true;
    
    atom::WindowList* window_list = atom::WindowList::GetInstance();
    if (window_list->size() == 0) {
      Shutdown();
    } else {
      
      
      for (NativeWindow* window : *window_list)
        window->CloseContents(nullptr);  
    }
  }
}
void Browser::Shutdown() {