Browse Source

deps: fix inspector v8 test

This fixes the inspector tests failing after the cherry-pick.

V8 commit: f19b889be8
PR-URL: https://github.com/nodejs/node/pull/14827
Fixes: https://github.com/nodejs/node/issues/14824
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
canary-base
Eugene Ostroukhov 7 years ago
parent
commit
cd9f81d5bf
  1. 7
      deps/v8/test/inspector/isolate-data.cc
  2. 1
      deps/v8/test/inspector/isolate-data.h

7
deps/v8/test/inspector/isolate-data.cc

@ -93,3 +93,10 @@ v8::MaybeLocal<v8::Module> IsolateData::ModuleResolveCallback(
IsolateData* data = IsolateData::FromContext(context);
return data->modules_[ToVector(specifier)].Get(data->isolate_);
}
void IsolateData::FreeContext(v8::Local<v8::Context> context) {
int context_group_id = GetContextGroupId(context);
auto it = contexts_.find(context_group_id);
if (it == contexts_.end()) return;
contexts_.erase(it);
}

1
deps/v8/test/inspector/isolate-data.h

@ -39,6 +39,7 @@ class IsolateData {
void RegisterModule(v8::Local<v8::Context> context,
v8::internal::Vector<uint16_t> name,
v8::ScriptCompiler::Source* source);
void FreeContext(v8::Local<v8::Context> context);
private:
struct VectorCompare {

Loading…
Cancel
Save