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 90d9177654
commit 70192ce8ff

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):