In nsDocumentViewer::SetDocument, call Document::Destroy if the new document is a static document.
Categories
(Toolkit :: Printing, defect)
Tracking
()
Tracking | Status | |
---|---|---|
firefox91 | --- | fixed |
People
(Reporter: emilio, Assigned: emilio)
References
Details
Attachments
(1 file)
Assignee | ||
Comment 1•3 years ago
|
||
Even if the old one isn't, otherwise we can leak.
This doesn't happen at the moment because our printing code creates its
own browser with the initial about:blank loaded (which not Destroy()ing
is fine), and then host the clone in there.
In bug 1666247, for simplify mode the front-end is creating a non-static
document with the simplify mode, then reusing the same docshell for the
static document. That means that we forget the non-static document and
we can leak.
In comment 16 on that bug, the leak comes from a <link rel=stylesheet>
whose SheetLoadData we keep in Document::mPreloadService (which uses
Document::Destroy() to call ClearAllPreloads() and break cycles).
To fix it, check aDocument->IsStaticDocument(), not just
mDocument->IsStaticDocument()... That's the right check since it is the
cloning codepath the one that otherwise doesn't care about what was in
the viewer before.
Comment 3•3 years ago
|
||
bugherder |
Comment 4•3 years ago
|
||
Backed out for failures on browser_preview_print_coop.js
-
backout: https://hg.mozilla.org/integration/autoland/rev/4f21ef08cb8c0746c4bdebed96075504dc662e91
-
failure log: https://treeherder.mozilla.org/logviewer?job_id=344223061&repo=autoland&lineNumber=61689
[task 2021-07-02T08:21:31.687Z] 08:21:31 INFO -
[task 2021-07-02T08:21:31.687Z] 08:21:31 INFO - Buffered messages logged at 08:20:02
[task 2021-07-02T08:21:31.688Z] 08:21:31 INFO - Console message: [JavaScript Error: "remote browser crashed while on about:printpreview
[task 2021-07-02T08:21:31.688Z] 08:21:31 INFO - " {file: "chrome://mochikit/content/mochitest-e10s-utils.js" line: 10}]
[task 2021-07-02T08:21:31.688Z] 08:21:31 INFO - e10s_init/<@chrome://mochikit/content/mochitest-e10s-utils.js:10:10
[task 2021-07-02T08:21:31.688Z] 08:21:31 INFO -
[task 2021-07-02T08:21:31.689Z] 08:21:31 INFO - Console message: [JavaScript Error: "remote browser crashed while on https://example.com/browser/toolkit/components/printing/tests/file_coop_header.html
[task 2021-07-02T08:21:31.689Z] 08:21:31 INFO - " {file: "chrome://mochikit/content/mochitest-e10s-utils.js" line: 10}]
[task 2021-07-02T08:21:31.689Z] 08:21:31 INFO - e10s_init/<@chrome://mochikit/content/mochitest-e10s-utils.js:10:10
[task 2021-07-02T08:21:31.689Z] 08:21:31 INFO -
[task 2021-07-02T08:21:31.689Z] 08:21:31 INFO - Buffered messages finished
[task 2021-07-02T08:21:31.690Z] 08:21:31 INFO - TEST-UNEXPECTED-FAIL | toolkit/components/printing/tests/browser_preview_print_coop.js | Test timed out -
[task 2021-07-02T08:21:31.690Z] 08:21:31 INFO - GECKO(5502) | MEMORY STAT | vsize 8072MB | residentFast 399MB | heapAllocated 114MB
[task 2021-07-02T08:21:31.690Z] 08:21:31 INFO - TEST-OK | toolkit/components/printing/tests/browser_preview_print_coop.js | took 90058ms
[task 2021-07-02T08:21:31.691Z] 08:21:31 INFO - Not taking screenshot here: see the one that was previously logged
[task 2021-07-02T08:21:31.691Z] 08:21:31 INFO - TEST-UNEXPECTED-FAIL | toolkit/components/printing/tests/browser_preview_print_coop.js | Found a tab after previous test timed out: about:printpreview -
[task 2021-07-02T08:21:31.692Z] 08:21:31 INFO - GECKO(5502) | [Parent 5502, Main Thread] WARNING: '!inner', file /builds/worker/checkouts/gecko/dom/ipc/jsactor/JSWindowActorProtocol.cpp:184
[task 2021-07-02T08:21:31.692Z] 08:21:31 INFO - Not taking screenshot here: see the one that was previously logged
[task 2021-07-02T08:21:31.693Z] 08:21:31 INFO - TEST-UNEXPECTED-FAIL | toolkit/components/printing/tests/browser_preview_print_coop.js | Found a tab after previous test timed out: about:blank -
[task 2021-07-02T08:21:31.693Z] 08:21:31 INFO - GECKO(5502) | [Parent 5502, Main Thread] WARNING: '!inner', file /builds/worker/checkouts/gecko/dom/ipc/jsactor/JSWindowActorProtocol.cpp:184
[task 2021-07-02T08:21:31.694Z] 08:21:31 INFO - GECKO(5502) | [Child 5504: Main Thread]: I/DocShellAndDOMWindowLeak ++DOCSHELL 105a42800 == 1 [pid = 5504] [id = 36]
[task 2021-07-02T08:21:31.694Z] 08:21:31 INFO - GECKO(5502) | [Child 5504: Main Thread]: I/DocShellAndDOMWindowLeak ++DOMWINDOW == 1 (105abcac0) [pid = 5504] [serial = 93] [outer = 0]
[task 2021-07-02T08:21:31.695Z] 08:21:31 INFO - GECKO(5502) | [Child 5504: Main Thread]: I/DocShellAndDOMWindowLeak ++DOMWINDOW == 2 (105c08400) [pid = 5504] [serial = 94] [outer = 105abcac0]
[task 2021-07-02T08:21:31.695Z] 08:21:31 INFO - checking window state
Comment 5•3 years ago
|
||
Backout merged to central:
https://hg.mozilla.org/mozilla-central/rev/4f21ef08cb8c0746c4bdebed96075504dc662e91
Assignee | ||
Updated•3 years ago
|
Comment 7•3 years ago
|
||
bugherder |
Description
•