Closed
Bug 86378
Opened 25 years ago
Closed 24 years ago
[FIX]Print system does not listen to nsresult values...
Categories
(Core :: Printing: Output, defect)
Tracking
()
RESOLVED
FIXED
mozilla0.9.8
People
(Reporter: roland.mainz, Assigned: rods)
Details
Attachments
(1 file)
|
8.28 KB,
patch
|
dcone
:
review+
attinasi
:
superreview+
|
Details | Diff | Splinter Review |
[this is a general issue in the print system/API, I am using Xprint module only
as an example here...]
Any NS_ERROR_FAILURE returned by print DeviceContext methods used to indicate
that something went wrong during setup is currently ignored by the underlying
print system - causing crashes everywhere because the print system uses an
invalid object (e.g. not properly initalized).
For example - the following functions in Xprint module may return an error if
something went wrong (printer not found, invalid printer attribute (DIN A3 on a
printer which only supports DIN A4 etc.), illegal access, no memory etc. etc.):
nsDeviceContextXp::SetSpec()
nsDeviceContextXp::CreateRenderingContext()
nsDeviceContextXp::InitDeviceContextXP()
Optionally - for correctess - a failure returned by the following functions
should _abort_ the print job.
nsDeviceContextXp::BeginDocument()
nsDeviceContextXp::EndDocument()
nsDeviceContextXp::BeginPage()
nsDeviceContextXp::EndPage()
Suggested fix:
Check nsresult for error and do not use half-initalized objects.
I see a minor problem here: What happens if BeginDocument() returns NS_OK - but
something after that point (BeginPage()/EndPage()/EndDocument()) failed ?
I suggest to add a new method called "CancelDocument()" to tell the print module
that the job has been canceled - and to give the print module a way to "clean
up"...
dcone:
Is there a way to notify the user _why_ the print attempt failed (e.g. pass
error message to user (dialog !?)) ?
Updated•24 years ago
|
Target Milestone: --- → mozilla0.9.8
Updated•24 years ago
|
Severity: critical → normal
Target Milestone: mozilla0.9.8 → mozilla1.0
Comment 1•24 years ago
|
||
Bugs targeted at mozilla1.0 without the mozilla1.0 keyword moved to mozilla1.0.1
(you can query for this string to delete spam or retrieve the list of bugs I've
moved)
Target Milestone: mozilla1.0 → mozilla1.0.1
| Reporter | ||
Comment 2•24 years ago
|
||
rods:
Wanna take a look at this one, please ?
| Assignee | ||
Comment 3•24 years ago
|
||
taking bug
Assignee: dcone → rods
Target Milestone: mozilla1.0.1 → mozilla0.9.7
| Assignee | ||
Updated•24 years ago
|
Status: NEW → ASSIGNED
Target Milestone: mozilla0.9.7 → mozilla0.9.8
| Assignee | ||
Comment 4•24 years ago
|
||
Added extra error codes for Start/End Doc/Page and now all paths terminating
printing shows a dialog.
| Assignee | ||
Updated•24 years ago
|
Summary: Print system does not listen to nsresult values... → [FIX]Print system does not listen to nsresult values...
Comment 5•24 years ago
|
||
Comment on attachment 63562 [details] [diff] [review]
patch
r=dcone
Attachment #63562 -
Flags: review+
Comment 6•24 years ago
|
||
Comment on attachment 63562 [details] [diff] [review]
patch
sr=attinasi
Attachment #63562 -
Flags: superreview+
| Assignee | ||
Comment 7•24 years ago
|
||
fixed
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
| Reporter | ||
Updated•24 years ago
|
QA Contact: sujay → Roland.Mainz
You need to log in
before you can comment on or make changes to this bug.
Description
•