Bug 1651645 part 3 - Use markDenseElementsNotPacked in setDenseElementHole. r=evilpie
authorJan de Mooij <jdemooij@mozilla.com>
Thu, 09 Jul 2020 20:55:29 +0000
changeset 540334 d34278f7a4a713aada6fe56289a344395f194415
parent 540333 4a7666aa3cc64b5f63cc6ef1e816359cac07a0da
child 540335 c7a06239c86036335898d1ccf7aa477634c8b619
push id37599
push userapavel@mozilla.com
push dateTue, 14 Jul 2020 15:35:20 +0000
treeherdermozilla-central@bca48c382991 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersevilpie
bugs1651645
milestone80.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 1651645 part 3 - Use markDenseElementsNotPacked in setDenseElementHole. r=evilpie Depends on D82959 Differential Revision: https://phabricator.services.mozilla.com/D82960
js/src/vm/NativeObject-inl.h
--- a/js/src/vm/NativeObject-inl.h
+++ b/js/src/vm/NativeObject-inl.h
@@ -97,19 +97,17 @@ inline void NativeObject::initDenseEleme
   MOZ_ASSERT(!shouldConvertDoubleElements());
   MOZ_ASSERT(!val.isMagic(JS_ELEMENTS_HOLE));
 
   addDenseElementType(cx, index, val);
   initDenseElement(index, val);
 }
 
 inline void NativeObject::setDenseElementHole(JSContext* cx, uint32_t index) {
-  if (IsTypeInferenceEnabled()) {
-    MarkObjectGroupFlags(cx, this, OBJECT_FLAG_NON_PACKED);
-  }
+  markDenseElementsNotPacked(cx);
   setDenseElement(index, MagicValue(JS_ELEMENTS_HOLE));
 }
 
 inline void NativeObject::removeDenseElementForSparseIndex(JSContext* cx,
                                                            uint32_t index) {
   MOZ_ASSERT(containsPure(INT_TO_JSID(index)));
   if (IsTypeInferenceEnabled()) {
     MarkObjectGroupFlags(cx, this,