Fix CID 1373350: Uninitialized members (UNINIT_CTOR) in VideoDecoderChild

RESOLVED FIXED in Firefox 52

Status

()

defect
P5
normal
RESOLVED FIXED
3 years ago
2 years ago

People

(Reporter: JamesCheng, Assigned: JamesCheng)

Tracking

unspecified
mozilla52
Points:
---

Firefox Tracking Flags

(firefox52 fixed)

Details

Attachments

(1 attachment)

Assignee

Description

3 years ago
*** CID 1373350:  Uninitialized members  (UNINIT_CTOR)
/dom/media/ipc/VideoDecoderChild.cpp: 26 in mozilla::dom::VideoDecoderChild::VideoDecoderChild()()
20     using namespace gfx;
21
22     VideoDecoderChild::VideoDecoderChild()
23       : mThread(VideoDecoderManagerChild::GetManagerThread())
24       , mCanSend(true)
25     {
>>>     CID 1373350:  Uninitialized members  (UNINIT_CTOR)
>>>     Non-static class member "mLayersBackend" is not initialized in this constructor nor in any functions that it calls.
26     }


initial value could be aligned with 
http://searchfox.org/mozilla-central/rev/05ed82e50b45df5aa5a8fad219dece1b56757261/dom/media/MediaFormatReader.h#32
Assignee

Updated

3 years ago
Attachment #8795239 - Flags: review?(gsquelart)

Comment 2

3 years ago
mozreview-review
Comment on attachment 8795239 [details]
Bug 1305679 - Fix CID 1373350: Uninitialized members (UNINIT_CTOR) in VideoDecoderChild

https://reviewboard.mozilla.org/r/81362/#review79920

My guess is that it is probably a false positive, because InitIPDL() (which sets mLayersBackend) should always be called before Init() (which has the only use of mLayersBackend).
So I will defer to the original author to decide whether we should ignore or "fix" this warning.
Attachment #8795239 - Flags: review?(matt.woodrow)
Assignee

Comment 3

3 years ago
I know that InitIPDL will do the init but is it worth fixing it since initializing data member is reasonable in constructor?
Comment on attachment 8795239 [details]
Bug 1305679 - Fix CID 1373350: Uninitialized members (UNINIT_CTOR) in VideoDecoderChild

Though I'm usually happy with cheap inits when it removes doubts over potential uninitialized uses, I'll let Matt decide, as it's his code.
Attachment #8795239 - Flags: review?(matt.woodrow)
Attachment #8795239 - Flags: review?(gsquelart)

Comment 5

3 years ago
mozreview-review
Comment on attachment 8795239 [details]
Bug 1305679 - Fix CID 1373350: Uninitialized members (UNINIT_CTOR) in VideoDecoderChild

https://reviewboard.mozilla.org/r/81362/#review80060

Yeah, no harm in doing this.
Attachment #8795239 - Flags: review?(matt.woodrow) → review+
Assignee

Comment 6

3 years ago
Thank you!
Keywords: checkin-needed

Comment 7

3 years ago
Pushed by ryanvm@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/8837c195fbc6
Fix CID 1373350: Uninitialized members (UNINIT_CTOR) in VideoDecoderChild r=mattwoodrow
Keywords: checkin-needed

Comment 8

3 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/8837c195fbc6
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla52
No longer blocks: 1272504
You need to log in before you can comment on or make changes to this bug.