Commit d5c00fa
committed
Split WP11_Session_RemoveObject into by-handle and owned-object entries
Address review feedback on the concurrent C_DestroyObject fix.
Rename the full removal routine to WP11_Session_RemoveObjectByHandle, which
takes a handle-derived onToken and a checkDestroyable flag. This is the entry
point for C_DestroyObject, where a concurrent destroy of the same shared
token-object handle may free the object, so onToken must come from the handle
rather than from a dereference of the object.
Add a WP11_Session_RemoveObject(session, object) wrapper for cleanup paths that
hold the only reference to a live object. It reads onToken from the object
itself, which removes the risk of passing the wrong object's onToken, and drops
the repeated (void)..., 0 boilerplate at the six cleanup call sites.
Document both params and every return code (WP11_OBJECT_ALREADY_REMOVED,
WP11_OBJECT_NOT_DESTROYABLE, negative store status, 0) in the function comment
and header so callers know what to do in each case.1 parent 6d3d241 commit d5c00fa
4 files changed
Lines changed: 77 additions & 42 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1278 | 1278 | | |
1279 | 1279 | | |
1280 | 1280 | | |
1281 | | - | |
1282 | | - | |
1283 | | - | |
| 1281 | + | |
1284 | 1282 | | |
1285 | 1283 | | |
1286 | 1284 | | |
| |||
1476 | 1474 | | |
1477 | 1475 | | |
1478 | 1476 | | |
1479 | | - | |
1480 | | - | |
1481 | | - | |
| 1477 | + | |
1482 | 1478 | | |
1483 | 1479 | | |
1484 | 1480 | | |
| |||
1697 | 1693 | | |
1698 | 1694 | | |
1699 | 1695 | | |
1700 | | - | |
1701 | | - | |
| 1696 | + | |
| 1697 | + | |
1702 | 1698 | | |
1703 | 1699 | | |
1704 | 1700 | | |
| |||
1709 | 1705 | | |
1710 | 1706 | | |
1711 | 1707 | | |
1712 | | - | |
1713 | | - | |
1714 | | - | |
1715 | | - | |
1716 | | - | |
| 1708 | + | |
| 1709 | + | |
| 1710 | + | |
| 1711 | + | |
| 1712 | + | |
1717 | 1713 | | |
1718 | 1714 | | |
1719 | 1715 | | |
| |||
7936 | 7932 | | |
7937 | 7933 | | |
7938 | 7934 | | |
7939 | | - | |
7940 | | - | |
| 7935 | + | |
7941 | 7936 | | |
7942 | 7937 | | |
7943 | 7938 | | |
7944 | 7939 | | |
7945 | | - | |
7946 | | - | |
| 7940 | + | |
7947 | 7941 | | |
7948 | 7942 | | |
7949 | 7943 | | |
| |||
8440 | 8434 | | |
8441 | 8435 | | |
8442 | 8436 | | |
8443 | | - | |
8444 | | - | |
8445 | | - | |
| 8437 | + | |
8446 | 8438 | | |
8447 | 8439 | | |
8448 | 8440 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
922 | 922 | | |
923 | 923 | | |
924 | 924 | | |
925 | | - | |
| 925 | + | |
926 | 926 | | |
927 | 927 | | |
928 | 928 | | |
| |||
8815 | 8815 | | |
8816 | 8816 | | |
8817 | 8817 | | |
8818 | | - | |
| 8818 | + | |
| 8819 | + | |
8819 | 8820 | | |
8820 | | - | |
8821 | | - | |
8822 | | - | |
8823 | | - | |
| 8821 | + | |
| 8822 | + | |
| 8823 | + | |
| 8824 | + | |
| 8825 | + | |
| 8826 | + | |
| 8827 | + | |
| 8828 | + | |
| 8829 | + | |
| 8830 | + | |
| 8831 | + | |
| 8832 | + | |
| 8833 | + | |
| 8834 | + | |
| 8835 | + | |
| 8836 | + | |
| 8837 | + | |
| 8838 | + | |
| 8839 | + | |
| 8840 | + | |
| 8841 | + | |
| 8842 | + | |
| 8843 | + | |
| 8844 | + | |
8824 | 8845 | | |
8825 | | - | |
8826 | | - | |
| 8846 | + | |
| 8847 | + | |
| 8848 | + | |
8827 | 8849 | | |
8828 | 8850 | | |
8829 | 8851 | | |
| |||
8957 | 8979 | | |
8958 | 8980 | | |
8959 | 8981 | | |
| 8982 | + | |
| 8983 | + | |
| 8984 | + | |
| 8985 | + | |
| 8986 | + | |
| 8987 | + | |
| 8988 | + | |
| 8989 | + | |
| 8990 | + | |
| 8991 | + | |
| 8992 | + | |
| 8993 | + | |
| 8994 | + | |
| 8995 | + | |
| 8996 | + | |
| 8997 | + | |
| 8998 | + | |
| 8999 | + | |
| 9000 | + | |
8960 | 9001 | | |
8961 | 9002 | | |
8962 | 9003 | | |
| |||
10291 | 10332 | | |
10292 | 10333 | | |
10293 | 10334 | | |
10294 | | - | |
10295 | | - | |
| 10335 | + | |
| 10336 | + | |
10296 | 10337 | | |
10297 | 10338 | | |
10298 | 10339 | | |
10299 | | - | |
10300 | | - | |
| 10340 | + | |
| 10341 | + | |
10301 | 10342 | | |
10302 | 10343 | | |
10303 | 10344 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
441 | 441 | | |
442 | 442 | | |
443 | 443 | | |
444 | | - | |
445 | | - | |
446 | | - | |
447 | | - | |
448 | | - | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
449 | 449 | | |
450 | | - | |
451 | | - | |
452 | | - | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
453 | 453 | | |
454 | | - | |
| 454 | + | |
455 | 455 | | |
456 | 456 | | |
| 457 | + | |
| 458 | + | |
457 | 459 | | |
458 | 460 | | |
459 | 461 | | |
| |||
0 commit comments