Bug 1481844 - Clear expando for objects with an ExpandoAndGeneration before wrapping r=bz a=abillings
authorJon Coppeard <jcoppeard@mozilla.com>
Mon, 03 Sep 2018 10:46:39 +0100
changeset 489591 868b50082f4fa23f81accd23b14cfc3c7f611e34
parent 489584 2a4cf603095ae6c4dc01d9e2b4adc217cbfd2eaf
child 489592 29f80c699b14e2e7b1cde94b77b71878c9be0939
push id9740
push userarchaeopteryx@coole-files.de
push dateTue, 04 Sep 2018 16:57:14 +0000
treeherdermozilla-beta@0311d9ebb702 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbz, abillings
bugs1481844
milestone63.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
Bug 1481844 - Clear expando for objects with an ExpandoAndGeneration before wrapping r=bz a=abillings
dom/bindings/Codegen.py
--- a/dom/bindings/Codegen.py
+++ b/dom/bindings/Codegen.py
@@ -3493,17 +3493,17 @@ def CreateBindingJSObject(descriptor, pr
     objDecl = "BindingJSObjectCreator<%s> creator(aCx);\n" % descriptor.nativeType
 
     # We don't always need to root obj, but there are a variety
     # of cases where we do, so for simplicity, just always root it.
     if descriptor.proxy:
         if descriptor.interface.getExtendedAttribute('OverrideBuiltins'):
             create = dedent(
                 """
-                MOZ_ASSERT(aObject->mExpandoAndGeneration.expando.isUndefined());
+                aObject->mExpandoAndGeneration.expando.setUndefined();
                 JS::Rooted<JS::Value> expandoValue(aCx, JS::PrivateValue(&aObject->mExpandoAndGeneration));
                 creator.CreateProxyObject(aCx, &sClass.mBase, DOMProxyHandler::getInstance(),
                                           proto, aObject, expandoValue, aReflector);
                 """)
         else:
             create = dedent(
                 """
                 creator.CreateProxyObject(aCx, &sClass.mBase, DOMProxyHandler::getInstance(),