Skip to content
Snippets Groups Projects
  • Daniel Holbert's avatar
    1d08981c
    Bug 1733465 part 4: Convert nsViewManager::gViewManagers to StaticAutoPtr so... · 1d08981c
    Daniel Holbert authored
    Bug 1733465 part 4: Convert nsViewManager::gViewManagers to StaticAutoPtr so that we don't have to manually delete it. r=tnikkel
    
    This removes an explicit 'delete', by letting the StaticAutoPtr type handle the
    deletion for us automatically and atomically when we clear its value.
    
    Benefits/justification:
    * This reduces the potential for double-free bugs.
    * This matches existing patterns elsewhere in our code
      (search for e.g. "StaticAutoPtr<nsTArray")
    * This reduces (by 1) the number of explicit `delete` calls that we need to
      consider, when auditing the codebase for potential memory safety issues.
    
    Differential Revision: https://phabricator.services.mozilla.com/D127185
    1d08981c
    History
    Bug 1733465 part 4: Convert nsViewManager::gViewManagers to StaticAutoPtr so...
    Daniel Holbert authored
    Bug 1733465 part 4: Convert nsViewManager::gViewManagers to StaticAutoPtr so that we don't have to manually delete it. r=tnikkel
    
    This removes an explicit 'delete', by letting the StaticAutoPtr type handle the
    deletion for us automatically and atomically when we clear its value.
    
    Benefits/justification:
    * This reduces the potential for double-free bugs.
    * This matches existing patterns elsewhere in our code
      (search for e.g. "StaticAutoPtr<nsTArray")
    * This reduces (by 1) the number of explicit `delete` calls that we need to
      consider, when auditing the codebase for potential memory safety issues.
    
    Differential Revision: https://phabricator.services.mozilla.com/D127185