Bug 1031550 - Update js_DumpObject for symbol-keyed properties. r=Waldo.

--HG--
extra : rebase_source : 76b80eb64e0e93d1b9ff92fb3787f4990acef3e8
This commit is contained in:
Jason Orendorff 2014-06-27 16:36:56 -05:00
parent 7429114150
commit 0160893e41

View File

@ -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));