* 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::Locker locker(isolate());
  v8::HandleScope handle_scope(isolate());
  devtools_web_contents_.Reset();
  Emit("devtools-closed");
}
void WebContents::ShowAutofillPopup(content::RenderFrameHost* frame_host,
                                    const gfx::RectF& bounds,
                                    const std::vector<base::string16>& values,
                                    const std::vector<base::string16>& labels) {
  bool offscreen = IsOffScreen() || (embedder_ && embedder_->IsOffScreen());
  gfx::RectF popup_bounds(bounds);
  content::RenderFrameHost* embedder_frame_host = nullptr;
  if (embedder_) {
    auto* embedder_view = embedder_->web_contents()->GetMainFrame()->GetView();
    auto* view = web_contents()->GetMainFrame()->GetView();
    auto offset = view->GetViewBounds().origin() -
                  embedder_view->GetViewBounds().origin();
    popup_bounds.Offset(offset.x(), offset.y());
    embedder_frame_host = embedder_->web_contents()->GetMainFrame();
  }
  CommonWebContentsDelegate::ShowAutofillPopup(
      frame_host, embedder_frame_host, offscreen, popup_bounds, values, labels);
}
bool WebContents::OnMessageReceived(const IPC::Message& message) {