Bug 1307142 - correlate MOZ_ASSERT_IF with logic from IsConvertibleToDictionary. r?peterv draft
authorAndi-Bogdan Postelnicu <bpostelnicu@mozilla.com>
Mon, 03 Oct 2016 18:40:36 +0300
changeset 420162 90d449cfd75e840a257a36b436413f04b97cd9d2
parent 420017 955840bfd3c20eb24dd5a01be27bdc55c489a285
child 532739 05fcedc3a1e63b4efe431f35cef9f3adb4f6f686
push id31117
push userbmo:bpostelnicu@mozilla.com
push dateMon, 03 Oct 2016 15:41:06 +0000
reviewerspeterv
bugs1307142
milestone52.0a1
Bug 1307142 - correlate MOZ_ASSERT_IF with logic from IsConvertibleToDictionary. r?peterv MozReview-Commit-ID: 9cPblJOOf8U
dom/bindings/Codegen.py
--- a/dom/bindings/Codegen.py
+++ b/dom/bindings/Codegen.py
@@ -12326,17 +12326,17 @@ class CGDictionary(CGThing):
         we can avoid atomizing strings all the time, then we just spit
         out the getMemberConversion() output for each member,
         separated by newlines.
 
         """
         body = dedent("""
             // Passing a null JSContext is OK only if we're initing from null,
             // Since in that case we will not have to do any property gets
-            MOZ_ASSERT_IF(!cx, val.isNull());
+            MOZ_ASSERT_IF(!cx, val.isNullOrUndefined());
             """)
 
         if self.needToInitIds:
             body += fill(
                 """
                 ${dictName}Atoms* atomsCache = nullptr;
                 if (cx) {
                   atomsCache = GetAtomCache<${dictName}Atoms>(cx);