Closed Bug 1289407 Opened 3 years ago Closed 3 years ago

[Static Analysis][Uninitialized scalar field] In constructor nsDisplayItem(nsIFrame* aFrame)

Categories

(Core :: Layout, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla50
Tracking Status
firefox49 --- fixed
firefox50 --- fixed

People

(Reporter: andi, Assigned: andi)

References

(Blocks 1 open bug)

Details

(Keywords: coverity, Whiteboard: CID 1364099)

Attachments

(1 file)

The Static Analysis tool Coverity detected that |mForceNotVisible| is not initialised in the following context:

>>  explicit nsDisplayItem(nsIFrame* aFrame)
>>    : mFrame(aFrame)
>>    , mClip(nullptr)
>>    , mScrollClip(nullptr)
>>    , mReferenceFrame(nullptr)
>>    , mAnimatedGeometryRoot(nullptr)
>>#ifdef MOZ_DUMP_PAINTING
>>    , mPainted(false)
>>#endif
>>  {
>>  }

In order to integrate our static analysis tool that checks for uninitialised member variables we need this to be initialised for marked as skipped, like 1282408, but judging from the context i think we can initialise it with false.
Attachment #8774721 - Flags: review?(bzbarsky) → review?(tnikkel)
Comment on attachment 8774721 [details]
Bug 1289407 - initialise |mForceNotVisible| in explicit ctor.

https://reviewboard.mozilla.org/r/67162/#review64094

Thanks. We'll want to uplift to aurora and beta because the patch that caused this has been uplifted.
Attachment #8774721 - Flags: review?(tnikkel) → review+
Comment on attachment 8774721 [details]
Bug 1289407 - initialise |mForceNotVisible| in explicit ctor.

Actually, probably too late for beta.

Approval Request Comment
[Feature/regressing bug #]: bug 1276467
[User impact if declined]: fix for bug 1276467 (which we uplifted) might not get applied in the right cases
[Describe test coverage new/current, TreeHerder]: nope
[Risks and why]: safe
[String/UUID change made/needed]: none
Attachment #8774721 - Flags: approval-mozilla-aurora?
Pushed by bpostelnicu@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/1d4ebd027c42
initialise |mForceNotVisible| in explicit ctor. r=tnikkel
https://hg.mozilla.org/mozilla-central/rev/1d4ebd027c42
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla50
Comment on attachment 8774721 [details]
Bug 1289407 - initialise |mForceNotVisible| in explicit ctor.

sure, let's take it
Attachment #8774721 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
You need to log in before you can comment on or make changes to this bug.