Bug 1364014 - Remove unnecessary is-array check in GCMarker::restoreValueArray. r=jonco
authorJan de Mooij <jdemooij@mozilla.com>
Fri, 12 May 2017 09:46:21 +0200
changeset 358061 2af9492e9b767247f3339563da3a26c4e0ef4445
parent 358060 27fb70fdc7444c289e4ea9fdce5a1aafeafadd1b
child 358062 2757a36546c0b7d2cd7ff50d8a981841f85107f3
push id31808
push usercbook@mozilla.com
push dateFri, 12 May 2017 12:37:49 +0000
treeherdermozilla-central@030c0a7c8781 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjonco
bugs1364014
milestone55.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 1364014 - Remove unnecessary is-array check in GCMarker::restoreValueArray. r=jonco
js/src/gc/Marking.cpp
--- a/js/src/gc/Marking.cpp
+++ b/js/src/gc/Marking.cpp
@@ -1859,19 +1859,16 @@ GCMarker::restoreValueArray(const MarkSt
 {
     JSObject* objArg = array.ptr.asSavedValueArrayObject();
     if (!objArg->isNative())
         return false;
     NativeObject* obj = &objArg->as<NativeObject>();
 
     uintptr_t start = array.index;
     if (array.kind == HeapSlot::Element) {
-        if (!obj->is<ArrayObject>())
-            return false;
-
         uint32_t initlen = obj->getDenseInitializedLength();
 
         // Account for shifted elements.
         uint32_t numShifted = obj->getElementsHeader()->numShiftedElements();
         start = (numShifted < start) ? start - numShifted : 0;
 
         HeapSlot* vp = obj->getDenseElementsAllowCopyOnWrite();
         if (start < initlen) {