Merge mozilla-central into services-central
authorGregory Szorc <gps@mozilla.com>
Fri, 21 Sep 2012 12:12:59 -0700
changeset 111090 9c064d735c2345e6473448f238485e928531288f
parent 111089 3e2c523a5c6fba13c2215e315c5498b71f2d103f (current diff)
parent 107801 f0c89cebf913c81b0d7a96abea7ba3ddabed6821 (diff)
child 111091 c9c1d7126858879fca53be667b1404c2b342c80b
push id93
push usernmatsakis@mozilla.com
push dateWed, 31 Oct 2012 21:26:57 +0000
milestone18.0a1
Merge mozilla-central into services-central
--- a/dom/bluetooth/ipc/BluetoothParent.cpp
+++ b/dom/bluetooth/ipc/BluetoothParent.cpp
@@ -390,99 +390,99 @@ BluetoothRequestParent::DoRequest(const 
 }
 
 bool
 BluetoothRequestParent::DoRequest(const SetPinCodeRequest& aRequest)
 {
   MOZ_ASSERT(mService);
   MOZ_ASSERT(mRequestType == Request::TSetPinCodeRequest);
 
-  nsresult rv =
+  bool result =
     mService->SetPinCodeInternal(aRequest.path(),
                                  aRequest.pincode(),
                                  mReplyRunnable.get());
 
-  NS_ENSURE_SUCCESS(rv, false);
+  NS_ENSURE_TRUE(result, false);
 
   return true;
 }
 
 bool
 BluetoothRequestParent::DoRequest(const SetPasskeyRequest& aRequest)
 {
   MOZ_ASSERT(mService);
   MOZ_ASSERT(mRequestType == Request::TSetPasskeyRequest);
 
-  nsresult rv =
+  bool result =
     mService->SetPasskeyInternal(aRequest.path(),
                                  aRequest.passkey(),
                                  mReplyRunnable.get());
 
-  NS_ENSURE_SUCCESS(rv, false);
+  NS_ENSURE_TRUE(result, false);
 
   return true;
 }
 
 bool
 BluetoothRequestParent::DoRequest(const ConfirmPairingConfirmationRequest&
                                   aRequest)
 {
   MOZ_ASSERT(mService);
   MOZ_ASSERT(mRequestType == Request::TConfirmPairingConfirmationRequest);
 
-  nsresult rv =
+  bool result =
     mService->SetPairingConfirmationInternal(aRequest.path(),
                                              true,
                                              mReplyRunnable.get());
 
-  NS_ENSURE_SUCCESS(rv, false);
+  NS_ENSURE_TRUE(result, false);
 
   return true;
 }
 
 bool
 BluetoothRequestParent::DoRequest(const ConfirmAuthorizationRequest& aRequest)
 {
   MOZ_ASSERT(mService);
   MOZ_ASSERT(mRequestType == Request::TConfirmAuthorizationRequest);
 
-  nsresult rv =
+  bool result =
     mService->SetAuthorizationInternal(aRequest.path(),
                                        true,
                                        mReplyRunnable.get());
 
-  NS_ENSURE_SUCCESS(rv, false);
+  NS_ENSURE_TRUE(result, false);
 
   return true;
 }
 
 bool
 BluetoothRequestParent::DoRequest(const DenyPairingConfirmationRequest&
                                   aRequest)
 {
   MOZ_ASSERT(mService);
   MOZ_ASSERT(mRequestType == Request::TDenyPairingConfirmationRequest);
 
-  nsresult rv =
+  bool result =
     mService->SetPairingConfirmationInternal(aRequest.path(),
                                              false,
                                              mReplyRunnable.get());
 
-  NS_ENSURE_SUCCESS(rv, false);
+  NS_ENSURE_TRUE(result, false);
 
   return true;
 }
 
 bool
 BluetoothRequestParent::DoRequest(const DenyAuthorizationRequest& aRequest)
 {
   MOZ_ASSERT(mService);
   MOZ_ASSERT(mRequestType == Request::TDenyAuthorizationRequest);
 
-  nsresult rv =
+  bool result =
     mService->SetAuthorizationInternal(aRequest.path(),
                                        false,
                                        mReplyRunnable.get());
 
-  NS_ENSURE_SUCCESS(rv, false);
+  NS_ENSURE_TRUE(result, false);
 
   return true;
 }
--- a/ipc/chromium/src/chrome/common/ipc_message_utils.h
+++ b/ipc/chromium/src/chrome/common/ipc_message_utils.h
@@ -163,16 +163,31 @@ struct ParamTraits<unsigned long> {
   }
   static bool Read(const Message* m, void** iter, param_type* r) {
     return m->ReadULong(iter, r);
   }
   static void Log(const param_type& p, std::wstring* l) {
     l->append(StringPrintf(L"%ul", p));
   }
 };
+
+template <>
+struct ParamTraits<nsresult> {
+  typedef nsresult param_type;
+  static void Write(Message* m, const param_type& p) {
+    m->WriteUInt32(static_cast<uint32_t>(p));
+  }
+  static bool Read(const Message* m, void** iter, param_type* r) {
+    return m->ReadUInt32(iter, reinterpret_cast<uint32_t*>(r));
+  }
+  static void Log(const param_type& p, std::wstring* l) {
+    l->append(StringPrintf(L"%u", static_cast<uint32_t>(p)));
+  }
+};
+
 #if (defined(OS_OPENBSD) && defined(ARCH_CPU_64_BITS))
 // On OpenBSD, uint64_t is unsigned long long
 // see https://bugzilla.mozilla.org/show_bug.cgi?id=648735#c27
 template <>
 struct ParamTraits<unsigned long long> {
   typedef unsigned long long param_type;
   static void Write(Message* m, const param_type& p) {
     m->WriteData(reinterpret_cast<const char*>(&p), sizeof(param_type));
--- a/js/xpconnect/src/XPCComponents.cpp
+++ b/js/xpconnect/src/XPCComponents.cpp
@@ -1398,17 +1398,17 @@ nsXPCComponents_Results::NewResolve(nsIX
     JSAutoByteString name;
 
     if (JSID_IS_STRING(id) && name.encode(cx, JSID_TO_STRING(id))) {
         const char* rv_name;
         void* iter = nullptr;
         nsresult rv;
         while (nsXPCException::IterateNSResults(&rv, &rv_name, nullptr, &iter)) {
             if (!strcmp(name.ptr(), rv_name)) {
-                // The double cast below is required since nsresult is an enum,
+                // The two casts below is required since nsresult is an enum,
                 // and it can be interpreted as a signed integer if we directly
                 // cast to a double.
                 jsval val = JS_NumberValue((double)(uint32_t)rv);
 
                 *objp = obj;
                 if (!JS_DefinePropertyById(cx, obj, id, val,
                                            nullptr, nullptr,
                                            JSPROP_ENUMERATE |
@@ -4716,17 +4716,20 @@ nsXPCComponents::GetProperty(nsIXPConnec
         doResult = true;
     } else if (id == rt->GetStringID(XPCJSRuntime::IDX_RETURN_CODE)) {
         res = xpcc->GetPendingResult();
         doResult = true;
     }
 
     nsresult rv = NS_OK;
     if (doResult) {
-        *vp = JS_NumberValue((double) res);
+        // The two casts below is required since nsresult is an enum,
+        // and it can be interpreted as a signed integer if we directly
+        // cast to a double.
+        *vp = JS_NumberValue((double)(uint32_t) res);
         rv = NS_SUCCESS_I_DID_SOMETHING;
     }
 
     return rv;
 }
 
 /* bool setProperty (in nsIXPConnectWrappedNative wrapper, in JSContextPtr cx, in JSObjectPtr obj, in jsid id, in JSValPtr vp); */
 NS_IMETHODIMP
@@ -4868,9 +4871,9 @@ nsXPCComponents::PreCreate(nsISupports *
 {
   // this should never happen
   if (!mScope) {
       NS_WARNING("mScope must not be null when nsXPCComponents::PreCreate is called");
       return NS_ERROR_FAILURE;
   }
   *parentObj = mScope->GetGlobalJSObject();
   return NS_OK;
-}
\ No newline at end of file
+}
--- a/python/mozbuild/mozbuild/compilation/warnings.py
+++ b/python/mozbuild/mozbuild/compilation/warnings.py
@@ -1,14 +1,16 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this file,
 # You can obtain one at http://mozilla.org/MPL/2.0/.
 
 # This modules provides functionality for dealing with compiler warnings.
 
+from __future__ import unicode_literals
+
 import json
 import os
 import re
 
 from mozbuild.util import hash_file
 
 
 # Regular expression to strip ANSI color sequences from a string. This is
@@ -64,16 +66,28 @@ class CompilerWarning(dict):
 
     def __neq__(self, other):
         return not self.__eq__(other)
 
     def __hash__(self):
         """Define so this can exist inside a set, etc."""
         return hash(tuple(sorted(self.items())))
 
+    def __cmp__(self, other):
+        if not isinstance(other, CompilerWarning):
+            return -1
+
+        for key in ('filename', 'line', 'column'):
+            x = cmp(self[key], other[key])
+
+            if x != 0:
+                return x
+
+        return 0
+
 
 class WarningsDatabase(object):
     """Holds a collection of warnings.
 
     The warnings database is a semi-intelligent container that holds warnings
     encountered during builds.
 
     The warnings database is backed by a JSON file. But, that is transparent
new file mode 100644
--- /dev/null
+++ b/python/mozbuild/mozbuild/config.py
@@ -0,0 +1,488 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this file,
+# You can obtain one at http://mozilla.org/MPL/2.0/.
+
+r"""
+This file defines classes for representing config data/settings.
+
+Config data is modeled as key-value pairs. Keys are grouped together into named
+sections. Individual config settings (options) have metadata associated with
+them. This metadata includes type, default value, valid values, etc.
+
+The main interface to config data is the ConfigSettings class. 1 or more
+ConfigProvider classes are associated with ConfigSettings and define what
+settings are available.
+
+Descriptions of individual config options can be translated to multiple
+languages using gettext. Each option has associated with it a domain and locale
+directory. By default, the domain is the section the option is in and the
+locale directory is the "locale" directory beneath the directory containing the
+module that defines it.
+
+People implementing ConfigProvider instances are expected to define a complete
+gettext .po and .mo file for the en-US locale. You can use the gettext-provided
+msgfmt binary to perform this conversion. Generation of the original .po file
+can be done via the write_pot() of ConfigSettings.
+"""
+
+from __future__ import unicode_literals
+
+import collections
+import gettext
+import os
+import sys
+
+if sys.version_info[0] == 3:
+    from configparser import RawConfigParser
+    str_type = str
+else:
+    from ConfigParser import RawConfigParser
+    str_type = basestring
+
+
+class ConfigType(object):
+    """Abstract base class for config values."""
+
+    @staticmethod
+    def validate(value):
+        """Validates a Python value conforms to this type.
+
+        Raises a TypeError or ValueError if it doesn't conform. Does not do
+        anything if the value is valid.
+        """
+
+    @staticmethod
+    def from_config(config, section, option):
+        """Obtain the value of this type from a RawConfigParser.
+
+        Receives a RawConfigParser instance, a str section name, and the str
+        option in that section to retrieve.
+
+        The implementation may assume the option exists in the RawConfigParser
+        instance.
+
+        Implementations are not expected to validate the value. But, they
+        should return the appropriate Python type.
+        """
+
+    @staticmethod
+    def to_config(value):
+        return value
+
+
+class StringType(ConfigType):
+    @staticmethod
+    def validate(value):
+        if not isinstance(value, str_type):
+            raise TypeError()
+
+    @staticmethod
+    def from_config(config, section, option):
+        return config.get(section, option)
+
+
+class BooleanType(ConfigType):
+    @staticmethod
+    def validate(value):
+        if not isinstance(value, bool):
+            raise TypeError()
+
+    @staticmethod
+    def from_config(config, section, option):
+        return config.getboolean(section, option)
+
+    @staticmethod
+    def to_config(value):
+        return 'true' if value else 'false'
+
+
+class IntegerType(ConfigType):
+    @staticmethod
+    def validate(value):
+        if not isinstance(value, int):
+            raise TypeError()
+
+    @staticmethod
+    def from_config(config, section, option):
+        return config.getint(section, option)
+
+
+class PositiveIntegerType(IntegerType):
+    @staticmethod
+    def validate(value):
+        if not isinstance(value, int):
+            raise TypeError()
+
+        if value < 0:
+            raise ValueError()
+
+
+class PathType(StringType):
+    @staticmethod
+    def validate(value):
+        if not isinstance(value, str_type):
+            raise TypeError()
+
+    @staticmethod
+    def from_config(config, section, option):
+        return config.get(section, option)
+
+
+class AbsolutePathType(PathType):
+    @staticmethod
+    def validate(value):
+        if not isinstance(value, str_type):
+            raise TypeError()
+
+        if not os.path.isabs(value):
+            raise ValueError()
+
+
+class RelativePathType(PathType):
+    @staticmethod
+    def validate(value):
+        if not isinstance(value, str_type):
+            raise TypeError()
+
+        if os.path.isabs(value):
+            raise ValueError()
+
+
+class DefaultValue(object):
+    pass
+
+
+class ConfigProvider(object):
+    """Abstract base class for an object providing config settings.
+
+    Classes implementing this interface expose configurable settings. Settings
+    are typically only relevant to that component itself. But, nothing says
+    settings can't be shared by multiple components.
+    """
+
+    @classmethod
+    def register_settings(cls):
+        """Registers config settings.
+
+        This is called automatically. Child classes should likely not touch it.
+        See _register_settings() instead.
+        """
+        if hasattr(cls, '_settings_registered'):
+            return
+
+        cls._settings_registered = True
+
+        cls.config_settings = {}
+
+        ourdir = os.path.dirname(__file__)
+        cls.config_settings_locale_directory = os.path.join(ourdir, 'locale')
+
+        cls._register_settings()
+
+    @classmethod
+    def _register_settings(cls):
+        """The actual implementation of register_settings().
+
+        This is what child classes should implement. They should not touch
+        register_settings().
+
+        Implementations typically make 1 or more calls to _register_setting().
+        """
+        raise NotImplemented('%s must implement _register_settings.' %
+            __name__)
+
+    @classmethod
+    def register_setting(cls, section, option, type_cls, default=DefaultValue,
+        choices=None, domain=None):
+        """Register a config setting with this type.
+
+        This is a convenience method to populate available settings. It is
+        typically called in the class's _register_settings() implementation.
+
+        Each setting must have:
+
+            section -- str section to which the setting belongs. This is how
+                settings are grouped.
+
+            option -- str id for the setting. This must be unique within the
+                section it appears.
+
+            type -- a ConfigType-derived type defining the type of the setting.
+
+        Each setting has the following optional parameters:
+
+            default -- The default value for the setting. If None (the default)
+                there is no default.
+
+            choices -- A set of values this setting can hold. Values not in
+                this set are invalid.
+
+            domain -- Translation domain for this setting. By default, the
+                 domain is the same as the section name.
+        """
+        if not section in cls.config_settings:
+            cls.config_settings[section] = {}
+
+        if option in cls.config_settings[section]:
+            raise Exception('Setting has already been registered: %s.%s' % (
+                section, option))
+
+        domain = domain if domain is not None else section
+
+        meta = {
+            'short': '%s.short' % option,
+            'full': '%s.full' % option,
+            'type_cls': type_cls,
+            'domain': domain,
+            'localedir': cls.config_settings_locale_directory,
+        }
+
+        if default != DefaultValue:
+            meta['default'] = default
+
+        if choices is not None:
+            meta['choices'] = choices
+
+        cls.config_settings[section][option] = meta
+
+
+class ConfigSettings(collections.Mapping):
+    """Interface for configuration settings.
+
+    This is the main interface to the configuration.
+
+    A configuration is a collection of sections. Each section contains
+    key-value pairs.
+
+    When an instance is created, the caller first registers ConfigProvider
+    instances with it. This tells the ConfigSettings what individual settings
+    are available and defines extra metadata associated with those settings.
+    This is used for validation, etc.
+
+    Once ConfigProvider instances are registered, a config is populated. It can
+    be loaded from files or populated by hand.
+
+    ConfigSettings instances are accessed like dictionaries or by using
+    attributes. e.g. the section "foo" is accessed through either
+    settings.foo or settings['foo'].
+
+    Sections are modeled by the ConfigSection class which is defined inside
+    this one. They look just like dicts or classes with attributes. To access
+    the "bar" option in the "foo" section:
+
+        value = settings.foo.bar
+        value = settings['foo']['bar']
+        value = settings.foo['bar']
+
+    Assignment is similar:
+
+        settings.foo.bar = value
+        settings['foo']['bar'] = value
+        settings['foo'].bar = value
+
+    You can even delete user-assigned values:
+
+        del settings.foo.bar
+        del settings['foo']['bar']
+
+    If there is a default, it will be returned.
+
+    When settings are mutated, they are validated against the registered
+    providers. Setting unknown settings or setting values to illegal values
+    will result in exceptions being raised.
+    """
+
+    class ConfigSection(collections.MutableMapping, object):
+        """Represents an individual config section."""
+        def __init__(self, config, name, settings):
+            object.__setattr__(self, '_config', config)
+            object.__setattr__(self, '_name', name)
+            object.__setattr__(self, '_settings', settings)
+
+        # MutableMapping interface
+        def __len__(self):
+            return len(self._settings)
+
+        def __iter__(self):
+            return iter(self._settings.keys())
+
+        def __contains__(self, k):
+            return k in self._settings
+
+        def __getitem__(self, k):
+            if k not in self._settings:
+                raise KeyError('Option not registered with provider: %s' % k)
+
+            meta = self._settings[k]
+
+            if self._config.has_option(self._name, k):
+                return meta['type_cls'].from_config(self._config, self._name, k)
+
+            if not 'default' in meta:
+                raise KeyError('No default value registered: %s' % k)
+
+            return meta['default']
+
+        def __setitem__(self, k, v):
+            if k not in self._settings:
+                raise KeyError('Option not registered with provider: %s' % k)
+
+            meta = self._settings[k]
+
+            meta['type_cls'].validate(v)
+
+            if not self._config.has_section(self._name):
+                self._config.add_section(self._name)
+
+            self._config.set(self._name, k, meta['type_cls'].to_config(v))
+
+        def __delitem__(self, k):
+            self._config.remove_option(self._name, k)
+
+            # Prune empty sections.
+            if not len(self._config.options(self._name)):
+                self._config.remove_section(self._name)
+
+        def __getattr__(self, k):
+            return self.__getitem__(k)
+
+        def __setattr__(self, k, v):
+            self.__setitem__(k, v)
+
+        def __delattr__(self, k):
+            self.__delitem__(k)
+
+
+    def __init__(self):
+        self._config = RawConfigParser()
+
+        self._settings = {}
+        self._sections = {}
+        self._finalized = False
+        self._loaded_filenames = set()
+
+    def load_file(self, filename):
+        self.load_files([filename])
+
+    def load_files(self, filenames):
+        """Load a config from files specified by their paths.
+
+        Files are loaded in the order given. Subsequent files will overwrite
+        values from previous files. If a file does not exist, it will be
+        ignored.
+        """
+        filtered = [f for f in filenames if os.path.exists(f)]
+
+        fps = [open(f, 'rt') for f in filtered]
+        self.load_fps(fps)
+        self._loaded_filenames.update(set(filtered))
+        for fp in fps:
+            fp.close()
+
+    def load_fps(self, fps):
+        """Load config data by reading file objects."""
+
+        for fp in fps:
+            self._config.readfp(fp)
+
+    def loaded_files(self):
+        return self._loaded_filenames
+
+    def write(self, fh):
+        """Write the config to a file object."""
+        self._config.write(fh)
+
+    def validate(self):
+        """Ensure that the current config passes validation.
+
+        This is a generator of tuples describing any validation errors. The
+        elements of the tuple are:
+
+            (bool) True if error is fatal. False if just a warning.
+            (str) Type of validation issue. Can be one of ('unknown-section',
+                'missing-required', 'type-error')
+        """
+
+    def register_provider(self, provider):
+        """Register a ConfigProvider with this settings interface."""
+
+        if self._finalized:
+            raise Exception('Providers cannot be registered after finalized.')
+
+        provider.register_settings()
+
+        for section_name, settings in provider.config_settings.items():
+            section = self._settings.get(section_name, {})
+
+            for k, v in settings.items():
+                if k in section:
+                    raise Exception('Setting already registered: %s.%s' %
+                        section_name, k)
+
+                section[k] = v
+
+            self._settings[section_name] = section
+
+    def write_pot(self, fh):
+        """Write a pot gettext translation file."""
+
+        for section in sorted(self):
+            fh.write('# Section %s\n\n' % section)
+            for option in sorted(self[section]):
+                fh.write('msgid "%s.%s.short"\n' % (section, option))
+                fh.write('msgstr ""\n\n')
+
+                fh.write('msgid "%s.%s.full"\n' % (section, option))
+                fh.write('msgstr ""\n\n')
+
+            fh.write('# End of section %s\n\n' % section)
+
+    def option_help(self, section, option):
+        """Obtain the translated help messages for an option."""
+
+        meta = self[section]._settings[option]
+
+        # Providers should always have an en-US translation. If they don't,
+        # they are coded wrong and this will raise.
+        default = gettext.translation(meta['domain'], meta['localedir'],
+            ['en-US'])
+
+        t = gettext.translation(meta['domain'], meta['localedir'],
+            fallback=True)
+        t.add_fallback(default)
+
+        short = t.ugettext('%s.%s.short' % (section, option))
+        full = t.ugettext('%s.%s.full' % (section, option))
+
+        return (short, full)
+
+    def _finalize(self):
+        if self._finalized:
+            return
+
+        for section, settings in self._settings.items():
+            s = ConfigSettings.ConfigSection(self._config, section, settings)
+            self._sections[section] = s
+
+        self._finalized = True
+
+    # Mapping interface.
+    def __len__(self):
+        return len(self._settings)
+
+    def __iter__(self):
+        self._finalize()
+
+        return iter(self._sections.keys())
+
+    def __contains__(self, k):
+        return k in self._settings
+
+    def __getitem__(self, k):
+        self._finalize()
+
+        return self._sections[k]
+
+    # Allow attribute access because it looks nice.
+    def __getattr__(self, k):
+        return self.__getitem__(k)
--- a/python/mozbuild/mozbuild/logger.py
+++ b/python/mozbuild/mozbuild/logger.py
@@ -1,16 +1,18 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this file,
 # You can obtain one at http://mozilla.org/MPL/2.0/.
 
 # This file contains logging functionality for mozbuild. This functionality
 # could likely be split out of mozbuild. For now, mozbuild is the only
 # consumer and thus it lives here.
 
+from __future__ import unicode_literals
+
 try:
     import blessings
 except ImportError:
     blessings = None
 
 import json
 import logging
 import sys
@@ -54,17 +56,17 @@ class StructuredHumanFormatter(logging.F
     def __init__(self, start_time, write_interval=False):
         self.start_time = start_time
         self.write_interval = write_interval
         self.last_time = None
 
     def format(self, record):
         elapsed = self._time(record)
 
-        return u'%4.2f %s' % (elapsed, record.msg.format(**record.params))
+        return '%4.2f %s' % (elapsed, record.msg.format(**record.params))
 
     def _time(self, record):
         t = record.created - self.start_time
 
         if self.write_interval and self.last_time is not None:
             t = record.created - self.last_time
 
         self.last_time = record.created
@@ -77,17 +79,17 @@ class StructuredTerminalFormatter(Struct
 
     def set_terminal(self, terminal):
         self.terminal = terminal
 
     def format(self, record):
         t = self.terminal.blue('%4.2f' % self._time(record))
         f = record.msg.format(**record.params)
 
-        return u'%s %s' % (t, self._colorize(f))
+        return '%s %s' % (t, self._colorize(f))
 
     def _colorize(self, s):
         if not self.terminal:
             return s
 
         result = s
 
         if s.startswith('TEST-PASS'):
@@ -119,16 +121,18 @@ class LoggingManager(object):
         self.root_logger = logging.getLogger()
         self.root_logger.setLevel(logging.DEBUG)
 
         self.mozbuild_logger = logging.getLogger('mozbuild')
         self.mozbuild_logger.setLevel(logging.DEBUG)
 
         self.structured_filter = ConvertToStructuredFilter()
 
+        self.structured_loggers = [self.mozbuild_logger]
+
         self._terminal = None
 
     @property
     def terminal(self):
         if not self._terminal and blessings:
             terminal = blessings.Terminal(stream=sys.stdout)
 
             if terminal.is_a_tty:
@@ -140,17 +144,18 @@ class LoggingManager(object):
         """Enable JSON logging on the specified file object."""
 
         # Configure the consumer of structured messages.
         handler = logging.StreamHandler(stream=fh)
         handler.setFormatter(StructuredJSONFormatter())
         handler.setLevel(logging.DEBUG)
 
         # And hook it up.
-        self.mozbuild_logger.addHandler(handler)
+        for logger in self.structured_loggers:
+            logger.addHandler(handler)
 
         self.json_handlers.append(handler)
 
     def add_terminal_logging(self, fh=sys.stdout, level=logging.INFO,
             write_interval=False):
         """Enable logging to the terminal."""
 
         formatter = StructuredHumanFormatter(self.start_time,
@@ -160,43 +165,54 @@ class LoggingManager(object):
             formatter = StructuredTerminalFormatter(self.start_time,
                 write_interval=write_interval)
             formatter.set_terminal(self.terminal)
 
         handler = logging.StreamHandler(stream=fh)
         handler.setFormatter(formatter)
         handler.setLevel(level)
 
-        self.mozbuild_logger.addHandler(handler)
+        for logger in self.structured_loggers:
+            logger.addHandler(handler)
 
         self.terminal_handler = handler
         self.terminal_formatter = formatter
 
     def replace_terminal_handler(self, handler):
         """Replace the installed terminal handler.
 
         Returns the old handler or None if none was configured.
         If the new handler is None, removes any existing handler and disables
         logging to the terminal.
         """
         old = self.terminal_handler
 
         if old:
-            self.mozbuild_logger.removeHandler(old)
+            for logger in self.structured_loggers:
+                logger.removeHandler(old)
 
         if handler:
-            self.mozbuild_logger.addHandler(handler)
+            for logger in self.structured_loggers:
+                logger.addHandler(handler)
 
         self.terminal_handler = handler
 
         return old
 
     def enable_unstructured(self):
         """Enable logging of unstructured messages."""
         if self.terminal_handler:
             self.terminal_handler.addFilter(self.structured_filter)
             self.root_logger.addHandler(self.terminal_handler)
 
     def disable_unstructured(self):
         """Disable logging of unstructured messages."""
         if self.terminal_handler:
             self.terminal_handler.removeFilter(self.structured_filter)
             self.root_logger.removeHandler(self.terminal_handler)
+
+    def register_structured_logger(self, logger):
+        """Register a structured logger.
+
+        This needs to be called for all structured loggers that don't chain up
+        to the mozbuild logger in order for their output to be captured.
+        """
+        self.structured_loggers.append(logger)
--- a/python/mozbuild/mozbuild/test/compilation/test_warnings.py
+++ b/python/mozbuild/mozbuild/test/compilation/test_warnings.py
@@ -1,13 +1,13 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this file,
 # You can obtain one at http://mozilla.org/MPL/2.0/.
 
-import os.path
+import os
 import unittest
 
 from tempfile import NamedTemporaryFile
 
 from mozbuild.compilation.warnings import CompilerWarning
 from mozbuild.compilation.warnings import WarningsCollector
 from mozbuild.compilation.warnings import WarningsDatabase
 
@@ -103,29 +103,29 @@ class TestWarningsParsing(unittest.TestC
             self.assertEqual(warning['message'], message)
 
 class TestWarningsDatabase(unittest.TestCase):
     def test_basic(self):
         db = WarningsDatabase()
 
         self.assertEqual(len(db), 0)
 
-        for i in xrange(10):
+        for i in range(10):
             db.insert(get_warning(), compute_hash=False)
 
         self.assertEqual(len(db), 10)
 
         warnings = list(db)
         self.assertEqual(len(warnings), 10)
 
     def test_hashing(self):
         """Ensure that hashing files on insert works."""
         db = WarningsDatabase()
 
-        temp = NamedTemporaryFile()
+        temp = NamedTemporaryFile(mode='wt')
         temp.write('x' * 100)
         temp.flush()
 
         w = CompilerWarning()
         w['filename'] = temp.name
         w['line'] = 1
         w['column'] = 4
         w['message'] = 'foo bar'
@@ -138,18 +138,18 @@ class TestWarningsDatabase(unittest.Test
         with self.assertRaises(Exception):
             db.insert(w)
 
     def test_pruning(self):
         """Ensure old warnings are removed from database appropriately."""
         db = WarningsDatabase()
 
         source_files = []
-        for i in xrange(1, 21):
-            temp = NamedTemporaryFile()
+        for i in range(1, 21):
+            temp = NamedTemporaryFile(mode='wt')
             temp.write('x' * (100 * i))
             temp.flush()
 
             # Keep reference so it doesn't get GC'd and deleted.
             source_files.append(temp)
 
             w = CompilerWarning()
             w['filename'] = temp.name
@@ -178,14 +178,14 @@ class TestWarningsDatabase(unittest.Test
 
         warnings = list(db.warnings_for_file(source_files[0].name))
         self.assertEqual(len(warnings), 1)
         self.assertEqual(warnings[0]['column'], w['column'])
 
         # If we delete the source file, calling prune should call the warnings
         # to go away.
         old_filename = source_files[0].name
-        del source_files[0]
+        source_files[0].close()
 
         self.assertFalse(os.path.exists(old_filename))
 
         db.prune()
         self.assertEqual(len(db), 19)
new file mode 100644
--- /dev/null
+++ b/python/mozbuild/mozbuild/test/test_config.py
@@ -0,0 +1,255 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this file,
+# You can obtain one at http://mozilla.org/MPL/2.0/.  
+from __future__ import unicode_literals
+
+import sys
+import unittest
+
+from tempfile import NamedTemporaryFile
+
+from mozbuild.config import AbsolutePathType
+from mozbuild.config import BooleanType
+from mozbuild.config import ConfigProvider
+from mozbuild.config import ConfigSettings
+from mozbuild.config import IntegerType
+from mozbuild.config import PathType
+from mozbuild.config import PositiveIntegerType
+from mozbuild.config import RelativePathType
+from mozbuild.config import StringType
+
+if sys.version_info[0] == 3:
+    str_type = str
+else:
+    str_type = basestring
+
+CONFIG1 = r"""
+[foo]
+
+bar = bar_value
+baz = /baz/foo.c
+"""
+
+CONFIG2 = r"""
+[foo]
+
+bar = value2
+"""
+
+class Provider1(ConfigProvider):
+    @classmethod
+    def _register_settings(cls):
+        cls.register_setting('foo', 'bar', StringType)
+        cls.register_setting('foo', 'baz', AbsolutePathType)
+
+Provider1.register_settings()
+
+class ProviderDuplicate(ConfigProvider):
+    @classmethod
+    def _register_settings(cls):
+        cls.register_setting('dupesect', 'foo', StringType)
+        cls.register_setting('dupesect', 'foo', StringType)
+
+class TestConfigProvider(unittest.TestCase):
+    def test_construct(self):
+        s = Provider1.config_settings
+
+        self.assertEqual(len(s), 1)
+        self.assertIn('foo', s)
+
+        self.assertEqual(len(s['foo']), 2)
+        self.assertIn('bar', s['foo'])
+        self.assertIn('baz', s['foo'])
+
+    def test_duplicate_option(self):
+        with self.assertRaises(Exception):
+            ProviderDuplicate.register_settings()
+
+
+class Provider2(ConfigProvider):
+    @classmethod
+    def _register_settings(cls):
+        cls.register_setting('a', 'string', StringType)
+        cls.register_setting('a', 'boolean', BooleanType)
+        cls.register_setting('a', 'pos_int', PositiveIntegerType)
+        cls.register_setting('a', 'int', IntegerType)
+        cls.register_setting('a', 'abs_path', AbsolutePathType)
+        cls.register_setting('a', 'rel_path', RelativePathType)
+        cls.register_setting('a', 'path', PathType)
+
+Provider2.register_settings()
+
+class TestConfigSettings(unittest.TestCase):
+    def test_empty(self):
+        s = ConfigSettings()
+
+        self.assertEqual(len(s), 0)
+        self.assertNotIn('foo', s)
+
+    def test_simple(self):
+        s = ConfigSettings()
+        s.register_provider(Provider1)
+
+        self.assertEqual(len(s), 1)
+        self.assertIn('foo', s)
+
+        foo = s['foo']
+        foo = s.foo
+
+        self.assertEqual(len(foo), 2)
+
+        self.assertIn('bar', foo)
+        self.assertIn('baz', foo)
+
+        foo['bar'] = 'value1'
+        self.assertEqual(foo['bar'], 'value1')
+        self.assertEqual(foo['bar'], 'value1')
+
+    def test_assignment_validation(self):
+        s = ConfigSettings()
+        s.register_provider(Provider2)
+
+        a = s.a
+
+        # Assigning an undeclared setting raises.
+        with self.assertRaises(KeyError):
+            a.undefined = True
+
+        with self.assertRaises(KeyError):
+            a['undefined'] = True
+
+        # Basic type validation.
+        a.string = 'foo'
+        a.string = 'foo'
+
+        with self.assertRaises(TypeError):
+            a.string = False
+
+        a.boolean = True
+        a.boolean = False
+
+        with self.assertRaises(TypeError):
+            a.boolean = 'foo'
+
+        a.pos_int = 5
+        a.pos_int = 0
+
+        with self.assertRaises(ValueError):
+            a.pos_int = -1
+
+        with self.assertRaises(TypeError):
+            a.pos_int = 'foo'
+
+        a.int = 5
+        a.int = 0
+        a.int = -5
+
+        with self.assertRaises(TypeError):
+            a.int = 1.24
+
+        with self.assertRaises(TypeError):
+            a.int = 'foo'
+
+        a.abs_path = '/home/gps'
+
+        with self.assertRaises(ValueError):
+            a.abs_path = 'home/gps'
+
+        a.rel_path = 'home/gps'
+        a.rel_path = './foo/bar'
+        a.rel_path = 'foo.c'
+
+        with self.assertRaises(ValueError):
+            a.rel_path = '/foo/bar'
+
+        a.path = '/home/gps'
+        a.path = 'foo.c'
+        a.path = 'foo/bar'
+        a.path = './foo'
+
+    def test_retrieval_type(self):
+        s = ConfigSettings()
+        s.register_provider(Provider2)
+
+        a = s.a
+
+        a.string = 'foo'
+        a.boolean = True
+        a.pos_int = 12
+        a.int = -4
+        a.abs_path = '/home/gps'
+        a.rel_path = 'foo.c'
+        a.path = './foo/bar'
+
+        self.assertIsInstance(a.string, str_type)
+        self.assertIsInstance(a.boolean, bool)
+        self.assertIsInstance(a.pos_int, int)
+        self.assertIsInstance(a.int, int)
+        self.assertIsInstance(a.abs_path, str_type)
+        self.assertIsInstance(a.rel_path, str_type)
+        self.assertIsInstance(a.path, str_type)
+
+    def test_file_reading_single(self):
+        temp = NamedTemporaryFile(mode='wt')
+        temp.write(CONFIG1)
+        temp.flush()
+
+        s = ConfigSettings()
+        s.register_provider(Provider1)
+
+        s.load_file(temp.name)
+
+        self.assertEqual(s.foo.bar, 'bar_value')
+
+    def test_file_reading_multiple(self):
+        """Loading multiple files has proper overwrite behavior."""
+        temp1 = NamedTemporaryFile(mode='wt')
+        temp1.write(CONFIG1)
+        temp1.flush()
+
+        temp2 = NamedTemporaryFile(mode='wt')
+        temp2.write(CONFIG2)
+        temp2.flush()
+
+        s = ConfigSettings()
+        s.register_provider(Provider1)
+
+        s.load_files([temp1.name, temp2.name])
+
+        self.assertEqual(s.foo.bar, 'value2')
+
+    def test_file_reading_missing(self):
+        """Missing files should silently be ignored."""
+
+        s = ConfigSettings()
+
+        s.load_file('/tmp/foo.ini')
+
+    def test_file_writing(self):
+        s = ConfigSettings()
+        s.register_provider(Provider2)
+
+        s.a.string = 'foo'
+        s.a.boolean = False
+
+        temp = NamedTemporaryFile('wt')
+        s.write(temp)
+        temp.flush()
+
+        s2 = ConfigSettings()
+        s2.register_provider(Provider2)
+
+        s2.load_file(temp.name)
+
+        self.assertEqual(s.a.string, s2.a.string)
+        self.assertEqual(s.a.boolean, s2.a.boolean)
+
+    def test_write_pot(self):
+        s = ConfigSettings()
+        s.register_provider(Provider1)
+        s.register_provider(Provider2)
+
+        # Just a basic sanity test.
+        temp = NamedTemporaryFile('wt')
+        s.write_pot(temp)
+        temp.flush()
--- a/python/mozbuild/mozbuild/test/test_util.py
+++ b/python/mozbuild/mozbuild/test/test_util.py
@@ -1,38 +1,39 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this file,
 # You can obtain one at http://mozilla.org/MPL/2.0/.
 
+from __future__ import unicode_literals
+
 import hashlib
 import unittest
 
-from StringIO import StringIO
 from tempfile import NamedTemporaryFile
 
 from mozbuild.util import hash_file
 
 
 class TestHashing(unittest.TestCase):
     def test_hash_file_known_hash(self):
         """Ensure a known hash value is recreated."""
-        data = 'The quick brown fox jumps over the lazy cog'
+        data = b'The quick brown fox jumps over the lazy cog'
         expected = 'de9f2c7fd25e1b3afad3e85a0bd17d9b100db4b3'
 
         temp = NamedTemporaryFile()
         temp.write(data)
         temp.flush()
 
         actual = hash_file(temp.name)
 
         self.assertEqual(actual, expected)
 
     def test_hash_file_large(self):
         """Ensure that hash_file seems to work with a large file."""
-        data = 'x' * 1048576
+        data = b'x' * 1048576
 
         hasher = hashlib.sha1()
         hasher.update(data)
         expected = hasher.hexdigest()
 
         temp = NamedTemporaryFile()
         temp.write(data)
         temp.flush()
--- a/python/mozbuild/mozbuild/util.py
+++ b/python/mozbuild/mozbuild/util.py
@@ -1,15 +1,17 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this file,
 # You can obtain one at http://mozilla.org/MPL/2.0/.
 
 # This file contains miscellaneous utility functions that don't belong anywhere
 # in particular.
 
+from __future__ import unicode_literals
+
 import hashlib
 
 
 def hash_file(path):
     """Hashes a file specified by the path given and returns the hex digest."""
 
     # If the hashing function changes, this may invalidate lots of cached data.
     # Don't change it lightly.
--- a/xpcom/base/Makefile.in
+++ b/xpcom/base/Makefile.in
@@ -34,16 +34,17 @@ CPPSRCS		= \
 		nsInterfaceRequestorAgg.cpp \
 		nsUUIDGenerator.cpp \
 		nsSystemInfo.cpp \
 		nsCycleCollector.cpp \
 		nsStackWalk.cpp \
 		nsMemoryReporterManager.cpp \
 		ClearOnShutdown.cpp \
 		VisualEventTracer.cpp \
+		nsErrorAsserts.cpp \
 		$(NULL)
 
 ifeq ($(OS_ARCH),Linux)
 CPPSRCS += MapsMemoryReporter.cpp
 endif
 
 ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
 CPPSRCS		+= nsMacUtilsImpl.cpp
--- a/xpcom/base/nsError.h
+++ b/xpcom/base/nsError.h
@@ -73,16 +73,969 @@
  * 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.
  */
 #define NS_ERROR_MODULE_GENERAL    51
 
 /**
+ * @name Severity Code.  This flag identifies the level of warning
+ */
+
+#define NS_ERROR_SEVERITY_SUCCESS       0
+#define NS_ERROR_SEVERITY_ERROR         1
+
+/**
+ * @name Mozilla Code.  This flag separates consumers of mozilla code
+ *       from the native platform
+ */
+
+#define NS_ERROR_MODULE_BASE_OFFSET 0x45
+
+/* Helpers for defining our enum, to be undef'd later */
+#define SUCCESS_OR_FAILURE(sev, module, code) \
+  ((uint32_t)(sev) << 31) | \
+  ((uint32_t)(module + NS_ERROR_MODULE_BASE_OFFSET) << 16) | \
+  (uint32_t)(code)
+#define SUCCESS(code) \
+  SUCCESS_OR_FAILURE(NS_ERROR_SEVERITY_SUCCESS, MODULE, code)
+#define FAILURE(code) \
+  SUCCESS_OR_FAILURE(NS_ERROR_SEVERITY_ERROR, MODULE, code)
+
+/**
+ * @name Standard Macros for retrieving error bits
+ */
+
+#define NS_ERROR_GET_CODE(err)     ((err) & 0xffff)
+#define NS_ERROR_GET_MODULE(err)   ((((err) >> 16) - NS_ERROR_MODULE_BASE_OFFSET) & 0x1fff)
+#define NS_ERROR_GET_SEVERITY(err) (((err) >> 31) & 0x1)
+
+/**
+ * @name Standard return values
+ */
+
+/*@{*/
+
+typedef enum tag_nsresult {
+  /* Standard "it worked" return value */
+  NS_OK = 0,
+
+  /* ======================================================================= */
+  /* Core errors, not part of any modules */
+  /* ======================================================================= */
+  NS_ERROR_BASE                         = 0xC1F30000,
+  /* Returned when an instance is not initialized */
+  NS_ERROR_NOT_INITIALIZED              = NS_ERROR_BASE + 1,
+  /* Returned when an instance is already initialized */
+  NS_ERROR_ALREADY_INITIALIZED          = NS_ERROR_BASE + 2,
+  /* Returned by a not implemented function */
+  NS_ERROR_NOT_IMPLEMENTED              = 0x80004001,
+  /* Returned when a given interface is not supported. */
+  NS_NOINTERFACE                        = 0x80004002,
+  NS_ERROR_NO_INTERFACE                 = NS_NOINTERFACE,
+  NS_ERROR_INVALID_POINTER              = 0x80004003,
+  NS_ERROR_NULL_POINTER                 = NS_ERROR_INVALID_POINTER,
+  /* Returned when a function aborts */
+  NS_ERROR_ABORT                        = 0x80004004,
+  /* Returned when a function fails */
+  NS_ERROR_FAILURE                      = 0x80004005,
+  /* Returned when an unexpected error occurs */
+  NS_ERROR_UNEXPECTED                   = 0x8000ffff,
+  /* Returned when a memory allocation fails */
+  NS_ERROR_OUT_OF_MEMORY                = 0x8007000e,
+  /* Returned when an illegal value is passed */
+  NS_ERROR_ILLEGAL_VALUE                = 0x80070057,
+  NS_ERROR_INVALID_ARG                  = NS_ERROR_ILLEGAL_VALUE,
+  /* Returned when a class doesn't allow aggregation */
+  NS_ERROR_NO_AGGREGATION               = 0x80040110,
+  /* Returned when an operation can't complete due to an unavailable resource */
+  NS_ERROR_NOT_AVAILABLE                = 0x80040111,
+  /* Returned when a class is not registered */
+  NS_ERROR_FACTORY_NOT_REGISTERED       = 0x80040154,
+  /* Returned when a class cannot be registered, but may be tried again later */
+  NS_ERROR_FACTORY_REGISTER_AGAIN       = 0x80040155,
+  /* Returned when a dynamically loaded factory couldn't be found */
+  NS_ERROR_FACTORY_NOT_LOADED           = 0x800401f8,
+  /* Returned when a factory doesn't support signatures */
+  NS_ERROR_FACTORY_NO_SIGNATURE_SUPPORT = NS_ERROR_BASE + 0x101,
+  /* Returned when a factory already is registered */
+  NS_ERROR_FACTORY_EXISTS               = NS_ERROR_BASE + 0x100,
+
+
+  /* ======================================================================= */
+  /* 1: NS_ERROR_MODULE_XPCOM */
+  /* ======================================================================= */
+#define MODULE NS_ERROR_MODULE_XPCOM
+  /* Result codes used by nsIVariant */
+  NS_ERROR_CANNOT_CONVERT_DATA      = FAILURE(1),
+  NS_ERROR_OBJECT_IS_IMMUTABLE      = FAILURE(2),
+  NS_ERROR_LOSS_OF_SIGNIFICANT_DATA = FAILURE(3),
+  /* Result code used by nsIThreadManager */
+  NS_ERROR_NOT_SAME_THREAD          = FAILURE(4),
+  /* Various operations are not permitted during XPCOM shutdown and will fail
+   * with this exception. */
+  NS_ERROR_ILLEGAL_DURING_SHUTDOWN  = FAILURE(30),
+  NS_ERROR_SERVICE_NOT_AVAILABLE    = FAILURE(22),
+
+  NS_SUCCESS_LOSS_OF_INSIGNIFICANT_DATA = SUCCESS(1),
+  /* Used by nsCycleCollectionParticipant */
+  NS_SUCCESS_INTERRUPTED_TRAVERSE       = SUCCESS(2),
+  /* DEPRECATED */
+  NS_ERROR_SERVICE_NOT_FOUND            = SUCCESS(22),
+  /* DEPRECATED */
+  NS_ERROR_SERVICE_IN_USE               = SUCCESS(23),
+#undef MODULE
+
+
+  /* ======================================================================= */
+  /* 2: NS_ERROR_MODULE_BASE */
+  /* ======================================================================= */
+#define MODULE NS_ERROR_MODULE_BASE
+  /* I/O Errors */
+
+  /*  Stream closed */
+  NS_BASE_STREAM_CLOSED         = FAILURE(2),
+  /*  Error from the operating system */
+  NS_BASE_STREAM_OSERROR        = FAILURE(3),
+  /*  Illegal arguments */
+  NS_BASE_STREAM_ILLEGAL_ARGS   = FAILURE(4),
+  /*  For unichar streams */
+  NS_BASE_STREAM_NO_CONVERTER   = FAILURE(5),
+  /*  For unichar streams */
+  NS_BASE_STREAM_BAD_CONVERSION = FAILURE(6),
+  NS_BASE_STREAM_WOULD_BLOCK    = FAILURE(7),
+#undef MODULE
+
+
+  /* ======================================================================= */
+  /* 3: NS_ERROR_MODULE_GFX */
+  /* ======================================================================= */
+#define MODULE NS_ERROR_MODULE_GFX
+  /* error codes for printer device contexts */
+  /* Unix: print command (lp/lpr) not found */
+  NS_ERROR_GFX_PRINTER_CMD_NOT_FOUND              = FAILURE(2),
+  /* Unix: print command returned an error */
+  NS_ERROR_GFX_PRINTER_CMD_FAILURE                = FAILURE(3),
+  /* no printer available (e.g. cannot find _any_ printer) */
+  NS_ERROR_GFX_PRINTER_NO_PRINTER_AVAILABLE       = FAILURE(4),
+  /* _specified_ (by name) printer not found */
+  NS_ERROR_GFX_PRINTER_NAME_NOT_FOUND             = FAILURE(5),
+  /* access to printer denied */
+  NS_ERROR_GFX_PRINTER_ACCESS_DENIED              = FAILURE(6),
+  /* invalid printer attribute (for example: unsupported paper size etc.) */
+  NS_ERROR_GFX_PRINTER_INVALID_ATTRIBUTE          = FAILURE(7),
+  /* printer not "ready" (offline ?) */
+  NS_ERROR_GFX_PRINTER_PRINTER_NOT_READY          = FAILURE(9),
+  /* printer out of paper */
+  NS_ERROR_GFX_PRINTER_OUT_OF_PAPER               = FAILURE(10),
+  /* generic printer I/O error */
+  NS_ERROR_GFX_PRINTER_PRINTER_IO_ERROR           = FAILURE(11),
+  /* print-to-file: could not open output file */
+  NS_ERROR_GFX_PRINTER_COULD_NOT_OPEN_FILE        = FAILURE(12),
+  /* print-to-file: I/O error while printing to file */
+  NS_ERROR_GFX_PRINTER_FILE_IO_ERROR              = FAILURE(13),
+  /* print preview: needs at least one printer */
+  NS_ERROR_GFX_PRINTER_PRINTPREVIEW               = FAILURE(14),
+  /* print: starting document */
+  NS_ERROR_GFX_PRINTER_STARTDOC                   = FAILURE(15),
+  /* print: ending document */
+  NS_ERROR_GFX_PRINTER_ENDDOC                     = FAILURE(16),
+  /* print: starting page */
+  NS_ERROR_GFX_PRINTER_STARTPAGE                  = FAILURE(17),
+  /* print: ending page */
+  NS_ERROR_GFX_PRINTER_ENDPAGE                    = FAILURE(18),
+  /* print: print while in print preview */
+  NS_ERROR_GFX_PRINTER_PRINT_WHILE_PREVIEW        = FAILURE(19),
+  /* requested page size not supported by printer */
+  NS_ERROR_GFX_PRINTER_PAPER_SIZE_NOT_SUPPORTED   = FAILURE(20),
+  /* requested page orientation not supported */
+  NS_ERROR_GFX_PRINTER_ORIENTATION_NOT_SUPPORTED  = FAILURE(21),
+  /* requested colorspace not supported (like printing "color" on a
+     "grayscale"-only printer) */
+  NS_ERROR_GFX_PRINTER_COLORSPACE_NOT_SUPPORTED   = FAILURE(22),
+  /* too many copies requested */
+  NS_ERROR_GFX_PRINTER_TOO_MANY_COPIES            = FAILURE(23),
+  /* driver configuration error */
+  NS_ERROR_GFX_PRINTER_DRIVER_CONFIGURATION_ERROR = FAILURE(24),
+  /* The document is still being loaded, can't Print Preview */
+  NS_ERROR_GFX_PRINTER_DOC_IS_BUSY_PP             = FAILURE(25),
+  /* The document was asked to be destroyed while we were preparing printing */
+  NS_ERROR_GFX_PRINTER_DOC_WAS_DESTORYED          = FAILURE(26),
+  /* Cannot Print or Print Preview XUL Documents */
+  NS_ERROR_GFX_PRINTER_NO_XUL                     = FAILURE(27),
+  /* The toolkit no longer supports the Print Dialog (for embedders) */
+  NS_ERROR_GFX_NO_PRINTDIALOG_IN_TOOLKIT          = FAILURE(28),
+  /* The was wasn't any Print Prompt service registered (this shouldn't happen) */
+  NS_ERROR_GFX_NO_PRINTROMPTSERVICE               = FAILURE(29),
+  /* requested plex mode not supported by printer */
+  NS_ERROR_GFX_PRINTER_PLEX_NOT_SUPPORTED         = FAILURE(30),
+  /* The document is still being loaded */
+  NS_ERROR_GFX_PRINTER_DOC_IS_BUSY                = FAILURE(31),
+  /* Printing is not implemented */
+  NS_ERROR_GFX_PRINTING_NOT_IMPLEMENTED           = FAILURE(32),
+  /* Cannot load the matching print module */
+  NS_ERROR_GFX_COULD_NOT_LOAD_PRINT_MODULE        = FAILURE(33),
+  /* requested resolution/quality mode not supported by printer */
+  NS_ERROR_GFX_PRINTER_RESOLUTION_NOT_SUPPORTED   = FAILURE(34),
+  /* Font cmap is strangely structured - avoid this font! */
+  NS_ERROR_GFX_CMAP_MALFORMED                     = FAILURE(51),
+#undef MODULE
+
+
+  /* ======================================================================= */
+  /* 4: NS_ERROR_MODULE_WIDGET */
+  /* ======================================================================= */
+#define MODULE NS_ERROR_MODULE_WIDGET
+  /* nsIWidget::OnIMEFocusChange should be called during blur, but other
+   * OnIME*Change methods should not be called */
+  NS_SUCCESS_IME_NO_UPDATES = SUCCESS(1),
+#undef MODULE
+
+
+  /* ======================================================================= */
+  /* 6: NS_ERROR_MODULE_NETWORK */
+  /* ======================================================================= */
+#define MODULE NS_ERROR_MODULE_NETWORK
+  /* General async request error codes:
+   *
+   * These error codes are commonly passed through callback methods to indicate
+   * the status of some requested async request.
+   *
+   * For example, see nsIRequestObserver::onStopRequest.
+   */
+
+  /* The async request completed successfully. */
+  NS_BINDING_SUCCEEDED = NS_OK,
+
+  /* The async request failed for some unknown reason.  */
+  NS_BINDING_FAILED     = FAILURE(1),
+  /* The async request failed because it was aborted by some user action. */
+  NS_BINDING_ABORTED    = FAILURE(2),
+  /* The async request has been "redirected" to a different async request.
+   * (e.g., an HTTP redirect occurred).
+   *
+   * This error code is used with load groups to notify the load group observer
+   * when a request in the load group is redirected to another request. */
+  NS_BINDING_REDIRECTED = FAILURE(3),
+  /* The async request has been "retargeted" to a different "handler."
+   *
+   * This error code is used with load groups to notify the load group observer
+   * when a request in the load group is removed from the load group and added
+   * to a different load group. */
+  NS_BINDING_RETARGETED = FAILURE(4),
+
+  /* Miscellaneous error codes: These errors are not typically passed via
+   * onStopRequest. */
+
+  /* The URI is malformed. */
+  NS_ERROR_MALFORMED_URI                      = FAILURE(10),
+  /* The requested action could not be completed while the object is busy.
+   * Implementations of nsIChannel::asyncOpen will commonly return this error
+   * if the channel has already been opened (and has not yet been closed). */
+  NS_ERROR_IN_PROGRESS                        = FAILURE(15),
+  /* Returned from nsIChannel::asyncOpen to indicate that OnDataAvailable will
+   * not be called because there is no content available.  This is used by
+   * helper app style protocols (e.g., mailto).  XXX perhaps this should be a
+   * success code. */
+  NS_ERROR_NO_CONTENT                         = FAILURE(17),
+  /* The URI scheme corresponds to an unknown protocol handler. */
+  NS_ERROR_UNKNOWN_PROTOCOL                   = FAILURE(18),
+  /* The content encoding of the source document was incorrect, for example
+   * returning a plain HTML document advertised as Content-Encoding: gzip */
+  NS_ERROR_INVALID_CONTENT_ENCODING           = FAILURE(27),
+  /* A transport level corruption was found in the source document. for example
+   * a document with a calculated checksum that does not match the Content-MD5
+   * http header. */
+  NS_ERROR_CORRUPTED_CONTENT                  = FAILURE(29),
+  /* While parsing for the first component of a header field using syntax as in
+   * Content-Disposition or Content-Type, the first component was found to be
+   * empty, such as in: Content-Disposition: ; filename=foo */
+  NS_ERROR_FIRST_HEADER_FIELD_COMPONENT_EMPTY = FAILURE(34),
+  /* Returned from nsIChannel::asyncOpen when trying to open the channel again
+   * (reopening is not supported). */
+  NS_ERROR_ALREADY_OPENED                     = FAILURE(73),
+
+  /* Connectivity error codes: */
+
+  /* The connection is already established.  XXX unused - consider removing. */
+  NS_ERROR_ALREADY_CONNECTED        = FAILURE(11),
+  /* The connection does not exist.  XXX unused - consider removing. */
+  NS_ERROR_NOT_CONNECTED            = FAILURE(12),
+  /* The connection attempt failed, for example, because no server was
+   * listening at specified host:port. */
+  NS_ERROR_CONNECTION_REFUSED       = FAILURE(13),
+  /* The connection was lost due to a timeout error.  */
+  NS_ERROR_NET_TIMEOUT              = FAILURE(14),
+  /* The requested action could not be completed while the networking library
+   * is in the offline state. */
+  NS_ERROR_OFFLINE                  = FAILURE(16),
+  /* The requested action was prohibited because it would have caused the
+   * networking library to establish a connection to an unsafe or otherwise
+   * banned port. */
+  NS_ERROR_PORT_ACCESS_NOT_ALLOWED  = FAILURE(19),
+  /* The connection was established, but no data was ever received. */
+  NS_ERROR_NET_RESET                = FAILURE(20),
+  /* The connection was established, but the data transfer was interrupted. */
+  NS_ERROR_NET_INTERRUPT            = FAILURE(71),
+  /* The connection attempt to a proxy failed. */
+  NS_ERROR_PROXY_CONNECTION_REFUSED = FAILURE(72),
+
+  /* XXX really need to better rationalize these error codes.  are consumers of
+   * necko really expected to know how to discern the meaning of these?? */
+  /* This request is not resumable, but it was tried to resume it, or to
+   * request resume-specific data. */
+  NS_ERROR_NOT_RESUMABLE       = FAILURE(25),
+  /* The request failed as a result of a detected redirection loop.  */
+  NS_ERROR_REDIRECT_LOOP       = FAILURE(31),
+  /* It was attempted to resume the request, but the entity has changed in the
+   * meantime. */
+  NS_ERROR_ENTITY_CHANGED      = FAILURE(32),
+  /* The request failed because the content type returned by the server was not
+   * a type expected by the channel (for nested channels such as the JAR
+   * channel). */
+  NS_ERROR_UNSAFE_CONTENT_TYPE = FAILURE(74),
+  /* The request failed because the user tried to access to a remote XUL
+   * document from a website that is not in its white-list. */
+  NS_ERROR_REMOTE_XUL          = FAILURE(75),
+
+
+  /* FTP specific error codes: */
+
+  NS_ERROR_FTP_LOGIN = FAILURE(21),
+  NS_ERROR_FTP_CWD   = FAILURE(22),
+  NS_ERROR_FTP_PASV  = FAILURE(23),
+  NS_ERROR_FTP_PWD   = FAILURE(24),
+  NS_ERROR_FTP_LIST  = FAILURE(28),
+
+  /* DNS specific error codes: */
+
+  /* The lookup of a hostname failed.  This generally refers to the hostname
+   * from the URL being loaded. */
+  NS_ERROR_UNKNOWN_HOST          = FAILURE(30),
+  /* A low or medium priority DNS lookup failed because the pending queue was
+   * already full. High priorty (the default) always makes room */
+  NS_ERROR_DNS_LOOKUP_QUEUE_FULL = FAILURE(33),
+  /* The lookup of a proxy hostname failed.  If a channel is configured to
+   * speak to a proxy server, then it will generate this error if the proxy
+   * hostname cannot be resolved. */
+  NS_ERROR_UNKNOWN_PROXY_HOST    = FAILURE(42),
+
+
+  /* Socket specific error codes: */
+
+  /* The specified socket type does not exist. */
+  NS_ERROR_UNKNOWN_SOCKET_TYPE  = FAILURE(51),
+  /* The specified socket type could not be created. */
+  NS_ERROR_SOCKET_CREATE_FAILED = FAILURE(52),
+
+
+  /* Cache specific error codes: */
+  NS_ERROR_CACHE_KEY_NOT_FOUND       = FAILURE(61),
+  NS_ERROR_CACHE_DATA_IS_STREAM      = FAILURE(62),
+  NS_ERROR_CACHE_DATA_IS_NOT_STREAM  = FAILURE(63),
+  NS_ERROR_CACHE_WAIT_FOR_VALIDATION = FAILURE(64),
+  NS_ERROR_CACHE_ENTRY_DOOMED        = FAILURE(65),
+  NS_ERROR_CACHE_READ_ACCESS_DENIED  = FAILURE(66),
+  NS_ERROR_CACHE_WRITE_ACCESS_DENIED = FAILURE(67),
+  NS_ERROR_CACHE_IN_USE              = FAILURE(68),
+  /* Error passed through onStopRequest if the document could not be fetched
+   * from the cache. */
+  NS_ERROR_DOCUMENT_NOT_CACHED       = FAILURE(70),
+
+  /* Effective TLD Service specific error codes: */
+
+  /* The requested number of domain levels exceeds those present in the host
+   * string. */
+  NS_ERROR_INSUFFICIENT_DOMAIN_LEVELS = FAILURE(80),
+  /* The host string is an IP address. */
+  NS_ERROR_HOST_IS_IP_ADDRESS         = FAILURE(81),
+
+
+  /* StreamLoader specific result codes: */
+
+  /* Result code returned by nsIStreamLoaderObserver to indicate that the
+   * observer is taking over responsibility for the data buffer, and the loader
+   * should NOT free it. */
+  NS_SUCCESS_ADOPTED_DATA = SUCCESS(90),
+
+  /* FTP */
+  NS_NET_STATUS_BEGIN_FTP_TRANSACTION = SUCCESS(27),
+  NS_NET_STATUS_END_FTP_TRANSACTION   = SUCCESS(28),
+
+  /* This success code may be returned by nsIAuthModule::getNextToken to
+   * indicate that the authentication is finished and thus there's no need
+   * to call getNextToken again. */
+  NS_SUCCESS_AUTH_FINISHED = SUCCESS(40),
+
+  /* These are really not "results", they're statuses, used by nsITransport and
+   * friends.  This is abuse of nsresult, but we'll put up with it for now. */
+  /* nsITransport */
+  NS_NET_STATUS_READING = FAILURE(8),
+  NS_NET_STATUS_WRITING = FAILURE(9),
+
+  /* nsISocketTransport */
+  NS_NET_STATUS_RESOLVING_HOST = FAILURE(3),
+  NS_NET_STATUS_RESOLVED_HOST  = FAILURE(11),
+  NS_NET_STATUS_CONNECTING_TO  = FAILURE(7),
+  NS_NET_STATUS_CONNECTED_TO   = FAILURE(4),
+  NS_NET_STATUS_SENDING_TO     = FAILURE(5),
+  NS_NET_STATUS_WAITING_FOR    = FAILURE(10),
+  NS_NET_STATUS_RECEIVING_FROM = FAILURE(6),
+#undef MODULE
+
+
+  /* ======================================================================= */
+  /* 7: NS_ERROR_MODULE_PLUGINS */
+  /* ======================================================================= */
+#define MODULE NS_ERROR_MODULE_PLUGINS
+  NS_ERROR_PLUGINS_PLUGINSNOTCHANGED       = FAILURE(1000),
+  NS_ERROR_PLUGIN_DISABLED                 = FAILURE(1001),
+  NS_ERROR_PLUGIN_BLOCKLISTED              = FAILURE(1002),
+  NS_ERROR_PLUGIN_TIME_RANGE_NOT_SUPPORTED = FAILURE(1003),
+  NS_ERROR_PLUGIN_CLICKTOPLAY              = FAILURE(1004),
+#undef MODULE
+
+
+  /* ======================================================================= */
+  /* 8: NS_ERROR_MODULE_LAYOUT */
+  /* ======================================================================= */
+#define MODULE NS_ERROR_MODULE_LAYOUT
+  /* Return code for nsITableLayout */
+  NS_TABLELAYOUT_CELL_NOT_FOUND = SUCCESS(0),
+  /* Return code for nsFrame::GetNextPrevLineFromeBlockFrame */
+  NS_POSITION_BEFORE_TABLE      = SUCCESS(3),
+  /** Return codes for nsPresState::GetProperty() */
+  /* Returned if the property exists */
+  NS_STATE_PROPERTY_EXISTS      = NS_OK,
+  /* Returned if the property does not exist */
+  NS_STATE_PROPERTY_NOT_THERE   = SUCCESS(5),
+#undef MODULE
+
+
+  /* ======================================================================= */
+  /* 9: NS_ERROR_MODULE_HTMLPARSER */
+  /* ======================================================================= */
+#define MODULE NS_ERROR_MODULE_HTMLPARSER
+  NS_ERROR_HTMLPARSER_CONTINUE = NS_OK,
+
+  NS_ERROR_HTMLPARSER_EOF                       = FAILURE(1000),
+  NS_ERROR_HTMLPARSER_UNKNOWN                   = FAILURE(1001),
+  NS_ERROR_HTMLPARSER_CANTPROPAGATE             = FAILURE(1002),
+  NS_ERROR_HTMLPARSER_CONTEXTMISMATCH           = FAILURE(1003),
+  NS_ERROR_HTMLPARSER_BADFILENAME               = FAILURE(1004),
+  NS_ERROR_HTMLPARSER_BADURL                    = FAILURE(1005),
+  NS_ERROR_HTMLPARSER_INVALIDPARSERCONTEXT      = FAILURE(1006),
+  NS_ERROR_HTMLPARSER_INTERRUPTED               = FAILURE(1007),
+  NS_ERROR_HTMLPARSER_BLOCK                     = FAILURE(1008),
+  NS_ERROR_HTMLPARSER_BADTOKENIZER              = FAILURE(1009),
+  NS_ERROR_HTMLPARSER_BADATTRIBUTE              = FAILURE(1010),
+  NS_ERROR_HTMLPARSER_UNRESOLVEDDTD             = FAILURE(1011),
+  NS_ERROR_HTMLPARSER_MISPLACEDTABLECONTENT     = FAILURE(1012),
+  NS_ERROR_HTMLPARSER_BADDTD                    = FAILURE(1013),
+  NS_ERROR_HTMLPARSER_BADCONTEXT                = FAILURE(1014),
+  NS_ERROR_HTMLPARSER_STOPPARSING               = FAILURE(1015),
+  NS_ERROR_HTMLPARSER_UNTERMINATEDSTRINGLITERAL = FAILURE(1016),
+  NS_ERROR_HTMLPARSER_HIERARCHYTOODEEP          = FAILURE(1017),
+  NS_ERROR_HTMLPARSER_FAKE_ENDTAG               = FAILURE(1018),
+  NS_ERROR_HTMLPARSER_INVALID_COMMENT           = FAILURE(1019),
+
+  NS_HTMLTOKENS_NOT_AN_ENTITY      = SUCCESS(2000),
+  NS_HTMLPARSER_VALID_META_CHARSET = SUCCESS(3000),
+#undef MODULE
+
+
+  /* ======================================================================= */
+  /* 10: NS_ERROR_MODULE_RDF */
+  /* ======================================================================= */
+#define MODULE NS_ERROR_MODULE_RDF
+  /* Returned from nsIRDFDataSource::Assert() and Unassert() if the assertion
+   * (or unassertion was accepted by the datasource */
+  NS_RDF_ASSERTION_ACCEPTED = NS_OK,
+  /* Returned from nsIRDFCursor::Advance() if the cursor has no more
+   * elements to enumerate */
+  NS_RDF_CURSOR_EMPTY       = SUCCESS(1),
+  /* Returned from nsIRDFDataSource::GetSource() and GetTarget() if the
+   * source/target has no value */
+  NS_RDF_NO_VALUE           = SUCCESS(2),
+  /* Returned from nsIRDFDataSource::Assert() and Unassert() if the assertion
+   * (or unassertion) was rejected by the datasource; i.e., the datasource was
+   * not willing to record the statement. */
+  NS_RDF_ASSERTION_REJECTED = SUCCESS(3),
+  /* Return this from rdfITripleVisitor to stop cycling */
+  NS_RDF_STOP_VISIT         = SUCCESS(4),
+#undef MODULE
+
+
+  /* ======================================================================= */
+  /* 11: NS_ERROR_MODULE_UCONV */
+  /* ======================================================================= */
+#define MODULE NS_ERROR_MODULE_UCONV
+  NS_ERROR_UCONV_NOCONV      = FAILURE(1),
+  NS_ERROR_UDEC_ILLEGALINPUT = FAILURE(14),
+
+  NS_SUCCESS_USING_FALLBACK_LOCALE = SUCCESS(2),
+  NS_OK_UDEC_EXACTLENGTH           = SUCCESS(11),
+  NS_OK_UDEC_MOREINPUT             = SUCCESS(12),
+  NS_OK_UDEC_MOREOUTPUT            = SUCCESS(13),
+  NS_OK_UDEC_NOBOMFOUND            = SUCCESS(14),
+  NS_OK_UENC_EXACTLENGTH           = SUCCESS(33),
+  NS_OK_UENC_MOREOUTPUT            = SUCCESS(34),
+  NS_ERROR_UENC_NOMAPPING          = SUCCESS(35),
+  NS_OK_UENC_MOREINPUT             = SUCCESS(36),
+
+  /* BEGIN DEPRECATED */
+  NS_EXACT_LENGTH        = NS_OK_UDEC_EXACTLENGTH,
+  NS_PARTIAL_MORE_INPUT  = NS_OK_UDEC_MOREINPUT,
+  NS_PARTIAL_MORE_OUTPUT = NS_OK_UDEC_MOREOUTPUT,
+  NS_ERROR_ILLEGAL_INPUT = NS_ERROR_UDEC_ILLEGALINPUT,
+  /* END DEPRECATED */
+#undef MODULE
+
+
+  /* ======================================================================= */
+  /* 13: NS_ERROR_MODULE_FILES */
+  /* ======================================================================= */
+#define MODULE NS_ERROR_MODULE_FILES
+  NS_ERROR_FILE_UNRECOGNIZED_PATH     = FAILURE(1),
+  NS_ERROR_FILE_UNRESOLVABLE_SYMLINK  = FAILURE(2),
+  NS_ERROR_FILE_EXECUTION_FAILED      = FAILURE(3),
+  NS_ERROR_FILE_UNKNOWN_TYPE          = FAILURE(4),
+  NS_ERROR_FILE_DESTINATION_NOT_DIR   = FAILURE(5),
+  NS_ERROR_FILE_TARGET_DOES_NOT_EXIST = FAILURE(6),
+  NS_ERROR_FILE_COPY_OR_MOVE_FAILED   = FAILURE(7),
+  NS_ERROR_FILE_ALREADY_EXISTS        = FAILURE(8),
+  NS_ERROR_FILE_INVALID_PATH          = FAILURE(9),
+  NS_ERROR_FILE_DISK_FULL             = FAILURE(10),
+  NS_ERROR_FILE_CORRUPTED             = FAILURE(11),
+  NS_ERROR_FILE_NOT_DIRECTORY         = FAILURE(12),
+  NS_ERROR_FILE_IS_DIRECTORY          = FAILURE(13),
+  NS_ERROR_FILE_IS_LOCKED             = FAILURE(14),
+  NS_ERROR_FILE_TOO_BIG               = FAILURE(15),
+  NS_ERROR_FILE_NO_DEVICE_SPACE       = FAILURE(16),
+  NS_ERROR_FILE_NAME_TOO_LONG         = FAILURE(17),
+  NS_ERROR_FILE_NOT_FOUND             = FAILURE(18),
+  NS_ERROR_FILE_READ_ONLY             = FAILURE(19),
+  NS_ERROR_FILE_DIR_NOT_EMPTY         = FAILURE(20),
+  NS_ERROR_FILE_ACCESS_DENIED         = FAILURE(21),
+
+  NS_SUCCESS_FILE_DIRECTORY_EMPTY = SUCCESS(1),
+  /* Result codes used by nsIDirectoryServiceProvider2 */
+  NS_SUCCESS_AGGREGATE_RESULT     = SUCCESS(2),
+#undef MODULE
+
+
+  /* ======================================================================= */
+  /* 14: NS_ERROR_MODULE_DOM */
+  /* ======================================================================= */
+#define MODULE NS_ERROR_MODULE_DOM
+  /* XXX If you add a new DOM error code, also add an error string to
+   * dom/src/base/domerr.msg */
+
+  /* Standard DOM error codes: http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html */
+  NS_ERROR_DOM_INDEX_SIZE_ERR              = FAILURE(1),
+  NS_ERROR_DOM_HIERARCHY_REQUEST_ERR       = FAILURE(3),
+  NS_ERROR_DOM_WRONG_DOCUMENT_ERR          = FAILURE(4),
+  NS_ERROR_DOM_INVALID_CHARACTER_ERR       = FAILURE(5),
+  NS_ERROR_DOM_NO_MODIFICATION_ALLOWED_ERR = FAILURE(7),
+  NS_ERROR_DOM_NOT_FOUND_ERR               = FAILURE(8),
+  NS_ERROR_DOM_NOT_SUPPORTED_ERR           = FAILURE(9),
+  NS_ERROR_DOM_INUSE_ATTRIBUTE_ERR         = FAILURE(10),
+  NS_ERROR_DOM_INVALID_STATE_ERR           = FAILURE(11),
+  NS_ERROR_DOM_SYNTAX_ERR                  = FAILURE(12),
+  NS_ERROR_DOM_INVALID_MODIFICATION_ERR    = FAILURE(13),
+  NS_ERROR_DOM_NAMESPACE_ERR               = FAILURE(14),
+  NS_ERROR_DOM_INVALID_ACCESS_ERR          = FAILURE(15),
+  NS_ERROR_DOM_TYPE_MISMATCH_ERR           = FAILURE(17),
+  NS_ERROR_DOM_SECURITY_ERR                = FAILURE(18),
+  NS_ERROR_DOM_NETWORK_ERR                 = FAILURE(19),
+  NS_ERROR_DOM_ABORT_ERR                   = FAILURE(20),
+  NS_ERROR_DOM_URL_MISMATCH_ERR            = FAILURE(21),
+  NS_ERROR_DOM_QUOTA_EXCEEDED_ERR          = FAILURE(22),
+  NS_ERROR_DOM_TIMEOUT_ERR                 = FAILURE(23),
+  NS_ERROR_DOM_INVALID_NODE_TYPE_ERR       = FAILURE(24),
+  NS_ERROR_DOM_DATA_CLONE_ERR              = FAILURE(25),
+  /* XXX Should be JavaScript native errors */
+  NS_ERROR_TYPE_ERR                        = FAILURE(26),
+  NS_ERROR_RANGE_ERR                       = FAILURE(27),
+  /* DOM error codes defined by us */
+  NS_ERROR_DOM_SECMAN_ERR                  = FAILURE(1001),
+  NS_ERROR_DOM_WRONG_TYPE_ERR              = FAILURE(1002),
+  NS_ERROR_DOM_NOT_OBJECT_ERR              = FAILURE(1003),
+  NS_ERROR_DOM_NOT_XPC_OBJECT_ERR          = FAILURE(1004),
+  NS_ERROR_DOM_NOT_NUMBER_ERR              = FAILURE(1005),
+  NS_ERROR_DOM_NOT_BOOLEAN_ERR             = FAILURE(1006),
+  NS_ERROR_DOM_NOT_FUNCTION_ERR            = FAILURE(1007),
+  NS_ERROR_DOM_TOO_FEW_PARAMETERS_ERR      = FAILURE(1008),
+  NS_ERROR_DOM_BAD_DOCUMENT_DOMAIN         = FAILURE(1009),
+  NS_ERROR_DOM_PROP_ACCESS_DENIED          = FAILURE(1010),
+  NS_ERROR_DOM_XPCONNECT_ACCESS_DENIED     = FAILURE(1011),
+  NS_ERROR_DOM_BAD_URI                     = FAILURE(1012),
+  NS_ERROR_DOM_RETVAL_UNDEFINED            = FAILURE(1013),
+  NS_ERROR_DOM_QUOTA_REACHED               = FAILURE(1014),
+#undef MODULE
+
+
+  /* ======================================================================= */
+  /* 15: NS_ERROR_MODULE_IMGLIB */
+  /* ======================================================================= */
+#define MODULE NS_ERROR_MODULE_IMGLIB
+  NS_IMAGELIB_SUCCESS_LOAD_FINISHED = SUCCESS(0),
+  NS_IMAGELIB_CHANGING_OWNER        = SUCCESS(1),
+
+  NS_IMAGELIB_ERROR_FAILURE      = FAILURE(5),
+  NS_IMAGELIB_ERROR_NO_DECODER   = FAILURE(6),
+  NS_IMAGELIB_ERROR_NOT_FINISHED = FAILURE(7),
+  NS_IMAGELIB_ERROR_NO_ENCODER   = FAILURE(9),
+#undef MODULE
+
+
+  /* ======================================================================= */
+  /* 17: NS_ERROR_MODULE_EDITOR */
+  /* ======================================================================= */
+#define MODULE NS_ERROR_MODULE_EDITOR
+  NS_ERROR_EDITOR_NO_SELECTION = FAILURE(1),
+  NS_ERROR_EDITOR_NO_TEXTNODE  = FAILURE(2),
+  NS_FOUND_TARGET              = FAILURE(3),
+
+  NS_EDITOR_ELEMENT_NOT_FOUND  = SUCCESS(1),
+#undef MODULE
+
+
+  /* ======================================================================= */
+  /* 18: NS_ERROR_MODULE_XPCONNECT */
+  /* ======================================================================= */
+#define MODULE NS_ERROR_MODULE_XPCONNECT
+  NS_ERROR_XPC_NOT_ENOUGH_ARGS                 = FAILURE(1),
+  NS_ERROR_XPC_NEED_OUT_OBJECT                 = FAILURE(2),
+  NS_ERROR_XPC_CANT_SET_OUT_VAL                = FAILURE(3),
+  NS_ERROR_XPC_NATIVE_RETURNED_FAILURE         = FAILURE(4),
+  NS_ERROR_XPC_CANT_GET_INTERFACE_INFO         = FAILURE(5),
+  NS_ERROR_XPC_CANT_GET_PARAM_IFACE_INFO       = FAILURE(6),
+  NS_ERROR_XPC_CANT_GET_METHOD_INFO            = FAILURE(7),
+  NS_ERROR_XPC_UNEXPECTED                      = FAILURE(8),
+  NS_ERROR_XPC_BAD_CONVERT_JS                  = FAILURE(9),
+  NS_ERROR_XPC_BAD_CONVERT_NATIVE              = FAILURE(10),
+  NS_ERROR_XPC_BAD_CONVERT_JS_NULL_REF         = FAILURE(11),
+  NS_ERROR_XPC_BAD_OP_ON_WN_PROTO              = FAILURE(12),
+  NS_ERROR_XPC_CANT_CONVERT_WN_TO_FUN          = FAILURE(13),
+  NS_ERROR_XPC_CANT_DEFINE_PROP_ON_WN          = FAILURE(14),
+  NS_ERROR_XPC_CANT_WATCH_WN_STATIC            = FAILURE(15),
+  NS_ERROR_XPC_CANT_EXPORT_WN_STATIC           = FAILURE(16),
+  NS_ERROR_XPC_SCRIPTABLE_CALL_FAILED          = FAILURE(17),
+  NS_ERROR_XPC_SCRIPTABLE_CTOR_FAILED          = FAILURE(18),
+  NS_ERROR_XPC_CANT_CALL_WO_SCRIPTABLE         = FAILURE(19),
+  NS_ERROR_XPC_CANT_CTOR_WO_SCRIPTABLE         = FAILURE(20),
+  NS_ERROR_XPC_CI_RETURNED_FAILURE             = FAILURE(21),
+  NS_ERROR_XPC_GS_RETURNED_FAILURE             = FAILURE(22),
+  NS_ERROR_XPC_BAD_CID                         = FAILURE(23),
+  NS_ERROR_XPC_BAD_IID                         = FAILURE(24),
+  NS_ERROR_XPC_CANT_CREATE_WN                  = FAILURE(25),
+  NS_ERROR_XPC_JS_THREW_EXCEPTION              = FAILURE(26),
+  NS_ERROR_XPC_JS_THREW_NATIVE_OBJECT          = FAILURE(27),
+  NS_ERROR_XPC_JS_THREW_JS_OBJECT              = FAILURE(28),
+  NS_ERROR_XPC_JS_THREW_NULL                   = FAILURE(29),
+  NS_ERROR_XPC_JS_THREW_STRING                 = FAILURE(30),
+  NS_ERROR_XPC_JS_THREW_NUMBER                 = FAILURE(31),
+  NS_ERROR_XPC_JAVASCRIPT_ERROR                = FAILURE(32),
+  NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS   = FAILURE(33),
+  NS_ERROR_XPC_CANT_CONVERT_PRIMITIVE_TO_ARRAY = FAILURE(34),
+  NS_ERROR_XPC_CANT_CONVERT_OBJECT_TO_ARRAY    = FAILURE(35),
+  NS_ERROR_XPC_NOT_ENOUGH_ELEMENTS_IN_ARRAY    = FAILURE(36),
+  NS_ERROR_XPC_CANT_GET_ARRAY_INFO             = FAILURE(37),
+  NS_ERROR_XPC_NOT_ENOUGH_CHARS_IN_STRING      = FAILURE(38),
+  NS_ERROR_XPC_SECURITY_MANAGER_VETO           = FAILURE(39),
+  NS_ERROR_XPC_INTERFACE_NOT_SCRIPTABLE        = FAILURE(40),
+  NS_ERROR_XPC_INTERFACE_NOT_FROM_NSISUPPORTS  = FAILURE(41),
+  NS_ERROR_XPC_CANT_GET_JSOBJECT_OF_DOM_OBJECT = FAILURE(42),
+  NS_ERROR_XPC_CANT_SET_READ_ONLY_CONSTANT     = FAILURE(43),
+  NS_ERROR_XPC_CANT_SET_READ_ONLY_ATTRIBUTE    = FAILURE(44),
+  NS_ERROR_XPC_CANT_SET_READ_ONLY_METHOD       = FAILURE(45),
+  NS_ERROR_XPC_CANT_ADD_PROP_TO_WRAPPED_NATIVE = FAILURE(46),
+  NS_ERROR_XPC_CALL_TO_SCRIPTABLE_FAILED       = FAILURE(47),
+  NS_ERROR_XPC_JSOBJECT_HAS_NO_FUNCTION_NAMED  = FAILURE(48),
+  NS_ERROR_XPC_BAD_ID_STRING                   = FAILURE(49),
+  NS_ERROR_XPC_BAD_INITIALIZER_NAME            = FAILURE(50),
+  NS_ERROR_XPC_HAS_BEEN_SHUTDOWN               = FAILURE(51),
+  NS_ERROR_XPC_CANT_MODIFY_PROP_ON_WN          = FAILURE(52),
+  NS_ERROR_XPC_BAD_CONVERT_JS_ZERO_ISNOT_NULL  = FAILURE(53),
+  /* any new errors here should have an associated entry added in xpc.msg */
+
+  NS_SUCCESS_I_DID_SOMETHING     = SUCCESS(1),
+  /* Classes that want to only be touched by chrome (or from code whose
+   * filename begins with chrome://global/) shoudl return this from their
+   * scriptable helper's PreCreate hook. */
+  NS_SUCCESS_CHROME_ACCESS_ONLY  = SUCCESS(2),
+  /* Classes that want slim wrappers should return
+   * NS_SUCCESS_ALLOW_SLIM_WRAPPERS from their scriptable helper's PreCreate
+   * hook. They must also force a parent for their wrapper (from the PreCreate
+   * hook), they must implement nsWrapperCache and their scriptable helper must
+   * implement nsXPCClassInfo and must return DONT_ASK_INSTANCE_FOR_SCRIPTABLE
+   * in the flags. */
+  NS_SUCCESS_ALLOW_SLIM_WRAPPERS = SUCCESS(3),
+#undef MODULE
+
+
+  /* ======================================================================= */
+  /* 19: NS_ERROR_MODULE_PROFILE */
+  /* ======================================================================= */
+#define MODULE NS_ERROR_MODULE_PROFILE
+  NS_ERROR_LAUNCHED_CHILD_PROCESS = FAILURE(200),
+#undef MODULE
+
+
+  /* ======================================================================= */
+  /* 21: NS_ERROR_MODULE_SECURITY */
+  /* ======================================================================= */
+#define MODULE NS_ERROR_MODULE_SECURITY
+  /* Error code for CSP */
+  NS_ERROR_CSP_FRAME_ANCESTOR_VIOLATION    = FAILURE(99),
+
+  /* CMS specific nsresult error codes.  Note: the numbers used here correspond
+   * to the values in nsICMSMessageErrors.idl. */
+  NS_ERROR_CMS_VERIFY_NOT_SIGNED           = FAILURE(1024),
+  NS_ERROR_CMS_VERIFY_NO_CONTENT_INFO      = FAILURE(1025),
+  NS_ERROR_CMS_VERIFY_BAD_DIGEST           = FAILURE(1026),
+  NS_ERROR_CMS_VERIFY_NOCERT               = FAILURE(1028),
+  NS_ERROR_CMS_VERIFY_UNTRUSTED            = FAILURE(1029),
+  NS_ERROR_CMS_VERIFY_ERROR_UNVERIFIED     = FAILURE(1031),
+  NS_ERROR_CMS_VERIFY_ERROR_PROCESSING     = FAILURE(1032),
+  NS_ERROR_CMS_VERIFY_BAD_SIGNATURE        = FAILURE(1033),
+  NS_ERROR_CMS_VERIFY_DIGEST_MISMATCH      = FAILURE(1034),
+  NS_ERROR_CMS_VERIFY_UNKNOWN_ALGO         = FAILURE(1035),
+  NS_ERROR_CMS_VERIFY_UNSUPPORTED_ALGO     = FAILURE(1036),
+  NS_ERROR_CMS_VERIFY_MALFORMED_SIGNATURE  = FAILURE(1037),
+  NS_ERROR_CMS_VERIFY_HEADER_MISMATCH      = FAILURE(1038),
+  NS_ERROR_CMS_VERIFY_NOT_YET_ATTEMPTED    = FAILURE(1039),
+  NS_ERROR_CMS_VERIFY_CERT_WITHOUT_ADDRESS = FAILURE(1040),
+  NS_ERROR_CMS_ENCRYPT_NO_BULK_ALG         = FAILURE(1056),
+  NS_ERROR_CMS_ENCRYPT_INCOMPLETE          = FAILURE(1057),
+#undef MODULE
+
+
+  /* ======================================================================= */
+  /* 22: NS_ERROR_MODULE_DOM_XPATH */
+  /* ======================================================================= */
+#define MODULE NS_ERROR_MODULE_DOM_XPATH
+  /* DOM error codes from http://www.w3.org/TR/DOM-Level-3-XPath/ */
+  NS_ERROR_DOM_INVALID_EXPRESSION_ERR = FAILURE(51),
+  NS_ERROR_DOM_TYPE_ERR               = FAILURE(52),
+#undef MODULE
+
+
+  /* ======================================================================= */
+  /* 24: NS_ERROR_MODULE_URILOADER */
+  /* ======================================================================= */
+#define MODULE NS_ERROR_MODULE_URILOADER
+  NS_ERROR_WONT_HANDLE_CONTENT  = FAILURE(1),
+  /* The load has been cancelled because it was found on a malware or phishing
+   * blacklist. */
+  NS_ERROR_MALWARE_URI          = FAILURE(30),
+  NS_ERROR_PHISHING_URI         = FAILURE(31),
+  /* Used when "Save Link As..." doesn't see the headers quickly enough to
+   * choose a filename.  See nsContextMenu.js. */
+  NS_ERROR_SAVE_LINK_AS_TIMEOUT = FAILURE(32),
+  /* Used when the data from a channel has already been parsed and cached so it
+   * doesn't need to be reparsed from the original source. */
+  NS_ERROR_PARSED_DATA_CACHED   = FAILURE(33),
+
+  /* This success code indicates that a refresh header was found and
+   * successfully setup.  */
+  NS_REFRESHURI_HEADER_FOUND = SUCCESS(2),
+#undef MODULE
+
+
+  /* ======================================================================= */
+  /* 25: NS_ERROR_MODULE_CONTENT */
+  /* ======================================================================= */
+#define MODULE NS_ERROR_MODULE_CONTENT
+  /* Error codes for image loading */
+  NS_ERROR_IMAGE_SRC_CHANGED            = FAILURE(4),
+  NS_ERROR_IMAGE_BLOCKED                = FAILURE(5),
+  /* Error codes for content policy blocking */
+  NS_ERROR_CONTENT_BLOCKED              = FAILURE(6),
+  NS_ERROR_CONTENT_BLOCKED_SHOW_ALT     = FAILURE(7),
+  /* Success variations of content policy blocking */
+  NS_PROPTABLE_PROP_NOT_THERE           = FAILURE(10),
+  /* Error code for XBL */
+  NS_ERROR_XBL_BLOCKED                  = FAILURE(15),
+
+  /* XXX this is not really used */
+  NS_HTML_STYLE_PROPERTY_NOT_THERE  = SUCCESS(2),
+  NS_CONTENT_BLOCKED                = SUCCESS(8),
+  NS_CONTENT_BLOCKED_SHOW_ALT       = SUCCESS(9),
+  NS_PROPTABLE_PROP_OVERWRITTEN     = SUCCESS(11),
+  /* Error codes for FindBroadcaster in nsXULDocument.cpp */
+  NS_FINDBROADCASTER_NOT_FOUND      = SUCCESS(12),
+  NS_FINDBROADCASTER_FOUND          = SUCCESS(13),
+  NS_FINDBROADCASTER_AWAIT_OVERLAYS = SUCCESS(14),
+#undef MODULE
+
+
+  /* ======================================================================= */
+  /* 27: NS_ERROR_MODULE_XSLT */
+  /* ======================================================================= */
+#define MODULE NS_ERROR_MODULE_XSLT
+  NS_ERROR_XPATH_INVALID_ARG = NS_ERROR_INVALID_ARG,
+
+  NS_ERROR_XSLT_PARSE_FAILURE                 = FAILURE(1),
+  NS_ERROR_XPATH_PARSE_FAILURE                = FAILURE(2),
+  NS_ERROR_XSLT_ALREADY_SET                   = FAILURE(3),
+  NS_ERROR_XSLT_EXECUTION_FAILURE             = FAILURE(4),
+  NS_ERROR_XPATH_UNKNOWN_FUNCTION             = FAILURE(5),
+  NS_ERROR_XSLT_BAD_RECURSION                 = FAILURE(6),
+  NS_ERROR_XSLT_BAD_VALUE                     = FAILURE(7),
+  NS_ERROR_XSLT_NODESET_EXPECTED              = FAILURE(8),
+  NS_ERROR_XSLT_ABORTED                       = FAILURE(9),
+  NS_ERROR_XSLT_NETWORK_ERROR                 = FAILURE(10),
+  NS_ERROR_XSLT_WRONG_MIME_TYPE               = FAILURE(11),
+  NS_ERROR_XSLT_LOAD_RECURSION                = FAILURE(12),
+  NS_ERROR_XPATH_BAD_ARGUMENT_COUNT           = FAILURE(13),
+  NS_ERROR_XPATH_BAD_EXTENSION_FUNCTION       = FAILURE(14),
+  NS_ERROR_XPATH_PAREN_EXPECTED               = FAILURE(15),
+  NS_ERROR_XPATH_INVALID_AXIS                 = FAILURE(16),
+  NS_ERROR_XPATH_NO_NODE_TYPE_TEST            = FAILURE(17),
+  NS_ERROR_XPATH_BRACKET_EXPECTED             = FAILURE(18),
+  NS_ERROR_XPATH_INVALID_VAR_NAME             = FAILURE(19),
+  NS_ERROR_XPATH_UNEXPECTED_END               = FAILURE(20),
+  NS_ERROR_XPATH_OPERATOR_EXPECTED            = FAILURE(21),
+  NS_ERROR_XPATH_UNCLOSED_LITERAL             = FAILURE(22),
+  NS_ERROR_XPATH_BAD_COLON                    = FAILURE(23),
+  NS_ERROR_XPATH_BAD_BANG                     = FAILURE(24),
+  NS_ERROR_XPATH_ILLEGAL_CHAR                 = FAILURE(25),
+  NS_ERROR_XPATH_BINARY_EXPECTED              = FAILURE(26),
+  NS_ERROR_XSLT_LOAD_BLOCKED_ERROR            = FAILURE(27),
+  NS_ERROR_XPATH_INVALID_EXPRESSION_EVALUATED = FAILURE(28),
+  NS_ERROR_XPATH_UNBALANCED_CURLY_BRACE       = FAILURE(29),
+  NS_ERROR_XSLT_BAD_NODE_NAME                 = FAILURE(30),
+  NS_ERROR_XSLT_VAR_ALREADY_SET               = FAILURE(31),
+
+  NS_XSLT_GET_NEW_HANDLER = SUCCESS(1),
+#undef MODULE
+
+
+  /* ======================================================================= */
+  /* 29: NS_ERROR_MODULE_SVG */
+  /* ======================================================================= */
+#define MODULE NS_ERROR_MODULE_SVG
+  /* SVG DOM error codes from http://www.w3.org/TR/SVG11/svgdom.html */
+  NS_ERROR_DOM_SVG_WRONG_TYPE_ERR        = FAILURE(0),
+  /* Yes, the spec says "INVERTABLE", not "INVERTIBLE" */
+  NS_ERROR_DOM_SVG_MATRIX_NOT_INVERTABLE = FAILURE(2),
+#undef MODULE
+
+
+  /* ======================================================================= */
+  /* 30: NS_ERROR_MODULE_STORAGE */
+  /* ======================================================================= */
+#define MODULE NS_ERROR_MODULE_STORAGE
+  /* To add additional errors to Storage, please append entries to the bottom
+   * of the list in the following format:
+   *   NS_ERROR_STORAGE_YOUR_ERR = FAILURE(n)
+   * where n is the next unique positive integer.  You must also add an entry
+   * to js/xpconnect/src/xpc.msg under the code block beginning with the
+   * comment 'storage related codes (from mozStorage.h)', in the following
+   * format: 'XPC_MSG_DEF(NS_ERROR_STORAGE_YOUR_ERR, "brief description of your
+   * error")' */
+  NS_ERROR_STORAGE_BUSY       = FAILURE(1),
+  NS_ERROR_STORAGE_IOERR      = FAILURE(2),
+  NS_ERROR_STORAGE_CONSTRAINT = FAILURE(3),
+#undef MODULE
+
+
+  /* ======================================================================= */
+  /* 32: NS_ERROR_MODULE_DOM_FILE */
+  /* ======================================================================= */
+#define MODULE NS_ERROR_MODULE_DOM_FILE
+  NS_ERROR_DOM_FILE_NOT_FOUND_ERR    = FAILURE(0),
+  NS_ERROR_DOM_FILE_NOT_READABLE_ERR = FAILURE(1),
+  NS_ERROR_DOM_FILE_ABORT_ERR        = FAILURE(2),
+#undef MODULE
+
+
+  /* ======================================================================= */
+  /* 33: NS_ERROR_MODULE_DOM_INDEXEDDB */
+  /* ======================================================================= */
+#define MODULE NS_ERROR_MODULE_DOM_INDEXEDDB
+  /* IndexedDB error codes http://dvcs.w3.org/hg/IndexedDB/raw-file/tip/Overview.html */
+  NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR              = FAILURE(1),
+  NS_ERROR_DOM_INDEXEDDB_NOT_FOUND_ERR            = FAILURE(3),
+  NS_ERROR_DOM_INDEXEDDB_CONSTRAINT_ERR           = FAILURE(4),
+  NS_ERROR_DOM_INDEXEDDB_DATA_ERR                 = FAILURE(5),
+  NS_ERROR_DOM_INDEXEDDB_NOT_ALLOWED_ERR          = FAILURE(6),
+  NS_ERROR_DOM_INDEXEDDB_TRANSACTION_INACTIVE_ERR = FAILURE(7),
+  NS_ERROR_DOM_INDEXEDDB_ABORT_ERR                = FAILURE(8),
+  NS_ERROR_DOM_INDEXEDDB_READ_ONLY_ERR            = FAILURE(9),
+  NS_ERROR_DOM_INDEXEDDB_TIMEOUT_ERR              = FAILURE(10),
+  NS_ERROR_DOM_INDEXEDDB_QUOTA_ERR                = FAILURE(11),
+  NS_ERROR_DOM_INDEXEDDB_VERSION_ERR              = FAILURE(12),
+  NS_ERROR_DOM_INDEXEDDB_RECOVERABLE_ERR          = FAILURE(1001),
+#undef MODULE
+
+
+  /* ======================================================================= */
+  /* 34: NS_ERROR_MODULE_DOM_FILEHANDLE */
+  /* ======================================================================= */
+#define MODULE NS_ERROR_MODULE_DOM_FILEHANDLE
+  NS_ERROR_DOM_FILEHANDLE_UNKNOWN_ERR             = FAILURE(1),
+  NS_ERROR_DOM_FILEHANDLE_NOT_ALLOWED_ERR         = FAILURE(2),
+  NS_ERROR_DOM_FILEHANDLE_LOCKEDFILE_INACTIVE_ERR = FAILURE(3),
+  NS_ERROR_DOM_FILEHANDLE_ABORT_ERR               = FAILURE(4),
+  NS_ERROR_DOM_FILEHANDLE_READ_ONLY_ERR           = FAILURE(5),
+#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. */
+  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
+   * 206. */
+  NS_ERROR_DOWNLOAD_NOT_PARTIAL  = FAILURE(2),
+  NS_ERROR_UNORM_MOREOUTPUT      = FAILURE(33),
+
+  NS_ERROR_DOCSHELL_REQUEST_REJECTED = FAILURE(1001),
+  /* This is needed for displaying an error message when navigation is
+   * attempted on a document when printing The value arbitrary as long as it
+   * doesn't conflict with any of the other values in the errors in
+   * DisplayLoadError */
+  NS_ERROR_DOCUMENT_IS_PRINTMODE = FAILURE(2001),
+
+  NS_SUCCESS_DONT_FIXUP          = SUCCESS(1),
+  /* This success code may be returned by nsIAppStartup::Run to indicate that
+   * the application should be restarted.  This condition corresponds to the
+   * case in which nsIAppStartup::Quit was called with the eRestart flag. */
+  NS_SUCCESS_RESTART_APP         = SUCCESS(1),
+  NS_SUCCESS_UNORM_NOTFOUND = SUCCESS(17),
+
+
+  /* a11y */
+  /* raised when current pivot's position is needed but it's not in the tree */
+  NS_ERROR_NOT_IN_TREE = FAILURE(38),
+
+  /* see Accessible::GetAttrValue */
+  NS_OK_NO_ARIA_VALUE          = SUCCESS(33),
+  NS_OK_DEFUNCT_OBJECT         = SUCCESS(34),
+  /* see Accessible::GetNameInternal */
+  NS_OK_EMPTY_NAME             = SUCCESS(35),
+  NS_OK_NO_NAME_CLAUSE_HANDLED = SUCCESS(36),
+  /* see Accessible::GetNameInternal */
+  NS_OK_NAME_FROM_TOOLTIP      = SUCCESS(37)
+#undef MODULE
+} nsresult;
+
+#undef SUCCESS_OR_FAILURE
+#undef SUCCESS
+#undef FAILURE
+
+/**
  * @name Standard Error Handling Macros
  * @return 0 or 1
  */
 
 #ifdef __cplusplus
 inline int NS_FAILED(nsresult _nsresult) {
   return   _nsresult & 0x80000000;
 }
@@ -91,1303 +1044,30 @@ inline int NS_SUCCEEDED(nsresult _nsresu
   return !(_nsresult & 0x80000000);
 }
 #else
 #define NS_FAILED(_nsresult)    (NS_UNLIKELY((_nsresult) & 0x80000000))
 #define NS_SUCCEEDED(_nsresult) (NS_LIKELY(!((_nsresult) & 0x80000000)))
 #endif
 
 /**
- * @name Severity Code.  This flag identifies the level of warning
- */
-
-#define NS_ERROR_SEVERITY_SUCCESS       0
-#define NS_ERROR_SEVERITY_ERROR         1
-
-/**
- * @name Mozilla Code.  This flag separates consumers of mozilla code
- *       from the native platform
- */
-
-#define NS_ERROR_MODULE_BASE_OFFSET 0x45
-
-/**
  * @name Standard Error Generating Macros
  */
 
 #define NS_ERROR_GENERATE(sev, module, code) \
     (nsresult)(((uint32_t)(sev) << 31) | \
                ((uint32_t)(module + NS_ERROR_MODULE_BASE_OFFSET) << 16) | \
                ((uint32_t)(code)))
 
 #define NS_ERROR_GENERATE_SUCCESS(module, code) \
   NS_ERROR_GENERATE(NS_ERROR_SEVERITY_SUCCESS, module, code)
 
 #define NS_ERROR_GENERATE_FAILURE(module, code) \
   NS_ERROR_GENERATE(NS_ERROR_SEVERITY_ERROR, module, code)
 
-/**
- * @name Standard Macros for retrieving error bits
- */
-
-#define NS_ERROR_GET_CODE(err)     ((err) & 0xffff)
-#define NS_ERROR_GET_MODULE(err)   ((((err) >> 16) - NS_ERROR_MODULE_BASE_OFFSET) & 0x1fff)
-#define NS_ERROR_GET_SEVERITY(err) (((err) >> 31) & 0x1)
-
-/**
- * @name Standard return values
- */
-
-/* Standard "it worked" return value */
-#define NS_OK 0
-
-/* ======================================================================= */
-/* Core errors, not part of any modules */
-/* ======================================================================= */
-#define NS_ERROR_BASE                         0xC1F30000
-/* Returned when an instance is not initialized */
-#define NS_ERROR_NOT_INITIALIZED              NS_ERROR_BASE + 1
-/* Returned when an instance is already initialized */
-#define NS_ERROR_ALREADY_INITIALIZED          NS_ERROR_BASE + 2
-/* Returned by a not implemented function */
-#define NS_ERROR_NOT_IMPLEMENTED              0x80004001
-/* Returned when a given interface is not supported. */
-#define NS_NOINTERFACE                        0x80004002
-#define NS_ERROR_NO_INTERFACE                 NS_NOINTERFACE
-#define NS_ERROR_INVALID_POINTER              0x80004003
-#define NS_ERROR_NULL_POINTER                 NS_ERROR_INVALID_POINTER
-/* Returned when a function aborts */
-#define NS_ERROR_ABORT                        0x80004004
-/* Returned when a function fails */
-#define NS_ERROR_FAILURE                      0x80004005
-/* Returned when an unexpected error occurs */
-#define NS_ERROR_UNEXPECTED                   0x8000ffff
-/* Returned when a memory allocation fails */
-#define NS_ERROR_OUT_OF_MEMORY                0x8007000e
-/* Returned when an illegal value is passed */
-#define NS_ERROR_ILLEGAL_VALUE                0x80070057
-#define NS_ERROR_INVALID_ARG                  NS_ERROR_ILLEGAL_VALUE
-/* Returned when a class doesn't allow aggregation */
-#define NS_ERROR_NO_AGGREGATION               0x80040110
-/* Returned when an operation can't complete due to an unavailable resource */
-#define NS_ERROR_NOT_AVAILABLE                0x80040111
-/* Returned when a class is not registered */
-#define NS_ERROR_FACTORY_NOT_REGISTERED       0x80040154
-/* Returned when a class cannot be registered, but may be tried again later */
-#define NS_ERROR_FACTORY_REGISTER_AGAIN       0x80040155
-/* Returned when a dynamically loaded factory couldn't be found */
-#define NS_ERROR_FACTORY_NOT_LOADED           0x800401f8
-/* Returned when a factory doesn't support signatures */
-#define NS_ERROR_FACTORY_NO_SIGNATURE_SUPPORT NS_ERROR_BASE + 0x101
-/* Returned when a factory already is registered */
-#define NS_ERROR_FACTORY_EXISTS               NS_ERROR_BASE + 0x100
-
-
-/* ======================================================================= */
-/* 1: NS_ERROR_MODULE_XPCOM */
-/* ======================================================================= */
-/* Result codes used by nsIVariant */
-#define NS_ERROR_CANNOT_CONVERT_DATA \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_XPCOM, 1)
-#define NS_ERROR_OBJECT_IS_IMMUTABLE \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_XPCOM, 2)
-#define NS_ERROR_LOSS_OF_SIGNIFICANT_DATA \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_XPCOM, 3)
-/* Result code used by nsIThreadManager */
-#define NS_ERROR_NOT_SAME_THREAD \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_XPCOM, 4)
-/* Various operations are not permitted during XPCOM shutdown and will fail
- * with this exception. */
-#define NS_ERROR_ILLEGAL_DURING_SHUTDOWN \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_XPCOM, 30)
-#define NS_ERROR_SERVICE_NOT_AVAILABLE \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_XPCOM, 22)
-
-#define NS_SUCCESS_LOSS_OF_INSIGNIFICANT_DATA \
-  NS_ERROR_GENERATE_SUCCESS(NS_ERROR_MODULE_XPCOM, 1)
-/* Used by nsCycleCollectionParticipant */
-#define NS_SUCCESS_INTERRUPTED_TRAVERSE \
-  NS_ERROR_GENERATE_SUCCESS(NS_ERROR_MODULE_XPCOM, 2)
-/* DEPRECATED */
-#define NS_ERROR_SERVICE_NOT_FOUND \
-  NS_ERROR_GENERATE_SUCCESS(NS_ERROR_MODULE_XPCOM, 22)
-/* DEPRECATED */
-#define NS_ERROR_SERVICE_IN_USE \
-  NS_ERROR_GENERATE_SUCCESS(NS_ERROR_MODULE_XPCOM, 23)
-
-
-/* ======================================================================= */
-/* 2: NS_ERROR_MODULE_BASE */
-/* ======================================================================= */
-/* I/O Errors */
-
-/*  Stream closed */
-#define NS_BASE_STREAM_CLOSED \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_BASE, 2)
-/*  Error from the operating system */
-#define NS_BASE_STREAM_OSERROR \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_BASE, 3)
-/*  Illegal arguments */
-#define NS_BASE_STREAM_ILLEGAL_ARGS \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_BASE, 4)
-/*  For unichar streams */
-#define NS_BASE_STREAM_NO_CONVERTER \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_BASE, 5)
-/*  For unichar streams */
-#define NS_BASE_STREAM_BAD_CONVERSION \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_BASE, 6)
-#define NS_BASE_STREAM_WOULD_BLOCK \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_BASE, 7)
-
-
-/* ======================================================================= */
-/* 3: NS_ERROR_MODULE_GFX */
-/* ======================================================================= */
-/* error codes for printer device contexts */
-/* Unix: print command (lp/lpr) not found */
-#define NS_ERROR_GFX_PRINTER_CMD_NOT_FOUND \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_GFX, 2)
-/* Unix: print command returned an error */
-#define NS_ERROR_GFX_PRINTER_CMD_FAILURE \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_GFX, 3)
-/* no printer available (e.g. cannot find _any_ printer) */
-#define NS_ERROR_GFX_PRINTER_NO_PRINTER_AVAILABLE \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_GFX, 4)
-/* _specified_ (by name) printer not found */
-#define NS_ERROR_GFX_PRINTER_NAME_NOT_FOUND \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_GFX, 5)
-/* access to printer denied */
-#define NS_ERROR_GFX_PRINTER_ACCESS_DENIED \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_GFX, 6)
-/* invalid printer attribute (for example: unsupported paper size etc.) */
-#define NS_ERROR_GFX_PRINTER_INVALID_ATTRIBUTE \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_GFX, 7)
-/* printer not "ready" (offline ?) */
-#define NS_ERROR_GFX_PRINTER_PRINTER_NOT_READY \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_GFX, 9)
-/* printer out of paper */
-#define NS_ERROR_GFX_PRINTER_OUT_OF_PAPER \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_GFX, 10)
-/* generic printer I/O error */
-#define NS_ERROR_GFX_PRINTER_PRINTER_IO_ERROR \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_GFX, 11)
-/* print-to-file: could not open output file */
-#define NS_ERROR_GFX_PRINTER_COULD_NOT_OPEN_FILE \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_GFX, 12)
-/* print-to-file: I/O error while printing to file */
-#define NS_ERROR_GFX_PRINTER_FILE_IO_ERROR \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_GFX, 13)
-/* print preview: needs at least one printer */
-#define NS_ERROR_GFX_PRINTER_PRINTPREVIEW \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_GFX, 14)
-/* print: starting document */
-#define NS_ERROR_GFX_PRINTER_STARTDOC \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_GFX, 15)
-/* print: ending document */
-#define NS_ERROR_GFX_PRINTER_ENDDOC \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_GFX, 16)
-/* print: starting page */
-#define NS_ERROR_GFX_PRINTER_STARTPAGE \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_GFX, 17)
-/* print: ending page */
-#define NS_ERROR_GFX_PRINTER_ENDPAGE \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_GFX, 18)
-/* print: print while in print preview */
-#define NS_ERROR_GFX_PRINTER_PRINT_WHILE_PREVIEW \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_GFX, 19)
-/* requested page size not supported by printer */
-#define NS_ERROR_GFX_PRINTER_PAPER_SIZE_NOT_SUPPORTED \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_GFX, 20)
-/* requested page orientation not supported */
-#define NS_ERROR_GFX_PRINTER_ORIENTATION_NOT_SUPPORTED \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_GFX, 21)
-/* requested colorspace not supported (like printing "color" on a
-   "grayscale"-only printer) */
-#define NS_ERROR_GFX_PRINTER_COLORSPACE_NOT_SUPPORTED \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_GFX, 22)
-/* too many copies requested */
-#define NS_ERROR_GFX_PRINTER_TOO_MANY_COPIES \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_GFX, 23)
-/* driver configuration error */
-#define NS_ERROR_GFX_PRINTER_DRIVER_CONFIGURATION_ERROR \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_GFX, 24)
-/* The document is still being loaded, can't Print Preview */
-#define NS_ERROR_GFX_PRINTER_DOC_IS_BUSY_PP \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_GFX, 25)
-/* The document was asked to be destroyed while we were preparing printing */
-#define NS_ERROR_GFX_PRINTER_DOC_WAS_DESTORYED \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_GFX, 26)
-/* Cannot Print or Print Preview XUL Documents */
-#define NS_ERROR_GFX_PRINTER_NO_XUL \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_GFX, 27)
-/* The toolkit no longer supports the Print Dialog (for embedders) */
-#define NS_ERROR_GFX_NO_PRINTDIALOG_IN_TOOLKIT \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_GFX, 28)
-/* The was wasn't any Print Prompt service registered (this shouldn't happen) */
-#define NS_ERROR_GFX_NO_PRINTROMPTSERVICE \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_GFX, 29)
-/* requested plex mode not supported by printer */
-#define NS_ERROR_GFX_PRINTER_PLEX_NOT_SUPPORTED \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_GFX, 30)
-/* The document is still being loaded */
-#define NS_ERROR_GFX_PRINTER_DOC_IS_BUSY \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_GFX, 31)
-/* Printing is not implemented */
-#define NS_ERROR_GFX_PRINTING_NOT_IMPLEMENTED \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_GFX, 32)
-/* Cannot load the matching print module */
-#define NS_ERROR_GFX_COULD_NOT_LOAD_PRINT_MODULE \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_GFX, 33)
-/* requested resolution/quality mode not supported by printer */
-#define NS_ERROR_GFX_PRINTER_RESOLUTION_NOT_SUPPORTED \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_GFX, 34)
-/* Font cmap is strangely structured - avoid this font! */
-#define NS_ERROR_GFX_CMAP_MALFORMED \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_GFX, 51)
-
-
-/* ======================================================================= */
-/* 4: NS_ERROR_MODULE_WIDGET */
-/* ======================================================================= */
-/* nsIWidget::OnIMEFocusChange should be called during blur, but other
- * OnIME*Change methods should not be called */
-#define NS_SUCCESS_IME_NO_UPDATES \
-  NS_ERROR_GENERATE_SUCCESS(NS_ERROR_MODULE_WIDGET, 1)
-
-
-/* ======================================================================= */
-/* 6: NS_ERROR_MODULE_NETWORK */
-/* ======================================================================= */
-/* General async request error codes:
- *
- * These error codes are commonly passed through callback methods to indicate
- * the status of some requested async request.
- *
- * For example, see nsIRequestObserver::onStopRequest.
- */
-
-/* The async request completed successfully. */
-#define NS_BINDING_SUCCEEDED NS_OK
-
-/* The async request failed for some unknown reason.  */
-#define NS_BINDING_FAILED \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 1)
-/* The async request failed because it was aborted by some user action. */
-#define NS_BINDING_ABORTED \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 2)
-/* The async request has been "redirected" to a different async request.
- * (e.g., an HTTP redirect occurred).
- *
- * This error code is used with load groups to notify the load group observer
- * when a request in the load group is redirected to another request. */
-#define NS_BINDING_REDIRECTED \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 3)
-/* The async request has been "retargeted" to a different "handler."
- *
- * This error code is used with load groups to notify the load group observer
- * when a request in the load group is removed from the load group and added
- * to a different load group. */
-#define NS_BINDING_RETARGETED \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 4)
-
-/* Miscellaneous error codes: These errors are not typically passed via
- * onStopRequest. */
-
-/* The URI is malformed. */
-#define NS_ERROR_MALFORMED_URI \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 10)
-/* The requested action could not be completed while the object is busy.
- * Implementations of nsIChannel::asyncOpen will commonly return this error
- * if the channel has already been opened (and has not yet been closed). */
-#define NS_ERROR_IN_PROGRESS \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 15)
-/* Returned from nsIChannel::asyncOpen to indicate that OnDataAvailable will
- * not be called because there is no content available.  This is used by
- * helper app style protocols (e.g., mailto).  XXX perhaps this should be a
- * success code. */
-#define NS_ERROR_NO_CONTENT \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 17)
-/* The URI scheme corresponds to an unknown protocol handler. */
-#define NS_ERROR_UNKNOWN_PROTOCOL \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 18)
-/* The content encoding of the source document was incorrect, for example
- * returning a plain HTML document advertised as Content-Encoding: gzip */
-#define NS_ERROR_INVALID_CONTENT_ENCODING \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 27)
-/* A transport level corruption was found in the source document. for example
- * a document with a calculated checksum that does not match the Content-MD5
- * http header. */
-#define NS_ERROR_CORRUPTED_CONTENT \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 29)
-/* While parsing for the first component of a header field using syntax as in
- * Content-Disposition or Content-Type, the first component was found to be
- * empty, such as in: Content-Disposition: ; filename=foo */
-#define NS_ERROR_FIRST_HEADER_FIELD_COMPONENT_EMPTY \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 34)
-/* Returned from nsIChannel::asyncOpen when trying to open the channel again
- * (reopening is not supported). */
-#define NS_ERROR_ALREADY_OPENED \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 73)
-
-/* Connectivity error codes: */
-
-/* The connection is already established.  XXX unused - consider removing. */
-#define NS_ERROR_ALREADY_CONNECTED \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 11)
-/* The connection does not exist.  XXX unused - consider removing. */
-#define NS_ERROR_NOT_CONNECTED \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 12)
-/* The connection attempt failed, for example, because no server was
- * listening at specified host:port. */
-#define NS_ERROR_CONNECTION_REFUSED \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 13)
-/* The connection was lost due to a timeout error.  */
-#define NS_ERROR_NET_TIMEOUT \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 14)
-/* The requested action could not be completed while the networking library
- * is in the offline state. */
-#define NS_ERROR_OFFLINE \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 16)
-/* The requested action was prohibited because it would have caused the
- * networking library to establish a connection to an unsafe or otherwise
- * banned port. */
-#define NS_ERROR_PORT_ACCESS_NOT_ALLOWED \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 19)
-/* The connection was established, but no data was ever received. */
-#define NS_ERROR_NET_RESET \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 20)
-/* The connection was established, but the data transfer was interrupted. */
-#define NS_ERROR_NET_INTERRUPT \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 71)
-/* The connection attempt to a proxy failed. */
-#define NS_ERROR_PROXY_CONNECTION_REFUSED \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 72)
-
-/* XXX really need to better rationalize these error codes.  are consumers of
- * necko really expected to know how to discern the meaning of these?? */
-/* This request is not resumable, but it was tried to resume it, or to
- * request resume-specific data. */
-#define NS_ERROR_NOT_RESUMABLE \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 25)
-/* The request failed as a result of a detected redirection loop.  */
-#define NS_ERROR_REDIRECT_LOOP \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 31)
-/* It was attempted to resume the request, but the entity has changed in the
- * meantime. */
-#define NS_ERROR_ENTITY_CHANGED \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 32)
-/* The request failed because the content type returned by the server was not
- * a type expected by the channel (for nested channels such as the JAR
- * channel). */
-#define NS_ERROR_UNSAFE_CONTENT_TYPE \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 74)
-/* The request failed because the user tried to access to a remote XUL
- * document from a website that is not in its white-list. */
-#define NS_ERROR_REMOTE_XUL \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 75)
-
-
-/* FTP specific error codes: */
-
-#define NS_ERROR_FTP_LOGIN \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 21)
-#define NS_ERROR_FTP_CWD \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 22)
-#define NS_ERROR_FTP_PASV \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 23)
-#define NS_ERROR_FTP_PWD \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 24)
-#define NS_ERROR_FTP_LIST \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 28)
-
-/* DNS specific error codes: */
-
-/* The lookup of a hostname failed.  This generally refers to the hostname
- * from the URL being loaded. */
-#define NS_ERROR_UNKNOWN_HOST \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 30)
-/* A low or medium priority DNS lookup failed because the pending queue was
- * already full. High priorty (the default) always makes room */
-#define NS_ERROR_DNS_LOOKUP_QUEUE_FULL \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 33)
-/* The lookup of a proxy hostname failed.  If a channel is configured to
- * speak to a proxy server, then it will generate this error if the proxy
- * hostname cannot be resolved. */
-#define NS_ERROR_UNKNOWN_PROXY_HOST \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 42)
-
-
-/* Socket specific error codes: */
-
-/* The specified socket type does not exist. */
-#define NS_ERROR_UNKNOWN_SOCKET_TYPE \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 51)
-/* The specified socket type could not be created. */
-#define NS_ERROR_SOCKET_CREATE_FAILED \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 52)
-
-
-/* Cache specific error codes: */
-#define NS_ERROR_CACHE_KEY_NOT_FOUND \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 61)
-#define NS_ERROR_CACHE_DATA_IS_STREAM \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 62)
-#define NS_ERROR_CACHE_DATA_IS_NOT_STREAM \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 63)
-#define NS_ERROR_CACHE_WAIT_FOR_VALIDATION \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 64)
-#define NS_ERROR_CACHE_ENTRY_DOOMED \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 65)
-#define NS_ERROR_CACHE_READ_ACCESS_DENIED \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 66)
-#define NS_ERROR_CACHE_WRITE_ACCESS_DENIED \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 67)
-#define NS_ERROR_CACHE_IN_USE \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 68)
-/* Error passed through onStopRequest if the document could not be fetched
- * from the cache. */
-#define NS_ERROR_DOCUMENT_NOT_CACHED \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 70)
-
-/* Effective TLD Service specific error codes: */
-
-/* The requested number of domain levels exceeds those present in the host
- * string. */
-#define NS_ERROR_INSUFFICIENT_DOMAIN_LEVELS \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 80)
-/* The host string is an IP address. */
-#define NS_ERROR_HOST_IS_IP_ADDRESS \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 81)
-
-
-/* StreamLoader specific result codes: */
-
-/* Result code returned by nsIStreamLoaderObserver to indicate that the
- * observer is taking over responsibility for the data buffer, and the loader
- * should NOT free it. */
-#define NS_SUCCESS_ADOPTED_DATA \
-  NS_ERROR_GENERATE_SUCCESS(NS_ERROR_MODULE_NETWORK, 90)
-
-/* FTP */
-#define NS_NET_STATUS_BEGIN_FTP_TRANSACTION \
-  NS_ERROR_GENERATE_SUCCESS(NS_ERROR_MODULE_NETWORK, 27)
-#define NS_NET_STATUS_END_FTP_TRANSACTION \
-  NS_ERROR_GENERATE_SUCCESS(NS_ERROR_MODULE_NETWORK, 28)
-
-/* This success code may be returned by nsIAuthModule::getNextToken to
- * indicate that the authentication is finished and thus there's no need
- * to call getNextToken again. */
-#define NS_SUCCESS_AUTH_FINISHED \
-  NS_ERROR_GENERATE_SUCCESS(NS_ERROR_MODULE_NETWORK, 40)
-
-/* These are really not "results", they're statuses, used by nsITransport and
- * friends.  This is abuse of nsresult, but we'll put up with it for now. */
-/* nsITransport */
-#define NS_NET_STATUS_READING \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 8)
-#define NS_NET_STATUS_WRITING \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 9)
-
-/* nsISocketTransport */
-#define NS_NET_STATUS_RESOLVING_HOST \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 3)
-#define NS_NET_STATUS_RESOLVED_HOST \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 11)
-#define NS_NET_STATUS_CONNECTING_TO \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 7)
-#define NS_NET_STATUS_CONNECTED_TO \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 4)
-#define NS_NET_STATUS_SENDING_TO \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 5)
-#define NS_NET_STATUS_WAITING_FOR \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 10)
-#define NS_NET_STATUS_RECEIVING_FROM \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 6)
-
-
-/* ======================================================================= */
-/* 7: NS_ERROR_MODULE_PLUGINS */
-/* ======================================================================= */
-#define NS_ERROR_PLUGINS_PLUGINSNOTCHANGED \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_PLUGINS, 1000)
-#define NS_ERROR_PLUGIN_DISABLED \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_PLUGINS, 1001)
-#define NS_ERROR_PLUGIN_BLOCKLISTED \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_PLUGINS, 1002)
-#define NS_ERROR_PLUGIN_TIME_RANGE_NOT_SUPPORTED \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_PLUGINS, 1003)
-#define NS_ERROR_PLUGIN_CLICKTOPLAY \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_PLUGINS, 1004)
-
-
-/* ======================================================================= */
-/* 8: NS_ERROR_MODULE_LAYOUT */
-/* ======================================================================= */
-/* Return code for nsITableLayout */
-#define NS_TABLELAYOUT_CELL_NOT_FOUND \
-  NS_ERROR_GENERATE_SUCCESS(NS_ERROR_MODULE_LAYOUT, 0)
-/* Return code for nsFrame::GetNextPrevLineFromeBlockFrame */
-#define NS_POSITION_BEFORE_TABLE \
-  NS_ERROR_GENERATE_SUCCESS(NS_ERROR_MODULE_LAYOUT, 3)
-/** Return codes for nsPresState::GetProperty() */
-/* Returned if the property exists */
-#define NS_STATE_PROPERTY_EXISTS      NS_OK
-/* Returned if the property does not exist */
-#define NS_STATE_PROPERTY_NOT_THERE \
-  NS_ERROR_GENERATE_SUCCESS(NS_ERROR_MODULE_LAYOUT, 5)
-
-
-/* ======================================================================= */
-/* 9: NS_ERROR_MODULE_HTMLPARSER */
-/* ======================================================================= */
-#define NS_ERROR_HTMLPARSER_CONTINUE NS_OK
-
-#define NS_ERROR_HTMLPARSER_EOF \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_HTMLPARSER, 1000)
-#define NS_ERROR_HTMLPARSER_UNKNOWN \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_HTMLPARSER, 1001)
-#define NS_ERROR_HTMLPARSER_CANTPROPAGATE \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_HTMLPARSER, 1002)
-#define NS_ERROR_HTMLPARSER_CONTEXTMISMATCH \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_HTMLPARSER, 1003)
-#define NS_ERROR_HTMLPARSER_BADFILENAME \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_HTMLPARSER, 1004)
-#define NS_ERROR_HTMLPARSER_BADURL \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_HTMLPARSER, 1005)
-#define NS_ERROR_HTMLPARSER_INVALIDPARSERCONTEXT \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_HTMLPARSER, 1006)
-#define NS_ERROR_HTMLPARSER_INTERRUPTED \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_HTMLPARSER, 1007)
-#define NS_ERROR_HTMLPARSER_BLOCK \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_HTMLPARSER, 1008)
-#define NS_ERROR_HTMLPARSER_BADTOKENIZER \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_HTMLPARSER, 1009)
-#define NS_ERROR_HTMLPARSER_BADATTRIBUTE \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_HTMLPARSER, 1010)
-#define NS_ERROR_HTMLPARSER_UNRESOLVEDDTD \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_HTMLPARSER, 1011)
-#define NS_ERROR_HTMLPARSER_MISPLACEDTABLECONTENT \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_HTMLPARSER, 1012)
-#define NS_ERROR_HTMLPARSER_BADDTD \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_HTMLPARSER, 1013)
-#define NS_ERROR_HTMLPARSER_BADCONTEXT \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_HTMLPARSER, 1014)
-#define NS_ERROR_HTMLPARSER_STOPPARSING \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_HTMLPARSER, 1015)
-#define NS_ERROR_HTMLPARSER_UNTERMINATEDSTRINGLITERAL \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_HTMLPARSER, 1016)
-#define NS_ERROR_HTMLPARSER_HIERARCHYTOODEEP \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_HTMLPARSER, 1017)
-#define NS_ERROR_HTMLPARSER_FAKE_ENDTAG \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_HTMLPARSER, 1018)
-#define NS_ERROR_HTMLPARSER_INVALID_COMMENT \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_HTMLPARSER, 1019)
-
-#define NS_HTMLTOKENS_NOT_AN_ENTITY \
-  NS_ERROR_GENERATE_SUCCESS(NS_ERROR_MODULE_HTMLPARSER, 2000)
-#define NS_HTMLPARSER_VALID_META_CHARSET \
-  NS_ERROR_GENERATE_SUCCESS(NS_ERROR_MODULE_HTMLPARSER, 3000)
-
-
-/* ======================================================================= */
-/* 10: NS_ERROR_MODULE_RDF */
-/* ======================================================================= */
-/* Returned from nsIRDFDataSource::Assert() and Unassert() if the assertion
- * (or unassertion was accepted by the datasource */
-#define NS_RDF_ASSERTION_ACCEPTED NS_OK
-/* Returned from nsIRDFCursor::Advance() if the cursor has no more
- * elements to enumerate */
-#define NS_RDF_CURSOR_EMPTY \
-  NS_ERROR_GENERATE_SUCCESS(NS_ERROR_MODULE_RDF, 1)
-/* Returned from nsIRDFDataSource::GetSource() and GetTarget() if the
- * source/target has no value */
-#define NS_RDF_NO_VALUE \
-  NS_ERROR_GENERATE_SUCCESS(NS_ERROR_MODULE_RDF, 2)
-/* Returned from nsIRDFDataSource::Assert() and Unassert() if the assertion
- * (or unassertion) was rejected by the datasource; i.e., the datasource was
- * not willing to record the statement. */
-#define NS_RDF_ASSERTION_REJECTED \
-  NS_ERROR_GENERATE_SUCCESS(NS_ERROR_MODULE_RDF, 3)
-/* Return this from rdfITripleVisitor to stop cycling */
-#define NS_RDF_STOP_VISIT \
-  NS_ERROR_GENERATE_SUCCESS(NS_ERROR_MODULE_RDF, 4)
-
-
-/* ======================================================================= */
-/* 11: NS_ERROR_MODULE_UCONV */
-/* ======================================================================= */
-#define NS_ERROR_UCONV_NOCONV \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_UCONV, 1)
-#define NS_ERROR_UDEC_ILLEGALINPUT \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_UCONV, 14)
-
-#define NS_SUCCESS_USING_FALLBACK_LOCALE \
-  NS_ERROR_GENERATE_SUCCESS(NS_ERROR_MODULE_UCONV, 2)
-#define NS_OK_UDEC_EXACTLENGTH \
-  NS_ERROR_GENERATE_SUCCESS(NS_ERROR_MODULE_UCONV, 11)
-#define NS_OK_UDEC_MOREINPUT \
-  NS_ERROR_GENERATE_SUCCESS(NS_ERROR_MODULE_UCONV, 12)
-#define NS_OK_UDEC_MOREOUTPUT \
-  NS_ERROR_GENERATE_SUCCESS(NS_ERROR_MODULE_UCONV, 13)
-#define NS_OK_UDEC_NOBOMFOUND \
-  NS_ERROR_GENERATE_SUCCESS(NS_ERROR_MODULE_UCONV, 14)
-#define NS_OK_UENC_EXACTLENGTH \
-  NS_ERROR_GENERATE_SUCCESS(NS_ERROR_MODULE_UCONV, 33)
-#define NS_OK_UENC_MOREOUTPUT \
-  NS_ERROR_GENERATE_SUCCESS(NS_ERROR_MODULE_UCONV, 34)
-#define NS_ERROR_UENC_NOMAPPING \
-  NS_ERROR_GENERATE_SUCCESS(NS_ERROR_MODULE_UCONV, 35)
-#define NS_OK_UENC_MOREINPUT \
-  NS_ERROR_GENERATE_SUCCESS(NS_ERROR_MODULE_UCONV, 36)
-
-/* BEGIN DEPRECATED */
-#define NS_EXACT_LENGTH        NS_OK_UDEC_EXACTLENGTH
-#define NS_PARTIAL_MORE_INPUT  NS_OK_UDEC_MOREINPUT
-#define NS_PARTIAL_MORE_OUTPUT NS_OK_UDEC_MOREOUTPUT
-#define NS_ERROR_ILLEGAL_INPUT NS_ERROR_UDEC_ILLEGALINPUT
-/* END DEPRECATED */
-
-
-/* ======================================================================= */
-/* 13: NS_ERROR_MODULE_FILES */
-/* ======================================================================= */
-#define NS_ERROR_FILE_UNRECOGNIZED_PATH \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_FILES, 1)
-#define NS_ERROR_FILE_UNRESOLVABLE_SYMLINK \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_FILES, 2)
-#define NS_ERROR_FILE_EXECUTION_FAILED \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_FILES, 3)
-#define NS_ERROR_FILE_UNKNOWN_TYPE \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_FILES, 4)
-#define NS_ERROR_FILE_DESTINATION_NOT_DIR \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_FILES, 5)
-#define NS_ERROR_FILE_TARGET_DOES_NOT_EXIST \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_FILES, 6)
-#define NS_ERROR_FILE_COPY_OR_MOVE_FAILED \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_FILES, 7)
-#define NS_ERROR_FILE_ALREADY_EXISTS \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_FILES, 8)
-#define NS_ERROR_FILE_INVALID_PATH \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_FILES, 9)
-#define NS_ERROR_FILE_DISK_FULL \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_FILES, 10)
-#define NS_ERROR_FILE_CORRUPTED \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_FILES, 11)
-#define NS_ERROR_FILE_NOT_DIRECTORY \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_FILES, 12)
-#define NS_ERROR_FILE_IS_DIRECTORY \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_FILES, 13)
-#define NS_ERROR_FILE_IS_LOCKED \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_FILES, 14)
-#define NS_ERROR_FILE_TOO_BIG \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_FILES, 15)
-#define NS_ERROR_FILE_NO_DEVICE_SPACE \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_FILES, 16)
-#define NS_ERROR_FILE_NAME_TOO_LONG \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_FILES, 17)
-#define NS_ERROR_FILE_NOT_FOUND \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_FILES, 18)
-#define NS_ERROR_FILE_READ_ONLY \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_FILES, 19)
-#define NS_ERROR_FILE_DIR_NOT_EMPTY \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_FILES, 20)
-#define NS_ERROR_FILE_ACCESS_DENIED \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_FILES, 21)
-
-#define NS_SUCCESS_FILE_DIRECTORY_EMPTY \
-  NS_ERROR_GENERATE_SUCCESS(NS_ERROR_MODULE_FILES, 1)
-/* Result codes used by nsIDirectoryServiceProvider2 */
-#define NS_SUCCESS_AGGREGATE_RESULT \
-  NS_ERROR_GENERATE_SUCCESS(NS_ERROR_MODULE_FILES, 2)
-
-
-/* ======================================================================= */
-/* 14: NS_ERROR_MODULE_DOM */
-/* ======================================================================= */
-/* XXX If you add a new DOM error code, also add an error string to
- * dom/src/base/domerr.msg */
-
-/* Standard DOM error codes: http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html */
-#define NS_ERROR_DOM_INDEX_SIZE_ERR \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_DOM, 1)
-#define NS_ERROR_DOM_HIERARCHY_REQUEST_ERR \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_DOM, 3)
-#define NS_ERROR_DOM_WRONG_DOCUMENT_ERR \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_DOM, 4)
-#define NS_ERROR_DOM_INVALID_CHARACTER_ERR \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_DOM, 5)
-#define NS_ERROR_DOM_NO_MODIFICATION_ALLOWED_ERR \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_DOM, 7)
-#define NS_ERROR_DOM_NOT_FOUND_ERR \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_DOM, 8)
-#define NS_ERROR_DOM_NOT_SUPPORTED_ERR \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_DOM, 9)
-#define NS_ERROR_DOM_INUSE_ATTRIBUTE_ERR \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_DOM, 10)
-#define NS_ERROR_DOM_INVALID_STATE_ERR \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_DOM, 11)
-#define NS_ERROR_DOM_SYNTAX_ERR \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_DOM, 12)
-#define NS_ERROR_DOM_INVALID_MODIFICATION_ERR \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_DOM, 13)
-#define NS_ERROR_DOM_NAMESPACE_ERR \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_DOM, 14)
-#define NS_ERROR_DOM_INVALID_ACCESS_ERR \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_DOM, 15)
-#define NS_ERROR_DOM_TYPE_MISMATCH_ERR \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_DOM, 17)
-#define NS_ERROR_DOM_SECURITY_ERR \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_DOM, 18)
-#define NS_ERROR_DOM_NETWORK_ERR \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_DOM, 19)
-#define NS_ERROR_DOM_ABORT_ERR \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_DOM, 20)
-#define NS_ERROR_DOM_URL_MISMATCH_ERR \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_DOM, 21)
-#define NS_ERROR_DOM_QUOTA_EXCEEDED_ERR \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_DOM, 22)
-#define NS_ERROR_DOM_TIMEOUT_ERR \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_DOM, 23)
-#define NS_ERROR_DOM_INVALID_NODE_TYPE_ERR \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_DOM, 24)
-#define NS_ERROR_DOM_DATA_CLONE_ERR \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_DOM, 25)
-/* XXX Should be JavaScript native errors */
-#define NS_ERROR_TYPE_ERR \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_DOM, 26)
-#define NS_ERROR_RANGE_ERR \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_DOM, 27)
-/* DOM error codes defined by us */
-#define NS_ERROR_DOM_SECMAN_ERR \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_DOM, 1001)
-#define NS_ERROR_DOM_WRONG_TYPE_ERR \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_DOM, 1002)
-#define NS_ERROR_DOM_NOT_OBJECT_ERR \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_DOM, 1003)
-#define NS_ERROR_DOM_NOT_XPC_OBJECT_ERR \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_DOM, 1004)
-#define NS_ERROR_DOM_NOT_NUMBER_ERR \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_DOM, 1005)
-#define NS_ERROR_DOM_NOT_BOOLEAN_ERR \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_DOM, 1006)
-#define NS_ERROR_DOM_NOT_FUNCTION_ERR \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_DOM, 1007)
-#define NS_ERROR_DOM_TOO_FEW_PARAMETERS_ERR \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_DOM, 1008)
-#define NS_ERROR_DOM_BAD_DOCUMENT_DOMAIN \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_DOM, 1009)
-#define NS_ERROR_DOM_PROP_ACCESS_DENIED \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_DOM, 1010)
-#define NS_ERROR_DOM_XPCONNECT_ACCESS_DENIED \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_DOM, 1011)
-#define NS_ERROR_DOM_BAD_URI \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_DOM, 1012)
-#define NS_ERROR_DOM_RETVAL_UNDEFINED \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_DOM, 1013)
-#define NS_ERROR_DOM_QUOTA_REACHED \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_DOM, 1014)
-
-
-/* ======================================================================= */
-/* 15: NS_ERROR_MODULE_IMGLIB */
-/* ======================================================================= */
-#define NS_IMAGELIB_SUCCESS_LOAD_FINISHED \
-  NS_ERROR_GENERATE_SUCCESS(NS_ERROR_MODULE_IMGLIB, 0)
-#define NS_IMAGELIB_CHANGING_OWNER \
-  NS_ERROR_GENERATE_SUCCESS(NS_ERROR_MODULE_IMGLIB, 1)
-
-#define NS_IMAGELIB_ERROR_FAILURE \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_IMGLIB, 5)
-#define NS_IMAGELIB_ERROR_NO_DECODER \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_IMGLIB, 6)
-#define NS_IMAGELIB_ERROR_NOT_FINISHED \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_IMGLIB, 7)
-#define NS_IMAGELIB_ERROR_NO_ENCODER \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_IMGLIB, 9)
-
-
-/* ======================================================================= */
-/* 17: NS_ERROR_MODULE_EDITOR */
-/* ======================================================================= */
-#define NS_ERROR_EDITOR_NO_SELECTION \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_EDITOR, 1)
-#define NS_ERROR_EDITOR_NO_TEXTNODE \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_EDITOR, 2)
-#define NS_FOUND_TARGET \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_EDITOR, 3)
-
-#define NS_EDITOR_ELEMENT_NOT_FOUND \
-  NS_ERROR_GENERATE_SUCCESS(NS_ERROR_MODULE_EDITOR, 1)
-
-
-/* ======================================================================= */
-/* 18: NS_ERROR_MODULE_XPCONNECT */
-/* ======================================================================= */
-#define NS_ERROR_XPC_NOT_ENOUGH_ARGS \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_XPCONNECT, 1)
-#define NS_ERROR_XPC_NEED_OUT_OBJECT \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_XPCONNECT, 2)
-#define NS_ERROR_XPC_CANT_SET_OUT_VAL \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_XPCONNECT, 3)
-#define NS_ERROR_XPC_NATIVE_RETURNED_FAILURE \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_XPCONNECT, 4)
-#define NS_ERROR_XPC_CANT_GET_INTERFACE_INFO \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_XPCONNECT, 5)
-#define NS_ERROR_XPC_CANT_GET_PARAM_IFACE_INFO \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_XPCONNECT, 6)
-#define NS_ERROR_XPC_CANT_GET_METHOD_INFO \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_XPCONNECT, 7)
-#define NS_ERROR_XPC_UNEXPECTED \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_XPCONNECT, 8)
-#define NS_ERROR_XPC_BAD_CONVERT_JS \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_XPCONNECT, 9)
-#define NS_ERROR_XPC_BAD_CONVERT_NATIVE \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_XPCONNECT, 10)
-#define NS_ERROR_XPC_BAD_CONVERT_JS_NULL_REF \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_XPCONNECT, 11)
-#define NS_ERROR_XPC_BAD_OP_ON_WN_PROTO \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_XPCONNECT, 12)
-#define NS_ERROR_XPC_CANT_CONVERT_WN_TO_FUN \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_XPCONNECT, 13)
-#define NS_ERROR_XPC_CANT_DEFINE_PROP_ON_WN \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_XPCONNECT, 14)
-#define NS_ERROR_XPC_CANT_WATCH_WN_STATIC \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_XPCONNECT, 15)
-#define NS_ERROR_XPC_CANT_EXPORT_WN_STATIC \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_XPCONNECT, 16)
-#define NS_ERROR_XPC_SCRIPTABLE_CALL_FAILED \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_XPCONNECT, 17)
-#define NS_ERROR_XPC_SCRIPTABLE_CTOR_FAILED \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_XPCONNECT, 18)
-#define NS_ERROR_XPC_CANT_CALL_WO_SCRIPTABLE \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_XPCONNECT, 19)
-#define NS_ERROR_XPC_CANT_CTOR_WO_SCRIPTABLE \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_XPCONNECT, 20)
-#define NS_ERROR_XPC_CI_RETURNED_FAILURE \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_XPCONNECT, 21)
-#define NS_ERROR_XPC_GS_RETURNED_FAILURE \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_XPCONNECT, 22)
-#define NS_ERROR_XPC_BAD_CID \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_XPCONNECT, 23)
-#define NS_ERROR_XPC_BAD_IID \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_XPCONNECT, 24)
-#define NS_ERROR_XPC_CANT_CREATE_WN \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_XPCONNECT, 25)
-#define NS_ERROR_XPC_JS_THREW_EXCEPTION \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_XPCONNECT, 26)
-#define NS_ERROR_XPC_JS_THREW_NATIVE_OBJECT \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_XPCONNECT, 27)
-#define NS_ERROR_XPC_JS_THREW_JS_OBJECT \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_XPCONNECT, 28)
-#define NS_ERROR_XPC_JS_THREW_NULL \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_XPCONNECT, 29)
-#define NS_ERROR_XPC_JS_THREW_STRING \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_XPCONNECT, 30)
-#define NS_ERROR_XPC_JS_THREW_NUMBER \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_XPCONNECT, 31)
-#define NS_ERROR_XPC_JAVASCRIPT_ERROR \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_XPCONNECT, 32)
-#define NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_XPCONNECT, 33)
-#define NS_ERROR_XPC_CANT_CONVERT_PRIMITIVE_TO_ARRAY \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_XPCONNECT, 34)
-#define NS_ERROR_XPC_CANT_CONVERT_OBJECT_TO_ARRAY \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_XPCONNECT, 35)
-#define NS_ERROR_XPC_NOT_ENOUGH_ELEMENTS_IN_ARRAY \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_XPCONNECT, 36)
-#define NS_ERROR_XPC_CANT_GET_ARRAY_INFO \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_XPCONNECT, 37)
-#define NS_ERROR_XPC_NOT_ENOUGH_CHARS_IN_STRING \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_XPCONNECT, 38)
-#define NS_ERROR_XPC_SECURITY_MANAGER_VETO \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_XPCONNECT, 39)
-#define NS_ERROR_XPC_INTERFACE_NOT_SCRIPTABLE \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_XPCONNECT, 40)
-#define NS_ERROR_XPC_INTERFACE_NOT_FROM_NSISUPPORTS \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_XPCONNECT, 41)
-#define NS_ERROR_XPC_CANT_GET_JSOBJECT_OF_DOM_OBJECT \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_XPCONNECT, 42)
-#define NS_ERROR_XPC_CANT_SET_READ_ONLY_CONSTANT \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_XPCONNECT, 43)
-#define NS_ERROR_XPC_CANT_SET_READ_ONLY_ATTRIBUTE \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_XPCONNECT, 44)
-#define NS_ERROR_XPC_CANT_SET_READ_ONLY_METHOD \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_XPCONNECT, 45)
-#define NS_ERROR_XPC_CANT_ADD_PROP_TO_WRAPPED_NATIVE \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_XPCONNECT, 46)
-#define NS_ERROR_XPC_CALL_TO_SCRIPTABLE_FAILED \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_XPCONNECT, 47)
-#define NS_ERROR_XPC_JSOBJECT_HAS_NO_FUNCTION_NAMED \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_XPCONNECT, 48)
-#define NS_ERROR_XPC_BAD_ID_STRING \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_XPCONNECT, 49)
-#define NS_ERROR_XPC_BAD_INITIALIZER_NAME \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_XPCONNECT, 50)
-#define NS_ERROR_XPC_HAS_BEEN_SHUTDOWN \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_XPCONNECT, 51)
-#define NS_ERROR_XPC_CANT_MODIFY_PROP_ON_WN \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_XPCONNECT, 52)
-#define NS_ERROR_XPC_BAD_CONVERT_JS_ZERO_ISNOT_NULL \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_XPCONNECT, 53)
-/* any new errors here should have an associated entry added in xpc.msg */
-
-#define NS_SUCCESS_I_DID_SOMETHING \
-  NS_ERROR_GENERATE_SUCCESS(NS_ERROR_MODULE_XPCONNECT, 1)
-/* Classes that want to only be touched by chrome (or from code whose
- * filename begins with chrome://global/) shoudl return this from their
- * scriptable helper's PreCreate hook. */
-#define NS_SUCCESS_CHROME_ACCESS_ONLY \
-  NS_ERROR_GENERATE_SUCCESS(NS_ERROR_MODULE_XPCONNECT, 2)
-/* Classes that want slim wrappers should return
- * NS_SUCCESS_ALLOW_SLIM_WRAPPERS from their scriptable helper's PreCreate
- * hook. They must also force a parent for their wrapper (from the PreCreate
- * hook), they must implement nsWrapperCache and their scriptable helper must
- * implement nsXPCClassInfo and must return DONT_ASK_INSTANCE_FOR_SCRIPTABLE
- * in the flags. */
-#define NS_SUCCESS_ALLOW_SLIM_WRAPPERS \
-  NS_ERROR_GENERATE_SUCCESS(NS_ERROR_MODULE_XPCONNECT, 3)
-
-
-/* ======================================================================= */
-/* 19: NS_ERROR_MODULE_PROFILE */
-/* ======================================================================= */
-#define NS_ERROR_LAUNCHED_CHILD_PROCESS \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_PROFILE, 200)
-
-
-/* ======================================================================= */
-/* 21: NS_ERROR_MODULE_SECURITY */
-/* ======================================================================= */
-/* Error code for CSP */
-#define NS_ERROR_CSP_FRAME_ANCESTOR_VIOLATION \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_SECURITY, 99)
-
-/* CMS specific nsresult error codes.  Note: the numbers used here correspond
- * to the values in nsICMSMessageErrors.idl. */
-#define NS_ERROR_CMS_VERIFY_NOT_SIGNED \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_SECURITY, 1024)
-#define NS_ERROR_CMS_VERIFY_NO_CONTENT_INFO \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_SECURITY, 1025)
-#define NS_ERROR_CMS_VERIFY_BAD_DIGEST \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_SECURITY, 1026)
-#define NS_ERROR_CMS_VERIFY_NOCERT \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_SECURITY, 1028)
-#define NS_ERROR_CMS_VERIFY_UNTRUSTED \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_SECURITY, 1029)
-#define NS_ERROR_CMS_VERIFY_ERROR_UNVERIFIED \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_SECURITY, 1031)
-#define NS_ERROR_CMS_VERIFY_ERROR_PROCESSING \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_SECURITY, 1032)
-#define NS_ERROR_CMS_VERIFY_BAD_SIGNATURE \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_SECURITY, 1033)
-#define NS_ERROR_CMS_VERIFY_DIGEST_MISMATCH \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_SECURITY, 1034)
-#define NS_ERROR_CMS_VERIFY_UNKNOWN_ALGO \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_SECURITY, 1035)
-#define NS_ERROR_CMS_VERIFY_UNSUPPORTED_ALGO \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_SECURITY, 1036)
-#define NS_ERROR_CMS_VERIFY_MALFORMED_SIGNATURE \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_SECURITY, 1037)
-#define NS_ERROR_CMS_VERIFY_HEADER_MISMATCH \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_SECURITY, 1038)
-#define NS_ERROR_CMS_VERIFY_NOT_YET_ATTEMPTED \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_SECURITY, 1039)
-#define NS_ERROR_CMS_VERIFY_CERT_WITHOUT_ADDRESS \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_SECURITY, 1040)
-#define NS_ERROR_CMS_ENCRYPT_NO_BULK_ALG \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_SECURITY, 1056)
-#define NS_ERROR_CMS_ENCRYPT_INCOMPLETE \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_SECURITY, 1057)
-
-
-/* ======================================================================= */
-/* 22: NS_ERROR_MODULE_DOM_XPATH */
-/* ======================================================================= */
-/* DOM error codes from http://www.w3.org/TR/DOM-Level-3-XPath/ */
-#define NS_ERROR_DOM_INVALID_EXPRESSION_ERR \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_DOM_XPATH, 51)
-#define NS_ERROR_DOM_TYPE_ERR \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_DOM_XPATH, 52)
-
-
-/* ======================================================================= */
-/* 24: NS_ERROR_MODULE_URILOADER */
-/* ======================================================================= */
-#define NS_ERROR_WONT_HANDLE_CONTENT \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_URILOADER, 1)
-/* The load has been cancelled because it was found on a malware or phishing
- * blacklist. */
-#define NS_ERROR_MALWARE_URI \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_URILOADER, 30)
-#define NS_ERROR_PHISHING_URI \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_URILOADER, 31)
-/* Used when "Save Link As..." doesn't see the headers quickly enough to
- * choose a filename.  See nsContextMenu.js. */
-#define NS_ERROR_SAVE_LINK_AS_TIMEOUT \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_URILOADER, 32)
-/* Used when the data from a channel has already been parsed and cached so it
- * doesn't need to be reparsed from the original source. */
-#define NS_ERROR_PARSED_DATA_CACHED \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_URILOADER, 33)
-
-/* This success code indicates that a refresh header was found and
- * successfully setup.  */
-#define NS_REFRESHURI_HEADER_FOUND \
-  NS_ERROR_GENERATE_SUCCESS(NS_ERROR_MODULE_URILOADER, 2)
-
-
-/* ======================================================================= */
-/* 25: NS_ERROR_MODULE_CONTENT */
-/* ======================================================================= */
-/* Error codes for image loading */
-#define NS_ERROR_IMAGE_SRC_CHANGED \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_CONTENT, 4)
-#define NS_ERROR_IMAGE_BLOCKED \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_CONTENT, 5)
-/* Error codes for content policy blocking */
-#define NS_ERROR_CONTENT_BLOCKED \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_CONTENT, 6)
-#define NS_ERROR_CONTENT_BLOCKED_SHOW_ALT \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_CONTENT, 7)
-/* Success variations of content policy blocking */
-#define NS_PROPTABLE_PROP_NOT_THERE \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_CONTENT, 10)
-/* Error code for XBL */
-#define NS_ERROR_XBL_BLOCKED \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_CONTENT, 15)
-
-/* XXX this is not really used */
-#define NS_HTML_STYLE_PROPERTY_NOT_THERE \
-  NS_ERROR_GENERATE_SUCCESS(NS_ERROR_MODULE_CONTENT, 2)
-#define NS_CONTENT_BLOCKED \
-  NS_ERROR_GENERATE_SUCCESS(NS_ERROR_MODULE_CONTENT, 8)
-#define NS_CONTENT_BLOCKED_SHOW_ALT \
-  NS_ERROR_GENERATE_SUCCESS(NS_ERROR_MODULE_CONTENT, 9)
-#define NS_PROPTABLE_PROP_OVERWRITTEN \
-  NS_ERROR_GENERATE_SUCCESS(NS_ERROR_MODULE_CONTENT, 11)
-/* Error codes for FindBroadcaster in nsXULDocument.cpp */
-#define NS_FINDBROADCASTER_NOT_FOUND \
-  NS_ERROR_GENERATE_SUCCESS(NS_ERROR_MODULE_CONTENT, 12)
-#define NS_FINDBROADCASTER_FOUND \
-  NS_ERROR_GENERATE_SUCCESS(NS_ERROR_MODULE_CONTENT, 13)
-#define NS_FINDBROADCASTER_AWAIT_OVERLAYS \
-  NS_ERROR_GENERATE_SUCCESS(NS_ERROR_MODULE_CONTENT, 14)
-
-
-/* ======================================================================= */
-/* 27: NS_ERROR_MODULE_XSLT */
-/* ======================================================================= */
-#define NS_ERROR_XPATH_INVALID_ARG NS_ERROR_INVALID_ARG
-#define NS_ERROR_XSLT_PARSE_FAILURE \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_XSLT, 1)
-#define NS_ERROR_XPATH_PARSE_FAILURE \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_XSLT, 2)
-#define NS_ERROR_XSLT_ALREADY_SET \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_XSLT, 3)
-#define NS_ERROR_XSLT_EXECUTION_FAILURE \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_XSLT, 4)
-#define NS_ERROR_XPATH_UNKNOWN_FUNCTION \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_XSLT, 5)
-#define NS_ERROR_XSLT_BAD_RECURSION \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_XSLT, 6)
-#define NS_ERROR_XSLT_BAD_VALUE \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_XSLT, 7)
-#define NS_ERROR_XSLT_NODESET_EXPECTED \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_XSLT, 8)
-#define NS_ERROR_XSLT_ABORTED \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_XSLT, 9)
-#define NS_ERROR_XSLT_NETWORK_ERROR \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_XSLT, 10)
-#define NS_ERROR_XSLT_WRONG_MIME_TYPE \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_XSLT, 11)
-#define NS_ERROR_XSLT_LOAD_RECURSION \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_XSLT, 12)
-#define NS_ERROR_XPATH_BAD_ARGUMENT_COUNT \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_XSLT, 13)
-#define NS_ERROR_XPATH_BAD_EXTENSION_FUNCTION \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_XSLT, 14)
-#define NS_ERROR_XPATH_PAREN_EXPECTED \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_XSLT, 15)
-#define NS_ERROR_XPATH_INVALID_AXIS \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_XSLT, 16)
-#define NS_ERROR_XPATH_NO_NODE_TYPE_TEST \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_XSLT, 17)
-#define NS_ERROR_XPATH_BRACKET_EXPECTED \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_XSLT, 18)
-#define NS_ERROR_XPATH_INVALID_VAR_NAME \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_XSLT, 19)
-#define NS_ERROR_XPATH_UNEXPECTED_END \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_XSLT, 20)
-#define NS_ERROR_XPATH_OPERATOR_EXPECTED \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_XSLT, 21)
-#define NS_ERROR_XPATH_UNCLOSED_LITERAL \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_XSLT, 22)
-#define NS_ERROR_XPATH_BAD_COLON \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_XSLT, 23)
-#define NS_ERROR_XPATH_BAD_BANG \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_XSLT, 24)
-#define NS_ERROR_XPATH_ILLEGAL_CHAR \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_XSLT, 25)
-#define NS_ERROR_XPATH_BINARY_EXPECTED \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_XSLT, 26)
-#define NS_ERROR_XSLT_LOAD_BLOCKED_ERROR \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_XSLT, 27)
-#define NS_ERROR_XPATH_INVALID_EXPRESSION_EVALUATED \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_XSLT, 28)
-#define NS_ERROR_XPATH_UNBALANCED_CURLY_BRACE \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_XSLT, 29)
-#define NS_ERROR_XSLT_BAD_NODE_NAME \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_XSLT, 30)
-#define NS_ERROR_XSLT_VAR_ALREADY_SET \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_XSLT, 31)
-
-#define NS_XSLT_GET_NEW_HANDLER \
-  NS_ERROR_GENERATE_SUCCESS(NS_ERROR_MODULE_XSLT, 1)
-
-
-/* ======================================================================= */
-/* 29: NS_ERROR_MODULE_SVG */
-/* ======================================================================= */
-/* SVG DOM error codes from http://www.w3.org/TR/SVG11/svgdom.html */
-#define NS_ERROR_DOM_SVG_WRONG_TYPE_ERR \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_SVG, 0)
-/* Yes, the spec says "INVERTABLE", not "INVERTIBLE" */
-#define NS_ERROR_DOM_SVG_MATRIX_NOT_INVERTABLE \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_SVG, 2)
-
-
-/* ======================================================================= */
-/* 30: NS_ERROR_MODULE_STORAGE */
-/* ======================================================================= */
-/* To add additional errors to Storage, please append entries to the bottom
- * of the list in the following format:
- *   NS_ERROR_STORAGE_YOUR_ERR = FAILURE(n)
- * where n is the next unique positive integer.  You must also add an entry
- * to js/xpconnect/src/xpc.msg under the code block beginning with the
- * comment 'storage related codes (from mozStorage.h)', in the following
- * format: 'XPC_MSG_DEF(NS_ERROR_STORAGE_YOUR_ERR, "brief description of your
- * error")' */
-#define NS_ERROR_STORAGE_BUSY \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_STORAGE, 1)
-#define NS_ERROR_STORAGE_IOERR \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_STORAGE, 2)
-#define NS_ERROR_STORAGE_CONSTRAINT \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_STORAGE, 3)
-
-
-/* ======================================================================= */
-/* 32: NS_ERROR_MODULE_DOM_FILE */
-/* ======================================================================= */
-#define NS_ERROR_DOM_FILE_NOT_FOUND_ERR \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_DOM_FILE, 0)
-#define NS_ERROR_DOM_FILE_NOT_READABLE_ERR \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_DOM_FILE, 1)
-#define NS_ERROR_DOM_FILE_ABORT_ERR \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_DOM_FILE, 2)
-
-
-/* ======================================================================= */
-/* 33: NS_ERROR_MODULE_DOM_INDEXEDDB */
-/* ======================================================================= */
-/* IndexedDB error codes http://dvcs.w3.org/hg/IndexedDB/raw-file/tip/Overview.html */
-#define NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_DOM_INDEXEDDB, 1)
-#define NS_ERROR_DOM_INDEXEDDB_NOT_FOUND_ERR \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_DOM_INDEXEDDB, 3)
-#define NS_ERROR_DOM_INDEXEDDB_CONSTRAINT_ERR \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_DOM_INDEXEDDB, 4)
-#define NS_ERROR_DOM_INDEXEDDB_DATA_ERR \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_DOM_INDEXEDDB, 5)
-#define NS_ERROR_DOM_INDEXEDDB_NOT_ALLOWED_ERR \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_DOM_INDEXEDDB, 6)
-#define NS_ERROR_DOM_INDEXEDDB_TRANSACTION_INACTIVE_ERR \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_DOM_INDEXEDDB, 7)
-#define NS_ERROR_DOM_INDEXEDDB_ABORT_ERR \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_DOM_INDEXEDDB, 8)
-#define NS_ERROR_DOM_INDEXEDDB_READ_ONLY_ERR \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_DOM_INDEXEDDB, 9)
-#define NS_ERROR_DOM_INDEXEDDB_TIMEOUT_ERR \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_DOM_INDEXEDDB, 10)
-#define NS_ERROR_DOM_INDEXEDDB_QUOTA_ERR \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_DOM_INDEXEDDB, 11)
-#define NS_ERROR_DOM_INDEXEDDB_VERSION_ERR \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_DOM_INDEXEDDB, 12)
-#define NS_ERROR_DOM_INDEXEDDB_RECOVERABLE_ERR \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_DOM_INDEXEDDB, 1001)
-
-
-/* ======================================================================= */
-/* 34: NS_ERROR_MODULE_DOM_FILEHANDLE */
-/* ======================================================================= */
-#define NS_ERROR_DOM_FILEHANDLE_UNKNOWN_ERR \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_DOM_FILEHANDLE, 1)
-#define NS_ERROR_DOM_FILEHANDLE_NOT_ALLOWED_ERR \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_DOM_FILEHANDLE, 2)
-#define NS_ERROR_DOM_FILEHANDLE_LOCKEDFILE_INACTIVE_ERR \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_DOM_FILEHANDLE, 3)
-#define NS_ERROR_DOM_FILEHANDLE_ABORT_ERR \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_DOM_FILEHANDLE, 4)
-#define NS_ERROR_DOM_FILEHANDLE_READ_ONLY_ERR \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_DOM_FILEHANDLE, 5)
-
-
-/* ======================================================================= */
-/* 51: NS_ERROR_MODULE_GENERAL */
-/* ======================================================================= */
-/* Error code used internally by the incremental downloader to cancel the
- * network channel when the download is already complete. */
-#define NS_ERROR_DOWNLOAD_COMPLETE \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_GENERAL, 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
- * 206. */
-#define NS_ERROR_DOWNLOAD_NOT_PARTIAL \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_GENERAL, 2)
-#define NS_ERROR_UNORM_MOREOUTPUT \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_GENERAL, 33)
-
-#define NS_ERROR_DOCSHELL_REQUEST_REJECTED \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_GENERAL, 1001)
-/* This is needed for displaying an error message when navigation is
- * attempted on a document when printing The value arbitrary as long as it
- * doesn't conflict with any of the other values in the errors in
- * DisplayLoadError */
-#define NS_ERROR_DOCUMENT_IS_PRINTMODE \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_GENERAL, 2001)
-
-#define NS_SUCCESS_DONT_FIXUP \
-  NS_ERROR_GENERATE_SUCCESS(NS_ERROR_MODULE_GENERAL, 1)
-/* This success code may be returned by nsIAppStartup::Run to indicate that
- * the application should be restarted.  This condition corresponds to the
- * case in which nsIAppStartup::Quit was called with the eRestart flag. */
-#define NS_SUCCESS_RESTART_APP \
-  NS_ERROR_GENERATE_SUCCESS(NS_ERROR_MODULE_GENERAL, 1)
-#define NS_SUCCESS_UNORM_NOTFOUND \
-  NS_ERROR_GENERATE_SUCCESS(NS_ERROR_MODULE_GENERAL, 17)
-
-
-/* a11y */
-/* raised when current pivot's position is needed but it's not in the tree */
-#define NS_ERROR_NOT_IN_TREE \
-  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_GENERAL, 38)
-
-/* see Accessible::GetAttrValue */
-#define NS_OK_NO_ARIA_VALUE \
-  NS_ERROR_GENERATE_SUCCESS(NS_ERROR_MODULE_GENERAL, 33)
-#define NS_OK_DEFUNCT_OBJECT \
-  NS_ERROR_GENERATE_SUCCESS(NS_ERROR_MODULE_GENERAL, 34)
-/* see Accessible::GetNameInternal */
-#define NS_OK_EMPTY_NAME \
-  NS_ERROR_GENERATE_SUCCESS(NS_ERROR_MODULE_GENERAL, 35)
-#define NS_OK_NO_NAME_CLAUSE_HANDLED \
-  NS_ERROR_GENERATE_SUCCESS(NS_ERROR_MODULE_GENERAL, 36)
-/* see Accessible::GetNameInternal */
-#define NS_OK_NAME_FROM_TOOLTIP \
-  NS_ERROR_GENERATE_SUCCESS(NS_ERROR_MODULE_GENERAL, 37)
-
  /*
   * This will return the nsresult corresponding to the most recent NSPR failure
   * returned by PR_GetError.
   *
   ***********************************************************************
   *      Do not depend on this function. It will be going away!
   ***********************************************************************
   */
new file mode 100644
--- /dev/null
+++ b/xpcom/base/nsErrorAsserts.cpp
@@ -0,0 +1,7 @@
+#include "nsError.h"
+#include "mozilla/Assertions.h"
+
+// No reason to pull in Assertions.h for every single file that includes
+// nsError.h, so let's put this in its own .cpp file instead of in the .h.
+MOZ_STATIC_ASSERT(sizeof(nsresult) == sizeof(uint32_t),
+                  "nsresult must be 32 bits");
--- a/xpcom/base/nscore.h
+++ b/xpcom/base/nscore.h
@@ -305,17 +305,17 @@ typedef size_t(*nsMallocSizeOfFun)(const
 #else
 #define NS_NO_VTABLE
 #endif
 
 
 /**
  * Generic XPCOM result data type
  */
-typedef uint32_t nsresult;
+#include "nsError.h"
 
 /**
  * Reference count values
  *
  * This is the return type for AddRef() and Release() in nsISupports.
  * IUnknown of COM returns an unsigned long from equivalent functions.
  * The following ifdef exists to maintain binary compatibility with
  * IUnknown.
--- a/xpcom/reflect/xptcall/src/md/win32/xptcstubs_asm_x86_64.asm
+++ b/xpcom/reflect/xptcall/src/md/win32/xptcstubs_asm_x86_64.asm
@@ -79,257 +79,257 @@ SharedStub ENDP
 
 STUBENTRY MACRO functionname, paramcount
 functionname PROC EXPORT
     mov     r11, paramcount
     jmp     SharedStub
 functionname ENDP
 ENDM
 
-    STUBENTRY ?Stub3@nsXPTCStubBase@@UEAAIXZ, 3
-    STUBENTRY ?Stub4@nsXPTCStubBase@@UEAAIXZ, 4
-    STUBENTRY ?Stub5@nsXPTCStubBase@@UEAAIXZ, 5
-    STUBENTRY ?Stub6@nsXPTCStubBase@@UEAAIXZ, 6
-    STUBENTRY ?Stub7@nsXPTCStubBase@@UEAAIXZ, 7
-    STUBENTRY ?Stub8@nsXPTCStubBase@@UEAAIXZ, 8
-    STUBENTRY ?Stub9@nsXPTCStubBase@@UEAAIXZ, 9
-    STUBENTRY ?Stub10@nsXPTCStubBase@@UEAAIXZ, 10
-    STUBENTRY ?Stub11@nsXPTCStubBase@@UEAAIXZ, 11
-    STUBENTRY ?Stub12@nsXPTCStubBase@@UEAAIXZ, 12
-    STUBENTRY ?Stub13@nsXPTCStubBase@@UEAAIXZ, 13
-    STUBENTRY ?Stub14@nsXPTCStubBase@@UEAAIXZ, 14
-    STUBENTRY ?Stub15@nsXPTCStubBase@@UEAAIXZ, 15
-    STUBENTRY ?Stub16@nsXPTCStubBase@@UEAAIXZ, 16
-    STUBENTRY ?Stub17@nsXPTCStubBase@@UEAAIXZ, 17
-    STUBENTRY ?Stub18@nsXPTCStubBase@@UEAAIXZ, 18
-    STUBENTRY ?Stub19@nsXPTCStubBase@@UEAAIXZ, 19
-    STUBENTRY ?Stub20@nsXPTCStubBase@@UEAAIXZ, 20
-    STUBENTRY ?Stub21@nsXPTCStubBase@@UEAAIXZ, 21
-    STUBENTRY ?Stub22@nsXPTCStubBase@@UEAAIXZ, 22
-    STUBENTRY ?Stub23@nsXPTCStubBase@@UEAAIXZ, 23
-    STUBENTRY ?Stub24@nsXPTCStubBase@@UEAAIXZ, 24
-    STUBENTRY ?Stub25@nsXPTCStubBase@@UEAAIXZ, 25
-    STUBENTRY ?Stub26@nsXPTCStubBase@@UEAAIXZ, 26
-    STUBENTRY ?Stub27@nsXPTCStubBase@@UEAAIXZ, 27
-    STUBENTRY ?Stub28@nsXPTCStubBase@@UEAAIXZ, 28
-    STUBENTRY ?Stub29@nsXPTCStubBase@@UEAAIXZ, 29
-    STUBENTRY ?Stub30@nsXPTCStubBase@@UEAAIXZ, 30
-    STUBENTRY ?Stub31@nsXPTCStubBase@@UEAAIXZ, 31
-    STUBENTRY ?Stub32@nsXPTCStubBase@@UEAAIXZ, 32
-    STUBENTRY ?Stub33@nsXPTCStubBase@@UEAAIXZ, 33
-    STUBENTRY ?Stub34@nsXPTCStubBase@@UEAAIXZ, 34
-    STUBENTRY ?Stub35@nsXPTCStubBase@@UEAAIXZ, 35
-    STUBENTRY ?Stub36@nsXPTCStubBase@@UEAAIXZ, 36
-    STUBENTRY ?Stub37@nsXPTCStubBase@@UEAAIXZ, 37
-    STUBENTRY ?Stub38@nsXPTCStubBase@@UEAAIXZ, 38
-    STUBENTRY ?Stub39@nsXPTCStubBase@@UEAAIXZ, 39
-    STUBENTRY ?Stub40@nsXPTCStubBase@@UEAAIXZ, 40
-    STUBENTRY ?Stub41@nsXPTCStubBase@@UEAAIXZ, 41
-    STUBENTRY ?Stub42@nsXPTCStubBase@@UEAAIXZ, 42
-    STUBENTRY ?Stub43@nsXPTCStubBase@@UEAAIXZ, 43
-    STUBENTRY ?Stub44@nsXPTCStubBase@@UEAAIXZ, 44
-    STUBENTRY ?Stub45@nsXPTCStubBase@@UEAAIXZ, 45
-    STUBENTRY ?Stub46@nsXPTCStubBase@@UEAAIXZ, 46
-    STUBENTRY ?Stub47@nsXPTCStubBase@@UEAAIXZ, 47
-    STUBENTRY ?Stub48@nsXPTCStubBase@@UEAAIXZ, 48
-    STUBENTRY ?Stub49@nsXPTCStubBase@@UEAAIXZ, 49
-    STUBENTRY ?Stub50@nsXPTCStubBase@@UEAAIXZ, 50
-    STUBENTRY ?Stub51@nsXPTCStubBase@@UEAAIXZ, 51
-    STUBENTRY ?Stub52@nsXPTCStubBase@@UEAAIXZ, 52
-    STUBENTRY ?Stub53@nsXPTCStubBase@@UEAAIXZ, 53
-    STUBENTRY ?Stub54@nsXPTCStubBase@@UEAAIXZ, 54
-    STUBENTRY ?Stub55@nsXPTCStubBase@@UEAAIXZ, 55
-    STUBENTRY ?Stub56@nsXPTCStubBase@@UEAAIXZ, 56
-    STUBENTRY ?Stub57@nsXPTCStubBase@@UEAAIXZ, 57
-    STUBENTRY ?Stub58@nsXPTCStubBase@@UEAAIXZ, 58
-    STUBENTRY ?Stub59@nsXPTCStubBase@@UEAAIXZ, 59
-    STUBENTRY ?Stub60@nsXPTCStubBase@@UEAAIXZ, 60
-    STUBENTRY ?Stub61@nsXPTCStubBase@@UEAAIXZ, 61
-    STUBENTRY ?Stub62@nsXPTCStubBase@@UEAAIXZ, 62
-    STUBENTRY ?Stub63@nsXPTCStubBase@@UEAAIXZ, 63
-    STUBENTRY ?Stub64@nsXPTCStubBase@@UEAAIXZ, 64
-    STUBENTRY ?Stub65@nsXPTCStubBase@@UEAAIXZ, 65
-    STUBENTRY ?Stub66@nsXPTCStubBase@@UEAAIXZ, 66
-    STUBENTRY ?Stub67@nsXPTCStubBase@@UEAAIXZ, 67
-    STUBENTRY ?Stub68@nsXPTCStubBase@@UEAAIXZ, 68
-    STUBENTRY ?Stub69@nsXPTCStubBase@@UEAAIXZ, 69
-    STUBENTRY ?Stub70@nsXPTCStubBase@@UEAAIXZ, 70
-    STUBENTRY ?Stub71@nsXPTCStubBase@@UEAAIXZ, 71
-    STUBENTRY ?Stub72@nsXPTCStubBase@@UEAAIXZ, 72
-    STUBENTRY ?Stub73@nsXPTCStubBase@@UEAAIXZ, 73
-    STUBENTRY ?Stub74@nsXPTCStubBase@@UEAAIXZ, 74
-    STUBENTRY ?Stub75@nsXPTCStubBase@@UEAAIXZ, 75
-    STUBENTRY ?Stub76@nsXPTCStubBase@@UEAAIXZ, 76
-    STUBENTRY ?Stub77@nsXPTCStubBase@@UEAAIXZ, 77
-    STUBENTRY ?Stub78@nsXPTCStubBase@@UEAAIXZ, 78
-    STUBENTRY ?Stub79@nsXPTCStubBase@@UEAAIXZ, 79
-    STUBENTRY ?Stub80@nsXPTCStubBase@@UEAAIXZ, 80
-    STUBENTRY ?Stub81@nsXPTCStubBase@@UEAAIXZ, 81
-    STUBENTRY ?Stub82@nsXPTCStubBase@@UEAAIXZ, 82
-    STUBENTRY ?Stub83@nsXPTCStubBase@@UEAAIXZ, 83
-    STUBENTRY ?Stub84@nsXPTCStubBase@@UEAAIXZ, 84
-    STUBENTRY ?Stub85@nsXPTCStubBase@@UEAAIXZ, 85
-    STUBENTRY ?Stub86@nsXPTCStubBase@@UEAAIXZ, 86
-    STUBENTRY ?Stub87@nsXPTCStubBase@@UEAAIXZ, 87
-    STUBENTRY ?Stub88@nsXPTCStubBase@@UEAAIXZ, 88
-    STUBENTRY ?Stub89@nsXPTCStubBase@@UEAAIXZ, 89
-    STUBENTRY ?Stub90@nsXPTCStubBase@@UEAAIXZ, 90
-    STUBENTRY ?Stub91@nsXPTCStubBase@@UEAAIXZ, 91
-    STUBENTRY ?Stub92@nsXPTCStubBase@@UEAAIXZ, 92
-    STUBENTRY ?Stub93@nsXPTCStubBase@@UEAAIXZ, 93
-    STUBENTRY ?Stub94@nsXPTCStubBase@@UEAAIXZ, 94
-    STUBENTRY ?Stub95@nsXPTCStubBase@@UEAAIXZ, 95
-    STUBENTRY ?Stub96@nsXPTCStubBase@@UEAAIXZ, 96
-    STUBENTRY ?Stub97@nsXPTCStubBase@@UEAAIXZ, 97
-    STUBENTRY ?Stub98@nsXPTCStubBase@@UEAAIXZ, 98
-    STUBENTRY ?Stub99@nsXPTCStubBase@@UEAAIXZ, 99
-    STUBENTRY ?Stub100@nsXPTCStubBase@@UEAAIXZ, 100
-    STUBENTRY ?Stub101@nsXPTCStubBase@@UEAAIXZ, 101
-    STUBENTRY ?Stub102@nsXPTCStubBase@@UEAAIXZ, 102
-    STUBENTRY ?Stub103@nsXPTCStubBase@@UEAAIXZ, 103
-    STUBENTRY ?Stub104@nsXPTCStubBase@@UEAAIXZ, 104
-    STUBENTRY ?Stub105@nsXPTCStubBase@@UEAAIXZ, 105
-    STUBENTRY ?Stub106@nsXPTCStubBase@@UEAAIXZ, 106
-    STUBENTRY ?Stub107@nsXPTCStubBase@@UEAAIXZ, 107
-    STUBENTRY ?Stub108@nsXPTCStubBase@@UEAAIXZ, 108
-    STUBENTRY ?Stub109@nsXPTCStubBase@@UEAAIXZ, 109
-    STUBENTRY ?Stub110@nsXPTCStubBase@@UEAAIXZ, 110
-    STUBENTRY ?Stub111@nsXPTCStubBase@@UEAAIXZ, 111
-    STUBENTRY ?Stub112@nsXPTCStubBase@@UEAAIXZ, 112
-    STUBENTRY ?Stub113@nsXPTCStubBase@@UEAAIXZ, 113
-    STUBENTRY ?Stub114@nsXPTCStubBase@@UEAAIXZ, 114
-    STUBENTRY ?Stub115@nsXPTCStubBase@@UEAAIXZ, 115
-    STUBENTRY ?Stub116@nsXPTCStubBase@@UEAAIXZ, 116
-    STUBENTRY ?Stub117@nsXPTCStubBase@@UEAAIXZ, 117
-    STUBENTRY ?Stub118@nsXPTCStubBase@@UEAAIXZ, 118
-    STUBENTRY ?Stub119@nsXPTCStubBase@@UEAAIXZ, 119
-    STUBENTRY ?Stub120@nsXPTCStubBase@@UEAAIXZ, 120
-    STUBENTRY ?Stub121@nsXPTCStubBase@@UEAAIXZ, 121
-    STUBENTRY ?Stub122@nsXPTCStubBase@@UEAAIXZ, 122
-    STUBENTRY ?Stub123@nsXPTCStubBase@@UEAAIXZ, 123
-    STUBENTRY ?Stub124@nsXPTCStubBase@@UEAAIXZ, 124
-    STUBENTRY ?Stub125@nsXPTCStubBase@@UEAAIXZ, 125
-    STUBENTRY ?Stub126@nsXPTCStubBase@@UEAAIXZ, 126
-    STUBENTRY ?Stub127@nsXPTCStubBase@@UEAAIXZ, 127
-    STUBENTRY ?Stub128@nsXPTCStubBase@@UEAAIXZ, 128
-    STUBENTRY ?Stub129@nsXPTCStubBase@@UEAAIXZ, 129
-    STUBENTRY ?Stub130@nsXPTCStubBase@@UEAAIXZ, 130
-    STUBENTRY ?Stub131@nsXPTCStubBase@@UEAAIXZ, 131
-    STUBENTRY ?Stub132@nsXPTCStubBase@@UEAAIXZ, 132
-    STUBENTRY ?Stub133@nsXPTCStubBase@@UEAAIXZ, 133
-    STUBENTRY ?Stub134@nsXPTCStubBase@@UEAAIXZ, 134
-    STUBENTRY ?Stub135@nsXPTCStubBase@@UEAAIXZ, 135
-    STUBENTRY ?Stub136@nsXPTCStubBase@@UEAAIXZ, 136
-    STUBENTRY ?Stub137@nsXPTCStubBase@@UEAAIXZ, 137
-    STUBENTRY ?Stub138@nsXPTCStubBase@@UEAAIXZ, 138
-    STUBENTRY ?Stub139@nsXPTCStubBase@@UEAAIXZ, 139
-    STUBENTRY ?Stub140@nsXPTCStubBase@@UEAAIXZ, 140
-    STUBENTRY ?Stub141@nsXPTCStubBase@@UEAAIXZ, 141
-    STUBENTRY ?Stub142@nsXPTCStubBase@@UEAAIXZ, 142
-    STUBENTRY ?Stub143@nsXPTCStubBase@@UEAAIXZ, 143
-    STUBENTRY ?Stub144@nsXPTCStubBase@@UEAAIXZ, 144
-    STUBENTRY ?Stub145@nsXPTCStubBase@@UEAAIXZ, 145
-    STUBENTRY ?Stub146@nsXPTCStubBase@@UEAAIXZ, 146
-    STUBENTRY ?Stub147@nsXPTCStubBase@@UEAAIXZ, 147
-    STUBENTRY ?Stub148@nsXPTCStubBase@@UEAAIXZ, 148
-    STUBENTRY ?Stub149@nsXPTCStubBase@@UEAAIXZ, 149
-    STUBENTRY ?Stub150@nsXPTCStubBase@@UEAAIXZ, 150
-    STUBENTRY ?Stub151@nsXPTCStubBase@@UEAAIXZ, 151
-    STUBENTRY ?Stub152@nsXPTCStubBase@@UEAAIXZ, 152
-    STUBENTRY ?Stub153@nsXPTCStubBase@@UEAAIXZ, 153
-    STUBENTRY ?Stub154@nsXPTCStubBase@@UEAAIXZ, 154
-    STUBENTRY ?Stub155@nsXPTCStubBase@@UEAAIXZ, 155
-    STUBENTRY ?Stub156@nsXPTCStubBase@@UEAAIXZ, 156
-    STUBENTRY ?Stub157@nsXPTCStubBase@@UEAAIXZ, 157
-    STUBENTRY ?Stub158@nsXPTCStubBase@@UEAAIXZ, 158
-    STUBENTRY ?Stub159@nsXPTCStubBase@@UEAAIXZ, 159
-    STUBENTRY ?Stub160@nsXPTCStubBase@@UEAAIXZ, 160
-    STUBENTRY ?Stub161@nsXPTCStubBase@@UEAAIXZ, 161
-    STUBENTRY ?Stub162@nsXPTCStubBase@@UEAAIXZ, 162
-    STUBENTRY ?Stub163@nsXPTCStubBase@@UEAAIXZ, 163
-    STUBENTRY ?Stub164@nsXPTCStubBase@@UEAAIXZ, 164
-    STUBENTRY ?Stub165@nsXPTCStubBase@@UEAAIXZ, 165
-    STUBENTRY ?Stub166@nsXPTCStubBase@@UEAAIXZ, 166
-    STUBENTRY ?Stub167@nsXPTCStubBase@@UEAAIXZ, 167
-    STUBENTRY ?Stub168@nsXPTCStubBase@@UEAAIXZ, 168
-    STUBENTRY ?Stub169@nsXPTCStubBase@@UEAAIXZ, 169
-    STUBENTRY ?Stub170@nsXPTCStubBase@@UEAAIXZ, 170
-    STUBENTRY ?Stub171@nsXPTCStubBase@@UEAAIXZ, 171
-    STUBENTRY ?Stub172@nsXPTCStubBase@@UEAAIXZ, 172
-    STUBENTRY ?Stub173@nsXPTCStubBase@@UEAAIXZ, 173
-    STUBENTRY ?Stub174@nsXPTCStubBase@@UEAAIXZ, 174
-    STUBENTRY ?Stub175@nsXPTCStubBase@@UEAAIXZ, 175
-    STUBENTRY ?Stub176@nsXPTCStubBase@@UEAAIXZ, 176
-    STUBENTRY ?Stub177@nsXPTCStubBase@@UEAAIXZ, 177
-    STUBENTRY ?Stub178@nsXPTCStubBase@@UEAAIXZ, 178
-    STUBENTRY ?Stub179@nsXPTCStubBase@@UEAAIXZ, 179
-    STUBENTRY ?Stub180@nsXPTCStubBase@@UEAAIXZ, 180
-    STUBENTRY ?Stub181@nsXPTCStubBase@@UEAAIXZ, 181
-    STUBENTRY ?Stub182@nsXPTCStubBase@@UEAAIXZ, 182
-    STUBENTRY ?Stub183@nsXPTCStubBase@@UEAAIXZ, 183
-    STUBENTRY ?Stub184@nsXPTCStubBase@@UEAAIXZ, 184
-    STUBENTRY ?Stub185@nsXPTCStubBase@@UEAAIXZ, 185
-    STUBENTRY ?Stub186@nsXPTCStubBase@@UEAAIXZ, 186
-    STUBENTRY ?Stub187@nsXPTCStubBase@@UEAAIXZ, 187
-    STUBENTRY ?Stub188@nsXPTCStubBase@@UEAAIXZ, 188
-    STUBENTRY ?Stub189@nsXPTCStubBase@@UEAAIXZ, 189
-    STUBENTRY ?Stub190@nsXPTCStubBase@@UEAAIXZ, 190
-    STUBENTRY ?Stub191@nsXPTCStubBase@@UEAAIXZ, 191
-    STUBENTRY ?Stub192@nsXPTCStubBase@@UEAAIXZ, 192
-    STUBENTRY ?Stub193@nsXPTCStubBase@@UEAAIXZ, 193
-    STUBENTRY ?Stub194@nsXPTCStubBase@@UEAAIXZ, 194
-    STUBENTRY ?Stub195@nsXPTCStubBase@@UEAAIXZ, 195
-    STUBENTRY ?Stub196@nsXPTCStubBase@@UEAAIXZ, 196
-    STUBENTRY ?Stub197@nsXPTCStubBase@@UEAAIXZ, 197
-    STUBENTRY ?Stub198@nsXPTCStubBase@@UEAAIXZ, 198
-    STUBENTRY ?Stub199@nsXPTCStubBase@@UEAAIXZ, 199
-    STUBENTRY ?Stub200@nsXPTCStubBase@@UEAAIXZ, 200
-    STUBENTRY ?Stub201@nsXPTCStubBase@@UEAAIXZ, 201
-    STUBENTRY ?Stub202@nsXPTCStubBase@@UEAAIXZ, 202
-    STUBENTRY ?Stub203@nsXPTCStubBase@@UEAAIXZ, 203
-    STUBENTRY ?Stub204@nsXPTCStubBase@@UEAAIXZ, 204
-    STUBENTRY ?Stub205@nsXPTCStubBase@@UEAAIXZ, 205
-    STUBENTRY ?Stub206@nsXPTCStubBase@@UEAAIXZ, 206
-    STUBENTRY ?Stub207@nsXPTCStubBase@@UEAAIXZ, 207
-    STUBENTRY ?Stub208@nsXPTCStubBase@@UEAAIXZ, 208
-    STUBENTRY ?Stub209@nsXPTCStubBase@@UEAAIXZ, 209
-    STUBENTRY ?Stub210@nsXPTCStubBase@@UEAAIXZ, 210
-    STUBENTRY ?Stub211@nsXPTCStubBase@@UEAAIXZ, 211
-    STUBENTRY ?Stub212@nsXPTCStubBase@@UEAAIXZ, 212
-    STUBENTRY ?Stub213@nsXPTCStubBase@@UEAAIXZ, 213
-    STUBENTRY ?Stub214@nsXPTCStubBase@@UEAAIXZ, 214
-    STUBENTRY ?Stub215@nsXPTCStubBase@@UEAAIXZ, 215
-    STUBENTRY ?Stub216@nsXPTCStubBase@@UEAAIXZ, 216
-    STUBENTRY ?Stub217@nsXPTCStubBase@@UEAAIXZ, 217
-    STUBENTRY ?Stub218@nsXPTCStubBase@@UEAAIXZ, 218
-    STUBENTRY ?Stub219@nsXPTCStubBase@@UEAAIXZ, 219
-    STUBENTRY ?Stub220@nsXPTCStubBase@@UEAAIXZ, 220
-    STUBENTRY ?Stub221@nsXPTCStubBase@@UEAAIXZ, 221
-    STUBENTRY ?Stub222@nsXPTCStubBase@@UEAAIXZ, 222
-    STUBENTRY ?Stub223@nsXPTCStubBase@@UEAAIXZ, 223
-    STUBENTRY ?Stub224@nsXPTCStubBase@@UEAAIXZ, 224
-    STUBENTRY ?Stub225@nsXPTCStubBase@@UEAAIXZ, 225
-    STUBENTRY ?Stub226@nsXPTCStubBase@@UEAAIXZ, 226
-    STUBENTRY ?Stub227@nsXPTCStubBase@@UEAAIXZ, 227
-    STUBENTRY ?Stub228@nsXPTCStubBase@@UEAAIXZ, 228
-    STUBENTRY ?Stub229@nsXPTCStubBase@@UEAAIXZ, 229
-    STUBENTRY ?Stub230@nsXPTCStubBase@@UEAAIXZ, 230
-    STUBENTRY ?Stub231@nsXPTCStubBase@@UEAAIXZ, 231
-    STUBENTRY ?Stub232@nsXPTCStubBase@@UEAAIXZ, 232
-    STUBENTRY ?Stub233@nsXPTCStubBase@@UEAAIXZ, 233
-    STUBENTRY ?Stub234@nsXPTCStubBase@@UEAAIXZ, 234
-    STUBENTRY ?Stub235@nsXPTCStubBase@@UEAAIXZ, 235
-    STUBENTRY ?Stub236@nsXPTCStubBase@@UEAAIXZ, 236
-    STUBENTRY ?Stub237@nsXPTCStubBase@@UEAAIXZ, 237
-    STUBENTRY ?Stub238@nsXPTCStubBase@@UEAAIXZ, 238
-    STUBENTRY ?Stub239@nsXPTCStubBase@@UEAAIXZ, 239
-    STUBENTRY ?Stub240@nsXPTCStubBase@@UEAAIXZ, 240
-    STUBENTRY ?Stub241@nsXPTCStubBase@@UEAAIXZ, 241
-    STUBENTRY ?Stub242@nsXPTCStubBase@@UEAAIXZ, 242
-    STUBENTRY ?Stub243@nsXPTCStubBase@@UEAAIXZ, 243
-    STUBENTRY ?Stub244@nsXPTCStubBase@@UEAAIXZ, 244
-    STUBENTRY ?Stub245@nsXPTCStubBase@@UEAAIXZ, 245
-    STUBENTRY ?Stub246@nsXPTCStubBase@@UEAAIXZ, 246
-    STUBENTRY ?Stub247@nsXPTCStubBase@@UEAAIXZ, 247
-    STUBENTRY ?Stub248@nsXPTCStubBase@@UEAAIXZ, 248
-    STUBENTRY ?Stub249@nsXPTCStubBase@@UEAAIXZ, 249
+    STUBENTRY ?Stub3@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 3
+    STUBENTRY ?Stub4@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 4
+    STUBENTRY ?Stub5@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 5
+    STUBENTRY ?Stub6@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 6
+    STUBENTRY ?Stub7@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 7
+    STUBENTRY ?Stub8@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 8
+    STUBENTRY ?Stub9@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 9
+    STUBENTRY ?Stub10@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 10
+    STUBENTRY ?Stub11@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 11
+    STUBENTRY ?Stub12@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 12
+    STUBENTRY ?Stub13@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 13
+    STUBENTRY ?Stub14@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 14
+    STUBENTRY ?Stub15@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 15
+    STUBENTRY ?Stub16@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 16
+    STUBENTRY ?Stub17@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 17
+    STUBENTRY ?Stub18@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 18
+    STUBENTRY ?Stub19@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 19
+    STUBENTRY ?Stub20@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 20
+    STUBENTRY ?Stub21@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 21
+    STUBENTRY ?Stub22@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 22
+    STUBENTRY ?Stub23@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 23
+    STUBENTRY ?Stub24@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 24
+    STUBENTRY ?Stub25@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 25
+    STUBENTRY ?Stub26@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 26
+    STUBENTRY ?Stub27@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 27
+    STUBENTRY ?Stub28@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 28
+    STUBENTRY ?Stub29@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 29
+    STUBENTRY ?Stub30@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 30
+    STUBENTRY ?Stub31@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 31
+    STUBENTRY ?Stub32@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 32
+    STUBENTRY ?Stub33@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 33
+    STUBENTRY ?Stub34@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 34
+    STUBENTRY ?Stub35@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 35
+    STUBENTRY ?Stub36@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 36
+    STUBENTRY ?Stub37@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 37
+    STUBENTRY ?Stub38@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 38
+    STUBENTRY ?Stub39@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 39
+    STUBENTRY ?Stub40@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 40
+    STUBENTRY ?Stub41@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 41
+    STUBENTRY ?Stub42@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 42
+    STUBENTRY ?Stub43@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 43
+    STUBENTRY ?Stub44@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 44
+    STUBENTRY ?Stub45@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 45
+    STUBENTRY ?Stub46@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 46
+    STUBENTRY ?Stub47@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 47
+    STUBENTRY ?Stub48@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 48
+    STUBENTRY ?Stub49@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 49
+    STUBENTRY ?Stub50@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 50
+    STUBENTRY ?Stub51@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 51
+    STUBENTRY ?Stub52@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 52
+    STUBENTRY ?Stub53@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 53
+    STUBENTRY ?Stub54@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 54
+    STUBENTRY ?Stub55@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 55
+    STUBENTRY ?Stub56@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 56
+    STUBENTRY ?Stub57@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 57
+    STUBENTRY ?Stub58@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 58
+    STUBENTRY ?Stub59@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 59
+    STUBENTRY ?Stub60@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 60
+    STUBENTRY ?Stub61@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 61
+    STUBENTRY ?Stub62@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 62
+    STUBENTRY ?Stub63@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 63
+    STUBENTRY ?Stub64@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 64
+    STUBENTRY ?Stub65@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 65
+    STUBENTRY ?Stub66@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 66
+    STUBENTRY ?Stub67@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 67
+    STUBENTRY ?Stub68@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 68
+    STUBENTRY ?Stub69@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 69
+    STUBENTRY ?Stub70@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 70
+    STUBENTRY ?Stub71@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 71
+    STUBENTRY ?Stub72@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 72
+    STUBENTRY ?Stub73@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 73
+    STUBENTRY ?Stub74@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 74
+    STUBENTRY ?Stub75@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 75
+    STUBENTRY ?Stub76@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 76
+    STUBENTRY ?Stub77@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 77
+    STUBENTRY ?Stub78@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 78
+    STUBENTRY ?Stub79@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 79
+    STUBENTRY ?Stub80@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 80
+    STUBENTRY ?Stub81@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 81
+    STUBENTRY ?Stub82@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 82
+    STUBENTRY ?Stub83@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 83
+    STUBENTRY ?Stub84@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 84
+    STUBENTRY ?Stub85@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 85
+    STUBENTRY ?Stub86@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 86
+    STUBENTRY ?Stub87@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 87
+    STUBENTRY ?Stub88@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 88
+    STUBENTRY ?Stub89@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 89
+    STUBENTRY ?Stub90@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 90
+    STUBENTRY ?Stub91@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 91
+    STUBENTRY ?Stub92@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 92
+    STUBENTRY ?Stub93@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 93
+    STUBENTRY ?Stub94@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 94
+    STUBENTRY ?Stub95@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 95
+    STUBENTRY ?Stub96@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 96
+    STUBENTRY ?Stub97@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 97
+    STUBENTRY ?Stub98@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 98
+    STUBENTRY ?Stub99@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 99
+    STUBENTRY ?Stub100@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 100
+    STUBENTRY ?Stub101@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 101
+    STUBENTRY ?Stub102@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 102
+    STUBENTRY ?Stub103@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 103
+    STUBENTRY ?Stub104@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 104
+    STUBENTRY ?Stub105@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 105
+    STUBENTRY ?Stub106@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 106
+    STUBENTRY ?Stub107@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 107
+    STUBENTRY ?Stub108@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 108
+    STUBENTRY ?Stub109@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 109
+    STUBENTRY ?Stub110@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 110
+    STUBENTRY ?Stub111@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 111
+    STUBENTRY ?Stub112@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 112
+    STUBENTRY ?Stub113@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 113
+    STUBENTRY ?Stub114@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 114
+    STUBENTRY ?Stub115@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 115
+    STUBENTRY ?Stub116@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 116
+    STUBENTRY ?Stub117@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 117
+    STUBENTRY ?Stub118@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 118
+    STUBENTRY ?Stub119@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 119
+    STUBENTRY ?Stub120@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 120
+    STUBENTRY ?Stub121@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 121
+    STUBENTRY ?Stub122@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 122
+    STUBENTRY ?Stub123@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 123
+    STUBENTRY ?Stub124@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 124
+    STUBENTRY ?Stub125@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 125
+    STUBENTRY ?Stub126@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 126
+    STUBENTRY ?Stub127@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 127
+    STUBENTRY ?Stub128@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 128
+    STUBENTRY ?Stub129@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 129
+    STUBENTRY ?Stub130@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 130
+    STUBENTRY ?Stub131@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 131
+    STUBENTRY ?Stub132@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 132
+    STUBENTRY ?Stub133@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 133
+    STUBENTRY ?Stub134@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 134
+    STUBENTRY ?Stub135@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 135
+    STUBENTRY ?Stub136@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 136
+    STUBENTRY ?Stub137@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 137
+    STUBENTRY ?Stub138@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 138
+    STUBENTRY ?Stub139@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 139
+    STUBENTRY ?Stub140@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 140
+    STUBENTRY ?Stub141@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 141
+    STUBENTRY ?Stub142@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 142
+    STUBENTRY ?Stub143@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 143
+    STUBENTRY ?Stub144@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 144
+    STUBENTRY ?Stub145@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 145
+    STUBENTRY ?Stub146@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 146
+    STUBENTRY ?Stub147@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 147
+    STUBENTRY ?Stub148@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 148
+    STUBENTRY ?Stub149@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 149
+    STUBENTRY ?Stub150@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 150
+    STUBENTRY ?Stub151@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 151
+    STUBENTRY ?Stub152@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 152
+    STUBENTRY ?Stub153@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 153
+    STUBENTRY ?Stub154@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 154
+    STUBENTRY ?Stub155@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 155
+    STUBENTRY ?Stub156@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 156
+    STUBENTRY ?Stub157@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 157
+    STUBENTRY ?Stub158@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 158
+    STUBENTRY ?Stub159@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 159
+    STUBENTRY ?Stub160@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 160
+    STUBENTRY ?Stub161@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 161
+    STUBENTRY ?Stub162@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 162
+    STUBENTRY ?Stub163@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 163
+    STUBENTRY ?Stub164@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 164
+    STUBENTRY ?Stub165@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 165
+    STUBENTRY ?Stub166@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 166
+    STUBENTRY ?Stub167@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 167
+    STUBENTRY ?Stub168@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 168
+    STUBENTRY ?Stub169@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 169
+    STUBENTRY ?Stub170@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 170
+    STUBENTRY ?Stub171@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 171
+    STUBENTRY ?Stub172@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 172
+    STUBENTRY ?Stub173@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 173
+    STUBENTRY ?Stub174@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 174
+    STUBENTRY ?Stub175@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 175
+    STUBENTRY ?Stub176@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 176
+    STUBENTRY ?Stub177@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 177
+    STUBENTRY ?Stub178@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 178
+    STUBENTRY ?Stub179@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 179
+    STUBENTRY ?Stub180@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 180
+    STUBENTRY ?Stub181@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 181
+    STUBENTRY ?Stub182@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 182
+    STUBENTRY ?Stub183@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 183
+    STUBENTRY ?Stub184@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 184
+    STUBENTRY ?Stub185@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 185
+    STUBENTRY ?Stub186@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 186
+    STUBENTRY ?Stub187@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 187
+    STUBENTRY ?Stub188@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 188
+    STUBENTRY ?Stub189@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 189
+    STUBENTRY ?Stub190@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 190
+    STUBENTRY ?Stub191@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 191
+    STUBENTRY ?Stub192@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 192
+    STUBENTRY ?Stub193@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 193
+    STUBENTRY ?Stub194@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 194
+    STUBENTRY ?Stub195@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 195
+    STUBENTRY ?Stub196@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 196
+    STUBENTRY ?Stub197@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 197
+    STUBENTRY ?Stub198@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 198
+    STUBENTRY ?Stub199@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 199
+    STUBENTRY ?Stub200@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 200
+    STUBENTRY ?Stub201@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 201
+    STUBENTRY ?Stub202@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 202
+    STUBENTRY ?Stub203@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 203
+    STUBENTRY ?Stub204@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 204
+    STUBENTRY ?Stub205@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 205
+    STUBENTRY ?Stub206@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 206
+    STUBENTRY ?Stub207@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 207
+    STUBENTRY ?Stub208@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 208
+    STUBENTRY ?Stub209@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 209
+    STUBENTRY ?Stub210@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 210
+    STUBENTRY ?Stub211@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 211
+    STUBENTRY ?Stub212@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 212
+    STUBENTRY ?Stub213@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 213
+    STUBENTRY ?Stub214@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 214
+    STUBENTRY ?Stub215@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 215
+    STUBENTRY ?Stub216@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 216
+    STUBENTRY ?Stub217@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 217
+    STUBENTRY ?Stub218@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 218
+    STUBENTRY ?Stub219@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 219
+    STUBENTRY ?Stub220@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 220
+    STUBENTRY ?Stub221@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 221
+    STUBENTRY ?Stub222@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 222
+    STUBENTRY ?Stub223@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 223
+    STUBENTRY ?Stub224@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 224
+    STUBENTRY ?Stub225@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 225
+    STUBENTRY ?Stub226@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 226
+    STUBENTRY ?Stub227@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 227
+    STUBENTRY ?Stub228@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 228
+    STUBENTRY ?Stub229@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 229
+    STUBENTRY ?Stub230@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 230
+    STUBENTRY ?Stub231@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 231
+    STUBENTRY ?Stub232@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 232
+    STUBENTRY ?Stub233@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 233
+    STUBENTRY ?Stub234@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 234
+    STUBENTRY ?Stub235@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 235
+    STUBENTRY ?Stub236@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 236
+    STUBENTRY ?Stub237@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 237
+    STUBENTRY ?Stub238@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 238
+    STUBENTRY ?Stub239@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 239
+    STUBENTRY ?Stub240@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 240
+    STUBENTRY ?Stub241@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 241
+    STUBENTRY ?Stub242@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 242
+    STUBENTRY ?Stub243@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 243
+    STUBENTRY ?Stub244@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 244
+    STUBENTRY ?Stub245@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 245
+    STUBENTRY ?Stub246@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 246
+    STUBENTRY ?Stub247@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 247
+    STUBENTRY ?Stub248@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 248
+    STUBENTRY ?Stub249@nsXPTCStubBase@@UEAA?AW4tag_nsresult@@XZ, 249
 
 END