Closed
Bug 365004
Opened 18 years ago
Closed 18 years ago
Crash [@ nsPrintEngine::PrintPreview] when trying to print preview a display:none iframe
Categories
(Core :: Printing: Output, defect)
Tracking
()
VERIFIED
FIXED
People
(Reporter: martijn.martijn, Assigned: MatsPalmgren_bugz)
Details
(Keywords: crash, testcase)
Crash Data
Attachments
(2 files, 1 obsolete file)
|
1.53 KB,
text/html
|
Details | |
|
6.29 KB,
patch
|
sharparrow1
:
review+
roc
:
superreview+
|
Details | Diff | Splinter Review |
See upcoming testcase, which crashes Mozilla within 1 second.
Because of the use of enhanced privileges, you need to download the testcase to your computer.
This also crashes Mozilla1.7.12, so no (recent) regression.
Talkback ID: TB27739504H
nsPrintEngine::PrintPreview [mozilla\layout\printing\nsprintengine.cpp, line 783]
DocumentViewerImpl::PrintPreview [mozilla\layout\base\nsdocumentviewer.cpp, line 3557]
NS_InvokeByIndex [mozilla\xpcom\reflect\xptcall\src\md\win32\xptcinvoke.cpp, line 102]
XPCWrappedNative::CallMethod [mozilla\js\src\xpconnect\src\xpcwrappednative.cpp, line 2162]
| Reporter | ||
Comment 1•18 years ago
|
||
| Assignee | ||
Comment 2•18 years ago
|
||
This patch adds the same test in ::PrintPreview as is already present in ::Print
http://bonsai.mozilla.org/cvsblame.cgi?file=/mozilla/layout/base/nsDocumentViewer.cpp&rev=1.505&root=/cvsroot&mark=3464-3471#3432
Attachment #249668 -
Flags: review?(sharparrow1)
Comment 3•18 years ago
|
||
Comment on attachment 249668 [details] [diff] [review]
Patch rev. 1
Not the right fix; what we should be doing is checking the return value of the print engine Initialize call, which is failing because a null device context and parent widget are provided.
Attachment #249668 -
Flags: review?(sharparrow1) → review-
| Assignee | ||
Comment 4•18 years ago
|
||
Hmm, the convention elsewhere in the code base seems to be that the
caller is responsible for not making calls with invalid arguments, and that
the callee asserts this. But you're right that we should also check the return
value from Initialize of course.
OS: Windows XP → All
| Assignee | ||
Comment 5•18 years ago
|
||
Added some more error checking. The first two hunks are unrelated - they fix
two compile warnings.
Attachment #249668 -
Attachment is obsolete: true
Attachment #249693 -
Flags: review?(sharparrow1)
Comment 6•18 years ago
|
||
Comment on attachment 249693 [details] [diff] [review]
Patch rev. 2
I'd say OOM rather than FAILEDNEW, although it doesn't matter very much.
Attachment #249693 -
Flags: review?(sharparrow1) → review+
| Assignee | ||
Updated•18 years ago
|
Assignee: printing → mats.palmgren
| Assignee | ||
Updated•18 years ago
|
Attachment #249693 -
Flags: superreview?(roc)
Attachment #249693 -
Flags: superreview?(roc) → superreview+
| Assignee | ||
Comment 7•18 years ago
|
||
Ok, I changed FAILEDNEW to OOM.
Checked in to trunk at 2006-12-31 00:13 PST
-> FIXED
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
| Reporter | ||
Comment 8•18 years ago
|
||
Verified fixed, using:
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a2pre) Gecko/20070103 Minefield/3.0a2pre
I now get this error in the error console:
Error: uncaught exception: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIWebBrowserPrint.printPreview]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: file:///C:/Documents%20and%20Settings/mw/Bureaublad/365004_nsPrintEnginePrintPreview.htm :: printpreview :: line 30" data: no]
Status: RESOLVED → VERIFIED
Updated•14 years ago
|
Crash Signature: [@ nsPrintEngine::PrintPreview]
You need to log in
before you can comment on or make changes to this bug.
Description
•