<!--
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/atom_access_token_store.cc
DCHECK_CURRENTLY_ON(BrowserThread::UI);
    request_context_getter_ = browser_context->GetRequestContext();
    std::unique_ptr<base::Environment> env(base::Environment::Create());
    if (!env->GetVar("GOOGLE_API_KEY", &api_key_))
      api_key_ = GOOGLEAPIS_API_KEY;
    BrowserThread::PostTask(
        BrowserThread::IO, FROM_HERE,
        base::Bind(&TokenLoadingJob::RespondOnIOThread, this));
  }
 private:
  friend class base::RefCountedThreadSafe<TokenLoadingJob>;
  ~TokenLoadingJob() {}
  void RespondOnIOThread() {
    
    
    
    device::AccessTokenStore::AccessTokenMap access_token_map;
    std::pair<GURL, base::string16> token_pair;
    token_pair.first = GURL(GOOGLEAPIS_ENDPOINT + api_key_);
    access_token_map.insert(token_pair);
    callback_.Run(access_token_map, request_context_getter_);
  }
  device::AccessTokenStore::LoadAccessTokensCallback callback_;
  net::URLRequestContextGetter* request_context_getter_;
  std::string api_key_;
};
}  
AtomAccessTokenStore::AtomAccessTokenStore() {