Skip to content

Commit 07a0dc8

Browse files
committed
report: roll extra loop iteration in PrintNativeStack()
PR-URL: #25610 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Richard Lau <[email protected]>
1 parent a161a9b commit 07a0dc8

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/node_report.cc

+1-5
Original file line numberDiff line numberDiff line change
@@ -500,17 +500,13 @@ static void PrintNativeStack(JSONWriter* writer) {
500500
writer->json_arraystart("nativeStack");
501501
int i;
502502
std::ostringstream buf;
503-
for (i = 1; i < size - 1; i += 1) {
503+
for (i = 1; i < size; i++) {
504504
void* frame = frames[i];
505505
buf.str("");
506506
buf << " [pc=" << frame << "] ";
507507
buf << sym_ctx->LookupSymbol(frame).Display().c_str();
508508
writer->json_element(buf.str());
509509
}
510-
buf.str("");
511-
buf << " [pc=" << frames[i] << "] ";
512-
buf << sym_ctx->LookupSymbol(frames[i]).Display().c_str();
513-
writer->json_element(buf.str());
514510
writer->json_arrayend();
515511
}
516512

0 commit comments

Comments
 (0)