mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
In JS_PrintTraceThingInfo, only print the contents of JSSLOT_PRIVATE if it represents the class's private rather than the first slot. b=417972 r=igor a=DEBUG-only (not part of the default build)
This commit is contained in:
parent
cafaf208a1
commit
6a1479a554
@ -2010,12 +2010,17 @@ JS_PrintTraceThingInfo(char *buf, size_t bufsize, JSTracer *trc,
|
||||
case JSTRACE_OBJECT:
|
||||
{
|
||||
JSObject *obj = (JSObject *)thing;
|
||||
jsval privateValue = STOBJ_GET_SLOT(obj, JSSLOT_PRIVATE);
|
||||
void *privateThing = JSVAL_IS_VOID(privateValue)
|
||||
? NULL
|
||||
: JSVAL_TO_PRIVATE(privateValue);
|
||||
JSClass *clasp = STOBJ_GET_CLASS(obj);
|
||||
if (clasp->flags & JSCLASS_HAS_PRIVATE) {
|
||||
jsval privateValue = STOBJ_GET_SLOT(obj, JSSLOT_PRIVATE);
|
||||
void *privateThing = JSVAL_IS_VOID(privateValue)
|
||||
? NULL
|
||||
: JSVAL_TO_PRIVATE(privateValue);
|
||||
|
||||
JS_snprintf(buf, bufsize, "%p", privateThing);
|
||||
JS_snprintf(buf, bufsize, "%p", privateThing);
|
||||
} else {
|
||||
JS_snprintf(buf, bufsize, "<no private>");
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user