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
auto* osr_wcv = GetOffScreenWsView();
  return osr_wcv && osr_wcv->IsPainting();
}
void Ws::SetFrameRate(int frame_rate) {
  auto* osr_wcv = GetOffScreenWsView();
  if (osr_wcv)
    osr_wcv->SetFrameRate(frame_rate);
}
int Ws::GetFrameRate() const {
  auto* osr_wcv = GetOffScreenWsView();
  return osr_wcv ? osr_wcv->GetFrameRate() : 0;
}
#endif
void Ws::Invalidate() {
  if (IsOffScreen()) {
#if BUILDFLAG(ENABLE_OSR)
    auto* osr_rwhv = GetOffScreenRenderWidgetHostView();
    if (osr_rwhv)
      osr_rwhv->Invalidate();
#endif
  } else {
    auto* const window = owner_window();
    if (window)
      window->Invalidate();
  }
}
gfx::Size Ws::GetSizeForNewRenderView(content::Ws* wc) {