Closed
Bug 1028134
Opened 10 years ago
Closed 10 years ago
Remove dangerous public destructor of gfxContext
Categories
(Core :: Graphics, defect)
Tracking
()
RESOLVED
FIXED
mozilla33
People
(Reporter: bjacob, Assigned: jfkthame)
References
Details
Attachments
(1 file, 1 obsolete file)
3.59 KB,
patch
|
bjacob
:
review+
|
Details | Diff | Splinter Review |
In bug 1027251 we removed all dangerous public destructors of XPCOM-refcounted classes outside of a finite whitelist, see HasDangerousPublicDestructor. Now we are going over the entries in this whitelist. One of them is: gfxContext
Assignee | ||
Comment 1•10 years ago
|
||
AFAICS, there's no need for this destructor to be public; we can simply move it to private and drop it from the whitelist.
Attachment #8443683 -
Flags: review?(bjacob)
Reporter | ||
Comment 2•10 years ago
|
||
Comment on attachment 8443683 [details] [diff] [review] Remove dangerous public destructor of gfxContext. Review of attachment 8443683 [details] [diff] [review]: ----------------------------------------------------------------- Great, I somehow got confused into thinking that this would not be so trivial, but if this builds on tryserver then I was wrong. (FWIW when I tried locally that was on Linux).
Attachment #8443683 -
Flags: review?(bjacob) → review+
Assignee | ||
Comment 3•10 years ago
|
||
It builds for me on OS X; I've sent it to tryserver to see what the other platforms think: https://tbpl.mozilla.org/?tree=Try&rev=3054fc5aeaee.
Assignee | ||
Comment 4•10 years ago
|
||
Turns out you're right, Linux doesn't like it. :(
Reporter | ||
Comment 5•10 years ago
|
||
IIRC BenWa might have ideas about why gfxContexts are managed not-by-refcounting.
Assignee | ||
Comment 6•10 years ago
|
||
The gfxPlatformGtk issue, at least, looks like an easy fix. But I'll wait to hear from the other platforms before posting a new patch.
Comment 7•10 years ago
|
||
No, I was saying it would be nice if classes like gfxContext didn't require a heap allocation but ATM they do. They are -not- safe to be used on the stack. Please land this patch and fix all the stack usage of this. It would be nice to land this with the DISALLOW_STACK_ALLOCATION something macro.
Assignee | ||
Comment 8•10 years ago
|
||
This version seems to fare better: https://tbpl.mozilla.org/?tree=Try&rev=11f8404a2c6e.
Attachment #8443749 -
Flags: review?(bjacob)
Assignee | ||
Updated•10 years ago
|
Attachment #8443683 -
Attachment is obsolete: true
Assignee | ||
Updated•10 years ago
|
Assignee: nobody → jfkthame
Status: NEW → ASSIGNED
Reporter | ||
Updated•10 years ago
|
Attachment #8443749 -
Flags: review?(bjacob) → review+
Assignee | ||
Comment 9•10 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/93cd05e483cd
Target Milestone: --- → mozilla33
Comment 10•10 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/93cd05e483cd
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•