This doesn't affect the behavior of |Preferences::AddStrongObserver| which does prefix matching, correct?
-e On Tue, Mar 21, 2017 at 12:07 PM, Boris Zbarsky <[email protected]> wrote: > I have just landed a change[1] which changes > Preferences::RegisterCallback/RegisterCallbackAndCall > to do an exact, not prefix, match on the passed-in string. > > So if you do: > > Preferences::RegisterCallback(MyFunc, "foo"); > > and the preference named "foobar" changes, MyFunc will no longer be > called. Most consumers did not expect this behavior, and a number were > buggy as a result. > > The old behavior is still available via a new > RegisterPrefixCallback/RegisterPrefixCallbackAndCall/UnregisterPrefixCallback > API. These can be used to observe all preferences whose names start with > the given string. > > One caveat: It's very important to correctly pair up the registration and > unregistration functions. If you RegisterPrefixCallback but then > UnregisterCallback, it will not actually unregister the callback. > > -Boris > > [1] https://bugzilla.mozilla.org/show_bug.cgi?id=1348331 > _______________________________________________ > dev-platform mailing list > [email protected] > https://lists.mozilla.org/listinfo/dev-platform > _______________________________________________ dev-platform mailing list [email protected] https://lists.mozilla.org/listinfo/dev-platform

