mirror of
https://github.com/servo/servo.git
synced 2025-07-25 00:00:20 +01:00
Use IDL sequence default value
This commit is contained in:
parent
4ad08fff04
commit
01e0b2cb5e
13 changed files with 40 additions and 65 deletions
|
@ -6388,8 +6388,11 @@ class CGDictionary(CGThing):
|
|||
def struct(self):
|
||||
d = self.dictionary
|
||||
if d.parent:
|
||||
inheritance = " pub parent: %s::%s,\n" % (self.makeModuleName(d.parent),
|
||||
self.makeClassName(d.parent))
|
||||
typeName = "%s::%s" % (self.makeModuleName(d.parent),
|
||||
self.makeClassName(d.parent))
|
||||
if type_needs_tracing(d.parent):
|
||||
typeName = "RootedTraceableBox<%s>" % typeName
|
||||
inheritance = " pub parent: %s,\n" % typeName
|
||||
else:
|
||||
inheritance = ""
|
||||
memberDecls = [" pub %s: %s," %
|
||||
|
@ -6520,10 +6523,7 @@ class CGDictionary(CGThing):
|
|||
})
|
||||
|
||||
def membersNeedTracing(self):
|
||||
for member, _ in self.memberInfo:
|
||||
if type_needs_tracing(member.type):
|
||||
return True
|
||||
return False
|
||||
return type_needs_tracing(self.dictionary)
|
||||
|
||||
@staticmethod
|
||||
def makeDictionaryName(dictionary):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue