Commit 225c062d authored by Michael Lippautz's avatar Michael Lippautz Committed by Commit Bot

heap-snapshot-generator: Get copy of edge name

Edge names are not always string constants and have to be deleted at
some point. Copy them over to StringStorage to allow the embedder
freeing up their copy.

Bug: chromium:936797
Change-Id: I1c1a617c79c2016b3bd30c3460bb7a47edce1b95
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1565903
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Auto-Submit: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60849}
parent d03c6b17
......@@ -1932,7 +1932,8 @@ bool NativeObjectsExplorer::IterateAndExtractReferences(
if (edge.name == nullptr) {
from->SetIndexedAutoIndexReference(HeapGraphEdge::kElement, to);
} else {
from->SetNamedReference(HeapGraphEdge::kInternal, edge.name, to);
from->SetNamedReference(HeapGraphEdge::kInternal,
names_->GetCopy(edge.name), to);
}
}
}
......
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