summaryrefslogtreecommitdiff
path: root/cont.c
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-11-16 04:37:02 (GMT)
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-11-16 04:37:02 (GMT)
commitc761514c768d8a1bdae8f1e71657af251ea6d132 (patch)
tree2a71df8b943dc41bd89516ebe96e146d2e982e68 /cont.c
parent7fbab01f771dc9fbddb190c1d201e5509c17107b (diff)
fix up r60782 and r60783.
* cont.c (cont_restore_thread): re-check a condition (pointed by nobu). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60786 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'cont.c')
-rw-r--r--cont.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/cont.c b/cont.c
index e340677..bcc33a1 100644
--- a/cont.c
+++ b/cont.c
@@ -706,13 +706,12 @@ cont_restore_thread(rb_context_t *cont)
th->ec->errinfo = sec->errinfo;
/* trace on -> trace off */
- if (sec->trace_arg == NULL && th->ec->trace_arg != NULL) {
+ if (th->ec->trace_arg != NULL && sec->trace_arg == NULL) {
GET_VM()->trace_running--;
}
- else { /* sec->trace_arg == NULL */
- if (th->ec->trace_arg != NULL) {
- GET_VM()->trace_running++;
- }
+ /* trace off -> trace on */
+ else if (th->ec->trace_arg == NULL && sec->trace_arg != NULL) {
+ GET_VM()->trace_running++;
}
th->ec->trace_arg = sec->trace_arg;