File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -2919,7 +2919,7 @@ module.exports = function wasm() {
2919
2919
return cachedWasm ;
2920
2920
}
2921
2921
2922
- let currentCallback = null ;
2922
+ const callbackStack = [ ] ;
2923
2923
2924
2924
cachedWasm = readWasm ( ) . then ( buffer => {
2925
2925
return WebAssembly . instantiate ( buffer , {
@@ -2960,7 +2960,7 @@ module.exports = function wasm() {
2960
2960
}
2961
2961
}
2962
2962
2963
- currentCallback ( mapping ) ;
2963
+ callbackStack [ callbackStack . length - 1 ] ( mapping ) ;
2964
2964
} ,
2965
2965
2966
2966
start_all_generated_locations_for : function ( ) { console . time ( "all_generated_locations_for" ) ; } ,
@@ -2989,11 +2989,11 @@ module.exports = function wasm() {
2989
2989
return {
2990
2990
exports : wasm . instance . exports ,
2991
2991
withMappingCallback : ( mappingCallback , f ) => {
2992
- currentCallback = mappingCallback ;
2992
+ callbackStack . push ( mappingCallback )
2993
2993
try {
2994
2994
f ( ) ;
2995
2995
} finally {
2996
- currentCallback = null ;
2996
+ callbackStack . pop ( )
2997
2997
}
2998
2998
}
2999
2999
} ;
You can’t perform that action at this time.
0 commit comments