author | Tim Taubert <ttaubert@mozilla.com> |
Wed, 07 Feb 2018 12:01:00 +0100 | |
changeset 402778 | 13e0088b85fd056b409e79563ac707858662264c |
parent 402777 | f1a8cafe2ed9702e3e3709d8836bd8b12f93cf12 |
child 402779 | fd15c14e5efb1874591f4e113c1ae1c49154804f |
push id | 33402 |
push user | aciure@mozilla.com |
push date | Wed, 07 Feb 2018 22:06:27 +0000 |
treeherder | mozilla-central@8cc2427a322c [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | bz |
bugs | 1436308 |
milestone | 60.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
--- a/dom/bindings/Codegen.py +++ b/dom/bindings/Codegen.py @@ -13818,16 +13818,21 @@ class CGDictionary(CGThing): # Strings are always OK. return True if type.isPrimitive(): # Primitives (numbers and booleans) are ok, as long as # they're not unrestricted float/double. return not type.isFloat() or not type.isUnrestricted() + if type.isRecord(): + # Records are okay, as long as the value type is. + # Per spec, only strings are allowed as keys. + return CGDictionary.typeSafeToJSONify(type.inner) + return False @staticmethod def dictionarySafeToJSONify(dictionary): # The dictionary itself is OK, so we're good if all our types are. return all(CGDictionary.typeSafeToJSONify(m.type) for m in dictionary.members)