Commit 9c01797
authored
Implement JSAutoStructuredCloneBufferWrapper (#599)
* Implement JSAutoStructuredCloneBufferWrapper
Implement a safe wrapper of `*mut JSAutoStructuredCloneBuffer` that
Implements the Drop trait to prevent leakage.
Signed-off-by: Kingsley Yung <[email protected]>
* Remove unnecessary import
Signed-off-by: Kingsley Yung <[email protected]>
* Make sure JSAutoStructuredCloneBufferWrapper::new don't have null pointer
Signed-off-by: Kingsley Yung <[email protected]>
* Wrap raw pointer in NonNull
Signed-off-by: Kingsley Yung <[email protected]>
---------
Signed-off-by: Kingsley Yung <[email protected]>1 parent ace07c8 commit 9c01797
1 file changed
+30
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
| |||
47 | 48 | | |
48 | 49 | | |
49 | 50 | | |
| 51 | + | |
50 | 52 | | |
51 | 53 | | |
52 | 54 | | |
| |||
532 | 534 | | |
533 | 535 | | |
534 | 536 | | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
535 | 565 | | |
536 | 566 | | |
537 | 567 | | |
| |||
0 commit comments