Skip to content
  • Kirk Steuber's avatar
    Bug 1668096 - Replace activeUpdate with downloadingUpdate and readyUpdate... · 839b14ef
    Kirk Steuber authored
    Bug 1668096 - Replace activeUpdate with downloadingUpdate and readyUpdate r=mhowell,preferences-reviewers
    
    This patch does not make the necessary replacement in tests. Those changes will be made in a later patch in this stack.
    
    Some additional, related changes are also made in this patch:
    cleanupActiveUpdate is being replaced with cleanupDownloadingUpdate and cleanupReadyUpdate. The two new functions currently do very similar things, but separating them will allow us to have each function clean up the right update, once we fully support more than one update per session.
    The old mechanism to add something to the update history was for it to be assigned to activeUpdate, and then to assign null to activeUpdate. We now need to assign active updates to be null without adding them to the history. As an example, we need to set downloadingUpdate to null when the download completes, but it shouldn't be added to the history at that point. To address this, an explicit addUpdateToHistory function has been added, and assigning null to either active update variable no longer moves the update to the update history.
    
    Differential Revision: https://phabricator.services.mozilla.com/D92289
    839b14ef