Closed
Bug 1227008
Opened 9 years ago
Closed 9 years ago
GtkPaperSize leak in nsPrintSettingsGTK::SetGtkPrintSettings()
Categories
(Core :: Widget: Gtk, defect)
Core
Widget: Gtk
Tracking
()
RESOLVED
FIXED
mozilla45
Tracking | Status | |
---|---|---|
firefox45 | --- | fixed |
People
(Reporter: karlt, Unassigned)
References
Details
Attachments
(1 file)
https://dxr.mozilla.org/mozilla-central/source/widget/gtk/nsPrintSettingsGTK.cpp#186 https://git.gnome.org/browse/gtk+/tree/gtk/gtkprintsettings.c?h=3.18.5#n643
Reporter | ||
Comment 1•9 years ago
|
||
https://dxr.mozilla.org/mozilla-central/rev/abbd213422a560f1180c4ec6e3bf4792c2ea81ba/widget/gtk/nsPrintSettingsGTK.cpp#186
Reporter | ||
Comment 2•9 years ago
|
||
The GtkPageSetup already has a GtkPaperSize that we can manipulate directly. The GtkPrintSettings has a serialization of the GtkPaperSize. gtk_page_setup_get_paper_size() returns a pointer to the object in the GtkPageSetup, but gtk_print_settings_get_paper_size() returns a new GtkPaperSize.
Reporter | ||
Comment 3•9 years ago
|
||
bug 1227008 use GtkPaperSize in GtkPageSetup directly, instead of maintaining a separate copy r?acomminos Fixes a leak in nsPrintSettingsGTK::SetGtkPrintSettings() and missed paper size copy in operator= (bug 965991). GtkPageSetup always has a GtkPaperSize [1], which is returned from gtk_page_setup_get_paper_size() as indicated in the docs [2]: "Return value: the paper size" without "or NULL". [1] https://git.gnome.org/browse/gtk+/tree/gtk/gtkpagesetup.c?h=2.18.0#n68 [2] https://git.gnome.org/browse/gtk+/tree/gtk/gtkpagesetup.c?h=2.18.0#n164
Attachment #8691193 -
Flags: review?(andrew)
Reporter | ||
Updated•9 years ago
|
Comment 4•9 years ago
|
||
Comment on attachment 8691193 [details] MozReview Request: bug 1227008 use GtkPaperSize in GtkPageSetup directly, instead of maintaining a separate copy r?acomminos https://reviewboard.mozilla.org/r/26105/#review23463 Looks good to me, thanks! ::: widget/gtk/nsPrintSettingsGTK.h:138 (Diff revision 1) > * - mPrintSettings, mPageSetup and mPaperSize are just new objects with defaults determined by GTK. Comment referring to mPaperSize can be removed, no big deal though.
Attachment #8691193 -
Flags: review?(andrew) → review+
Reporter | ||
Comment 6•9 years ago
|
||
(In reply to Andrew Comminos [:acomminos] from comment #4) > Comment referring to mPaperSize can be removed Done, thanks.
Comment 7•9 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/45a665ae8dc7
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla45
You need to log in
before you can comment on or make changes to this bug.
Description
•