File tree Expand file tree Collapse file tree 5 files changed +28
-2
lines changed Expand file tree Collapse file tree 5 files changed +28
-2
lines changed Original file line number Diff line number Diff line change @@ -1629,7 +1629,7 @@ export class Module {
16291629 binaryen . _BinaryenModuleInterpret ( this . ref ) ;
16301630 }
16311631
1632- toBinary ( sourceMapUrl : string | null ) : BinaryModule {
1632+ toBinary ( sourceMapUrl : string | null = null ) : BinaryModule {
16331633 var out = this . lit ; // safe to reuse as long as..
16341634 assert ( binaryen . _BinaryenSizeofLiteral ( ) >= 12 ) ;
16351635 var cStr = allocString ( sourceMapUrl ) ;
@@ -1642,7 +1642,7 @@ export class Module {
16421642 var ret = new BinaryModule ( ) ;
16431643 ret . output = readBuffer ( binaryPtr , binaryLen ) ;
16441644 ret . sourceMap = readString ( sourceMapPtr ) ;
1645- binaryen . _free ( cStr ) ;
1645+ if ( cStr ) binaryen . _free ( cStr ) ;
16461646 binaryen . _free ( binaryPtr ) ;
16471647 if ( sourceMapPtr ) binaryen . _free ( sourceMapPtr ) ;
16481648 return ret ;
Original file line number Diff line number Diff line change 1+ {
2+ "asc_flags" : [
3+ " --runtime none" ,
4+ " --converge"
5+ ]
6+ }
Original file line number Diff line number Diff line change 1+ (module
2+ (type $none_=>_none (func ))
3+ (memory $0 0 )
4+ (export " memory" (memory $0 ))
5+ (export " test" (func $converge/test ))
6+ (func $converge/test
7+ nop
8+ )
9+ )
Original file line number Diff line number Diff line change 1+ export function test ( ) : void { }
Original file line number Diff line number Diff line change 1+ (module
2+ (type $none_=>_none (func ))
3+ (memory $0 0 )
4+ (table $0 1 funcref )
5+ (export " memory" (memory $0 ))
6+ (export " test" (func $converge/test ))
7+ (func $converge/test
8+ nop
9+ )
10+ )
You can’t perform that action at this time.
0 commit comments