* 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
if (devtools_web_contents_.IsEmpty())
    return v8::Null(isolate);
  else
    return v8::Local<v8::Value>::New(isolate, devtools_web_contents_);
}
v8::Local<v8::Value> WebContents::Debugger(v8::Isolate* isolate) {
  if (debugger_.IsEmpty()) {
    auto handle = atom::api::Debugger::Create(isolate, web_contents());
    debugger_.Reset(isolate, handle.ToV8());
  }
  return v8::Local<v8::Value>::New(isolate, debugger_);
}
void WebContents::GrantOriginAccess(const GURL& url) {
  content::ChildProcessSecurityPolicy::GetInstance()->GrantOrigin(
      web_contents()->GetMainFrame()->GetProcess()->GetID(),
      url::Origin(url));
}
void WebContents::BuildPrototype(v8::Isolate* isolate,
                                 v8::Local<v8::FunctionTemplate> prototype) {
  prototype->SetClassName(mate::StringToV8(isolate, "WebContents"));
  mate::ObjectTemplateBuilder(isolate, prototype->PrototypeTemplate())
      .MakeDestroyable()
      .SetMethod("getId", &WebContents::GetID)
      .SetMethod("getProcessId", &WebContents::GetProcessID)
      .SetMethod("getOSProcessId", &WebContents::GetOSProcessID)
      .SetMethod("equal", &WebContents::Equal)
      .SetMethod("_loadURL", &WebContents::LoadURL)
      .SetMethod("downloadURL", &WebContents::DownloadURL)
      .SetMethod("_getURL", &WebContents::GetURL)
      .SetMethod("getTitle", &WebContents::GetTitle)