Description[Windows] Fix for Browser IO MessageLoop spinning the CPU.
This corrects an integer overflow issue which resulted in the Browser IO
MessageLoop spinning, eating up 100% of a CPU core. The conversion from
a double to a 32-bit int was sometimes out-of-range: A large positive
double value was being assigned as a negative int value. Because of
this, MessagePumpWin acted as if a delayed task was past-due for running
and refused to sleep the thread. Downstream code paths would instead
see the task as "in the future" and then refuse to run it and remove it
from the queue. This resulted in a "never-wait, never-dequeue" bad
spinning state.
While researching this problem, a number of code points have been
exposed that are erroneously posting delayed tasks with huge delays,
likely due to bad math on 64-bit platforms. Added DLOG warnings to
whine at developers to avoid this in the future.
See bug for additional details.
BUG=450045
TBR=darin@chromium.org
Committed: https://crrev.com/9caeaa287bca5d34a21d73d103b9af7fd3676936
Cr-Commit-Position: refs/heads/master@{#313238}
Patch Set 1 #Patch Set 2 : Removed accidental two lines of white space. #Patch Set 3 : Move constant out of platform-specific region of file. #
Total comments: 2
Messages
Total messages: 11 (4 generated)
|