Bug 1624236 - 1624236: Removed 'else after 'break' in js/src/vm/Shape.cpp r=jandem
authorSydney <jacksonsd@g.cofc.edu>
Wed, 25 Mar 2020 09:07:31 +0000
changeset 520336 0c79992b340e1181ce949686c1eba6b6cf5d79c5
parent 520335 70e7b2baa28fc189985aea36b3819e953dba731f
child 520337 7fcd3948e2db2aa0e6e26061e3169366f080f351
push id37248
push userbtara@mozilla.com
push dateWed, 25 Mar 2020 16:40:49 +0000
treeherdermozilla-central@c5112a7573ac [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjandem
bugs1624236
milestone76.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 1624236 - 1624236: Removed 'else after 'break' in js/src/vm/Shape.cpp r=jandem Differential Revision: https://phabricator.services.mozilla.com/D68113
js/src/vm/Shape.cpp
--- a/js/src/vm/Shape.cpp
+++ b/js/src/vm/Shape.cpp
@@ -1422,21 +1422,20 @@ bool NativeObject::rollbackProperties(JS
    * The object cannot have escaped in a way which would prevent safe
    * removal of the last properties.
    */
   MOZ_ASSERT(!obj->inDictionaryMode() && slotSpan <= obj->slotSpan());
   while (true) {
     if (obj->lastProperty()->isEmptyShape()) {
       MOZ_ASSERT(slotSpan == 0);
       break;
-    } else {
-      uint32_t slot = obj->lastProperty()->slot();
-      if (slot < slotSpan) {
-        break;
-      }
+    }
+    uint32_t slot = obj->lastProperty()->slot();
+    if (slot < slotSpan) {
+      break;
     }
     if (!NativeObject::removeProperty(cx, obj, obj->lastProperty()->propid())) {
       return false;
     }
   }
 
   return true;
 }