Bug 924402. When an object that can only be returned from [NewObject] methods is used in a dictionary, just skip generating a ToObject for that dictionary. r=peterv

This commit is contained in:
Boris Zbarsky 2013-10-28 19:34:08 -04:00
parent eff45ee497
commit 38d1832bb2

View File

@ -8460,7 +8460,13 @@ if (""",
methods.append(self.initMethod())
methods.append(self.initFromJSONMethod())
methods.append(self.toObjectMethod())
try:
methods.append(self.toObjectMethod())
except MethodNotCreatorError:
# If we can't have a ToObject() because one of our members can only
# be returned from [NewObject] methods, then just skip generating
# ToObject().
pass
methods.append(self.traceDictionaryMethod())
if CGDictionary.isDictionaryCopyConstructible(d):