trace
This commit is contained in:
@@ -789,9 +789,32 @@ double cell_random() {
|
||||
return (double)buf / 9007199254740992.0;
|
||||
}
|
||||
|
||||
static cell_hook g_cell_trace_hook = NULL;
|
||||
|
||||
void cell_trace_sethook(cell_hook hook)
|
||||
{
|
||||
(void)hook;
|
||||
g_cell_trace_hook = hook;
|
||||
}
|
||||
|
||||
cell_hook cell_trace_gethook(void)
|
||||
{
|
||||
return g_cell_trace_hook;
|
||||
}
|
||||
|
||||
void cell_rt_set_trace_hook(JSContext *ctx, cell_hook hook)
|
||||
{
|
||||
struct cell_rt *rt = JS_GetContextOpaque(ctx);
|
||||
if (rt) rt->trace_hook = hook;
|
||||
}
|
||||
|
||||
const char *cell_rt_name(struct cell_rt *rt)
|
||||
{
|
||||
return rt->name;
|
||||
}
|
||||
|
||||
JSContext *cell_rt_context(struct cell_rt *rt)
|
||||
{
|
||||
return rt->context;
|
||||
}
|
||||
|
||||
int uncaught_exception(JSContext *js, JSValue v)
|
||||
|
||||
Reference in New Issue
Block a user