Closed Bug 417351 Opened 16 years ago Closed 16 years ago

Firefox crashes when cancelling printing since checkin of bug 414314

Categories

(Core :: Widget: Gtk, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: dholbert, Assigned: dholbert)

References

Details

(Keywords: crash)

Attachments

(1 file, 1 obsolete file)

Attached patch fix (obsolete) — Splinter Review
Steps to reproduce:
  - Ctrl-P to make print dialog appear
  - Click cancel
**crash** in nsDeviceContextSpecGTK::~nsDeviceContextSpecGTK

This is happening because mGtkPageSetup and mGtkPrintSettings are never getting initialized, so they have bogus values (0xa5a5a5a5 I think), and the patch for bug 414314 (understandably) assumes that anything non-null is valid.

Attaching a simple fix, which just initializes these values to nsnull.  It fixes the crash.

The patch also makes a few cosmetic s/NULL/nsnull/ changes to the same file, to match our convention.
Attachment #303123 - Flags: superreview?(roc)
Attachment #303123 - Flags: review?(roc)
Summary: Firefox crashes when cancelling printing since checkin of 414314 → Firefox crashes when cancelling printing since checkin of bug 414314
Component: Printing → Widget: Gtk
Blocks: 414314
Flags: blocking1.9?
Comment on attachment 303123 [details] [diff] [review]
fix

You can just take out the null-setters in the destructor, they're pointless.
Attachment #303123 - Flags: superreview?(roc)
Attachment #303123 - Flags: superreview+
Attachment #303123 - Flags: review?(roc)
Attachment #303123 - Flags: review+
Attachment #303123 - Attachment is obsolete: true
Attachment #303137 - Flags: superreview+
Attachment #303137 - Flags: review+
Flags: blocking1.9? → blocking1.9+
QA Contact: printing → gtk
"fix for landing" checked in last night.  Closing.
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Flags: in-litmus?
https://litmus.mozilla.org/show_test.cgi?id=5276 added to Litmus.
Flags: in-litmus? → in-litmus+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: