Skip to content
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 for low-repro reset bug. #2146

Merged
merged 2 commits into from
Sep 16, 2019

Conversation

madratman
Copy link
Contributor

original PR by @ironclownfish #1970
recreating coz of recursive git rebase and/or merge errors

Changed virtual void UpdatableObject::reset() to void UpdatableObject::reset(), and added a new function: UpdatableObject::resetImplementation(), which is called by UpdatableObject::reset().

reset() overrides always had to call super to get the base class functionality. Now the base class functionality is inherent in the reset() call. This allows the addition of a reset_in_progress flag in a single place, rather than in every reset() override. This new flag is used to make reset() reentrant, which fixes the bug.

Also removed all extraneous calls to super from reset() overrides (which are now resetImplementation() overrides). Moved other UpdatableObject reset/update failure cases into a virtual function: failResetUpdateOrdering(), so they can be disabled by overriding the function. This is a little cleaner, and the old way of disabling didn't work with the new reset stuff.

Nicholas Gyde and others added 2 commits September 13, 2019 17:22
Changed virtual void UpdatableObject::reset() to void UpdatableObject::reset(), and added a new function: UpdatableObject::resetImplementation(), which is called by UpdatableObject::reset().

reset() overrides always had to call super to get the base class functionality. Now the base class functionality is inherent in the reset() call. This allows the addition of a reset_in_progress flag in a single place, rather than in every reset() override. This new flag is used to make reset() reentrant, which fixes the bug.

Also removed all extraneous calls to super from reset() overrides (which are now resetImplementation() overrides). Moved other UpdatableObject reset/update failure cases into a virtual function: failResetUpdateOrdering(), so they can be disabled by overriding the function. This is a little cleaner, and the old way of disabling didn't work with the new reset stuff
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants