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
const SkBitmap& bitmap) {
  
  promise.Resolve(gfx::Image::CreateFrom1xBitmap(bitmap));
}
base::Optional<base::TimeDelta> GetCursorBlinkInterval() {
#if defined(OS_MACOSX)
  base::TimeDelta interval;
  if (ui::TextInsertionCaretBlinkPeriod(&interval))
    return interval;
#elif defined(OS_LINUX)
  if (auto* linux_ui = views::LinuxUI::instance())
    return linux_ui->GetCursorBlinkInterval();
#elif defined(OS_WIN)
  const auto system_msec = ::GetCaretBlinkTime();
  if (system_msec != 0) {
    return (system_msec == INFINITE)
               ? base::TimeDelta()
               : base::TimeDelta::FromMilliseconds(system_msec);
  }
#endif
  return base::nullopt;
}
#if BUILDFLAG(ENABLE_PRINTING)
bool IsDeviceNameValid(const base::string16& device_name) {