Commit 8e49d826 authored by Frank Emrich's avatar Frank Emrich Committed by Commit Bot

[dict-proto] Fix leaking handle in ExtractPropertyReferences

This fixes a handle leaking out of
V8HeapExplorer::ExtractPropertyReferences when enabling
v8_dict_mode_prototypes, which breaks the
test-heap-profiler/NoHandleLeaks cctest.

Bug: v8:11388
Change-Id: I911f60e3701277540ae5a63fa59f3ac2f52879ef
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2748580Reviewed-by: 's avatarIgor Sheludko <ishell@chromium.org>
Reviewed-by: 's avatarMarja Hölttä <marja@chromium.org>
Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
Commit-Queue: Frank Emrich <emrich@google.com>
Cr-Commit-Position: refs/heads/master@{#73319}
parent 881364fd
......@@ -1378,6 +1378,10 @@ void V8HeapExplorer::ExtractPropertyReferences(JSObject js_obj,
SetDataOrAccessorPropertyReference(details.kind(), entry, name, value);
}
} else if (V8_DICT_MODE_PROTOTYPES_BOOL) {
// SwissNameDictionary::IterateEntries creates a Handle, which should not
// leak out of here.
HandleScope scope(isolate);
SwissNameDictionary dictionary = js_obj.property_dictionary_swiss();
ReadOnlyRoots roots(isolate);
for (InternalIndex i : dictionary.IterateEntries()) {
......
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