Skip to content
Snippets Groups Projects
Commit aa58bf18 authored by deuce's avatar deuce
Browse files

Add the context pointer to log output.

parent 7307c8e3
No related branches found
No related tags found
No related merge requests found
......@@ -106,7 +106,7 @@ void js_debug_beginrequest(JSContext *cx, const char *file, unsigned long line)
case LAST_REQUEST_TYPE_BEGIN:
case LAST_REQUEST_TYPE_SUSPEND:
case LAST_REQUEST_TYPE_RESUME:
sprintf(str,"Begin after %s from %s:%u at %s:%u\n",type_names[req->type],req->file,req->line,file,line);
sprintf(str,"Begin after %s from %s:%u at %s:%u (%p)\n",type_names[req->type],req->file,req->line,file,line,req->cx);
logstr();
break;
}
......@@ -115,7 +115,7 @@ void js_debug_beginrequest(JSContext *cx, const char *file, unsigned long line)
break;
case 1:
default:
sprintf(str,"depth=%u at Begin after %s from %s:%u at %s:%u\n",cx->requestDepth,type_names[req->type],req->file,req->line,file,line);
sprintf(str,"depth=%u at Begin after %s from %s:%u at %s:%u (%p)\n",cx->requestDepth,type_names[req->type],req->file,req->line,file,line,req->cx);
logstr();
break;
}
......@@ -144,7 +144,7 @@ void js_debug_endrequest(JSContext *cx, const char *file, unsigned long line)
case LAST_REQUEST_TYPE_BEGIN:
if(req->file) {
if(strcmp(req->file, file) != 0 || line < req->line) {
sprintf(str,"Suspicious End after %s from %s:%u at %s:%u\n",type_names[req->type],req->file,req->line,file,line);
sprintf(str,"Suspicious End after %s from %s:%u at %s:%u (%p)\n",type_names[req->type],req->file,req->line,file,line,req->cx);
}
break;
}
......@@ -153,14 +153,14 @@ void js_debug_endrequest(JSContext *cx, const char *file, unsigned long line)
case LAST_REQUEST_TYPE_NONE:
case LAST_REQUEST_TYPE_END:
case LAST_REQUEST_TYPE_SUSPEND:
sprintf(str,"End after %s from %s:%u at %s:%u\n",type_names[req->type],req->file,req->line,file,line);
sprintf(str,"End after %s from %s:%u at %s:%u (%p)\n",type_names[req->type],req->file,req->line,file,line,req->cx);
logstr();
break;
}
switch(cx->requestDepth) {
case 0:
default:
sprintf(str,"depth=%u at End after %s from %s:%u at %s:%u\n",cx->requestDepth,type_names[req->type],req->file,req->line,file,line);
sprintf(str,"depth=%u at End after %s from %s:%u at %s:%u (%p)\n",cx->requestDepth,type_names[req->type],req->file,req->line,file,line,req->cx);
logstr();
break;
case 1:
......@@ -210,14 +210,14 @@ jsrefcount js_debug_suspendrequest(JSContext *cx, const char *file, unsigned lon
break;
case LAST_REQUEST_TYPE_END:
case LAST_REQUEST_TYPE_SUSPEND:
sprintf(str,"Suspend after %s from %s:%u at %s:%u\n",type_names[req->type],req->file,req->line,file,line);
sprintf(str,"Suspend after %s from %s:%u at %s:%u (%p)\n",type_names[req->type],req->file,req->line,file,line,req->cx);
logstr();
break;
}
switch(cx->requestDepth) {
case 0:
default:
sprintf(str,"depth=%u at Suspend after %s from %s:%u at %s:%u\n",cx->requestDepth,type_names[req->type],req->file,req->line,file,line);
sprintf(str,"depth=%u at Suspend after %s from %s:%u at %s:%u (%p)\n",cx->requestDepth,type_names[req->type],req->file,req->line,file,line,req->cx);
logstr();
break;
case 1:
......@@ -252,14 +252,14 @@ void js_debug_resumerequest(JSContext *cx, jsrefcount rc, const char *file, unsi
case LAST_REQUEST_TYPE_END:
case LAST_REQUEST_TYPE_BEGIN:
case LAST_REQUEST_TYPE_RESUME:
sprintf(str,"Resume after %s from %s:%u at %s:%u\n",type_names[req->type],req->file,req->line,file,line);
sprintf(str,"Resume after %s from %s:%u at %s:%u (%p)\n",type_names[req->type],req->file,req->line,file,line,req->cx);
logstr();
break;
}
switch(cx->requestDepth) {
case 1:
default:
sprintf(str,"depth=%u at Suspend after %s from %s:%u at %s:%u\n",cx->requestDepth,type_names[req->type],req->file,req->line,file,line);
sprintf(str,"depth=%u at Suspend after %s from %s:%u at %s:%u (%p)\n",cx->requestDepth,type_names[req->type],req->file,req->line,file,line,req->cx);
logstr();
break;
case 0:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment