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 char s. |
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论