Skip to content

Commit d77c72d

Browse files
committed
Revert "Merge pull request #3126 from jbreeden/backtrace_irep_null_check"
This reverts commit bf7719f, reversing changes made to 4f4fa0a. We should get backtrace while irep is alive.
1 parent bf7719f commit d77c72d

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

Diff for: src/backtrace.c

+2-7
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,6 @@ each_backtrace(mrb_state *mrb, mrb_int ciidx, mrb_code *pc0, each_backtrace_func
111111
mrb_callinfo *ci;
112112
mrb_irep *irep;
113113
mrb_code *pc;
114-
115-
loc.lineno = -1;
116114

117115
ci = &mrb->c->cibase[i];
118116

@@ -130,11 +128,8 @@ each_backtrace(mrb_state *mrb, mrb_int ciidx, mrb_code *pc0, each_backtrace_func
130128
else {
131129
pc = pc0;
132130
}
133-
134-
if (irep) {
135-
loc.filename = mrb_debug_get_filename(irep, (uint32_t)(pc - irep->iseq));
136-
loc.lineno = mrb_debug_get_line(irep, (uint32_t)(pc - irep->iseq));
137-
}
131+
loc.filename = mrb_debug_get_filename(irep, (uint32_t)(pc - irep->iseq));
132+
loc.lineno = mrb_debug_get_line(irep, (uint32_t)(pc - irep->iseq));
138133

139134
if (loc.lineno == -1) continue;
140135

0 commit comments

Comments
 (0)