Closed Bug 645943 Opened 13 years ago Closed 13 years ago

valgrind warnings related to timer duration from refresh driver

Categories

(Core :: Layout, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla5

People

(Reporter: dbaron, Assigned: bzbarsky)

References

Details

(Keywords: valgrind)

Attachments

(1 file)

I was just running the toolkit/mozapps/extensions browser-chrome mochitests under valgrind, and I got a series of timer-related warnings.  The first one was:

==8280== Conditional jump or move depends on uninitialised value(s)
==8280==    at 0x7005BAA: mozilla::TimeDuration::FromMilliseconds(double) (TimeStamp.h:148)
==8280==    by 0x7056A11: nsTimerImpl::InitCommon(unsigned int, unsigned int) (nsTimerImpl.cpp:560)
==8280==    by 0x59ABDB8: nsRefreshDriver::EnsureTimerStarted() (nsRefreshDriver.cpp:175)
==8280==    by 0x58F185D: nsCSSFrameConstructor::PostRestyleEventInternal(int) (nsRefreshDriver.h:131)
==8280==    by 0x58F97F1: nsCSSFrameConstructor::AttributeChanged(mozilla::dom::Element*, int, nsIAtom*, int) (nsCSSFrameConstructor.h:323)
...

I think the problem is that nsRefreshDriver::mLastTimerInterval is not initialized, which could happen if the first call to nsRefreshDriver::GetRefreshTimerInterval is after SetThrottled has been called.  At least, that seems to be the first explanation I can see -- I haven't tested it.

Presumably a regression from https://hg.mozilla.org/mozilla-central/rev/2e8d88ba3f7d
Attached patch I agreeSplinter Review
Attachment #522580 - Flags: review?(dbaron)
Comment on attachment 522580 [details] [diff] [review]
I agree

r=dbaron
Attachment #522580 - Flags: review?(dbaron) → review+
Pushed http://hg.mozilla.org/mozilla-central/rev/8373a20bb449
Status: NEW → RESOLVED
Closed: 13 years ago
Flags: in-testsuite-
Resolution: --- → FIXED
Target Milestone: --- → mozilla2.2
Assignee: nobody → bzbarsky
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: