This repository was archived by the owner on Nov 12, 2022. It is now read-only.
File tree 2 files changed +18
-2
lines changed 2 files changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -75,6 +75,17 @@ pub struct ReadableStreamUnderlyingSourceTraps {
75
75
> ,
76
76
}
77
77
78
+ #[ repr( C ) ]
79
+ #[ derive( Copy , Clone , Default ) ]
80
+ pub struct JSExternalStringCallbacksTraps {
81
+ pub finalize : :: std:: option:: Option <
82
+ unsafe extern "C" fn ( * const c_void , * mut :: libc:: wchar_t )
83
+ > ,
84
+ pub sizeOfBuffer : :: std:: option:: Option <
85
+ unsafe extern "C" fn ( * const c_void , * const :: libc:: wchar_t , MallocSizeOf ) -> :: libc:: size_t
86
+ > ,
87
+ }
88
+
78
89
#[ repr( C ) ]
79
90
#[ derive( Copy , Clone ) ]
80
91
pub struct ProxyTraps {
@@ -578,6 +589,11 @@ extern "C" {
578
589
source : * const c_void ,
579
590
) -> * mut JS :: ReadableStreamUnderlyingSource ;
580
591
pub fn DeleteReadableStreamUnderlyingSource ( source : * mut JS :: ReadableStreamUnderlyingSource ) ;
592
+ pub fn CreateJSExternalStringCallbacks (
593
+ traps : * const JSExternalStringCallbacksTraps ,
594
+ privateData : * const c_void ,
595
+ ) -> * mut JSExternalStringCallbacks ;
596
+ pub fn DeleteJSExternalStringCallbacks ( callbacks : * mut JSExternalStringCallbacks ) ;
581
597
pub fn DispatchableRun (
582
598
cx : * mut JSContext ,
583
599
ptr : * mut JS :: Dispatchable ,
Original file line number Diff line number Diff line change @@ -1244,9 +1244,9 @@ DeleteReadableStreamUnderlyingSource(JS::ReadableStreamUnderlyingSource* source)
1244
1244
}
1245
1245
1246
1246
JSExternalStringCallbacks*
1247
- CreateRustJSExternalStringCallbacks (const JSExternalStringCallbacksTraps* aTraps, void * aCallbacks )
1247
+ CreateRustJSExternalStringCallbacks (const JSExternalStringCallbacksTraps* aTraps, void * privateData )
1248
1248
{
1249
- return new RustJSExternalStringCallbacks (*aTraps, aCallbacks );
1249
+ return new RustJSExternalStringCallbacks (*aTraps, privateData );
1250
1250
}
1251
1251
1252
1252
void DeleteRustJSExternalStringCallbacks (JSExternalStringCallbacks* callbacks)
You can’t perform that action at this time.
0 commit comments