From f50a633530e00d5568759a9258522ad4b8077095 Mon Sep 17 00:00:00 2001 From: deuce <> Date: Sat, 29 Oct 2011 01:40:10 +0000 Subject: [PATCH] Make request debugging work when the patches in 3rdp/build are included. --- src/sbbs3/js_request.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/src/sbbs3/js_request.c b/src/sbbs3/js_request.c index 45f053a7a1..ceee0f681b 100644 --- a/src/sbbs3/js_request.c +++ b/src/sbbs3/js_request.c @@ -16,7 +16,6 @@ #ifdef DEBUG_JS_REQUESTS #define DEBUG -#include <jscntxt.h> enum last_request_type { LAST_REQUEST_TYPE_NONE @@ -109,12 +108,12 @@ void js_debug_beginrequest(JSContext *cx, const char *file, unsigned long line) logstr(); break; } - switch(cx->requestDepth) { + switch(JS_RequestDepth(cx)) { case 0: break; case 1: default: - 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); + sprintf(str,"depth=%u at Begin after %s from %s:%u at %s:%u (%p)\n",JS_RequestDepth(cx),type_names[req->type],req->file,req->line,file,line,req->cx); logstr(); break; } @@ -156,10 +155,10 @@ void js_debug_endrequest(JSContext *cx, const char *file, unsigned long line) logstr(); break; } - switch(cx->requestDepth) { + switch(JS_RequestDepth(cx)) { case 0: default: - 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); + sprintf(str,"depth=%u at End after %s from %s:%u at %s:%u (%p)\n",JS_RequestDepth(cx),type_names[req->type],req->file,req->line,file,line,req->cx); logstr(); break; case 1: @@ -170,7 +169,7 @@ void js_debug_endrequest(JSContext *cx, const char *file, unsigned long line) req->file=file; req->line=line; JS_EndRequest(cx); - if(cx->requestDepth==0) { + if(JS_RequestDepth(cx)==0) { if(req->prev != NULL) req->prev->next=req->next; if(req->next != NULL) @@ -213,10 +212,10 @@ jsrefcount js_debug_suspendrequest(JSContext *cx, const char *file, unsigned lon logstr(); break; } - switch(cx->requestDepth) { + switch(JS_RequestDepth(cx)) { case 0: default: - 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); + sprintf(str,"depth=%u at Suspend after %s from %s:%u at %s:%u (%p)\n",JS_RequestDepth(cx),type_names[req->type],req->file,req->line,file,line,req->cx); logstr(); break; case 1: @@ -255,10 +254,10 @@ void js_debug_resumerequest(JSContext *cx, jsrefcount rc, const char *file, unsi logstr(); break; } - switch(cx->requestDepth) { + switch(JS_RequestDepth(cx)) { case 1: default: - 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); + sprintf(str,"depth=%u at Suspend after %s from %s:%u at %s:%u (%p)\n",JS_RequestDepth(cx),type_names[req->type],req->file,req->line,file,line,req->cx); logstr(); break; case 0: -- GitLab