* 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
#include "atom/browser/api/atom_api_web_contents.h"
#include <set>
#include <string>
#include "atom/browser/api/atom_api_debugger.h"
#include "atom/browser/api/atom_api_session.h"
#include "atom/browser/api/atom_api_window.h"
#include "atom/browser/atom_browser_client.h"
#include "atom/browser/atom_browser_context.h"
#include "atom/browser/atom_browser_main_parts.h"
#include "atom/browser/atom_javascript_dialog_manager.h"
#include "atom/browser/child_web_contents_tracker.h"
#include "atom/browser/lib/bluetooth_chooser.h"
#include "atom/browser/native_window.h"
#include "atom/browser/net/atom_network_delegate.h"
#if defined(ENABLE_OSR)
#include "atom/browser/osr/osr_output_device.h"
#include "atom/browser/osr/osr_render_widget_host_view.h"
#include "atom/browser/osr/osr_web_contents_view.h"
#endif
#include "atom/browser/ui/drag_util.h"
#include "atom/browser/web_contents_permission_helper.h"
#include "atom/browser/web_contents_preferences.h"
#include "atom/browser/web_contents_zoom_controller.h"
#include "atom/browser/web_view_guest_delegate.h"
#include "atom/common/api/api_messages.h"
#include "atom/common/api/event_emitter_caller.h"