Commit adba698
Fix race condition in FontFile data access during threaded imports
Add mutex protection to FontFile data access methods to prevent
race conditions when multiple import threads access the same
cached FontFile simultaneously.
Use data_external flag to track whether data came from set_data_ptr()
vs set_data() to avoid unnecessary PackedByteArray COW copies.1 parent 7c26d93 commit adba698
2 files changed
+22
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
591 | 591 | | |
592 | 592 | | |
593 | 593 | | |
| 594 | + | |
| 595 | + | |
594 | 596 | | |
595 | 597 | | |
596 | 598 | | |
| |||
1408 | 1410 | | |
1409 | 1411 | | |
1410 | 1412 | | |
1411 | | - | |
1412 | | - | |
1413 | | - | |
| 1413 | + | |
| 1414 | + | |
| 1415 | + | |
| 1416 | + | |
| 1417 | + | |
| 1418 | + | |
| 1419 | + | |
1414 | 1420 | | |
1415 | 1421 | | |
1416 | 1422 | | |
| |||
2070 | 2076 | | |
2071 | 2077 | | |
2072 | 2078 | | |
2073 | | - | |
| 2079 | + | |
| 2080 | + | |
| 2081 | + | |
2074 | 2082 | | |
2075 | 2083 | | |
| 2084 | + | |
2076 | 2085 | | |
2077 | 2086 | | |
2078 | 2087 | | |
| |||
2082 | 2091 | | |
2083 | 2092 | | |
2084 | 2093 | | |
| 2094 | + | |
| 2095 | + | |
2085 | 2096 | | |
2086 | 2097 | | |
2087 | 2098 | | |
| 2099 | + | |
2088 | 2100 | | |
2089 | 2101 | | |
2090 | 2102 | | |
| |||
2094 | 2106 | | |
2095 | 2107 | | |
2096 | 2108 | | |
2097 | | - | |
| 2109 | + | |
| 2110 | + | |
| 2111 | + | |
2098 | 2112 | | |
2099 | 2113 | | |
2100 | 2114 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
| |||
185 | 186 | | |
186 | 187 | | |
187 | 188 | | |
| 189 | + | |
188 | 190 | | |
189 | 191 | | |
| 192 | + | |
190 | 193 | | |
191 | 194 | | |
192 | 195 | | |
| |||
0 commit comments