On Thu, Feb 6, 2020 at 9:12 AM Boris Zbarsky <bzbar...@mit.edu> wrote:
> 3) While ErrorResult::Throw taking just an nsresult still exists, it is > deprecated and new code should not be adding new calls to it if that can > be avoided. > We are attempting to add a static analysis that blocks new uses of `NS_NewNamedThread` in bug 1613440 [0]. We'd definitely like to consider making it general enough that it can serve as a sort of quasi-[[deprecated]] [1] for other uses in the code base (e.g. the sandboxing folks would like to incrementally disallow functions from being called from certain locations as they work to lock down the sandbox), and this sort of replacement seems like another good application. If you have other things you'd like this static analysis to be used for, please file dependencies on bug 1613440. Thanks, -Nathan [0] https://bugzilla.mozilla.org/show_bug.cgi?id=1613440 [1] We can't actually use [[deprecated]] / __attribute__((deprecated)) because of their use in third-party code; having the compiler error on uses of such functions would break the build. [2] [2] https://searchfox.org/mozilla-central/rev/3811b11b5773c1dccfe8228bfc7143b10a9a2a99/build/moz.configure/warnings.configure#140-142 _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform