- Electron version: v0.37.6
- Operating system: Mac OS

**Test code:**
Simply add 'ipcMain.on' twice in the `main.js` and ipcRenderer.sendSync in `index.html`, run the program and it will crash when started.

**main.js:**

```
'use strict';

const electron = require('electron');
// Module to control application life.
const app = electron.app;
// Module to create native browser window.
const BrowserWindow = electron.BrowserWindow;
const ipcMain = electron.ipcMain;

// Keep a global reference of the window object, if you don't, the window will
// be closed automatically when the JavaScript object is garbage collected.
mainWindow = global.mainWindow = undefined

function createWindow () {
  const controller = require('./controller')
  // Create the browser window.
  mainWindow = new BrowserWindow({width: 800, height: 600});

  ipcMain.on('synchronous-message', function(event, status) {console.log("test"); event.returnValue="test"})
  ipcMain.on('synchronous-message', function(event, status) {console.log("test"); event.returnValue="test"})

  // and load the index.html of the app.
  mainWindow.loadURL('file://' + __dirname + '/index.html');

  // Open the DevTools.
  mainWindow.webContents.openDevTools();

  // Emitted when the window is closed.
  mainWindow.on('closed', function() {
    // Dereference the window object, usually you would store windows
    // in an array if your app supports multi windows, this is the time
    // when you should delete the corresponding element.
    mainWindow = null;
  });
}

// This method will be called when Electron has finished
// initialization and is ready to create browser windows.
app.on('ready', createWindow);
// var onlineStatusWindow;
// app.on('ready', function() {
//   onlineStatusWindow = new BrowserWindow({ width: 0, height: 0, show: false });
//   onlineStatusWindow.loadURL('file://' + __dirname + '/online-status.html');
// });

// Quit when all windows are closed.
app.on('window-all-closed', function () {
  // On OS X it is common for applications and their menu bar
  // to stay active until the user quits explicitly with Cmd + Q
  if (process.platform !== 'darwin') {
    app.quit();
  }
});

app.on('activate', function () {
  // On OS X it's common to re-create a window in the app when the
  // dock icon is clicked and there are no other windows open.
  if (mainWindow === null) {
    createWindow();
  }
});

```

**index.html**

```
<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8">
    <title>Hello World!</title>
  </head>
  <body>
    <h1>Hello World!</h1>
    We are using node <script>document.write(process.versions.node)</script>,
    Chromium <script>document.write(process.versions.chrome)</script>,
    and Electron <script>document.write(process.versions.electron)</script>.
  </body>
  <script>
    const ipcRenderer = require('electron').ipcRenderer;
    ipcRenderer.sendSync('synchronous-message')
  </script>
</html>

```

atom/browser/api/event.cc
#include "atom/browser/api/event.h"
#include "atom/common/api/api_messages.h"
#include "atom/common/native_mate_converters/string16_converter.h"
#include "content/public/browser/web_contents.h"
#include "native_mate/object_template_builder.h"
namespace mate {
Event::Event(v8::Isolate* isolate)
    : sender_(NULL),
      message_(NULL) {
  Init(isolate);
}
Event::~Event() {
}
void Event::SetSenderAndMessage(content::WebContents* sender,
                                IPC::Message* message) {
  DCHECK(!sender_);
  DCHECK(!message_);
  sender_ = sender;
  message_ = message;
  Observe(sender);
}
void Event::WebContentsDestroyed() {