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

Only remove the request from the list if the new request depth is zero.

parent 26261b2b
No related branches found
No related tags found
No related merge requests found
......@@ -171,17 +171,19 @@ void js_debug_endrequest(JSContext *cx, const char *file, unsigned long line)
req->file=file;
req->line=line;
JS_EndRequest(cx);
if(req->prev != NULL)
req->prev->next=req->next;
if(req->next != NULL)
req->next->prev=req->prev;
if(first_request==req) {
if(cx->requestDepth==0) {
if(req->prev != NULL)
first_request=req->prev;
else
first_request=req->next;
req->prev->next=req->next;
if(req->next != NULL)
req->next->prev=req->prev;
if(first_request==req) {
if(req->prev != NULL)
first_request=req->prev;
else
first_request=req->next;
}
free(req);
}
free(req);
pthread_mutex_unlock(&req_mutex);
}
......
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