Add missing expose_wasm_vector_len

Found through some testing I did awhile back!
This commit is contained in:
Alex Crichton
2019-04-25 19:21:13 -07:00
parent 7decb133f0
commit 21205eccf2

View File

@ -1450,6 +1450,7 @@ impl<'a> Context<'a> {
} }
self.require_internal_export("__wbindgen_malloc")?; self.require_internal_export("__wbindgen_malloc")?;
self.expose_uint32_memory(); self.expose_uint32_memory();
self.expose_wasm_vector_len();
if self.config.anyref { if self.config.anyref {
// TODO: using `addToAnyrefTable` goes back and forth between wasm // TODO: using `addToAnyrefTable` goes back and forth between wasm
// and JS a lot, we should have a bulk operation for this. // and JS a lot, we should have a bulk operation for this.
@ -2667,7 +2668,7 @@ impl<'a, 'b> SubContext<'a, 'b> {
.expect("classes already written") .expect("classes already written")
.entry(class_name.to_string()) .entry(class_name.to_string())
.or_insert(ExportedClass::default()); .or_insert(ExportedClass::default());
let doc_comments = format_doc_comments(&export.comments, Some(js_doc)); let doc_comments = format_doc_comments(&export.comments, Some(js_doc));
class.contents.push_str(&doc_comments); class.contents.push_str(&doc_comments);
class.typescript.push_str(&doc_comments); class.typescript.push_str(&doc_comments);