[heap-profiler] Annotate global handle

Annotate global handle with label to identify the context held alive for
debugging in DevTools

Bug: chromium:811842
Change-Id: I24f08b4d01939421ba1b7ec7b03982f00ebbdd1a
Reviewed-on: https://chromium-review.googlesource.com/962788
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51936}
This commit is contained in:
Michael Lippautz 2018-03-14 18:46:12 +01:00 committed by Commit Bot
parent 7b88f3569e
commit a07b245e01

View File

@ -376,6 +376,9 @@ bool Debug::Load() {
if (context.is_null()) return false;
debug_context_ = isolate_->global_handles()->Create(*context);
GlobalHandles::AnnotateStrongRetainer(
Handle<Object>::cast(debug_context_).location(),
"v8::internal::Debug::debug_context_");
feature_tracker()->Track(DebugFeatureTracker::kActive);