Fix timer keeps active when resampling disabled in some cases#97197
Fix timer keeps active when resampling disabled in some cases#97197fluttergithubbot merged 13 commits intoflutter:masterfrom
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. |
|
@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:
resamplingEnabledto true.resamplingEnabledto 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?.cancelnot be called.