* 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
RemoveFromWeakMap();
  
  
  MarkDestroyed();
  Emit("destroyed");
  
  base::ThreadTaskRunnerHandle::Get()->PostTask(
      FROM_HERE, GetDestroyClosure());
}
void WebContents::NavigationEntryCommitted(
    const content::LoadCommittedDetails& details) {
  Emit("navigation-entry-commited", details.entry->GetURL(),
       details.is_same_document, details.did_replace_entry);
}
int64_t WebContents::GetID() const {
  int64_t process_id = web_contents()->GetRenderProcessHost()->GetID();
  int64_t routing_id = web_contents()->GetRenderViewHost()->GetRoutingID();
  int64_t rv = (process_id << 32) + routing_id;
  return rv;
}
int WebContents::GetProcessID() const {
  return web_contents()->GetRenderProcessHost()->GetID();
}
base::ProcessId WebContents::GetOSProcessID() const {
  auto process_handle = web_contents()->GetRenderProcessHost()->GetHandle();
  return base::GetProcId(process_handle);
}
WebContents::Type WebContents::GetType() const {