Re: PSA: Don't write out multiple Add/RemoveObserver calls manually, iterate over an array instead

2014-02-18 Thread Chris Peterson
On 2/17/14, 11:25 AM, Kyle Huey wrote: If you are observing several topics it's easy to forget to add a Remove call when adding new observer topic. If you instead write an array of topics and iterate over that it's impossible to screw up

Re: PSA: Don't write out multiple Add/RemoveObserver calls manually, iterate over an array instead

2014-02-18 Thread Ben Kelly
On 2/17/2014 2:25 PM, Kyle Huey wrote: If you are observing several topics it's easy to forget to add a Remove call when adding new observer topic. If you instead write an array of topics and iterate over that it's impossible to screw up (e.g.

PSA: Don't write out multiple Add/RemoveObserver calls manually, iterate over an array instead

2014-02-17 Thread Kyle Huey
If you are observing several topics it's easy to forget to add a Remove call when adding new observer topic. If you instead write an array of topics and iterate over that it's impossible to screw up (e.g. https://hg.mozilla.org/mozilla-central/rev/3a8fe7c942e3). We've seen a couple of leaks