зеркало из https://github.com/mozilla/gecko-dev.git
20cc0e0a3f
In mozilla-central before this patch, we had a boilerplate NS_ENSURE_SUCCESS(rv, rv) after our call to GetObserverService() This expression *does not actually test whether GetObserverService() succeeded* though, since GetObserverService doesn't touch rv! When GetObserverService() fails, it just returns nullptr. So we should be testing it for success with a null-check. In fact, we did *used to* test for success with a null-check, but that was replaced by this ineffective NS_ENSURE_SUCCESS by accident in Bug 1276488, as part of a large patch that was geared at adding diagnostics. So: let's just restore the null-check. It's unlikely to be tripped, since GetObserverService only returns nullptr at xpcom shutdown time (and this code runs at startup); but explicitly handling that by returning a failure code seems to be the right thing to do. And more importantly, the NS_ENSURE_SUCCESS can be made to misfire if we happen to have a stray error code from some earlier call remaining in 'rv'. Differential Revision: https://phabricator.services.mozilla.com/D174544 |
||
---|---|---|
.. | ||
brotli | ||
fdlibm | ||
freetype2 | ||
libjar | ||
libmar | ||
libpref | ||
woff2 | ||
xz-embedded | ||
zlib | ||
moz.build |