Don't make QPC to GTC fallback in TimeStamp_windows let change differences of previously taken timestamps

RESOLVED FIXED in mozilla35

Status

()

Core
XPCOM
RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: mayhemer, Assigned: mayhemer)

Tracking

unspecified
mozilla35
All
Windows XP
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

4 years ago
Created attachment 8451028 [details] [diff] [review]
v1

- two stamp taken before we've detected a QPC misbehavior, contain GTC+QPC values
- count duration from them, value is X1
- drop the use-QPC flag to false
- count duration from the two stamps again, value is X2 and X2 <> X1

This can be easily changed, when both stamps have the QPC value stored and it's found sane, use it for the duration calculation regardless the QPC flag.

The patch moves the if (!useQPC) return GTC1-GTC2; way after we do the initial QPC vs GTC sanity checks.  Now the result is independent of the useQPC global flag changes.
Attachment #8451028 - Flags: review?(tellrob)
Comment on attachment 8451028 [details] [diff] [review]
v1

Review of attachment 8451028 [details] [diff] [review]:
-----------------------------------------------------------------

Sorry for the delay. That is a good case to consider! Any way to write a unit test for it? It seems nicely self contained.
Attachment #8451028 - Flags: review?(tellrob) → review+
(Assignee)

Comment 2

4 years ago
(In reply to Rob Arnold [:robarnold] from comment #1)
> Comment on attachment 8451028 [details] [diff] [review]
> v1
> 
> Review of attachment 8451028 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> Sorry for the delay. That is a good case to consider! Any way to write a
> unit test for it? It seems nicely self contained.

I absolutely don't know how to write a test for this, sorry.
Thanks for the review.
(Assignee)

Updated

4 years ago
Assignee: nobody → honzab.moz
Status: NEW → ASSIGNED
https://hg.mozilla.org/mozilla-central/rev/352aa978236d
Status: ASSIGNED → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla35
You need to log in before you can comment on or make changes to this bug.