Hi,

Variable name for ErrorResult hasn't defined in our coding rules yet:
https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Coding_Style#Error_Variables

Do we have a consensus for it?

According to m-c's code, I can see some variable names for it:

* er
* rv/aRv
* error/aError
* errorResult
* err
* er
* erv
* result
* res

rv/aRv is used in most places, if we won't worry about conflict with nsresult's variable name, taking this makes sense to me.

However, I've seen some methods which have both variables for nsresult and ErrorResult. In such case, what names should be used for them? (I usually use erv for consistency with nsresult's naming rule.)

Additionally, developers used to believe rv is a variable name for nsresult but currently, it cannot. When you try to build your patch, you may see build error caused by |ErrorResult rv;|.


Anyway, I'd like we to add a rule to the coding style guide.

--
Masayuki Nakano <masay...@d-toybox.com>
Manager, Internationalization, Mozilla Japan.
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to