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)
NameTypeDescription
trcJSTracer *The tracer whose debugging hooks are to be set.
printerJSTraceNamePrinterA callback function, described below; or NULL.
argvoid *See the description.
indexsize_tSee the description.

Callback syntax

typedef void (*JSTraceNamePrinter)(JSTracer *trc, char *buf, size_t bufsize);
NameTypeDescription
trcJSTracer *The tracer.
bufchar *Out parameter. The callback stores a string describing the reference traced in buf.
bufsizesize_tThe 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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据

词条统计

浏览:46 次

字数:3139

最后编辑:7年前

编辑次数:0 次

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文