Closed Bug 1243359 Opened 10 years ago Closed 10 years ago

[Static Analysis][Uninitialized scalar field] In function ScrollWheelInput::ScrollWheelInput

Categories

(Core :: Widget, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla47
Tracking Status
firefox47 --- fixed

People

(Reporter: andi, Assigned: andi)

References

(Blocks 1 open bug)

Details

(Keywords: coverity, Whiteboard: CID 1346310)

Attachments

(1 file)

The Static Analysis tool Coverity added that variable mScrollSeriesNumber is not initialized when constructor: >> ScrollWheelInput::ScrollWheelInput(const WidgetWheelEvent& aWheelEvent) get's called. This variable is initialed in the 2nd constructor: >> ScrollWheelInput(uint32_t aTime, >> TimeStamp aTimeStamp, >> Modifiers aModifiers, >> ScrollMode aScrollMode, >> ScrollDeltaType aDeltaType, >> const ScreenPoint& aOrigin, >> double aDeltaX, >> double aDeltaY) The only place where this variable is attributed a value outside of the 2nd constructor is: >> if (!mLastEventTime.IsNull() && >> (aEvent.mTimeStamp - mLastEventTime).ToMilliseconds() > kScrollSeriesTimeoutMs) >> { >> mScrollSeriesCounter = 0; >> } >> aEvent.mScrollSeriesNumber = ++mScrollSeriesCounter; The only place where this variable is used is in AsyncPanZoomController::GetScrollWheelDelta(const ScrollWheelInput& aEvent) const but i don't know for sure what constructor was used to build aEvent nor if it already passed through WheelBlockState::Update(ScrollWheelInput& aEvent).
Component: Drag and Drop → Widget
Comment on attachment 8712653 [details] MozReview Request: Bug 1243359 - initialize mScrollSeriesNumber in all ScrollWheelInput constructors. r?roc https://reviewboard.mozilla.org/r/32601/#review29529
Keywords: checkin-needed
this failed to apply: patching file widget/InputData.cpp Hunk #1 FAILED at 373 1 out of 1 hunks FAILED -- saving rejects to file widget/InputData.cpp.rej patch failed to apply abort: fix up the merge and run hg transplant --continue
Flags: needinfo?(bogdan.postelnicu)
Keywords: checkin-needed
i don't see why this would fail, i've applied it to the latest revision: from mozilla-central 281836 and it worked. Can you please givbe me more details?
Flags: needinfo?(bogdan.postelnicu) → needinfo?(cbook)
Comment on attachment 8712653 [details] MozReview Request: Bug 1243359 - initialize mScrollSeriesNumber in all ScrollWheelInput constructors. r?roc Review request updated; see interdiff: https://reviewboard.mozilla.org/r/32601/diff/1-2/
Flags: needinfo?(cbook)
Keywords: checkin-needed
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla47
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: