Bug 1257037 part 14. Remove the now-unused skipGen bits from binding code. r=khuey

This commit is contained in:
Boris Zbarsky 2016-07-08 00:37:55 -04:00
Родитель d959247e48
Коммит 8c00d2132b
3 изменённых файлов: 9 добавлений и 22 удалений

Просмотреть файл

@ -48,10 +48,6 @@
# * implicitJSContext - attributes and methods specified in the .webidl file # * implicitJSContext - attributes and methods specified in the .webidl file
# that require a JSContext as the first argument # that require a JSContext as the first argument
# #
# A descriptor can also have 'skipGen': True specified if it should be skipped
# when deciding what header includes to generate and should never have an
# implementation generated for it. This is now unused and is about to go away.
#
# The value for an interface is a dictionary which specifies the # The value for an interface is a dictionary which specifies the
# descriptor to use when generating that interface's binding. # descriptor to use when generating that interface's binding.

Просмотреть файл

@ -5315,7 +5315,7 @@ def getJSToNativeConversionInfo(type, descriptorProvider, failureCode=None,
""", """,
getPromiseGlobal=getPromiseGlobal, getPromiseGlobal=getPromiseGlobal,
exceptionCode=exceptionCode) exceptionCode=exceptionCode)
elif not descriptor.skipGen and not descriptor.interface.isConsequential() and not descriptor.interface.isExternal(): elif not descriptor.interface.isConsequential() and not descriptor.interface.isExternal():
if failureCode is not None: if failureCode is not None:
templateBody += str(CastableObjectUnwrapper( templateBody += str(CastableObjectUnwrapper(
descriptor, descriptor,
@ -6423,7 +6423,7 @@ def getWrapTemplateForType(type, descriptorProvider, result, successCode,
else: else:
wrappingCode = "" wrappingCode = ""
if not descriptor.interface.isExternal() and not descriptor.skipGen: if not descriptor.interface.isExternal():
if descriptor.wrapperCache: if descriptor.wrapperCache:
wrapMethod = "GetOrCreateDOMReflector" wrapMethod = "GetOrCreateDOMReflector"
wrapArgs = "cx, %s, ${jsvalHandle}" % result wrapArgs = "cx, %s, ${jsvalHandle}" % result
@ -12953,8 +12953,7 @@ class CGRegisterWorkerBindings(CGAbstractMethod):
def definition_body(self): def definition_body(self):
descriptors = self.config.getDescriptors(hasInterfaceObject=True, descriptors = self.config.getDescriptors(hasInterfaceObject=True,
isExposedInAnyWorker=True, isExposedInAnyWorker=True,
register=True, register=True)
skipGen=False)
conditions = [] conditions = []
for desc in descriptors: for desc in descriptors:
bindingNS = toBindingNamespace(desc.name) bindingNS = toBindingNamespace(desc.name)
@ -12979,8 +12978,7 @@ class CGRegisterWorkerDebuggerBindings(CGAbstractMethod):
def definition_body(self): def definition_body(self):
descriptors = self.config.getDescriptors(hasInterfaceObject=True, descriptors = self.config.getDescriptors(hasInterfaceObject=True,
isExposedInWorkerDebugger=True, isExposedInWorkerDebugger=True,
register=True, register=True)
skipGen=False)
conditions = [] conditions = []
for desc in descriptors: for desc in descriptors:
bindingNS = toBindingNamespace(desc.name) bindingNS = toBindingNamespace(desc.name)
@ -13007,8 +13005,7 @@ class CGResolveSystemBinding(CGAbstractMethod):
def definition_body(self): def definition_body(self):
descriptors = self.config.getDescriptors(hasInterfaceObject=True, descriptors = self.config.getDescriptors(hasInterfaceObject=True,
isExposedInSystemGlobals=True, isExposedInSystemGlobals=True,
register=True, register=True)
skipGen=False)
def descNameToId(name): def descNameToId(name):
return "s%s_id" % name return "s%s_id" % name
@ -13307,8 +13304,7 @@ class CGBindingRoot(CGThing):
True) True)
descriptors = config.getDescriptors(webIDLFile=webIDLFile, descriptors = config.getDescriptors(webIDLFile=webIDLFile,
hasInterfaceOrInterfacePrototypeObject=True, hasInterfaceOrInterfacePrototypeObject=True)
skipGen=False)
unionTypes = UnionsForFile(config, webIDLFile) unionTypes = UnionsForFile(config, webIDLFile)
@ -16287,8 +16283,7 @@ class GlobalGenRoots():
defineIncludes = [CGHeaders.getDeclarationFilename(desc.interface) defineIncludes = [CGHeaders.getDeclarationFilename(desc.interface)
for desc in config.getDescriptors(hasInterfaceObject=True, for desc in config.getDescriptors(hasInterfaceObject=True,
register=True, register=True,
isExposedInAnyWorker=True, isExposedInAnyWorker=True)]
skipGen=False)]
curr = CGHeaders([], [], [], [], [], defineIncludes, curr = CGHeaders([], [], [], [], [], defineIncludes,
'RegisterWorkerBindings', curr) 'RegisterWorkerBindings', curr)
@ -16313,8 +16308,7 @@ class GlobalGenRoots():
defineIncludes = [CGHeaders.getDeclarationFilename(desc.interface) defineIncludes = [CGHeaders.getDeclarationFilename(desc.interface)
for desc in config.getDescriptors(hasInterfaceObject=True, for desc in config.getDescriptors(hasInterfaceObject=True,
register=True, register=True,
isExposedInWorkerDebugger=True, isExposedInWorkerDebugger=True)]
skipGen=False)]
curr = CGHeaders([], [], [], [], [], defineIncludes, curr = CGHeaders([], [], [], [], [], defineIncludes,
'RegisterWorkerDebuggerBindings', curr) 'RegisterWorkerDebuggerBindings', curr)
@ -16339,8 +16333,7 @@ class GlobalGenRoots():
defineIncludes = [CGHeaders.getDeclarationFilename(desc.interface) defineIncludes = [CGHeaders.getDeclarationFilename(desc.interface)
for desc in config.getDescriptors(hasInterfaceObject=True, for desc in config.getDescriptors(hasInterfaceObject=True,
register=True, register=True,
isExposedInSystemGlobals=True, isExposedInSystemGlobals=True)]
skipGen=False)]
defineIncludes.append("nsThreadUtils.h") # For NS_IsMainThread defineIncludes.append("nsThreadUtils.h") # For NS_IsMainThread
defineIncludes.append("js/Id.h") # For jsid defineIncludes.append("js/Id.h") # For jsid
defineIncludes.append("mozilla/dom/BindingUtils.h") # AtomizeAndPinJSString defineIncludes.append("mozilla/dom/BindingUtils.h") # AtomizeAndPinJSString

Просмотреть файл

@ -335,8 +335,6 @@ class Descriptor(DescriptorProvider):
else: else:
self.jsImplParentHeader = self.jsImplParent.replace("::", "/") + ".h" self.jsImplParentHeader = self.jsImplParent.replace("::", "/") + ".h"
self.skipGen = desc.get('skipGen', False)
self.notflattened = desc.get('notflattened', False) self.notflattened = desc.get('notflattened', False)
self.register = desc.get('register', True) self.register = desc.get('register', True)