bug 580128 - Fix js_PrintObjectSlotName. r=mrbkap
authorPeter Van der Beken <peterv@propagandism.org>
Sun, 10 Oct 2010 15:46:42 -0700
changeset 55683 1916a5ca667a604b418e87c227cb4425a60b981d
parent 55682 276bcbeb0ab2c4bc114a3453f1051256c18d03ae
child 55684 c1ca077ef22858921a691239dba0c34351be8f01
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmrbkap
bugs580128
milestone2.0b8pre
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 580128 - Fix js_PrintObjectSlotName. r=mrbkap
js/src/jsobj.cpp
--- a/js/src/jsobj.cpp
+++ b/js/src/jsobj.cpp
@@ -6134,16 +6134,18 @@ js_PrintObjectSlotName(JSTracer *trc, ch
     uint32 slot = (uint32)trc->debugPrintIndex;
     JS_ASSERT(slot >= JSSLOT_START(obj->getClass()));
 
     const Shape *shape;
     if (obj->isNative()) {
         shape = obj->lastProperty();
         while (shape->previous() && shape->slot != slot)
             shape = shape->previous();
+        if (shape->slot != slot)
+            shape = NULL;
     } else {
         shape = NULL;
     }
 
     if (!shape) {
         const char *slotname = NULL;
         Class *clasp = obj->getClass();
         if (clasp->flags & JSCLASS_IS_GLOBAL) {