From 0160893e41429b2b0177b88165be425838e06c01 Mon Sep 17 00:00:00 2001 From: Jason Orendorff Date: Fri, 27 Jun 2014 16:36:56 -0500 Subject: [PATCH] Bug 1031550 - Update js_DumpObject for symbol-keyed properties. r=Waldo. --HG-- extra : rebase_source : 76b80eb64e0e93d1b9ff92fb3787f4990acef3e8 --- js/src/jsobj.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/js/src/jsobj.cpp b/js/src/jsobj.cpp index 8d3b46f95ac..fb986b9f468 100644 --- a/js/src/jsobj.cpp +++ b/js/src/jsobj.cpp @@ -5769,7 +5769,7 @@ DumpProperty(JSObject *obj, Shape &shape) jsid id = shape.propid(); uint8_t attrs = shape.attributes(); - fprintf(stderr, " ((JSShape *) %p) ", (void *) &shape); + fprintf(stderr, " ((js::Shape *) %p) ", (void *) &shape); if (attrs & JSPROP_ENUMERATE) fprintf(stderr, "enumerate "); if (attrs & JSPROP_READONLY) fprintf(stderr, "readonly "); if (attrs & JSPROP_PERMANENT) fprintf(stderr, "permanent "); @@ -5785,10 +5785,8 @@ DumpProperty(JSObject *obj, Shape &shape) else if (!shape.hasDefaultSetter()) fprintf(stderr, "setterOp=%p ", JS_FUNC_TO_DATA_PTR(void *, shape.setterOp())); - if (JSID_IS_ATOM(id)) - JSID_TO_STRING(id)->dump(); - else if (JSID_IS_INT(id)) - fprintf(stderr, "%d", (int) JSID_TO_INT(id)); + if (JSID_IS_ATOM(id) || JSID_IS_INT(id) || JSID_IS_SYMBOL(id)) + dumpValue(js::IdToValue(id)); else fprintf(stderr, "unknown jsid %p", (void *) JSID_BITS(id));