Open Bug 827183 Opened 12 years ago Updated 2 years ago

assertion in nsDocumentViewer "User did not call nsIContentViewer::Destroy" when printing, if page wants to navigate away

Categories

(Core :: Layout, defect)

x86
macOS
defect

Tracking

()

People

(Reporter: heycam, Unassigned)

References

Details

Attachments

(2 files, 2 obsolete files)

Attached file test (obsolete) (deleted) —
STR: 1. Visit some page. 2. In the same tab, go to the attachment test URL. 3. Cancel the print dialog (or choose to print it, doesn't matter). 4. Notice the following assertions: ###!!! ASSERTION: User did not call nsIContentViewer::Destroy: '!mPresShell && !mPresContext', file /z/mozilla-inbound/layout/base/nsDocumentViewer.cpp, line 580 ###!!! ASSERTION: No document in Destroy()!: 'mDocument', file /z/mozilla-inbound/layout/base/nsDocumentViewer.cpp, line 1508 The test does this: window.back(); window.print();
Attached file test 2 (obsolete) (deleted) —
A similar one. STR: 1. Load some page. 2. In the same tab, go to this attachment. 3. Select "Print selection only" and print. 4. Notice assertion: ###!!! ASSERTION: PMSetLastPage failed: 'status == noErr', file /z/mozilla-inbound/widget/cocoa/nsDeviceContextSpecX.mm, line 77 5. Notice that the window title and location bar indicate the original URL from step 1, but the contents of the attachment are still displayed. Trying to visit any other page in the same tab no longer works.
window.back() no longer works, need to replace it with window.history.back(). But with that change these testcases still produce the same errors. I'll upload new testcases. In addition if you are on mac you'll need a fix for bug 1272349 to able to select "print selection only".
Attached file test 1 (deleted) —
Attachment #698492 - Attachment is obsolete: true
Attached file test 2 (deleted) —
Attachment #698505 - Attachment is obsolete: true

Are the recent failures from bug 1636728?

Flags: needinfo?(emilio)
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: