Bug 1500926 - Part 3: Remove unused WebIDL Codegen items, r=bzbarsky
authorNika Layzell <nika@thelayzells.com>
Mon, 22 Oct 2018 22:03:17 -0400
changeset 491208 8b0b407e053f4bbde1b14abc8b3d28d6251c908b
parent 491207 3d9631fca868cb87b172f0b615aea84042084356
child 491209 109ff0694f9a131d47f08dbe25c941cbb0f014b6
push id247
push userfmarier@mozilla.com
push dateSat, 27 Oct 2018 01:06:44 +0000
reviewersbzbarsky
bugs1500926
milestone65.0a1
Bug 1500926 - Part 3: Remove unused WebIDL Codegen items, r=bzbarsky Differential Revision: https://phabricator.services.mozilla.com/D9465
dom/bindings/Codegen.py
--- a/dom/bindings/Codegen.py
+++ b/dom/bindings/Codegen.py
@@ -13771,59 +13771,16 @@ class CGGlobalNames(CGGeneric):
             """,
             count=len(phf.entries),
             strings="\n".join(strings) + ";\n",
             entries=entries,
             getter=getter)
         CGGeneric.__init__(self, define=define)
 
 
-class CGGlobalNamesString(CGGeneric):
-    def __init__(self, config):
-        globalNames = getGlobalNames(config)
-        currentOffset = 0
-        strings = []
-        for (name, _) in globalNames:
-            strings.append('/* %i */ "%s\\0"' % (currentOffset, name))
-            currentOffset += len(name) + 1 # Add trailing null.
-        define = fill("""
-            const uint32_t WebIDLGlobalNameHash::sCount = ${count};
-
-            const char WebIDLGlobalNameHash::sNames[] =
-              $*{strings}
-
-            """,
-            count=len(globalNames),
-            strings="\n".join(strings) + ";\n")
-
-        CGGeneric.__init__(self, define=define)
-
-
-class CGRegisterGlobalNames(CGAbstractMethod):
-    def __init__(self, config):
-        CGAbstractMethod.__init__(self, None, 'RegisterWebIDLGlobalNames',
-                                  'void', [])
-        self.config = config
-
-    def definition_body(self):
-        def getCheck(desc):
-            if not desc.isExposedConditionally():
-                return "nullptr"
-            return "%s_Binding::ConstructorEnabled" % desc.name
-
-        define = ""
-        currentOffset = 0
-        for (name, desc) in getGlobalNames(self.config):
-            length = len(name)
-            define += "WebIDLGlobalNameHash::Register(%i, %i, %s_Binding::CreateInterfaceObjects, %s, constructors::id::%s);\n" % (
-                currentOffset, length, desc.name, getCheck(desc), desc.name)
-            currentOffset += length + 1 # Add trailing null.
-        return define
-
-
 def dependencySortObjects(objects, dependencyGetter, nameGetter):
     """
     Sort IDL objects with dependencies on each other such that if A
     depends on B then B will come before A.  This is needed for
     declaring C++ classes in the right order, for example.  Objects
     that have no dependencies are just sorted by name.
 
     objects should be something that can produce a set of objects