Commit 7f9094e
committed
Stop managing JSOneshotClosure by FinalizationRegistry
JSOneshotClosure manages its lifetime by itself, so it doesn't require
nondeterministic FinalizationRegistry. Additionally, use of FinalizationRegistry
was unsafe for the case:
1. JSOneshotClosure C1 is created
2. C1 is called, and destroyed
3. JSOneshotClosure C2 is created at the same address of C1
4. C1's finalizer callback is called1 parent db3a6e2 commit 7f9094e
File tree
4 files changed
+29
-1
lines changed- Plugins/PackageToJS/Templates
- Runtime/src
- Sources
- JavaScriptKit/FundamentalObjects
- _CJavaScriptKit/include
4 files changed
+29
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
638 | 638 | | |
639 | 639 | | |
640 | 640 | | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
641 | 647 | | |
642 | 648 | | |
643 | 649 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
557 | 557 | | |
558 | 558 | | |
559 | 559 | | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
560 | 572 | | |
561 | 573 | | |
562 | 574 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
| 28 | + | |
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
278 | 278 | | |
279 | 279 | | |
280 | 280 | | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
281 | 291 | | |
282 | 292 | | |
283 | 293 | | |
| |||
0 commit comments