Bug 1339540 part 1. Introduce an ErrorResult-specific nsresult module. r=smaug
authorBoris Zbarsky <bzbarsky@mit.edu>
Wed, 15 Feb 2017 00:01:57 -0500
changeset 342969 ebb182ab1da2d3eb7c00662f23818b46dd940611
parent 342968 5061e0dedf2f7afd0ff203d93b9122d7eaaf0007
child 342970 8682efc34f6c8ca80c2d4394870f581c441debc6
push id31366
push usercbook@mozilla.com
push dateWed, 15 Feb 2017 11:25:19 +0000
treeherdermozilla-central@c0807d6938c1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug
bugs1339540
milestone54.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1339540 part 1. Introduce an ErrorResult-specific nsresult module. r=smaug
xpcom/base/ErrorList.h
xpcom/base/nsError.h
--- a/xpcom/base/ErrorList.h
+++ b/xpcom/base/ErrorList.h
@@ -1004,16 +1004,22 @@
   ERROR(NS_ERROR_UC_UPDATE_DUPLICATE_PREFIX,        FAILURE(2)),
   ERROR(NS_ERROR_UC_UPDATE_INFINITE_LOOP,           FAILURE(3)),
   ERROR(NS_ERROR_UC_UPDATE_WRONG_REMOVAL_INDICES,   FAILURE(4)),
   ERROR(NS_ERROR_UC_UPDATE_CHECKSUM_MISMATCH,       FAILURE(5)),
   ERROR(NS_ERROR_UC_UPDATE_MISSING_CHECKSUM,        FAILURE(6)),
 #undef MODULE
 
   /* ======================================================================= */
+  /* 43: NS_ERROR_MODULE_ERRORRESULT */
+  /* ======================================================================= */
+#define MODULE NS_ERROR_MODULE_ERRORRESULT
+#undef MODULE
+
+  /* ======================================================================= */
   /* 51: NS_ERROR_MODULE_GENERAL */
   /* ======================================================================= */
 #define MODULE NS_ERROR_MODULE_GENERAL
   /* Error code used internally by the incremental downloader to cancel the
    * network channel when the download is already complete. */
   ERROR(NS_ERROR_DOWNLOAD_COMPLETE,      FAILURE(1)),
   /* Error code used internally by the incremental downloader to cancel the
    * network channel when the response to a range request is 200 instead of
--- a/xpcom/base/nsError.h
+++ b/xpcom/base/nsError.h
@@ -76,16 +76,19 @@
 #define NS_ERROR_MODULE_SIGNED_JAR 35
 #define NS_ERROR_MODULE_DOM_FILESYSTEM 36
 #define NS_ERROR_MODULE_DOM_BLUETOOTH 37
 #define NS_ERROR_MODULE_SIGNED_APP 38
 #define NS_ERROR_MODULE_DOM_ANIM 39
 #define NS_ERROR_MODULE_DOM_PUSH 40
 #define NS_ERROR_MODULE_DOM_MEDIA 41
 #define NS_ERROR_MODULE_URL_CLASSIFIER 42
+/* ErrorResult gets its own module to reduce the chance of someone accidentally
+   defining an error code matching one of the ErrorResult ones. */
+#define NS_ERROR_MODULE_ERRORRESULT 43
 
 /* NS_ERROR_MODULE_GENERAL should be used by modules that do not
  * care if return code values overlap. Callers of methods that
  * return such codes should be aware that they are not
  * globally unique. Implementors should be careful about blindly
  * returning codes from other modules that might also use
  * the generic base.
  */