diff --git a/deps/v8/test/inspector/isolate-data.cc b/deps/v8/test/inspector/isolate-data.cc index 927bd31ef4..b1e85ede80 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 34f0ae8308..52a3fb3206 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 {