-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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 memory leaks due to onBroadcast and mutation errors. #7161
Fix memory leaks due to onBroadcast and mutation errors. #7161
Conversation
74e22c2
to
067c2ef
Compare
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.
@kamilkisiela I agree with your analysis in #7160, but I decided to go a bit further by collapsing the MutationStore
class into QueryManager
. All of these changes are technically backwards compatible because QueryManager
is a private API, but I decided to retarget this PR against release-3.3
just because the changes are more extensive/risky now.
Unless you object to my additional changes, I'll get this PR merged and release another AC3.3 beta shortly!
067c2ef
to
d53928c
Compare
onBroadcast: connectToDevTools ? () => { | ||
if (this.devToolsHookCb) { | ||
this.devToolsHookCb({ | ||
action: {}, | ||
state: { | ||
queries: this.queryManager.getQueryStore(), | ||
mutations: this.queryManager.mutationStore.getStore(), | ||
mutations: this.queryManager.mutationStore || {}, |
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.
@jcreighton Am I right to think this PR is backwards compatible with devtools, since this.queryManager.mutationStore
is now the same as what this.queryManager.mutationStore.getStore()
used to return?
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.
Yes! This change won't be a big deal on the devtools side. 👍 Thanks for checking!
Related #7160