Bug 1500926 - Part 3: Remove unused WebIDL Codegen items, r=bzbarsky
Differential Revision:
https://phabricator.services.mozilla.com/D9465
--- 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