зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1302442 - Add ignore-initialization-check annotation to class member variables constructed by Codegen. r=peterv
MozReview-Commit-ID: 2vd6EELGSSj --HG-- extra : rebase_source : 810b61ea983b8a2636130f488c13b1ee61996aef
This commit is contained in:
Родитель
401257b7ed
Коммит
0a7e6c2c05
|
@ -10255,15 +10255,18 @@ class ClassDestructor(ClassItem):
|
|||
|
||||
class ClassMember(ClassItem):
|
||||
def __init__(self, name, type, visibility="private", static=False,
|
||||
body=None):
|
||||
body=None, hasIgnoreInitCheckFlag=False):
|
||||
self.type = type
|
||||
self.static = static
|
||||
self.body = body
|
||||
self.hasIgnoreInitCheckFlag = hasIgnoreInitCheckFlag;
|
||||
ClassItem.__init__(self, name, visibility)
|
||||
|
||||
def declare(self, cgClass):
|
||||
return '%s%s %s;\n' % ('static ' if self.static else '', self.type,
|
||||
self.name)
|
||||
return '%s%s%s %s;\n' % ('static ' if self.static else '',
|
||||
'MOZ_INIT_OUTSIDE_CTOR '
|
||||
if self.hasIgnoreInitCheckFlag else '',
|
||||
self.type, self.name)
|
||||
|
||||
def define(self, cgClass):
|
||||
if not self.static:
|
||||
|
@ -12519,7 +12522,8 @@ class CGDictionary(CGThing):
|
|||
members = [ClassMember(self.makeMemberName(m[0].identifier.name),
|
||||
self.getMemberType(m),
|
||||
visibility="public",
|
||||
body=self.getMemberInitializer(m))
|
||||
body=self.getMemberInitializer(m),
|
||||
hasIgnoreInitCheckFlag=True)
|
||||
for m in self.memberInfo]
|
||||
if d.parent:
|
||||
# We always want to init our parent with our non-initializing
|
||||
|
|
Загрузка…
Ссылка в новой задаче