Skip to content

Commit

Permalink
report: roll extra loop iteration in PrintNativeStack()
Browse files Browse the repository at this point in the history
PR-URL: #25610
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
  • Loading branch information
addaleax committed Jan 24, 2019
1 parent a161a9b commit 07a0dc8
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/node_report.cc
Original file line number Diff line number Diff line change
Expand Up @@ -500,17 +500,13 @@ static void PrintNativeStack(JSONWriter* writer) {
writer->json_arraystart("nativeStack");
int i;
std::ostringstream buf;
for (i = 1; i < size - 1; i += 1) {
for (i = 1; i < size; i++) {
void* frame = frames[i];
buf.str("");
buf << " [pc=" << frame << "] ";
buf << sym_ctx->LookupSymbol(frame).Display().c_str();
writer->json_element(buf.str());
}
buf.str("");
buf << " [pc=" << frames[i] << "] ";
buf << sym_ctx->LookupSymbol(frames[i]).Display().c_str();
writer->json_element(buf.str());
writer->json_arrayend();
}

Expand Down

0 comments on commit 07a0dc8

Please sign in to comment.