Closed Bug 1305679 Opened 9 years ago Closed 9 years ago

Fix CID 1373350: Uninitialized members (UNINIT_CTOR) in VideoDecoderChild

Categories

(Core :: Audio/Video: Playback, defect, P5)

defect

Tracking

()

RESOLVED FIXED
mozilla52
Tracking Status
firefox52 --- fixed

People

(Reporter: JamesCheng, Assigned: JamesCheng)

Details

Attachments

(1 file)

*** 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
Attachment #8795239 - Flags: review?(gsquelart)
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.
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 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+
Thank you!
Keywords: checkin-needed
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
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla52
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: