Commit 00f43504 authored by jarin's avatar jarin Committed by Commit bot

In PrintCode, keep the debug_name string alive for all uses.

BUG=chromium:465645
LOG=n
R=titzer@chromium.org

Review URL: https://codereview.chromium.org/996663002

Cr-Commit-Position: refs/heads/master@{#27099}
parent 1982186b
......@@ -183,12 +183,14 @@ void CodeGenerator::PrintCode(Handle<Code> code, CompilationInfo* info) {
(info->IsOptimizing() && FLAG_print_opt_code));
if (print_code) {
const char* debug_name;
SmartArrayPointer<char> debug_name_holder;
if (info->IsStub()) {
CodeStub::Major major_key = info->code_stub()->MajorKey();
debug_name = CodeStub::MajorName(major_key, false);
} else {
debug_name =
info->parse_info()->function()->debug_name()->ToCString().get();
debug_name_holder =
info->parse_info()->function()->debug_name()->ToCString();
debug_name = debug_name_holder.get();
}
CodeTracer::Scope tracing_scope(info->isolate()->GetCodeTracer());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment