-
-
Notifications
You must be signed in to change notification settings - Fork 353
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Call dispose() when fetch overwrites a value
This corrects an oversight in the disposal flow on set overwrites. We don't call dispose when creating the BackgroundFetch, because of course, the thing hasn't been replaced yet. And we don't call dispose when _replacing_ a BackgroundFetch, because that isn't a value, it's just a potential value, so we abort the fetch and forget about it (which is a no-op if the set() in question is the resolution of that BackgroundFetch). The missing piece is that we *do* have to dispose() the `__staleWhileFetching` value on that BackgroundFetch promise, if there is one, when overwriting a BackgroundFetch. Fix: #309
- Loading branch information
Showing
2 changed files
with
33 additions
and
2 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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