Bug 1582592. Improve the default return type for example codegen's GetParentObject. r=edgar

Differential Revision: https://phabricator.services.mozilla.com/D49467

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Boris Zbarsky 2019-10-17 22:08:54 +00:00
parent 215bc3accf
commit e7ff63c252

View File

@ -15744,8 +15744,13 @@ class CGBindingImplClass(CGClass):
return None
def getGetParentObjectReturnType(self):
return ("// TODO: return something sensible here, and change the return type\n"
"%s*" % self.descriptor.nativeType.split('::')[-1])
# The lack of newline before the end of the string is on purpose.
return dedent(
"""
// This should return something that eventually allows finding a
// path to the global this object is associated with. Most simply,
// returning an actual global works.
nsIGlobalObject*""")
def getGetParentObjectBody(self):
return None