If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

nsPrintingPromptService::GetHWNDForDOMWindow should always return a temporary window

UNCONFIRMED
Unassigned

Status

()

Core
Printing: Setup
UNCONFIRMED
2 years ago
2 years ago

People

(Reporter: Joachim Priesner, Unassigned)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

fix
5.06 KB, patch
Jacek Caban
: review?
smontagu
Details | Diff | Splinter Review
(Reporter)

Description

2 years ago
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:41.0) Gecko/20100101 Firefox/41.0
Build ID: 2015091800

Steps to reproduce:

http://hg.mozilla.org/mozilla-central/rev/f692ed55fb8a makes all Windows Common Dialogs children of a temporary window which is destroyed after the dialog is shown.

For the print dialog, the parent window handle is retrieved by the nsPrintingPromptService::GetHWNDForDOMWindow() function. However, not all code paths in this function return a temporary window. From looking at the code, it seems that if Gecko is embedded, a non-temporary window, namely the result of site->GetSiteWindow(), will be returned. This window will be destroyed after showing the print dialog.

In particular, this causes Wine's embedded IE, which uses Gecko, to freeze after calling the print dialog.

Comment 1

2 years ago
Created attachment 8695866 [details] [diff] [review]
fix

Good catch, thanks. The attached patch fixes it for me.
Attachment #8695866 - Flags: review?(smontagu)
You need to log in before you can comment on or make changes to this bug.