Re: Error handling with MOZ_MUST_USE

2016-11-14 Thread Wei-Cheng Pan
Hi, I've updated the coding style document, added something about MOZ_MUST_USE and MOZ_MUST_USE_TYPE on MDN: https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Coding_Style#Error_handling Best, Wei-Cheng Pan On 04/11/2016 12:39 AM, Michael Layzell wrote: > We also have a static a

Re: Error handling with MOZ_MUST_USE

2016-11-03 Thread Michael Layzell
We also have a static analysis attribute MOZ_MUST_USE_TYPE which can be added to class declarations to ensure that those declarations are always used when they are returned. We currently are using it to annotate already_AddRefed values. If there are other types which universally should be checked w

Error handling with MOZ_MUST_USE

2016-11-03 Thread Wei-Cheng Pan
Hi, As :njn announced before [1], we are trying to add MOZ_MUST_USE to all fail-able functions, which is tracking in bug 1268766 [2]. We have bugs to track the progress for each directory. If anyone is interested, please feel free to take any of the bugs. We hope all reviewers also mind the foll