GeezerVison is showing github.com — src: replace usage of deprecated GetDebugContext · outsideris/node@d515a3f
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: src/debug-agent.cc +2-1Lines changed: 2 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -124,7 +124,8 @@ void Agent::Enable() { |
124 | 124 |
|
125 | 125 | // Assign environment to the debugger's context |
126 | 126 | // NOTE: The debugger context is created after `SetMessageHandler()` call |
127 | | - parent_env()->AssignToContext(v8::Debug::GetDebugContext()); |
| 127 | + auto debug_context = v8::Debug::GetDebugContext(parent_env()->isolate()); |
| 128 | + parent_env()->AssignToContext(debug_context); |
128 | 129 | } |
129 | 130 |
|
130 | 131 |
|
|
Collapse file
Copy file name to clipboardExpand all lines: src/node_contextify.cc +2-2Lines changed: 2 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -243,12 +243,12 @@ class ContextifyContext { |
243 | 243 | Local<String> script_source(args[0]->ToString(args.GetIsolate())); |
244 | 244 | if (script_source.IsEmpty()) |
245 | 245 | return; // Exception pending. |
246 | | - Local<Context> debug_context = Debug::GetDebugContext(); |
| 246 | + Local<Context> debug_context = Debug::GetDebugContext(args.GetIsolate()); |
247 | 247 | Environment* env = Environment::GetCurrent(args); |
248 | 248 | if (debug_context.IsEmpty()) { |
249 | 249 | // Force-load the debug context. |
250 | 250 | Debug::GetMirror(args.GetIsolate()->GetCurrentContext(), args[0]); |
251 | | - debug_context = Debug::GetDebugContext(); |
| 251 | + debug_context = Debug::GetDebugContext(args.GetIsolate()); |
252 | 252 | CHECK(!debug_context.IsEmpty()); |
253 | 253 | // Ensure that the debug context has an Environment assigned in case |
254 | 254 | // a fatal error is raised. The fatal exception handler in node.cc |
|