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
base::BindRepeating(&Ws::OnPaint, base::Unretained(this)));
      params.view = view;
      params.delegate_view = view;
      ontents = content::Ws::Create(params);
      view->SetWs(ontents.get());
    } else {
#endif
      ontents = content::Ws::Create(params);
#if BUILDFLAG(ENABLE_OSR)
    }
  } else if (IsOffScreen()) {
    bool transparent = false;
    options.Get("transparent", &transparent);
    content::Ws::CreateParams params(session->browser_context());
    auto* view = new OffScreenWsView(
        transparent,
        base::BindRepeating(&Ws::OnPaint, base::Unretained(this)));
    params.view = view;
    params.delegate_view = view;
    ontents = content::Ws::Create(params);
    view->SetWs(ontents.get());
#endif
  } else {
    content::Ws::CreateParams params(session->browser_context());
    params.initially_hidden = !initially_shown;
    ontents = content::Ws::Create(params);
  }
  InitWithSessionAndOptions(isolate, std::move(ontents), session, options);
}
void Ws::InitZoomController(content::Ws* ontents,