Commit 90f70ed
src: use cppgc to manage ContextifyContext
This simplifies the memory management of ContextifyContext,
making all references visible to V8.
The destructors don't need to do anything because when the wrapper is
going away, the context is already going away or otherwise it would've
been holding the wrapper alive, so there's no need to reset the
pointers in the context. Also, any global handles to the context
would've been empty at this point, and the per-Environment context
tracking code is capable of dealing with empty handles from contexts
purged elsewhere.
To this end, the context tracking code also purges empty handles
from the list now, to prevent keeping too many empty handles around.
PR-URL: #56522
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>1 parent 6762768 commit 90f70edCopy full SHA for 90f70ed
File tree
Expand file treeCollapse file tree
5 files changed
+115
-60
lines changedOpen diff view settings
Filter options
- src
- test/parallel
Expand file treeCollapse file tree
5 files changed
+115
-60
lines changedOpen diff view settings
Collapse file
+6-1Lines changed: 6 additions & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
223 | 223 | |
224 | 224 | |
225 | 225 | |
| 226 | + |
| 227 | + |
| 228 | + |
| 229 | + |
226 | 230 | |
| 231 | + |
227 | 232 | |
228 | 233 | |
229 | 234 | |
| ||
232 | 237 | |
233 | 238 | |
234 | 239 | |
235 | | - |
| 240 | + |
236 | 241 | |
237 | 242 | |
238 | 243 | |
|
Collapse file
+1Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
1093 | 1093 | |
1094 | 1094 | |
1095 | 1095 | |
| 1096 | + |
1096 | 1097 | |
1097 | 1098 | |
1098 | 1099 | |
|
Collapse file
+33-36Lines changed: 33 additions & 36 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
118 | 118 | |
119 | 119 | |
120 | 120 | |
121 | | - |
122 | | - |
| 121 | + |
| 122 | + |
| 123 | + |
123 | 124 | |
124 | 125 | |
125 | 126 | |
| ||
140 | 141 | |
141 | 142 | |
142 | 143 | |
143 | | - |
| 144 | + |
144 | 145 | |
145 | 146 | |
146 | 147 | |
147 | 148 | |
148 | | - |
| 149 | + |
| 150 | + |
| 151 | + |
| 152 | + |
149 | 153 | |
150 | 154 | |
151 | 155 | |
152 | 156 | |
153 | 157 | |
154 | | - |
155 | | - |
| 158 | + |
156 | 159 | |
157 | 160 | |
| 161 | + |
| 162 | + |
158 | 163 | |
159 | 164 | |
160 | 165 | |
161 | 166 | |
162 | 167 | |
163 | 168 | |
164 | 169 | |
165 | | - |
166 | | - |
167 | | - |
168 | | - |
169 | | - |
170 | | - |
171 | | - |
172 | | - |
173 | | - |
174 | | - |
175 | | - |
176 | | - |
177 | | - |
178 | 170 | |
179 | 171 | |
180 | 172 | |
| ||
251 | 243 | |
252 | 244 | |
253 | 245 | |
254 | | - |
255 | | - |
256 | | - |
257 | | - |
258 | | - |
| 246 | + |
| 247 | + |
| 248 | + |
| 249 | + |
259 | 250 | |
260 | 251 | |
261 | 252 | |
262 | 253 | |
263 | 254 | |
264 | 255 | |
265 | 256 | |
266 | | - |
| 257 | + |
267 | 258 | |
268 | 259 | |
269 | 260 | |
| ||
300 | 291 | |
301 | 292 | |
302 | 293 | |
303 | | - |
| 294 | + |
304 | 295 | |
305 | 296 | |
306 | 297 | |
| ||
315 | 306 | |
316 | 307 | |
317 | 308 | |
318 | | - |
| 309 | + |
319 | 310 | |
320 | 311 | |
321 | 312 | |
| ||
328 | 319 | |
329 | 320 | |
330 | 321 | |
331 | | - |
| 322 | + |
332 | 323 | |
333 | 324 | |
334 | 325 | |
335 | 326 | |
336 | 327 | |
337 | 328 | |
338 | 329 | |
339 | | - |
| 330 | + |
340 | 331 | |
341 | 332 | |
342 | | - |
343 | | - |
344 | | - |
345 | | - |
| 333 | + |
| 334 | + |
| 335 | + |
| 336 | + |
| 337 | + |
| 338 | + |
346 | 339 | |
347 | 340 | |
348 | 341 | |
| ||
352 | 345 | |
353 | 346 | |
354 | 347 | |
355 | | - |
| 348 | + |
356 | 349 | |
357 | 350 | |
358 | 351 | |
| ||
364 | 357 | |
365 | 358 | |
366 | 359 | |
367 | | - |
| 360 | + |
368 | 361 | |
369 | 362 | |
370 | 363 | |
| ||
438 | 431 | |
439 | 432 | |
440 | 433 | |
441 | | - |
| 434 | + |
442 | 435 | |
443 | 436 | |
444 | 437 | |
| ||
469 | 462 | |
470 | 463 | |
471 | 464 | |
| 465 | + |
| 466 | + |
| 467 | + |
| 468 | + |
472 | 469 | |
473 | 470 | |
474 | 471 | |
|
Collapse file
+70-14Lines changed: 70 additions & 14 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
23 | 23 | |
24 | 24 | |
25 | 25 | |
26 | | - |
| 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 | + |
| 70 | + |
| 71 | + |
| 72 | + |
| 73 | + |
| 74 | + |
| 75 | + |
| 76 | + |
27 | 77 | |
| 78 | + |
| 79 | + |
| 80 | + |
28 | 81 | |
29 | 82 | |
30 | 83 | |
31 | 84 | |
32 | | - |
33 | 85 | |
34 | | - |
35 | | - |
36 | | - |
| 86 | + |
| 87 | + |
| 88 | + |
| 89 | + |
| 90 | + |
| 91 | + |
| 92 | + |
37 | 93 | |
38 | 94 | |
39 | 95 | |
| ||
48 | 104 | |
49 | 105 | |
50 | 106 | |
51 | | - |
| 107 | + |
52 | 108 | |
53 | 109 | |
54 | 110 | |
| ||
75 | 131 | |
76 | 132 | |
77 | 133 | |
78 | | - |
79 | | - |
80 | | - |
| 134 | + |
| 135 | + |
| 136 | + |
81 | 137 | |
82 | | - |
83 | | - |
84 | | - |
85 | | - |
| 138 | + |
| 139 | + |
| 140 | + |
| 141 | + |
86 | 142 | |
87 | 143 | |
88 | 144 | |
| ||
140 | 196 | |
141 | 197 | |
142 | 198 | |
143 | | - |
| 199 | + |
144 | 200 | |
145 | 201 | |
146 | 202 | |
|
Collapse file
test/parallel/test-inspector-contexts.js
Copy file name to clipboardExpand all lines: test/parallel/test-inspector-contexts.js+5-9Lines changed: 5 additions & 9 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
8 | 8 | |
9 | 9 | |
10 | 10 | |
11 | | - |
| 11 | + |
12 | 12 | |
13 | 13 | |
14 | 14 | |
| ||
66 | 66 | |
67 | 67 | |
68 | 68 | |
69 | | - |
70 | | - |
| 69 | + |
71 | 70 | |
72 | 71 | |
73 | 72 | |
| ||
98 | 97 | |
99 | 98 | |
100 | 99 | |
101 | | - |
102 | | - |
| 100 | + |
103 | 101 | |
104 | 102 | |
105 | 103 | |
| ||
124 | 122 | |
125 | 123 | |
126 | 124 | |
127 | | - |
128 | | - |
| 125 | + |
129 | 126 | |
130 | 127 | |
131 | 128 | |
| ||
148 | 145 | |
149 | 146 | |
150 | 147 | |
151 | | - |
152 | | - |
| 148 | + |
153 | 149 | |
154 | 150 | |
155 | 151 | |
|
0 commit comments