Skip to content

Commit

Permalink
Merge pull request #4 from hashseed/nomirror
Browse files Browse the repository at this point in the history
src: remove usage of deprecated debug API
  • Loading branch information
hashseed committed Feb 2, 2017
2 parents 5b247b7 + 80d2342 commit 293fc84
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/node_contextify.cc
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,9 @@ class ContextifyContext {
}


static void DummyDebugEventListener(const Debug::EventDetails&) {}


static void RunInDebugContext(const FunctionCallbackInfo<Value>& args) {
Local<String> script_source(args[0]->ToString(args.GetIsolate()));
if (script_source.IsEmpty())
Expand All @@ -252,7 +255,7 @@ class ContextifyContext {
Environment* env = Environment::GetCurrent(args);
if (debug_context.IsEmpty()) {
// Force-load the debug context.
Debug::GetMirror(args.GetIsolate()->GetCurrentContext(), args[0]);
Debug::SetDebugEventListener(args.GetIsolate(), DummyDebugEventListener);
debug_context = Debug::GetDebugContext(args.GetIsolate());
CHECK(!debug_context.IsEmpty());
// Ensure that the debug context has an Environment assigned in case
Expand Down

0 comments on commit 293fc84

Please sign in to comment.