<!--
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.cc
CommonWebContentsDelegate::GetDevToolsWebContents() const {
  if (!web_contents_)
    return nullptr;
  return web_contents_->GetDevToolsWebContents();
}
content::WebContents* CommonWebContentsDelegate::OpenURLFromTab(
    content::WebContents* source,
    const content::OpenURLParams& params) {
  content::NavigationController::LoadURLParams load_url_params(params.url);
  load_url_params.referrer = params.referrer;
  load_url_params.transition_type = params.transition;
  load_url_params.extra_headers = params.extra_headers;
  load_url_params.should_replace_current_entry =
      params.should_replace_current_entry;
  load_url_params.is_renderer_initiated = params.is_renderer_initiated;
  load_url_params.should_clear_history_list = true;
  source->GetController().LoadURLWithParams(load_url_params);
  return source;
}
bool CommonWebContentsDelegate::CanOverscrollContent() const {
  return false;
}
content::JavaScriptDialogManager*
CommonWebContentsDelegate::GetJavaScriptDialogManager(
    content::WebContents* source) {
  if (!dialog_manager_)
    dialog_manager_.reset(new AtomJavaScriptDialogManager);
  return dialog_manager_.get();
}
content::ColorChooser* CommonWebContentsDelegate::OpenColorChooser(