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
}
  // Calling LoadURLWithParams() can trigger JS which destroys |this|.
  auto weak_this = GetWeakPtr();
  params.transition_type = ui::PAGE_TRANSITION_TYPED;
  params.should_clear_history_list = true;
  params.override_user_agent = content::NavigationController::UA_OVERRIDE_TRUE;
  // Discord non-committed entries to ensure that we don't re-use a pending
  // entry
  ontents()->GetController().DiscardNonCommittedEntries();
  ontents()->GetController().LoadURLWithParams(params);
  // ⚠️WARNING!⚠️
  // LoadURLWithParams() triggers JS events which can call destroy() on |this|.
  // It's not safe to assume that |this| points to valid memory at this point.
  if (!weak_this)
    return;
  // Set the background color of RenderWidgetHostView.
  // We have to call it right after LoadURL because the RenderViewHost is only
  // created after loading a page.
  auto* const view = weak_this->ontents()->GetRenderWidgetHostView();
  if (view) {
    auto* web_preferences = WsPreferences::From(ontents());
    std::string color_name;
    if (web_preferences->GetPreference(options::kBackgroundColor,
                                       &color_name)) {
      view->SetBackgroundColor(ParseHexColor(color_name));
    } else {
      view->SetBackgroundColor(SK_ColorTRANSPARENT);
    }
  }
}