-
Notifications
You must be signed in to change notification settings - Fork 28.9k
Fix timer keeps active when resampling disabled in some cases #97197
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix timer keeps active when resampling disabled in some cases #97197
Conversation
Gold has detected about 6 new digest(s) on patchset 1. |
Gold has detected about 41 new digest(s) on patchset 2. |
Gold has detected about 30 new digest(s) on patchset 3. |
Gold has detected about 49 new digest(s) on patchset 4. |
Gold has detected about 50 new digest(s) on patchset 5. |
Gold has detected about 37 new digest(s) on patchset 6. |
Gold has detected about 12 new digest(s) on patchset 7. |
Gold has detected about 49 new digest(s) on patchset 8. |
@wangying3426 Looks like this PR is addressing two different issues? Can you please split it in two so we can evaluate (and land) them separately? |
Gold has detected about 24 new digest(s) on patchset 9. |
@goderbauer I have modified this PR to focus only one issue and updated the first comments. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@wangying3426 Can you rebase this to the latest master to make the checks pass, please? |
553618c
to
2fbebfb
Compare
2fbebfb
to
3c155a3
Compare
This pull request is not suitable for automatic merging in its current state.
|
@goderbauer Could you please also review this related PR flutter/engine#30422 ? thanks. |
@wangying3426 It would be best to have that one reviewed by an engine expert. |
Fix timer still keeps active when resampling disabled.
The problem will occur like this:
resamplingEnabled
to true.resamplingEnabled
to false, at this moment the periodic time still keeps active .For example, flutter/engine#30422 shows a case that the timestamp of a fake event is much more than current sample time, so its resampler and the timer will keeps active for a very long time.
For the tests, an assert exception will occur and tests will failed if
_timer?.cancel
not be called.