Perma toolkit/components/printing/tests/browser_modal_print.js | leaked 2 window(s) until shutdown [url = about:blank]
Categories
(Core :: Print Preview, defect)
Tracking
()
Tracking | Status | |
---|---|---|
firefox88 | --- | fixed |
People
(Reporter: florian, Assigned: florian)
References
Details
Attachments
(1 file)
I see this failure permanently if I fix bug 1596165.
Adding await TestUtils.waitForTick();
at https://searchfox.org/mozilla-central/rev/ca910762568921c0faa34838d6a4efac2471dff1/toolkit/components/printing/tests/browser_modal_print.js#54 fixes it.
Here's a profile of what happens during this very short additional wait time: https://share.firefox.dev/3qBtkgH
I notice especially the "Runnable - NotifyUnhandledRejections" marker.
Olli, can you see how closing the dialog holding the about:blank window before this NotifyUnhandledRejections runnable had a change to run could cause us to keep a reference to the window until shutdown?
Comment 1•4 years ago
|
||
Is there some particular reason why NotifyUnhandledRejections is interesting in this case?
Are you adding the await before or after closing the dialog?
Window closing certainly has asynchronous parts, like https://searchfox.org/mozilla-central/rev/87a8afd9f57ee4bc542ba0ec3f96a891042b6db7/dom/base/nsGlobalWindowOuter.cpp#6068-6071
But hard to say anything useful.
Assignee | ||
Comment 2•4 years ago
|
||
Depends on D108020
Assignee | ||
Comment 3•4 years ago
|
||
(In reply to Olli Pettay [:smaug] from comment #1)
Is there some particular reason why NotifyUnhandledRejections is interesting in this case?
It's one of the only 2 runnables that get executed in the additional time I need to wait to avoid the leak.
The other one is "Runnable - PWindowGlobal::Msg_RawMessage" (I don't know what this does).
Are you adding the await before or after closing the dialog?
Before.
If you want to reproduce, you can apply the patch from bug 1596165 and run ./mach test toolkit/components/printing/tests/browser_modal_print.js
on a debug build.
Applying the patch I added in this bug avoids the leak.
Comment 5•4 years ago
|
||
bugherder |
Description
•