* Electron Version 6.0.0-beta.12
* Operating System Windows 10 64 bit

Expected Behavior
webContents.print() should send print a job to the specified printer

Actual behavior
Nothing happens. Callback gets called much latter, for example on program exit.

To Reproduce
let print_options = { 
    silent: true,
    printBackground: true,
    deviceName: barcode_device_name 
}
print_window.webContents.print(print_options, (data) => {
    console.log(`print result: ${data}`)
})

Related to #17260
shell/browser/api/atom_api_web_contents.cc
}
v8::Local<v8::Promise> WebContents::CapturePage(mate::Arguments* args) {
  gfx::Rect rect;
  util::Promise promise(isolate());
  v8::Local<v8::Promise> handle = promise.GetHandle();
  
  args->GetNext(&rect);
  auto* const view = web_contents()->GetRenderWidgetHostView();
  if (!view) {
    promise.Resolve(gfx::Image());
    return handle;
  }
  
  const gfx::Size view_size =
      rect.IsEmpty() ? view->GetViewBounds().size() : rect.size();
  
  
  
  gfx::Size bitmap_size = view_size;
  const gfx::NativeView native_view = view->GetNativeView();
  const float scale = display::Screen::GetScreen()
                          ->GetDisplayNearestView(native_view)
                          .device_scale_factor();
  if (scale > 1.0f)
    bitmap_size = gfx::ScaleToCeiledSize(view_size, scale);
  view->CopyFromSurface(gfx::Rect(rect.origin(), view_size), bitmap_size,
                        base::BindOnce(&OnCapturePageDone, std::move(promise)));
  return handle;
}
void WebContents::OnCursorChange(const content::WebCursor& cursor) {