author | Boris Zbarsky <bzbarsky@mit.edu> |
Fri, 08 Jul 2016 00:37:55 -0400 | |
changeset 304183 | 4082fdfd16fb2e87556f948bb09e3c3edfdd9fb1 |
parent 304182 | 762c289ada581c1cef856ab16b241355c2d6c7bc |
child 304184 | a92d0eec5c91eb50116758bf14d05fde28bf788a |
push id | 30414 |
push user | cbook@mozilla.com |
push date | Fri, 08 Jul 2016 09:59:01 +0000 |
treeherder | mozilla-central@45682df2d2d4 [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | khuey |
bugs | 1257037 |
milestone | 50.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
--- a/dom/bindings/Bindings.conf +++ b/dom/bindings/Bindings.conf @@ -43,20 +43,16 @@ # # The following fields are either a string, an array (defaults to an empty # array) or a dictionary with three possible keys (all, getterOnly and # setterOnly) each having such an array as the value # # * implicitJSContext - attributes and methods specified in the .webidl file # 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 # descriptor to use when generating that interface's binding. DOMInterfaces = { 'AbstractWorker': { 'concrete': False },
--- a/dom/bindings/Codegen.py +++ b/dom/bindings/Codegen.py @@ -5310,17 +5310,17 @@ def getJSToNativeConversionInfo(type, de promiseRv.MaybeSetPendingException(cx); $*{exceptionCode} } #endif // SPIDERMONKEY_PROMISE } """, getPromiseGlobal=getPromiseGlobal, 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: templateBody += str(CastableObjectUnwrapper( descriptor, "&${val}.toObject()", "${declName}", failureCode)) else: templateBody += str(FailureFatalCastableObjectUnwrapper( @@ -6418,17 +6418,17 @@ def getWrapTemplateForType(type, descrip descriptor = descriptorProvider.getDescriptor(type.unroll().inner.identifier.name) if type.nullable(): wrappingCode = ("if (!%s) {\n" % (result) + indent(setNull()) + "}\n") else: wrappingCode = "" - if not descriptor.interface.isExternal() and not descriptor.skipGen: + if not descriptor.interface.isExternal(): if descriptor.wrapperCache: wrapMethod = "GetOrCreateDOMReflector" wrapArgs = "cx, %s, ${jsvalHandle}" % result else: # Hack: the "Promise" interface is OK to return from # non-newobject things even when it's not wrappercached; that # happens when using SpiderMonkey promises, and the WrapObject() # method will just return the existing reflector, which is just @@ -12948,18 +12948,17 @@ class CGRegisterWorkerBindings(CGAbstrac CGAbstractMethod.__init__(self, None, 'RegisterWorkerBindings', 'bool', [Argument('JSContext*', 'aCx'), Argument('JS::Handle<JSObject*>', 'aObj')]) self.config = config def definition_body(self): descriptors = self.config.getDescriptors(hasInterfaceObject=True, isExposedInAnyWorker=True, - register=True, - skipGen=False) + register=True) conditions = [] for desc in descriptors: bindingNS = toBindingNamespace(desc.name) condition = "!%s::GetConstructorObject(aCx, aObj)" % bindingNS if desc.isExposedConditionally(): condition = ( "%s::ConstructorEnabled(aCx, aObj) && " % bindingNS + condition) @@ -12974,18 +12973,17 @@ class CGRegisterWorkerDebuggerBindings(C CGAbstractMethod.__init__(self, None, 'RegisterWorkerDebuggerBindings', 'bool', [Argument('JSContext*', 'aCx'), Argument('JS::Handle<JSObject*>', 'aObj')]) self.config = config def definition_body(self): descriptors = self.config.getDescriptors(hasInterfaceObject=True, isExposedInWorkerDebugger=True, - register=True, - skipGen=False) + register=True) conditions = [] for desc in descriptors: bindingNS = toBindingNamespace(desc.name) condition = "!%s::GetConstructorObject(aCx, aObj)" % bindingNS if desc.isExposedConditionally(): condition = ( "%s::ConstructorEnabled(aCx, aObj) && " % bindingNS + condition) @@ -13002,18 +13000,17 @@ class CGResolveSystemBinding(CGAbstractM Argument('JS::Handle<JSObject*>', 'aObj'), Argument('JS::Handle<jsid>', 'aId'), Argument('bool*', 'aResolvedp')]) self.config = config def definition_body(self): descriptors = self.config.getDescriptors(hasInterfaceObject=True, isExposedInSystemGlobals=True, - register=True, - skipGen=False) + register=True) def descNameToId(name): return "s%s_id" % name jsidNames = [descNameToId(desc.name) for desc in descriptors] jsidDecls = CGList(CGGeneric("static jsid %s;\n" % name) for name in jsidNames) jsidInits = CGList( @@ -13302,18 +13299,17 @@ class CGBindingRoot(CGThing): bindingDeclareHeaders = dict.fromkeys(( 'mozilla/dom/BindingDeclarations.h', 'mozilla/dom/Nullable.h', 'mozilla/ErrorResult.h', ), True) descriptors = config.getDescriptors(webIDLFile=webIDLFile, - hasInterfaceOrInterfacePrototypeObject=True, - skipGen=False) + hasInterfaceOrInterfacePrototypeObject=True) unionTypes = UnionsForFile(config, webIDLFile) (unionHeaders, unionImplheaders, unionDeclarations, traverseMethods, unlinkMethods, unionStructs) = UnionTypes(unionTypes, config) bindingDeclareHeaders.update(dict.fromkeys(unionHeaders, True)) bindingHeaders.update(dict.fromkeys(unionImplheaders, True)) @@ -16282,18 +16278,17 @@ class GlobalGenRoots(): curr = CGNamespace.build(['mozilla', 'dom'], CGWrapper(curr, post='\n')) curr = CGWrapper(curr, post='\n') # Add the includes defineIncludes = [CGHeaders.getDeclarationFilename(desc.interface) for desc in config.getDescriptors(hasInterfaceObject=True, register=True, - isExposedInAnyWorker=True, - skipGen=False)] + isExposedInAnyWorker=True)] curr = CGHeaders([], [], [], [], [], defineIncludes, 'RegisterWorkerBindings', curr) # Add include guards. curr = CGIncludeGuard('RegisterWorkerBindings', curr) # Done. @@ -16308,18 +16303,17 @@ class GlobalGenRoots(): curr = CGNamespace.build(['mozilla', 'dom'], CGWrapper(curr, post='\n')) curr = CGWrapper(curr, post='\n') # Add the includes defineIncludes = [CGHeaders.getDeclarationFilename(desc.interface) for desc in config.getDescriptors(hasInterfaceObject=True, register=True, - isExposedInWorkerDebugger=True, - skipGen=False)] + isExposedInWorkerDebugger=True)] curr = CGHeaders([], [], [], [], [], defineIncludes, 'RegisterWorkerDebuggerBindings', curr) # Add include guards. curr = CGIncludeGuard('RegisterWorkerDebuggerBindings', curr) # Done. @@ -16334,18 +16328,17 @@ class GlobalGenRoots(): curr = CGNamespace.build(['mozilla', 'dom'], CGWrapper(curr, post='\n')) curr = CGWrapper(curr, post='\n') # Add the includes defineIncludes = [CGHeaders.getDeclarationFilename(desc.interface) for desc in config.getDescriptors(hasInterfaceObject=True, register=True, - isExposedInSystemGlobals=True, - skipGen=False)] + isExposedInSystemGlobals=True)] defineIncludes.append("nsThreadUtils.h") # For NS_IsMainThread defineIncludes.append("js/Id.h") # For jsid defineIncludes.append("mozilla/dom/BindingUtils.h") # AtomizeAndPinJSString curr = CGHeaders([], [], [], [], [], defineIncludes, 'ResolveSystemBinding', curr) # Add include guards.
--- a/dom/bindings/Configuration.py +++ b/dom/bindings/Configuration.py @@ -330,18 +330,16 @@ class Descriptor(DescriptorProvider): headerDefault = headerDefault.replace("::", "/") + ".h" self.headerFile = desc.get('headerFile', headerDefault) self.headerIsDefault = self.headerFile == headerDefault if self.jsImplParent == self.nativeType: self.jsImplParentHeader = self.headerFile else: self.jsImplParentHeader = self.jsImplParent.replace("::", "/") + ".h" - self.skipGen = desc.get('skipGen', False) - self.notflattened = desc.get('notflattened', False) self.register = desc.get('register', True) self.hasXPConnectImpls = desc.get('hasXPConnectImpls', False) # If we're concrete, we need to crawl our ancestor interfaces and mark # them as having a concrete descendant. self.concrete = (not self.interface.isExternal() and