diff options
author | Allan Sandfeld Jensen <allan.jensen@digia.com> | 2014-10-06 17:07:26 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@digia.com> | 2014-10-06 17:32:11 +0200 |
commit | ea46a149dc42a48c103833742a7a0d575576c14a (patch) | |
tree | 10bd5380beda3315bc71f0dfb9eb93c9ff7776ed | |
parent | ee0fcd2acc8ad5a300ed4e25880ccb95e704d3a6 (diff) | |
download | qtwebkit-ea46a149dc42a48c103833742a7a0d575576c14a.tar.gz |
Fix assertion in PerformanceTiming
We get negative values in monotonic increasing time because we forget
to initialize the start time.
Change-Id: I292792f8f996025e7f0254bb90391b7af6873877
Reviewed-by: Michael Bruning <michael.bruning@digia.com>
-rw-r--r-- | Source/WTF/wtf/CurrentTime.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Source/WTF/wtf/CurrentTime.cpp b/Source/WTF/wtf/CurrentTime.cpp index e7326df04..0a4dea454 100644 --- a/Source/WTF/wtf/CurrentTime.cpp +++ b/Source/WTF/wtf/CurrentTime.cpp @@ -296,6 +296,8 @@ double monotonicallyIncreasingTime() { ASSERT(QElapsedTimer::isMonotonic()); static QElapsedTimer timer; + if (!timer.isValid()) + timer.start(); return timer.nsecsElapsed() / 1.0e9; } |