e.g.

```js
// in the main process
const w = new BrowserWindow({ show: false })
const menu = Menu.buildFromTemplate([
  { label: '1' },
  { label: '2' },
  { label: '3' }
])
menu.popup()
menu.closePopup()
```

It works if you call `closePopup()` in a `setTimeout` callback, though.

Expected behaviour:
menu appears and then disappears.

Actual behaviour:
menu appears and never goes away.

See [fiddle](https://gist.github.com/b76d0930011603e320f06f6ca0788317).

Happens on Electron 4, 5 and 6.
shell/browser/api/atom_api_menu_mac.h
protected:
  MenuMac(v8::Isolate* isolate, v8::Local<v8::Object> wrapper);
  ~MenuMac() override;
  void PopupAt(TopLevelWindow* window,
               int x,
               int y,
               int positioning_item,
               const base::Closure& callback) override;
  void PopupOnUI(const base::WeakPtr<NativeWindow>& native_window,
                 int32_t window_id,
                 int x,
                 int y,
                 int positioning_item,
                 base::Closure callback);
  void ClosePopupAt(int32_t window_id) override;
 private:
  friend class Menu;
  void OnClosed(int32_t window_id, base::Closure callback);
  scoped_nsobject<AtomMenuController> menu_controller_;
  
  std::map<int32_t, scoped_nsobject<AtomMenuController>> popup_controllers_;
  base::WeakPtrFactory<MenuMac> weak_factory_;
  DISALLOW_COPY_AND_ASSIGN(MenuMac);
};
}  
}  
#endif