Skip to content

Commit

Permalink
Merge pull request #11 from kuzmas/fix-debugger
Browse files Browse the repository at this point in the history
Fix debugger
  • Loading branch information
koush authored Dec 17, 2020
2 parents 5f9d314 + 988d248 commit 402b073
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions quickjs-debugger.c
Original file line number Diff line number Diff line change
Expand Up @@ -680,6 +680,7 @@ void js_debugger_free(JSRuntime *rt, JSDebuggerInfo *info) {
if (info->message_buffer) {
js_free_rt(rt, info->message_buffer);
info->message_buffer = NULL;
info->message_buffer_length = 0;
}

JS_FreeValue(info->debugging_ctx, info->breakpoints);
Expand Down
4 changes: 2 additions & 2 deletions quickjs.c
Original file line number Diff line number Diff line change
Expand Up @@ -16008,7 +16008,7 @@ static JSValue JS_CallInternal(JSContext *caller_ctx, JSValueConst func_obj,

#if !DIRECT_DISPATCH
#define SWITCH(pc) switch (opcode = *pc++)
#define CASE(op) case op
#define CASE(op) case op: if (caller_ctx->rt->debugger_info.transport_close) js_debugger_check(ctx, pc); stub_ ## op
#define DEFAULT default
#define BREAK break
#else
Expand Down Expand Up @@ -16036,10 +16036,10 @@ static JSValue JS_CallInternal(JSContext *caller_ctx, JSValueConst func_obj,
#define CASE(op) case_debugger_ ## op: js_debugger_check(ctx, pc); case_ ## op
#define DEFAULT case_default
#define BREAK SWITCH(pc)
#endif

const void * const * active_dispatch_table = caller_ctx->rt->debugger_info.transport_close
? debugger_dispatch_table : dispatch_table;
#endif

if (js_poll_interrupts(caller_ctx))
return JS_EXCEPTION;
Expand Down

0 comments on commit 402b073

Please sign in to comment.