mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-07-25 00:51:57 +00:00
Ensure internal exported_classes
map is consistent
Throw it in an `Option` and then `take()` it when we consume it to ensure that future calls to insert data into it panic instead of producing inconsistent JS.
This commit is contained in:
@@ -196,16 +196,15 @@ impl Bindgen {
|
||||
let (js, ts) = {
|
||||
let mut cx = js::Context {
|
||||
globals: String::new(),
|
||||
globals_written: false,
|
||||
imports: String::new(),
|
||||
imports_post: String::new(),
|
||||
footer: String::new(),
|
||||
typescript: format!("/* tslint:disable */\n"),
|
||||
exposed_globals: Default::default(),
|
||||
exposed_globals: Some(Default::default()),
|
||||
required_internal_exports: Default::default(),
|
||||
imported_names: Default::default(),
|
||||
imported_identifiers: Default::default(),
|
||||
exported_classes: Default::default(),
|
||||
exported_classes: Some(Default::default()),
|
||||
config: &self,
|
||||
module: &mut module,
|
||||
function_table_needed: false,
|
||||
|
Reference in New Issue
Block a user