Version: v5.0.5, v5.0.6
JavaScript code: `document.querySelector('iframe').contentWindow.print()`
shell/browser/api/atom_api_web_contents.cc
const base::FilePath& file_path) {
  util::Promise promise(isolate());
  v8::Local<v8::Promise> handle = promise.GetHandle();
  base::ThreadRestrictions::ScopedAllowIO allow_io;
  base::File file(file_path,
                  base::File::FLAG_CREATE_ALWAYS | base::File::FLAG_WRITE);
  if (!file.IsValid()) {
    promise.RejectWithErrorMessage("takeHeapSnapshot failed");
    return handle;
  }
  auto* frame_host = web_contents()->GetMainFrame();
  if (!frame_host) {
    promise.RejectWithErrorMessage("takeHeapSnapshot failed");
    return handle;
  }
  
  
  
  auto electron_ptr = std::make_unique<mojom::ElectronRendererAssociatedPtr>();
  frame_host->GetRemoteAssociatedInterfaces()->GetInterface(
      mojo::MakeRequest(electron_ptr.get()));
  auto* raw_ptr = electron_ptr.get();
  (*raw_ptr)->TakeHeapSnapshot(
      mojo::WrapPlatformFile(file.TakePlatformFile()),
      base::BindOnce(
          [](mojom::ElectronRendererAssociatedPtr* ep, util::Promise promise,
             bool success) {
            if (success) {
              promise.Resolve();
            } else {