summaryrefslogtreecommitdiffstats
path: root/chrome/browser/ui/cocoa/browser_window_controller.mm
diff options
context:
space:
mode:
authorAlex Clarke <alexclarke@chromium.org>2016-02-26 15:49:53 +0000
committerAlex Clarke <alexclarke@chromium.org>2016-02-26 15:52:34 +0000
commitfd563254490ae93382cb88a1e9a1c1e54815c97b (patch)
treecb2c505c12029cb350e74a68f59c9f2636061439 /chrome/browser/ui/cocoa/browser_window_controller.mm
parent03fbe7507d8209e2fd0091a5f1c749ce98b2b8af (diff)
downloadchromium_src-fd563254490ae93382cb88a1e9a1c1e54815c97b.zip
chromium_src-fd563254490ae93382cb88a1e9a1c1e54815c97b.tar.gz
chromium_src-fd563254490ae93382cb88a1e9a1c1e54815c97b.tar.bz2
[cherrypick] Fix computation of runtime for throttled tasks
The computation of the delayed task runtime was computing the (virtual) TimeDomain's now + delay. That doesn't take into account the skew between the real time and the virtual time, which meant timers could run sooner than expected for background tabs. Timers associated with foreground tabs are unaffected. This patch makes the computation of delayed runtime the responsibility of the TimeDomain and introduces a ThrottledTimeDomain which computes the delayed runtime as realtime + delay. This means timers will no longer run sooner than expected. Under normal circumstancs this only timers whose delay modulo 1000ms is less than 100 ms are less likely to be affected. Timers whose whose delay modulo 1000ms is greater than 900 are highly likely to be affected (there's a good chance their delay was too small before). BUG=587074 Review URL: https://codereview.chromium.org/1718233002 Cr-Commit-Position: refs/heads/master@{#376993} (cherry picked from commit b56bbe4ce3e7276a130a00d83cf00e5672cd6be1) R=skyostil@chromium.org Review URL: https://codereview.chromium.org/1730153005 . Cr-Commit-Position: refs/branch-heads/2623@{#521} Cr-Branched-From: 92d77538a86529ca35f9220bd3cd512cbea1f086-refs/heads/master@{#369907}
Diffstat (limited to 'chrome/browser/ui/cocoa/browser_window_controller.mm')
0 files changed, 0 insertions, 0 deletions