зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1246153 part 1. Restrict initialization of dictionaries from JSON to dictionaries that can actually be represented in JSON. r=bholley
This commit is contained in:
Родитель
c8663502fd
Коммит
190e8db66b
|
@ -12485,10 +12485,12 @@ class CGDictionary(CGThing):
|
|||
methods.append(self.initIdsMethod())
|
||||
|
||||
methods.append(self.initMethod())
|
||||
methods.append(self.initFromJSONMethod())
|
||||
canBeRepresentedAsJSON = self.dictionarySafeToJSONify(self.dictionary)
|
||||
if canBeRepresentedAsJSON:
|
||||
methods.append(self.initFromJSONMethod())
|
||||
try:
|
||||
methods.append(self.toObjectInternalMethod())
|
||||
if self.dictionarySafeToJSONify(self.dictionary):
|
||||
if canBeRepresentedAsJSON:
|
||||
methods.append(self.toJSONMethod())
|
||||
except MethodNotNewObjectError:
|
||||
# If we can't have a ToObjectInternal() because one of our members
|
||||
|
|
Загрузка…
Ссылка в новой задаче