### Preflight Checklist
<!-- Please ensure you've completed the following steps by replacing [ ] with [x]-->

* [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/master/CONTRIBUTING.md) for this project.
* [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/master/CODE_OF_CONDUCT.md) that this project adheres to.
* [X] I have searched the issue tracker for an issue that matches the one I want to file, without success.

### Issue Details

* **Electron Version:**
  * <!-- (output of `node_modules/.bin/electron --version`) e.g. 4.0.3 -->v5.0.0-beta.7
* **Operating System:**
  * <!-- (Platform and Version) e.g. macOS 10.13.6 / Windows 10 (1803) / Ubuntu 18.04 x64 --> Windows 10

### Expected Behavior
<!-- A clear and concise description of what you expected to happen. -->
Electron app should not crash when toggling `Alt` key when `setMenuBarVisibility(false)`

### Actual Behavior
<!-- A clear and concise description of what actually happened. -->
Electron app crashes when `Alt` key is pressed

### To Reproduce
```sh
$ git clone  https://github.com/KiranNiranjan/electron-quick-start.git -b crash
$ npm install
$ npm start || electron .
```
When the app finishes loading press the `Alt` and the app crashes

### Screenshots
<!-- If applicable, add screenshots to help explain your problem. -->
![2019-04-02 12 51 11](https://user-images.githubusercontent.com/13243259/55383546-1af75800-5546-11e9-873e-22be38ea6247.gif)


### Additional Information
<!-- Add any other context about the problem here. -->
Looks similary to the following issue -> https://github.com/electron/electron/pull/17474

atom/browser/ui/views/root_view.cc
: window_(window),
      last_focused_view_tracker_(std::make_unique<views::ViewTracker>()) {
  set_owned_by_client();
}
RootView::~RootView() {}
void RootView::SetMenu(AtomMenuModel* menu_model) {
  if (menu_model == nullptr) {
    
    UnregisterAcceleratorsWithFocusManager();
    
    SetMenuBarVisibility(false);
    menu_bar_.reset();
    return;
  }
  RegisterAcceleratorsWithFocusManager(menu_model);
  
  if (!window_->has_frame())
    return;
  if (!menu_bar_) {
    menu_bar_.reset(new MenuBar(this));
    menu_bar_->set_owned_by_client();
    if (!menu_bar_autohide_)
      SetMenuBarVisibility(true);
  }
  menu_bar_->SetMenu(menu_model);
  Layout();
}
bool RootView::HasMenu() const {