Electron Version: 7.1.1
Operating System: Windows 10 (1803)

If I set the 'margins' option when call webContents.print method,
The app will crash with no error message.

```js
let { remote } = require("electron");
let webContents = remote.getCurrentWebContents();
webContents.print(
  {
    margins: {
      marginType: "custom",
      top: 30,
      bottom: 0,
      left: 0,
      right: 0
    }
  },
  (success, errorType) => {
    if (!success) console.log(errorType);
  }
);
```

shell/browser/api/electron_api_web_contents.cc
bool proceed,
                                    bool* proceed_to_fire_unload) {
  if (type_ == Type::BROWSER_WINDOW || type_ == Type::OFF_SCREEN)
    *proceed_to_fire_unload = proceed;
  else
    *proceed_to_fire_unload = true;
}
void Ws::SetContentsBounds(content::Ws* source,
                                    const gfx::Rect& rect) {
  for (ExtendedWsObserver& observer : observers_)
    observer.OnSetContentBounds(rect);
}
void Ws::CloseContents(content::Ws* source) {
  Emit("close");
  auto* autofill_driver_factory =
      AutofillDriverFactory::FromWs(ontents());
  if (autofill_driver_factory) {
    autofill_driver_factory->CloseAllPopups();
  }
  if (managed_ontents())
    managed_ontents()->GetView()->SetDelegate(nullptr);
  for (ExtendedWsObserver& observer : observers_)
    observer.OnCloseContents();
}
void Ws::ActivateContents(content::Ws* source) {
  for (ExtendedWsObserver& observer : observers_)
    observer.OnActivateContents();
}
void Ws::UpdateTargetURL(content::Ws* source,