File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -79,7 +79,9 @@ export async function startWasiChildThread(event) {
79
79
const swift = new SwiftRuntime ( {
80
80
sharedMemory : true ,
81
81
threadChannel : {
82
- postMessageToMainThread : parentPort . postMessage . bind ( parentPort ) ,
82
+ postMessageToMainThread : ( message , transfer ) => {
83
+ parentPort . postMessage ( message , transfer ) ;
84
+ } ,
83
85
listenMessageFromMainThread : ( listener ) => {
84
86
parentPort . on ( "message" , listener )
85
87
}
@@ -139,9 +141,9 @@ class ThreadRegistry {
139
141
return this . workers . get ( tid ) ;
140
142
}
141
143
142
- wakeUpWorkerThread ( tid , message ) {
144
+ wakeUpWorkerThread ( tid , message , transfer ) {
143
145
const worker = this . workers . get ( tid ) ;
144
- worker . postMessage ( message ) ;
146
+ worker . postMessage ( message , transfer ) ;
145
147
}
146
148
}
147
149
You can’t perform that action at this time.
0 commit comments