* Electron version: 1.6.15
* Operating system: Linux

### Expected behavior

Open a `BrowserWindow` with passed options

### Actual behavior

  - Usually a Segmentation fault.
  - Sometimes `[12843:0100/000000.043847:FATAL:zygote_linux.cc(479)] Failed to synchronise with parent zygote process`
  - Sometimes `[12819:0100/000000.719122:FATAL:zygote_linux.cc(509)] Check failed: len > 0 (0 vs. 0)`

### How to reproduce

I'm still working on making a smaller reproduction case. The issue goes away with small tweaks.

1. Starting from https://github.com/daurnimator/fengari-electron-example
2. Modify main.lua to contain:
```lua
local js = require "js"
local electron = require "electron"

electron.app:on("ready", function()
	local win = js.new(electron.BrowserWindow, js.createproxy({
		backgroundColor = '#2e2c29';
	}, "object"))
	win:loadURL("https://fengari.io")
end)
```

atom/browser/api/atom_api_web_contents.cc
Emit("will-destroy");
  ResetManagedWebContents(async);
}
bool WebContents::DidAddMessageToConsole(content::WebContents* source,
                                         int32_t level,
                                         const base::string16& message,
                                         int32_t line_no,
                                         const base::string16& source_id) {
  if (type_ == OFF_SCREEN) {
    return false;
  } else {
    Emit("console-message", level, message, line_no, source_id);
    return true;
  }
}
void WebContents::OnCreateWindow(
    const GURL& target_url,
    const std::string& frame_name,
    WindowOpenDisposition disposition,
    const std::vector<std::string>& features,
    const scoped_refptr<content::ResourceRequestBody>& body) {
  if (type_ == BROWSER_WINDOW || type_ == OFF_SCREEN)
    Emit("-new-window", target_url, frame_name, disposition, features, body);
  else
    Emit("new-window", target_url, frame_name, disposition, features);
}
void WebContents::WebContentsCreated(