@@ -134,6 +134,7 @@ export function xsnap(options) {
134
134
const vatCancelled = vatExit . promise . then ( ( ) => {
135
135
throw Error ( `${ name } exited` ) ;
136
136
} ) ;
137
+ vatCancelled . catch ( ( ) => console . log ( `vatCancelled being ignored` ) ) ;
137
138
138
139
const writer = xsnapProcess . stdio [ 3 ] ;
139
140
const reader = xsnapProcess . stdio [ 4 ] ;
@@ -212,7 +213,8 @@ export function xsnap(options) {
212
213
return runToIdle ( ) ;
213
214
} ) ;
214
215
baton = result . then ( ( ) => { } ) . catch ( ( ) => { } ) ;
215
- return Promise . race ( [ vatCancelled , result ] ) ;
216
+ //return Promise.race([vatCancelled, result]);
217
+ return result ;
216
218
}
217
219
218
220
/**
@@ -225,7 +227,8 @@ export function xsnap(options) {
225
227
await runToIdle ( ) ;
226
228
} ) ;
227
229
baton = result . catch ( ( ) => { } ) ;
228
- return Promise . race ( [ vatCancelled , result ] ) ;
230
+ //return Promise.race([vatCancelled, result]);
231
+ return result ;
229
232
}
230
233
231
234
/**
@@ -238,7 +241,8 @@ export function xsnap(options) {
238
241
await runToIdle ( ) ;
239
242
} ) ;
240
243
baton = result . catch ( ( ) => { } ) ;
241
- return Promise . race ( [ vatCancelled , result ] ) ;
244
+ //return Promise.race([vatCancelled, result]);
245
+ return result ;
242
246
}
243
247
244
248
/**
@@ -250,7 +254,8 @@ export function xsnap(options) {
250
254
await runToIdle ( ) ;
251
255
} ) ;
252
256
baton = result . catch ( ( ) => { } ) ;
253
- return Promise . race ( [ vatCancelled , result ] ) ;
257
+ //return Promise.race([vatCancelled, result]);
258
+ return result ;
254
259
}
255
260
256
261
/**
@@ -269,7 +274,8 @@ export function xsnap(options) {
269
274
( ) => { } ,
270
275
( ) => { } ,
271
276
) ;
272
- return Promise . race ( [ vatCancelled , result ] ) ;
277
+ //return Promise.race([vatCancelled, result]);
278
+ return result ;
273
279
}
274
280
275
281
/**
@@ -291,7 +297,8 @@ export function xsnap(options) {
291
297
await runToIdle ( ) ;
292
298
} ) ;
293
299
baton = result . catch ( ( ) => { } ) ;
294
- return Promise . race ( [ vatExit . promise , baton ] ) ;
300
+ //return Promise.race([vatExit.promise, baton]);
301
+ return baton ;
295
302
}
296
303
297
304
/**
0 commit comments