Please note, this is a STATIC archive of website developer.mozilla.org from November 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

JS_SET_TRACING_DETAILS

This article covers features introduced in SpiderMonkey 1.8

Set debugging information about the next thing to be traced by a JSTracer.

Syntax

JS_SET_TRACING_DETAILS(trc, printer, arg, index)
Name Type Description
trc JSTracer * The tracer whose debugging hooks are to be set.
printer JSTraceNamePrinter A callback function, described below; or NULL.
arg void * See the description.
index size_t See the description.

Callback syntax

typedef void (*JSTraceNamePrinter)(JSTracer *trc, char *buf, size_t bufsize);
Name Type Description
trc JSTracer * The tracer.
buf char * Out parameter. The callback stores a string describing the reference traced in buf.
bufsize size_t The size of buf, in chars.

Description

Set debugging information about a reference to a traceable thing to prepare for the following call to JS_CallTracer.

When printer is null, arg must be const char * or char * C string naming the reference and index must be either (size_t)-1 indicating that the name alone describes the reference or it must be an index into some array vector that stores the reference.

When printer is not null, the arg and index arguments are available to the callback as the debugPrinterArg and debugPrintIndex fields of trc.

The storage for name or callback's arguments needs to live only until the following call to JS_CallTracer returns.

MXR ID Search for JS_SET_TRACING_DETAILS

Document Tags and Contributors

 Contributors to this page: fscholz, Jorend
 Last updated by: fscholz,