<!--
Thanks for opening an issue! A few things to keep in mind:

- The issue tracker is only for bugs and feature requests.
- Before reporting a bug, please try reproducing your issue against
  the latest version of Electron.
- If you need general advice, join our Slack: http://atom-slack.herokuapp.com
-->

* Electron version: 1.6.1
* Operating system: macOS

### Expected behavior

navigator.geolocation.getCurrentPosition runs in background

### Actual behavior

the entire UI is frozen

### How to reproduce

```js
    navigator.geolocation.getCurrentPosition((pos) => {
      console.log('POS: ' + pos);
    }, (err) => {
      console.log('Geolocation error: ', err);
    }, {enableHighAccuracy: false});
```
atom/browser/common_web_contents_delegate.h
base::WeakPtr<NativeWindow> owner_window_;
  
  bool html_fullscreen_;
  
  bool native_fullscreen_;
  std::unique_ptr<WebDialogHelper> web_dialog_helper_;
  std::unique_ptr<AtomJavaScriptDialogManager> dialog_manager_;
  scoped_refptr<DevToolsFileSystemIndexer> devtools_file_system_indexer_;
  
  scoped_refptr<AtomBrowserContext> browser_context_;
  
  
  
  
  std::unique_ptr<brightray::InspectableWebContents> web_contents_;
  
  typedef std::map<std::string, base::FilePath> PathsMap;
  PathsMap saved_files_;
  
  typedef std::map<
      int,
      scoped_refptr<DevToolsFileSystemIndexer::FileSystemIndexingJob>>
      DevToolsIndexingJobsMap;
  DevToolsIndexingJobsMap devtools_indexing_jobs_;
  DISALLOW_COPY_AND_ASSIGN(CommonWebContentsDelegate);
};
}  
#endif