From 79958975cc8822eca14178b4e485fea999be48af Mon Sep 17 00:00:00 2001 From: Eugene Ostroukhov Date: Mon, 14 Aug 2017 11:47:36 -0700 Subject: [PATCH] deps: fix inspector v8 test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This fixes the inspector tests failing after the cherry-pick. V8 commit: https://chromium.googlesource.com/v8/v8/+/f19b889be801bdebc04c49090e37c787f7ba8805 PR-URL: https://github.com/nodejs/node/pull/14827 Fixes: https://github.com/nodejs/node/issues/14824 Reviewed-By: Anna Henningsen Reviewed-By: James M Snell Reviewed-By: Michaƫl Zasso Reviewed-By: Michael Dawson --- deps/v8/test/inspector/isolate-data.cc | 7 +++++++ deps/v8/test/inspector/isolate-data.h | 1 + 2 files changed, 8 insertions(+) diff --git a/deps/v8/test/inspector/isolate-data.cc b/deps/v8/test/inspector/isolate-data.cc index 927bd31ef43e32..b1e85ede80a12f 100644 --- a/deps/v8/test/inspector/isolate-data.cc +++ b/deps/v8/test/inspector/isolate-data.cc @@ -93,3 +93,10 @@ v8::MaybeLocal IsolateData::ModuleResolveCallback( IsolateData* data = IsolateData::FromContext(context); return data->modules_[ToVector(specifier)].Get(data->isolate_); } + +void IsolateData::FreeContext(v8::Local context) { + int context_group_id = GetContextGroupId(context); + auto it = contexts_.find(context_group_id); + if (it == contexts_.end()) return; + contexts_.erase(it); +} diff --git a/deps/v8/test/inspector/isolate-data.h b/deps/v8/test/inspector/isolate-data.h index 34f0ae83086f23..52a3fb320633a1 100644 --- a/deps/v8/test/inspector/isolate-data.h +++ b/deps/v8/test/inspector/isolate-data.h @@ -39,6 +39,7 @@ class IsolateData { void RegisterModule(v8::Local context, v8::internal::Vector name, v8::ScriptCompiler::Source* source); + void FreeContext(v8::Local context); private: struct VectorCompare {