Closed Bug 168874 Opened 23 years ago Closed 7 years ago

Print preview does not abort with an error if |nsDeviceContextPS::SetSpec()| fails

Categories

(Core :: Print Preview, defect, P2)

All
Linux
defect

Tracking

()

RESOLVED INVALID
Future

People

(Reporter: roland.mainz, Unassigned)

Details

Print preview does not abort with an error if |nsDeviceContextPS::SetSpec()| fails (the print engine calls |GetDeviceContextFor()| which ends in a SetSpec() call some time later). If |nsDeviceContextPS::SetSpec()| (or |nsDeviceContextXp::SetSpec|) returns an error (for example the requested paper size was not found or something else went wrong) we don't return an error to the user and abort the print preview mode - we simply continue and work on an invalid print device context. Steps to reproduce: 1. Put a |return NS_ERROR_OUT_OF_MEMORY;| at the beginning of |nsDeviceContextPS::SetSpec()| 2. Recompile and restart Mozilla 3. Go to print preview Result: We switch into print preview mode using invalid parameters (for example on my box the page size doesn't look correctly for me) Expected result: An error dialog should popup and say: "No memory available." (or something like this) and we should _not switch into PP-mode...
Status: NEW → ASSIGNED
Priority: -- → P2
Target Milestone: --- → Future
Assignee: rods → nobody
Status: ASSIGNED → NEW
QA Contact: sujay → printing
There is no SetSpec is widget code any more. (Or any nsDeviceContextPS for that matter.)
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.