Commit 0beb8a6
src: deprecate two- and one-argument AtExit()
Using `AtExit()` without an `Environment*` pointer or providing
an argument is almost always a sign of improperly relying on global
state and/or using `AtExit()` as an addon when the addon-targeting
`AddEnvironmentCleanupHook()` would be the better choice.
Deprecate those variants. This also updates the addon docs to
refer to `AddEnvironmentCleanupHook()` rather than `AtExit()`.
PR-URL: #30227
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>1 parent bf4c39d commit 0beb8a6Copy full SHA for 0beb8a6
File tree
Expand file treeCollapse file tree
3 files changed
+81
-89
lines changedOpen diff view settings
Filter options
- doc/api
- src
- test/addons/at-exit
Expand file treeCollapse file tree
3 files changed
+81
-89
lines changedOpen diff view settings
Collapse file
+60-84Lines changed: 60 additions & 84 deletions
- Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
241 | 241 | |
242 | 242 | |
243 | 243 | |
| 244 | + |
| 245 | + |
| 246 | + |
| 247 | + |
| 248 | + |
| 249 | + |
244 | 250 | |
245 | 251 | |
246 | 252 | |
| ||
254 | 260 | |
255 | 261 | |
256 | 262 | |
257 | | - |
| 263 | + |
258 | 264 | |
259 | | - |
260 | | - |
| 265 | + |
261 | 266 | |
262 | | - |
263 | | - |
| 267 | + |
| 268 | + |
| 269 | + |
| 270 | + |
| 271 | + |
| 272 | + |
| 273 | + |
| 274 | + |
| 275 | + |
| 276 | + |
| 277 | + |
| 278 | + |
| 279 | + |
| 280 | + |
| 281 | + |
| 282 | + |
| 283 | + |
| 284 | + |
| 285 | + |
| 286 | + |
| 287 | + |
| 288 | + |
| 289 | + |
| 290 | + |
| 291 | + |
| 292 | + |
| 293 | + |
| 294 | + |
| 295 | + |
| 296 | + |
| 297 | + |
| 298 | + |
| 299 | + |
| 300 | + |
| 301 | + |
| 302 | + |
| 303 | + |
| 304 | + |
| 305 | + |
| 306 | + |
| 307 | + |
| 308 | + |
| 309 | + |
| 310 | + |
| 311 | + |
| 312 | + |
| 313 | + |
| 314 | + |
| 315 | + |
| 316 | + |
| 317 | + |
| 318 | + |
264 | 319 | |
265 | 320 | |
266 | 321 | |
| ||
1293 | 1348 | |
1294 | 1349 | |
1295 | 1350 | |
1296 | | - |
1297 | | - |
1298 | | - |
1299 | | - |
1300 | | - |
1301 | | - |
1302 | | - |
1303 | | - |
1304 | | - |
1305 | | - |
1306 | | - |
1307 | | - |
1308 | | - |
1309 | | - |
1310 | | - |
1311 | | - |
1312 | | - |
1313 | | - |
1314 | | - |
1315 | | - |
1316 | | - |
1317 | | - |
1318 | | - |
1319 | | - |
1320 | | - |
1321 | | - |
1322 | | - |
1323 | | - |
1324 | | - |
1325 | | - |
1326 | | - |
1327 | | - |
1328 | | - |
1329 | | - |
1330 | | - |
1331 | | - |
1332 | | - |
1333 | | - |
1334 | | - |
1335 | | - |
1336 | | - |
1337 | | - |
1338 | | - |
1339 | | - |
1340 | | - |
1341 | | - |
1342 | | - |
1343 | | - |
1344 | | - |
1345 | | - |
1346 | | - |
1347 | | - |
1348 | | - |
1349 | | - |
1350 | | - |
1351 | | - |
1352 | | - |
1353 | | - |
1354 | | - |
1355 | | - |
1356 | | - |
1357 | | - |
1358 | | - |
1359 | | - |
1360 | | - |
1361 | | - |
1362 | | - |
1363 | | - |
1364 | | - |
1365 | | - |
1366 | | - |
1367 | | - |
1368 | | - |
1369 | | - |
1370 | | - |
1371 | | - |
1372 | | - |
1373 | | - |
1374 | | - |
1375 | 1351 | |
1376 | 1352 | |
1377 | 1353 | |
|
Collapse file
+13-2Lines changed: 13 additions & 2 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
664 | 664 | |
665 | 665 | |
666 | 666 | |
| 667 | + |
| 668 | + |
| 669 | + |
667 | 670 | |
668 | | - |
| 671 | + |
| 672 | + |
| 673 | + |
669 | 674 | |
670 | 675 | |
671 | 676 | |
672 | 677 | |
673 | 678 | |
674 | 679 | |
675 | 680 | |
676 | | - |
| 681 | + |
| 682 | + |
| 683 | + |
| 684 | + |
| 685 | + |
| 686 | + |
| 687 | + |
677 | 688 | |
678 | 689 | |
679 | 690 | |
|
Collapse file
test/addons/at-exit/binding.cc
Copy file name to clipboardExpand all lines: test/addons/at-exit/binding.cc+8-3Lines changed: 8 additions & 3 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
3 | 3 | |
4 | 4 | |
5 | 5 | |
| 6 | + |
| 7 | + |
6 | 8 | |
| 9 | + |
| 10 | + |
7 | 11 | |
8 | 12 | |
9 | 13 | |
| ||
46 | 50 | |
47 | 51 | |
48 | 52 | |
49 | | - |
50 | | - |
51 | | - |
| 53 | + |
| 54 | + |
| 55 | + |
| 56 | + |
52 | 57 | |
53 | 58 | |
54 | 59 | |
0 commit comments