Skip to content

Commit

Permalink
deps: escape funtionName in CPU Profiles
Browse files Browse the repository at this point in the history
  • Loading branch information
santigimeno committed Sep 9, 2024
1 parent 3913f0e commit e22c5e3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions deps/v8/src/profiler/profile-generator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -802,8 +802,8 @@ void CpuProfileJSONSerializer::SerializePositionTicks(

void CpuProfileJSONSerializer::SerializeCallFrame(
const v8::CpuProfileNode* node) {
writer_->AddString("\"functionName\":\"");
writer_->AddString(node->GetFunctionNameStr());
writer_->AddString("\"functionName\":");
writer_->EscapeAndAddString(node->GetFunctionNameStr());
writer_->AddString("\",\"lineNumber\":");
writer_->AddNumber(node->GetLineNumber() - 1);
writer_->AddString(",\"columnNumber\":");
Expand Down

0 comments on commit e22c5e3

Please sign in to comment.