* **Electron Version** (output of `node_modules/.bin/electron --version`):
  * 3.0.6
* **Operating System** (Platform and Version):
  * macOS 10.14

### Expected Behavior
a `new-window` event fires

### Actual behavior
a `did-fail-load` fires with errorCode -3

### To Reproduce
```sh
$ git clone git@github.com:chrismohr/no-new-window.git -b master
$ cd no-new-window/
$ npm i && npm start
```

atom/browser/web_contents_preferences.cc
} else {
    SetDefaultBoolIfUndefined(options::kAllowRunningInsecureContent, false);
  }
#if defined(OS_MACOSX)
  SetDefaultBoolIfUndefined(options::kScrollBounce, false);
#endif
  SetDefaultBoolIfUndefined(options::kOffscreen, false);
  
  
  int guest_instance_id = 0;
  if (web_preferences.Get(options::kGuestInstanceID, &guest_instance_id)) {
    auto* manager = WebViewManager::GetWebViewManager(web_contents);
    if (manager) {
      auto* embedder = manager->GetEmbedder(guest_instance_id);
      if (embedder) {
        auto* embedder_preferences = WebContentsPreferences::From(embedder);
        if (embedder_preferences &&
            embedder_preferences->IsEnabled(options::kOffscreen)) {
          preference_.SetKey(options::kOffscreen, base::Value(true));
        }
      }
    }
  }
  last_preference_ = preference_.Clone();
}
WebContentsPreferences::~WebContentsPreferences() {
  instances_.erase(std::remove(instances_.begin(), instances_.end(), this),
                   instances_.end());
}
bool WebContentsPreferences::SetDefaultBoolIfUndefined(