Closed Bug 1157663 Opened 5 years ago Closed 4 years ago

Uninitialized members in mozilla::layers::TextRenderer constructor

Categories

(Core :: Graphics: Layers, defect, trivial)

defect
Not set
trivial

Tracking

()

RESOLVED FIXED
mozilla41
Tracking Status
firefox41 --- fixed

People

(Reporter: nical, Assigned: baptiste.em, Mentored)

References

(Blocks 1 open bug)

Details

(Keywords: coverity, Whiteboard: [gfx-noted])

Attachments

(1 file)

mMap is not initialized in the constructor. In practice the code is correct because we never call read from mMap without calling EnsureIntialized, but it contributres to the coverity warning noise and half initialized structures are generally a bad idea, so let's fix it.
Keywords: coverity
Hi,

I would like to work on this bug. First contribution
Assignee: nobody → baptiste.em
Quick question. Do I have to take the code inside EnsureIntialized and put it in the constructor or just initialized mMap to something else.
(In reply to Baptiste Emmanuel from comment #2)
> Quick question. Do I have to take the code inside EnsureIntialized and put
> it in the constructor or just initialized mMap to something else.

Initializing it with mData = nullptr and mStride = 0 is enough.
Attachment #8607573 - Flags: review?(nical.bugzilla)
Attachment #8607573 - Flags: review?(nical.bugzilla) → review+
can we get a try run for this, thanks!
Flags: needinfo?(baptiste.em)
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/26b9e4567122
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla41
Flags: needinfo?(baptiste.em)
You need to log in before you can comment on or make changes to this bug.