From a9e7dd7b91b8c701bcaee68baf71ea51159e6b2d Mon Sep 17 00:00:00 2001 From: Zoltan Herczeg Date: Wed, 31 May 2017 12:53:25 +0200 Subject: [PATCH] Check breakpoint stop condition in VM. (#1868) Check breakpoint stop condition even after a message is processed. JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com --- jerry-core/vm/vm.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/jerry-core/vm/vm.c b/jerry-core/vm/vm.c index 080cfefcc..8ac3bf7d4 100644 --- a/jerry-core/vm/vm.c +++ b/jerry-core/vm/vm.c @@ -2410,7 +2410,9 @@ vm_loop (vm_frame_ctx_t *frame_ctx_p) /**< frame context */ continue; } - if (JERRY_CONTEXT (debugger_flags) & JERRY_DEBUGGER_VM_STOP) + if ((JERRY_CONTEXT (debugger_flags) & JERRY_DEBUGGER_VM_STOP) + && (JERRY_CONTEXT (debugger_stop_context) == NULL + || JERRY_CONTEXT (debugger_stop_context) == JERRY_CONTEXT (vm_top_context_p))) { jerry_debugger_breakpoint_hit (JERRY_DEBUGGER_BREAKPOINT_HIT); }