File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
crates/cli-support/src/js Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -1754,13 +1754,13 @@ impl<'a> Context<'a> {
1754
1754
let add = self . expose_add_to_externref_table ( table, alloc) ?;
1755
1755
self . global ( & format ! (
1756
1756
"\
1757
- function handleError(f, args) {{
1757
+ function handleError(f, args) {{
1758
1758
try {{
1759
1759
return f.apply(this, args);
1760
1760
}} catch (e) {{
1761
1761
const idx = {}(e);
1762
1762
wasm.{}(idx);
1763
- }}
1763
+ }}
1764
1764
}}
1765
1765
" ,
1766
1766
add, store,
@@ -1791,7 +1791,7 @@ impl<'a> Context<'a> {
1791
1791
}
1792
1792
self . global (
1793
1793
"\
1794
- function logError(f, args) {
1794
+ function logError(f, args) {
1795
1795
try {
1796
1796
return f.apply(this, args);
1797
1797
} catch (e) {
@@ -3306,6 +3306,9 @@ impl<'a> Context<'a> {
3306
3306
let default_name = format ! ( "__wbindgen_export_{}" , self . next_export_idx) ;
3307
3307
self . next_export_idx += 1 ;
3308
3308
let name = match id {
3309
+ walrus:: ExportItem :: Memory ( _) if self . module . memories . iter ( ) . count ( ) == 1 => {
3310
+ "memory" . to_owned ( )
3311
+ }
3309
3312
walrus:: ExportItem :: Function ( f) => match & self . module . funcs . get ( f) . name {
3310
3313
Some ( s) => to_js_identifier ( s) ,
3311
3314
None => default_name,
You can’t perform that action at this time.
0 commit comments