diff --git a/xpcom/base/ErrorList.py b/xpcom/base/ErrorList.py index fe461443585a..c72fc6f8ccdb 100755 --- a/xpcom/base/ErrorList.py +++ b/xpcom/base/ErrorList.py @@ -1,6 +1,5 @@ #!/usr/bin/env python import json -from collections import OrderedDict class Mod: @@ -21,7 +20,7 @@ class Mod: Mod.active = None -modules = OrderedDict() +modules = {} # To add error code to your module, you need to do the following: # @@ -123,7 +122,7 @@ def SUCCESS(code): # Errors is an ordered dictionary, so that we can recover the order in which # they were defined. This is important for determining which name is the # canonical name for an error code. -errors = OrderedDict() +errors = {} # Standard "it worked" return value errors["NS_OK"] = 0 diff --git a/xpcom/reflect/xptinfo/xptcodegen.py b/xpcom/reflect/xptinfo/xptcodegen.py index d089e8480790..f3ae66c96bfc 100644 --- a/xpcom/reflect/xptinfo/xptcodegen.py +++ b/xpcom/reflect/xptinfo/xptcodegen.py @@ -7,7 +7,6 @@ import functools import json -from collections import OrderedDict import buildconfig from perfecthash import PerfectHash @@ -208,7 +207,7 @@ def link_to_cpp(interfaces, fd, header_fd): consts = [] domobjects = [] domobject_cache = {} - strings = OrderedDict() + strings = {} def lower_uuid(uuid): return ( @@ -242,7 +241,7 @@ def link_to_cpp(interfaces, fd, header_fd): # We've already seen this string. return strings[s] elif len(strings): - # Get the last string we inserted (should be O(1) on OrderedDict). + # Get the last string we inserted (should be O(1) on dict). last_s = next(reversed(strings)) strings[s] = strings[last_s] + len(last_s) + 1 else: