On 3/21/17 7:18 PM, zbranie...@mozilla.com wrote:
Is there a reason we should use RegisterCallback over AddStrongObserver?

It doesn't require creating a separate object to act as an observer. Of course it creates one under the hood for you, so this is mostly a matter of whether calling code ends up simpler or not, not of efficiency.

I have a fresh API where I'm using AddStrongObserver at the moment, but would 
be happy to switch if that will be cheaper / more future-compatible.

Are you properly handling the fact that AddStrongObserver watches all prefs starting with the prefix you pass it? ;)

-Boris

_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to