- Electron version: 1.2.1
- Operating system: Mac OS X

See also https://github.com/electron/electron/issues/5714

STR:
1. Start a webserver on localhost:port that serves a dummy index.html
2. Register a custom http protocol.
   
   ``` js
   electron.protocol.registerStandardSchemes(['foobar', 'http', 'https']);
   
   app.on('ready', function() {
     electron.protocol.registerHttpProtocol('foobar', (request, callback) => {
       const redirectPath = `http://localhost:port/index.html`;
       callback({ method: request.method, referrer: request.referrer, url: redirectPath });
     }, e => { if (e) { console.log(e); } });
   });
   ```
3. Either through devtools, or via some js in our index.html, have a single line that does `fetch('http://localhost:port/index.html')` or anything else from our server.

Results: as soon as `fetch` is called, the webview becomes black, and the devtools crash if they were open. No other visible error or stdout.

If devtools were open, they show this message: "Devtools was disconnected from the page.
Once page is reloaded, DevTools will automatically reconnect."

atom/renderer/atom_renderer_client.cc
AtomRendererClient* renderer_client)
      : content::RenderFrameObserver(frame),
        render_frame_(frame),
        world_id_(-1),
        renderer_client_(renderer_client) {}
  
  void DidClearWindowObject() override {
    renderer_client_->DidClearWindowObject(render_frame_);
  }
  void DidCreateScriptContext(v8::Handle<v8::Context> context,
                              int extension_group,
                              int world_id) override {
    if (world_id_ != -1 && world_id_ != world_id)
      return;
    world_id_ = world_id;
    renderer_client_->DidCreateScriptContext(context, render_frame_);
  }
  void WillReleaseScriptContext(v8::Local<v8::Context> context,
                                int world_id) override {
    if (world_id_ != world_id)
      return;
    renderer_client_->WillReleaseScriptContext(context, render_frame_);
  }
 private:
  content::RenderFrame* render_frame_;
  int world_id_;
  AtomRendererClient* renderer_client_;
  DISALLOW_COPY_AND_ASSIGN(AtomRenderFrameObserver);
};
v8::Local<v8::Value> GetRenderProcessPreferences(