Revert 01f7825; fix #3650

Redundant `mark_context() is far better than crashes.
This commit is contained in:
Yukihiro "Matz" Matsumoto
2017-05-25 21:56:43 +09:00
parent ac442bc1df
commit f75f506181
+4 -4
View File
@@ -595,8 +595,8 @@ mark_context(mrb_state *mrb, struct mrb_context *c)
}
/* mark fibers */
mrb_gc_mark(mrb, (struct RBasic*)c->fib);
if (c->prev && c->prev->fib) {
mrb_gc_mark(mrb, (struct RBasic*)c->prev->fib);
if (c->prev) {
mark_context(mrb, c->prev);
}
}
@@ -878,9 +878,9 @@ root_scan_phase(mrb_state *mrb, mrb_gc *gc)
mrb_gc_mark(mrb, (struct RBasic*)mrb->arena_err);
#endif
mark_context(mrb, mrb->root_c);
mark_context(mrb, mrb->c);
if (mrb->root_c != mrb->c) {
mark_context(mrb, mrb->c);
mark_context(mrb, mrb->root_c);
}
}