[heap-snapshot] Fix context header size
Different contexts have different header sizes now. The function ScopeInfo::ContextHeaderLength should be used instead of Context::MIN_CONTEXT_SLOTS. Bug: chromium:1021884 Change-Id: Ia9ea321cfb19d2a2ae0bc12c7db621f7d35b3b51 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2036074 Commit-Queue: Victor Gomes <victorgomes@chromium.org> Reviewed-by: Victor Gomes <victorgomes@chromium.org> Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Reviewed-by: Peter Marshall <petermarshall@chromium.org> Auto-Submit: Victor Gomes <victorgomes@chromium.org> Cr-Commit-Position: refs/heads/master@{#66103}
This commit is contained in:
parent
091e100cb5
commit
4ba141f3f5
@ -978,7 +978,7 @@ void V8HeapExplorer::ExtractContextReferences(HeapEntry* entry,
|
||||
int context_locals = scope_info.ContextLocalCount();
|
||||
for (int i = 0; i < context_locals; ++i) {
|
||||
String local_name = scope_info.ContextLocalName(i);
|
||||
int idx = Context::MIN_CONTEXT_SLOTS + i;
|
||||
int idx = scope_info.ContextHeaderLength() + i;
|
||||
SetContextReference(entry, local_name, context.get(idx),
|
||||
Context::OffsetOfElementAt(idx));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user