mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-03-16 02:00:51 +00:00
Merge pull request #1304 from alexcrichton/fix-init
Fix a `__wbindgen_placeholder__` module leaking through
This commit is contained in:
commit
c62f6529d8
@ -616,6 +616,15 @@ impl<'a> Context<'a> {
|
||||
if self.config.emit_start {
|
||||
self.add_start_function()?;
|
||||
has_start_function = self.unstart_start_function();
|
||||
|
||||
// In the "we're pretending to be an ES module use case if we've got
|
||||
// a start function then we use an injected shim to actually execute
|
||||
// the real start function on the next tick of the microtask queue
|
||||
// (explained above)
|
||||
if !self.config.no_modules && has_start_function {
|
||||
self.inject_start_shim();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
self.export_table()?;
|
||||
@ -787,14 +796,6 @@ impl<'a> Context<'a> {
|
||||
},
|
||||
)
|
||||
} else {
|
||||
// In the "we're pretending to be an ES module use case if we've got
|
||||
// a start function then we use an injected shim to actually execute
|
||||
// the real start function on the next tick of the microtask queue
|
||||
// (explained above)
|
||||
if has_start_function {
|
||||
self.inject_start_shim();
|
||||
}
|
||||
|
||||
let import_wasm = if self.globals.len() == 0 {
|
||||
String::new()
|
||||
} else if self.use_node_require() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user