Annotate some stack-only classes and const members in SVG-text-related layout code
Categories
(Core :: SVG, task)
Tracking
()
Tracking | Status | |
---|---|---|
firefox108 | --- | fixed |
People
(Reporter: dholbert, Assigned: dholbert)
Details
Attachments
(2 files)
Building towards some minor refactoring in bug 1798048, I'm using this bug to add some trivial-ish annotations in svg text code to reflect reality and improve reasoning ability for this code.
Assignee | ||
Comment 1•3 years ago
|
||
This patch doesn't impact behavior; it's just adding an annotation to activate
a static analysis check for various classes.
The annotation gives us some confidence that these instances are tightly scoped
to a particular function-call. This helps reduce concerns about to-what-extent
the affected classes might need to worry about the lifetimes of the objects
pointed to by their member-vars.
The specific classes I'm annotating are:
-
gfxTextRunDrawCallbacks and PaintTextParams, both of which have multiple
subclasses, all of which will automatically inherit this annotation and
benefit from it. -
TextFrameIterator and CharIterator, two local utility classes in
SVGTextFrame.cpp.
Assignee | ||
Comment 2•3 years ago
|
||
This patch doesn't impact behavior.
The new const annotations will help to simplify reasoning about these various
helper classes & what states they could possibly be in.
Comment 4•3 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/d172c72030b9
https://hg.mozilla.org/mozilla-central/rev/c3adab330847
Description
•