Commit 78a1570
authored
src: avoid making JSTransferable wrapper object weak
JSTransferable wrapper object is a short-lived wrapper in the scope of
the serialization or the deserialization. Make the JSTransferable
wrapper object pointer as a strongly-referenced detached BaseObjectPtr
so that a JSTransferable wrapper object and its target object will never
be garbage-collected during a ser-des process, and the wrapper object
will be immediately destroyed when the process is completed.
PR-URL: #50026
Fixes: #49852
Fixes: #49844
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>1 parent 6b76b77 commit 78a1570Copy full SHA for 78a1570
File tree
Expand file treeCollapse file tree
3 files changed
+37
-19
lines changedOpen diff view settings
Filter options
- src
- test/pummel
Expand file treeCollapse file tree
3 files changed
+37
-19
lines changedOpen diff view settings
Collapse file
+22-14Lines changed: 22 additions & 14 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
321 | 321 | |
322 | 322 | |
323 | 323 | |
324 | | - |
325 | | - |
| 324 | + |
| 325 | + |
| 326 | + |
326 | 327 | |
327 | 328 | |
328 | 329 | |
| ||
536 | 537 | |
537 | 538 | |
538 | 539 | |
539 | | - |
540 | | - |
| 540 | + |
541 | 541 | |
542 | 542 | |
543 | 543 | |
| ||
1190 | 1190 | |
1191 | 1191 | |
1192 | 1192 | |
1193 | | - |
| 1193 | + |
| 1194 | + |
1194 | 1195 | |
1195 | 1196 | |
1196 | 1197 | |
1197 | 1198 | |
1198 | 1199 | |
1199 | | - |
| 1200 | + |
1200 | 1201 | |
1201 | | - |
| 1202 | + |
| 1203 | + |
1202 | 1204 | |
1203 | 1205 | |
1204 | 1206 | |
1205 | 1207 | |
1206 | 1208 | |
1207 | 1209 | |
1208 | | - |
| 1210 | + |
| 1211 | + |
| 1212 | + |
1209 | 1213 | |
1210 | 1214 | |
1211 | 1215 | |
| ||
1226 | 1230 | |
1227 | 1231 | |
1228 | 1232 | |
1229 | | - |
1230 | 1233 | |
1231 | | - |
| 1234 | + |
| 1235 | + |
| 1236 | + |
| 1237 | + |
| 1238 | + |
| 1239 | + |
| 1240 | + |
1232 | 1241 | |
1233 | 1242 | |
1234 | 1243 | |
| 1244 | + |
1235 | 1245 | |
1236 | 1246 | |
1237 | 1247 | |
| ||
1335 | 1345 | |
1336 | 1346 | |
1337 | 1347 | |
1338 | | - |
1339 | | - |
| 1348 | + |
1340 | 1349 | |
1341 | 1350 | |
1342 | 1351 | |
| ||
1397 | 1406 | |
1398 | 1407 | |
1399 | 1408 | |
1400 | | - |
1401 | | - |
| 1409 | + |
1402 | 1410 | |
1403 | 1411 | |
1404 | 1412 | |
|
Collapse file
+7-5Lines changed: 7 additions & 5 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
324 | 324 | |
325 | 325 | |
326 | 326 | |
327 | | - |
| 327 | + |
| 328 | + |
328 | 329 | |
329 | 330 | |
330 | 331 | |
331 | 332 | |
| 333 | + |
| 334 | + |
| 335 | + |
| 336 | + |
| 337 | + |
332 | 338 | |
333 | 339 | |
334 | 340 | |
| ||
345 | 351 | |
346 | 352 | |
347 | 353 | |
348 | | - |
349 | | - |
350 | | - |
351 | | - |
352 | 354 | |
353 | 355 | |
354 | 356 | |
|
Collapse file
test/pummel/test-structuredclone-jstransferable.js
Copy file name to clipboard+8Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
| 1 | + |
| 2 | + |
| 3 | + |
| 4 | + |
| 5 | + |
| 6 | + |
| 7 | + |
| 8 | + |
0 commit comments