Skip to content
  • Nicolas Chevobbe's avatar
    Bug 1662054 - Add a destroy function to targetList. r=jdescottes, a=RyanVM · 1a982041
    Nicolas Chevobbe authored
    At the moment, we don't have any guards in the targetList to _not_ execute the
    creation/destruction listeners once the toolbox gets destroyed.
    We only have a stopListening function on the targetList that is called when we
    close the toolbox, but we can't rely only on that since it's also called when
    doing a target switch (and working around that is very racy).
    
    One solution would be to follow the common pattern we have everywhere by having
    a destroy method that we would check before trying to call the listeners callback.
    
    This might help with intermittent test failures.
    
    Differential Revision: https://phabricator.services.mozilla.com/D88765
    1a982041