* 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
if (managed_web_contents()) {
    managed_web_contents()->GetView()->SetDelegate(nullptr);
    RenderViewDeleted(web_contents()->GetRenderViewHost());
    if (type_ == Type::BROWSER_WINDOW && owner_window()) {
      
      
      for (ExtendedWebContentsObserver& observer : observers_)
        observer.OnCloseContents();
      
      
      WebContentsDestroyed();
    } else if (Browser::Get()->is_shutting_down()) {
      
      DestroyWebContents(false );
    } else {
      
      
      DestroyWebContents(!IsGuest() );
      
      
      
      WebContentsDestroyed();
    }
  }
}
void WebContents::DestroyWebContents(bool async) {