[cross-posting to firefox-dev] Fellow mozillians, bug 1402519 [1] just landed and it introduces a dummy implementation of the crash reporter which is built when configuring with --disable-crash-reporter. This removes the need for bracketing calls to the crash reporter with #ifdef MOZ_CRASHREPORTER / #endif preprocessor directives. You can now freely use the crash reporter methods without worrying about it being enabled at compiler time or not.
I've also removed all the existing directives and only a few remain where they are actually needed. JavaScript consumers should be unaffected save for the following pattern which was used in a few places to detect if the crash reporter had been compiled: if ("nsICrashReporter" in Ci && Services.appinfo instanceof Ci.nsICrashReporter) { // Crash reporter is enabled } This doesn't work anymore as the nsICrashReporter interface is always present. You can replace it with: if (AppConstants.MOZ_CRASHREPORTER) { // Crash reporter is enabled } This touched a lot of places in the code so if anything crash-related seems wrong please let me know. Gabriele [1] Use a dummy crashreporter implementation when building with --disable-crashreporter https://bugzilla.mozilla.org/show_bug.cgi?id=1402519
signature.asc
Description: OpenPGP digital signature
_______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform