Commit 1b070e4
Myles Borins
node_contextify: do not incept debug context
Currently a debug context is created for various calls to util.
If the node debugger is being run the main context is the debug
context. In this case node_contextify was freeing the debug context
and causing everything to explode.
This change moves around the logic and no longer frees the context.
There is a concern about the dangling pointer
The regression test was adapted from code submitted by @3y3 in #4815
Fixes: #4440
Fixes: #4815
Fixes: #4597
Fixes: #4952
PR-URL: #4815
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Rich Trott <rtrott@gmail.com>1 parent f205e99 commit 1b070e4Copy full SHA for 1b070e4
File tree
Expand file treeCollapse file tree
3 files changed
+83
-21
lines changedOpen diff view settings
Filter options
- src
- test
- fixtures
- parallel
Expand file treeCollapse file tree
3 files changed
+83
-21
lines changedOpen diff view settings
Collapse file
+10-21Lines changed: 10 additions & 21 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
239 | 239 | |
240 | 240 | |
241 | 241 | |
242 | | - |
243 | | - |
244 | | - |
245 | | - |
246 | | - |
247 | | - |
248 | | - |
249 | | - |
250 | | - |
251 | | - |
252 | | - |
253 | | - |
254 | | - |
255 | | - |
256 | | - |
257 | | - |
258 | | - |
259 | | - |
260 | | - |
261 | 242 | |
262 | 243 | |
263 | 244 | |
264 | 245 | |
| 246 | + |
265 | 247 | |
266 | 248 | |
267 | 249 | |
268 | 250 | |
269 | 251 | |
| 252 | + |
| 253 | + |
| 254 | + |
| 255 | + |
| 256 | + |
| 257 | + |
| 258 | + |
| 259 | + |
270 | 260 | |
271 | | - |
272 | | - |
| 261 | + |
273 | 262 | |
274 | 263 | |
275 | 264 | |
|
Collapse file
test/fixtures/debugger-util-regression-fixture.js
Copy file name to clipboard+4Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
| 1 | + |
| 2 | + |
| 3 | + |
| 4 | + |
Collapse file
test/parallel/test-debugger-util-regression.js
Copy file name to clipboard+69Lines changed: 69 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
| 1 | + |
| 2 | + |
| 3 | + |
| 4 | + |
| 5 | + |
| 6 | + |
| 7 | + |
| 8 | + |
| 9 | + |
| 10 | + |
| 11 | + |
| 12 | + |
| 13 | + |
| 14 | + |
| 15 | + |
| 16 | + |
| 17 | + |
| 18 | + |
| 19 | + |
| 20 | + |
| 21 | + |
| 22 | + |
| 23 | + |
| 24 | + |
| 25 | + |
| 26 | + |
| 27 | + |
| 28 | + |
| 29 | + |
| 30 | + |
| 31 | + |
| 32 | + |
| 33 | + |
| 34 | + |
| 35 | + |
| 36 | + |
| 37 | + |
| 38 | + |
| 39 | + |
| 40 | + |
| 41 | + |
| 42 | + |
| 43 | + |
| 44 | + |
| 45 | + |
| 46 | + |
| 47 | + |
| 48 | + |
| 49 | + |
| 50 | + |
| 51 | + |
| 52 | + |
| 53 | + |
| 54 | + |
| 55 | + |
| 56 | + |
| 57 | + |
| 58 | + |
| 59 | + |
| 60 | + |
| 61 | + |
| 62 | + |
| 63 | + |
| 64 | + |
| 65 | + |
| 66 | + |
| 67 | + |
| 68 | + |
| 69 | + |
0 commit comments