You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix: drop queued UvRunOnce tasks when polling stops - #56061
UvRunOnce tasks now carry the polling generation they were posted under, and StopPolling() bumps it, as in #54228.
A task from before the stop returns without running the loop or posting embed_sem_, so it cannot disturb the next page's embed thread.
I have not built or run this version, and I don't have a machine that can build electron.
I tested that one by patching it into the 45.5.0 release binary: with 5 ms busy work, 0 of 160 reloads stalled, against 76 of 160 without it.
The first version of this PR invalidated the weak pointers in StopPolling() instead.
⚠️ This PR contains unsigned commits. This repository enforces commit signatures
for all incoming PRs. To get your PR merged, please sign those commits
(git rebase --exec 'git commit -S --amend --no-edit -n' @{upstream}) and force push them to this branch
(git push --force-with-lease)
Thanks for working on this, can you instead taking the poll tracking bit from eaa0990polling_generation_ which should cleanly stop old queued tasks from running after page reload and also avoid re-entrant cases. This will also supersede well when the refactor lands.
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This branch has not been deployed
No deployments
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
semver/patchbackwards-compatible bug fixestarget/44-x-yPR should also be added to the "44-x-y" branch.target/45-x-yPR should also be added to the "45-x-y" branch.target/46-x-yPR should also be added to the "46-x-y" branch.
2 participants
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of Change
Fixes #56060.
UvRunOncetasks now carry the polling generation they were posted under, andStopPolling()bumps it, as in #54228.A task from before the stop returns without running the loop or posting
embed_sem_, so it cannot disturb the next page's embed thread.I have not built or run this version, and I don't have a machine that can build electron.
I tested that one by patching it into the 45.5.0 release binary: with 5 ms busy work, 0 of 160 reloads stalled, against 76 of 160 without it.
The first version of this PR invalidated the weak pointers in
StopPolling()instead.Checklist
npm testpassesRelease Notes
Notes: Fixed Node.js timers in the renderer stopping after a page reload.