@@ -3,10 +3,9 @@ use std::fmt::Write;
3
3
use std:: mem;
4
4
5
5
use failure:: { Error , ResultExt } ;
6
- use parity_wasm;
7
6
use parity_wasm:: elements:: * ;
8
7
use shared;
9
- use wasm_gc ;
8
+ use wasm_bindgen_gc ;
10
9
11
10
use super :: Bindgen ;
12
11
use descriptor:: { Descriptor , VectorKind } ;
@@ -403,7 +402,7 @@ impl<'a> Context<'a> {
403
402
self . create_memory_export ( ) ;
404
403
self . unexport_unused_internal_exports ( ) ;
405
404
closures:: rewrite ( self ) ?;
406
- self . gc ( ) ? ;
405
+ self . gc ( ) ;
407
406
408
407
// Note that it's important `throw` comes last *after* we gc. The
409
408
// `__wbindgen_malloc` function may call this but we only want to
@@ -482,7 +481,7 @@ impl<'a> Context<'a> {
482
481
} ;
483
482
484
483
self . export_table ( ) ;
485
- self . gc ( ) ? ;
484
+ self . gc ( ) ;
486
485
487
486
while js. contains ( "\n \n \n " ) {
488
487
js = js. replace ( "\n \n \n " , "\n \n " ) ;
@@ -1661,18 +1660,12 @@ impl<'a> Context<'a> {
1661
1660
) ;
1662
1661
}
1663
1662
1664
- fn gc ( & mut self ) -> Result < ( ) , Error > {
1663
+ fn gc ( & mut self ) {
1665
1664
self . parse_wasm_names ( ) ;
1666
- let module = mem:: replace ( self . module , Module :: default ( ) ) ;
1667
- let result = wasm_gc:: Config :: new ( )
1665
+ wasm_bindgen_gc:: Config :: new ( )
1668
1666
. demangle ( self . config . demangle )
1669
1667
. keep_debug ( self . config . keep_debug || self . config . debug )
1670
- . run ( module, |m| parity_wasm:: serialize ( m) . unwrap ( ) ) ?;
1671
- * self . module = match result. into_module ( ) {
1672
- Ok ( m) => m,
1673
- Err ( result) => deserialize_buffer ( & result. into_bytes ( ) ?) ?,
1674
- } ;
1675
- Ok ( ( ) )
1668
+ . run ( & mut self . module ) ;
1676
1669
}
1677
1670
1678
1671
fn parse_wasm_names ( & mut self ) {
0 commit comments