Closed
Bug 230157
Opened 22 years ago
Closed 19 years ago
nsDeviceContextSpecG prefs issues (wrong api)
Categories
(Core Graveyard :: GFX: Gtk, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: bzbarsky, Assigned: sciguyryan)
References
Details
(Keywords: helpwanted, memory-leak, Whiteboard: [good first bug])
Attachments
(1 file, 4 obsolete files)
33.90 KB,
patch
|
Details | Diff | Splinter Review |
gfx/src/gtk/nsDeviceContextSpecG.cpp misuses prefs badly. See bug 225686
comment 6 for the leak (and misuse of the api in terms of ignoring the nsresult
return) and see bug 225686 comment 14 for the fact that the deprecated prefs api
is used.
Chances are the xlib version has similar issues.
Comment 1•22 years ago
|
||
That's some impressive code right there, folks.
Comment 2•21 years ago
|
||
mlk keyword needed?
![]() |
Reporter | |
Updated•21 years ago
|
Keywords: helpwanted,
mlk
![]() |
Reporter | |
Updated•21 years ago
|
Whiteboard: [good first bug]
Updated•21 years ago
|
Status: NEW → ASSIGNED
Comment 3•21 years ago
|
||
bug 257381 removed the leak-part of this bug. This patch changes to use
nsIPrefBranch + some small string code changes
Attachment #172813 -
Flags: superreview?(roc)
Attachment #172813 -
Flags: review?(bzbarsky)
Comment 4•21 years ago
|
||
Mikael, just my two cents. There's a file
gfx/src/xlib/nsDeviceContextSpecXlib.cpp which serves the same purpose in the
Xlib toolkit as nsDeviceContextSpecG.cpp does for gtk. You should create a patch
for that file as well to keep the two toolkits in sync. This isn't hard to do;
the two files are virtually identical other than the names of the identifiers.
(There's a bug somewhere about replacing these two files with a single shared
version, if you're looking for your next bug :-)
![]() |
Reporter | |
Comment 5•21 years ago
|
||
I don't know when I'll be able to get to this review; it will be at least a week...
Updated•21 years ago
|
Attachment #172813 -
Attachment is obsolete: true
Attachment #172813 -
Flags: superreview?(roc)
Attachment #172813 -
Flags: review?(bzbarsky)
Updated•21 years ago
|
Summary: nsDeviceContextSpecG prefs usage issues (memory leaks, wrong api) → nsDeviceContextSpecG prefs issues (wrong api)
Assignee | ||
Comment 6•19 years ago
|
||
Only requesting a review from bz for this one (not sure who to request a sr from).
This patches:
* mozilla/widget/src/gtk2/nsDeviceContextSpecG.cpp
* mozilla/gfx/src/xlib/nsDeviceContextSpecXlib.cpp
and
* mozilla/gfx/src/qt/nsDeviceContextSpecQt.cpp
I'm not sure if the last one is actually wanted here and I'll re-submit the patch without the modifications to that file if needed. If I missed any other files let me know.
Patch based from the last patch submitted by Mikael Parknert.
Attachment #242333 -
Flags: review?(bzbarsky)
![]() |
Reporter | |
Comment 7•19 years ago
|
||
I don't really know this code that well (either the prefs stuff or the code being patched).
biesi, Neil, do you happen to know who's a good reviewer for the pref api changes?
Assignee | ||
Updated•19 years ago
|
Attachment #242333 -
Attachment is obsolete: true
Attachment #242333 -
Flags: review?(bzbarsky)
Assignee | ||
Comment 8•19 years ago
|
||
Removed Windows line endings.
Assignee | ||
Updated•19 years ago
|
Attachment #242344 -
Attachment is obsolete: true
Assignee | ||
Updated•19 years ago
|
Attachment #242344 -
Attachment description: Patch v2 → Patch v2 (Not including nsDeviceContextSpecQt changes)
Attachment #242344 -
Attachment is obsolete: false
Assignee | ||
Comment 9•19 years ago
|
||
Assignee | ||
Comment 10•19 years ago
|
||
Comment on attachment 242345 [details] [diff] [review]
Patch v2 (Inc. nsDeviceContextSpecQt.cpp changes)
Per biesi requesting r,sr from roc.
Attachment #242345 -
Flags: superreview?(roc)
Attachment #242345 -
Flags: review?(roc)
Comment 11•19 years ago
|
||
(In reply to comment #0)
>gfx/src/gtk/nsDeviceContextSpecG.cpp misuses prefs badly.
Just looking at the file, nsPrinterFeatures ought to use a pref branch rather than concatenating strings all the time. (Who reads these prefs anyway?)
Comment 12•19 years ago
|
||
(In reply to comment #11)
>(Who reads these prefs anyway?)
As far as I understand it, the PrinterFeatures prefs (anything starting with "print.tmp.printerfeatures") are created by the the device context spec at the beginning of each print operation to list all of the printers and their capabilities. The prefs are then read by the print dialog to show the list of printers, paper sizes, and so on.
There is an *amazing* amount of cruft in the printing interfaces...
Comment on attachment 242345 [details] [diff] [review]
Patch v2 (Inc. nsDeviceContextSpecQt.cpp changes)
I'd really like to see someone take ownership of this stuff and overhaul it properly, but for now we should definitely take this. Nice work.
Attachment #242345 -
Flags: superreview?(roc)
Attachment #242345 -
Flags: superreview+
Attachment #242345 -
Flags: review?(roc)
Attachment #242345 -
Flags: review+
Assignee | ||
Updated•19 years ago
|
Whiteboard: [good first bug] → [good first bug] [checkin needed]
Comment 14•19 years ago
|
||
I was going to land this patch, but it doesn't seem to apply cleanly to the current trunk.
Whiteboard: [good first bug] [checkin needed] → [good first bug]
Assignee | ||
Comment 15•19 years ago
|
||
Not actually sure what happened with that patch, I've gone through it and updated it to the latest trunk CVS so it should patch correctly now.
Assignee: mikael → sciguyryan+bugzilla
Attachment #242344 -
Attachment is obsolete: true
Attachment #242345 -
Attachment is obsolete: true
Assignee | ||
Updated•19 years ago
|
Whiteboard: [good first bug] → [good first bug] [checkin needed]
Comment 16•19 years ago
|
||
Checked in:
Checking in gfx/src/qt/nsDeviceContextSpecQt.cpp;
/cvsroot/mozilla/gfx/src/qt/nsDeviceContextSpecQt.cpp,v <-- nsDeviceContextSpecQt.cpp
new revision: 1.5; previous revision: 1.4
done
Checking in gfx/src/xlib/nsDeviceContextSpecXlib.cpp;
/cvsroot/mozilla/gfx/src/xlib/nsDeviceContextSpecXlib.cpp,v <-- nsDeviceContextSpecXlib.cpp
new revision: 1.52; previous revision: 1.51
done
Checking in widget/src/gtk2/nsDeviceContextSpecG.cpp;
/cvsroot/mozilla/widget/src/gtk2/nsDeviceContextSpecG.cpp,v <-- nsDeviceContextSpecG.cpp
new revision: 1.74; previous revision: 1.73
Assignee | ||
Comment 17•19 years ago
|
||
Are there any other files that need patches? If not this can be marked as fixed. :)
Assignee | ||
Updated•19 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Updated•19 years ago
|
Whiteboard: [good first bug] [checkin needed] → [good first bug]
Updated•17 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•