Bug 1310744: Revert "Bug 1300193: Make existing assertion that no longer holds more flexible. r=jandem", but keep the test. r?nbp draft
authorEmilio Cobos Álvarez <ecoal95@gmail.com>
Wed, 19 Oct 2016 21:39:08 +0200
changeset 427493 8dcb4a587c264177ae5770e95ab4689763861166
parent 427492 3028b948769f63513f03019663479cba21e86136
child 534479 11c6189c3d3faa950ab8aaaaa22f1f67d7764114
push id33030
push userbmo:ecoal95@gmail.com
push dateThu, 20 Oct 2016 13:02:22 +0000
reviewersjandem, nbp
bugs1310744, 1300193
milestone52.0a1
Bug 1310744: Revert "Bug 1300193: Make existing assertion that no longer holds more flexible. r=jandem", but keep the test. r?nbp This now holds, as it should. The test is superseded by the one in this bug, but it's harmless. MozReview-Commit-ID: G7HHZLIIr6Y
js/src/vm/NativeObject-inl.h
--- a/js/src/vm/NativeObject-inl.h
+++ b/js/src/vm/NativeObject-inl.h
@@ -158,17 +158,17 @@ NativeObject::extendDenseElements(Exclus
     MOZ_ASSERT(!denseElementsAreFrozen());
 
     /*
      * Don't grow elements for non-extensible objects or watched objects. Dense
      * elements can be added/written with no extensible or watchpoint checks as
      * long as there is capacity for them.
      */
     if (!nonProxyIsExtensible() || watched()) {
-        MOZ_ASSERT(getDenseCapacity() == 0 || (!watched() && getElementsHeader()->isFrozen()));
+        MOZ_ASSERT(getDenseCapacity() == 0);
         return DenseElementResult::Incomplete;
     }
 
     /*
      * Don't grow elements for objects which already have sparse indexes.
      * This avoids needing to count non-hole elements in willBeSparseElements
      * every time a new index is added.
      */