summaryrefslogtreecommitdiffstats
path: root/dom/bindings/Configuration.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:13:27 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:13:27 +0000
commit40a355a42d4a9444dc753c04c6608dade2f06a23 (patch)
tree871fc667d2de662f171103ce5ec067014ef85e61 /dom/bindings/Configuration.py
parentAdding upstream version 124.0.1. (diff)
downloadfirefox-40a355a42d4a9444dc753c04c6608dade2f06a23.tar.xz
firefox-40a355a42d4a9444dc753c04c6608dade2f06a23.zip
Adding upstream version 125.0.1.upstream/125.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'dom/bindings/Configuration.py')
-rw-r--r--dom/bindings/Configuration.py27
1 files changed, 13 insertions, 14 deletions
diff --git a/dom/bindings/Configuration.py b/dom/bindings/Configuration.py
index 266a8db34a..354a450de6 100644
--- a/dom/bindings/Configuration.py
+++ b/dom/bindings/Configuration.py
@@ -7,7 +7,6 @@ import itertools
import os
from collections import defaultdict
-import six
from WebIDL import IDLIncludesStatement
autogenerated_comment = "/* THIS FILE IS AUTOGENERATED - DO NOT EDIT */\n"
@@ -98,7 +97,7 @@ class Configuration(DescriptorProvider):
# different .webidl file than their LHS interface. Make sure we
# don't have any of those. See similar block below for partial
# interfaces!
- if thing.interface.filename() != thing.filename():
+ if thing.interface.filename != thing.filename:
raise TypeError(
"The binding build system doesn't really support "
"'includes' statements which don't appear in the "
@@ -124,7 +123,7 @@ class Configuration(DescriptorProvider):
# statements!
if not thing.isExternal():
for partial in thing.getPartials():
- if partial.filename() != thing.filename():
+ if partial.filename != thing.filename:
raise TypeError(
"The binding build system doesn't really support "
"partial interfaces/namespaces/mixins which don't "
@@ -146,7 +145,7 @@ class Configuration(DescriptorProvider):
or iface.getExtendedAttribute("Func")
== ["nsContentUtils::IsCallerChromeOrFuzzingEnabled"]
or not iface.hasInterfaceObject()
- or isInWebIDLRoot(iface.filename())
+ or isInWebIDLRoot(iface.filename)
):
raise TypeError(
"Interfaces which are exposed to the web may only be "
@@ -187,7 +186,7 @@ class Configuration(DescriptorProvider):
self.descriptorsByFile = {}
for d in self.descriptors:
- self.descriptorsByFile.setdefault(d.interface.filename(), []).append(d)
+ self.descriptorsByFile.setdefault(d.interface.filename, []).append(d)
self.enums = [e for e in parseData if e.isEnum()]
@@ -212,19 +211,19 @@ class Configuration(DescriptorProvider):
def addUnion(t):
filenamesForUnion = self.filenamesPerUnion[t.name]
- if t.filename() not in filenamesForUnion:
+ if t.filename not in filenamesForUnion:
# We have a to be a bit careful: some of our built-in
# typedefs are for unions, and those unions end up with
# "<unknown>" as the filename. If that happens, we don't
# want to try associating this union with one particular
# filename, since there isn't one to associate it with,
# really.
- if t.filename() == "<unknown>":
+ if t.filename == "<unknown>":
uniqueFilenameForUnion = None
elif len(filenamesForUnion) == 0:
# This is the first file that we found a union with this
# name in, record the union as part of the file.
- uniqueFilenameForUnion = t.filename()
+ uniqueFilenameForUnion = t.filename
else:
# We already found a file that contains a union with
# this name.
@@ -246,7 +245,7 @@ class Configuration(DescriptorProvider):
# the filename as None, so that we can detect that.
uniqueFilenameForUnion = None
self.unionsPerFilename[uniqueFilenameForUnion].append(t)
- filenamesForUnion.add(t.filename())
+ filenamesForUnion.add(t.filename)
def addUnions(t):
t = findInnermostType(t)
@@ -498,7 +497,7 @@ class Configuration(DescriptorProvider):
# Collect up our filters, because we may have a webIDLFile filter that
# we always want to apply first.
tofilter = [(lambda x: x.interface.isExternal(), False)]
- for key, val in six.iteritems(filters):
+ for key, val in filters.items():
if key == "webIDLFile":
# Special-case this part to make it fast, since most of our
# getDescriptors calls are conditioned on a webIDLFile. We may
@@ -571,13 +570,13 @@ class Configuration(DescriptorProvider):
return curr
def getEnums(self, webIDLFile):
- return [e for e in self.enums if e.filename() == webIDLFile]
+ return [e for e in self.enums if e.filename == webIDLFile]
def getDictionaries(self, webIDLFile):
- return [d for d in self.dictionaries if d.filename() == webIDLFile]
+ return [d for d in self.dictionaries if d.filename == webIDLFile]
def getCallbacks(self, webIDLFile):
- return [c for c in self.callbacks if c.filename() == webIDLFile]
+ return [c for c in self.callbacks if c.filename == webIDLFile]
def getDescriptor(self, interfaceName):
"""
@@ -704,7 +703,7 @@ class Descriptor(DescriptorProvider):
# import it here, sadly.
# Use our local version of the header, not the exported one, so that
# test bindings, which don't export, will work correctly.
- basename = os.path.basename(self.interface.filename())
+ basename = os.path.basename(self.interface.filename)
headerDefault = basename.replace(".webidl", "Binding.h")
else:
if not self.interface.isExternal() and self.interface.getExtendedAttribute(