<!--
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/api/atom_api_web_contents.cc
v8::Local<v8::Value> val,
                     atom::SetSizeParams* out) {
    mate::Dictionary params;
    if (!ConvertFromV8(isolate, val, &params))
      return false;
    bool autosize;
    if (params.Get("enableAutoSize", &autosize))
      out->enable_auto_size.reset(new bool(true));
    gfx::Size size;
    if (params.Get("min", &size))
      out->min_size.reset(new gfx::Size(size));
    if (params.Get("max", &size))
      out->max_size.reset(new gfx::Size(size));
    if (params.Get("normal", &size))
      out->normal_size.reset(new gfx::Size(size));
    return true;
  }
};
template<>
struct Converter<PrintSettings> {
  static bool FromV8(v8::Isolate* isolate, v8::Local<v8::Value> val,