Bug 1348273 [1] just landed and with it how we deal with crash annotations. All annotations are now declared in toolkit/crashreporter/CrashAnnotations.yaml which contains both a description, type and whitelisting/blacklisting information.
To add an annotation just add the entry to that list. By default the annotations will only be sent alongside a crash report. If the annotation needs to be included in the crash ping mark it with the 'ping: true' attribute (after getting data review). The C++ API has been changed to accept an enum value generated from CrashAnnotations.yaml so the call sites have changed from this: AnnotateCrashReport( NS_LITERAL_CSTRING("MyAnnotation"), NS_LITERAL_CSTRING("data for my annotation")); To this: AnnotateCrashReport( CrashReporter::Annotations::MyAnnotation,, NS_LITERAL_CSTRING("data for my annotation")); Overloaded functions are also provided for annotations taking integers, unsigned integers and boolean values. The types listed under CrashAnnotations.yaml are not enforced yet but will be soon. A dedicated function has also been added to remove an annotation. JavaScript callers need no modification, they still take the annotation name as a string but will throw if given an unknown one. On this topic, it's unfortunately not possible to add an annotation to an artifact build; a full build is required to re-generate the relevant code. Gabriele [1] Make AnnotateCrashReport() more robust by turning annotations into a well known list of constants https://bugzilla.mozilla.org/show_bug.cgi?id=1348273
signature.asc
Description: OpenPGP digital signature
_______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform