File tree Expand file tree Collapse file tree 2 files changed +10
-9
lines changed Expand file tree Collapse file tree 2 files changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -191,15 +191,11 @@ impl<'a> Context<'a> {
191
191
// `__wbindgen_malloc`) if none of our JS glue actually needed it.
192
192
self . unexport_unused_internal_exports ( ) ;
193
193
194
- // Handle the `start` function, if one was specified. If we're in a
195
- // --test mode (such as wasm-bindgen-test-runner) then we skip this
196
- // entirely. Otherwise we want to first add a start function to the
197
- // `start` section if one is specified.
198
- //
199
- // Note that once a start function is added, if any, we immediately
200
- // un-start it. This is done because we require that the JS glue
201
- // initializes first, so we execute wasm startup manually once the JS
202
- // glue is all in place.
194
+ // Initialization is just flat out tricky and not something we
195
+ // understand super well. To try to handle various issues that have come
196
+ // up we always remove the `start` function if one is present. The JS
197
+ // bindings glue then manually calls the start function (if it was
198
+ // previously present).
203
199
let mut needs_manual_start = false ;
204
200
if self . config . emit_start {
205
201
needs_manual_start = self . unstart_start_function ( ) ;
Original file line number Diff line number Diff line change @@ -317,6 +317,11 @@ impl Bindgen {
317
317
// supports that aren't covered by WebIDL bindings.
318
318
webidl:: process ( & mut module) ?;
319
319
320
+ // Now that we've got type information from the webidl processing pass,
321
+ // touch up the output of rustc to insert anyref shims where necessary.
322
+ // This is only done if the anyref pass is enabled, which it's
323
+ // currently off-by-default since `anyref` is still in development in
324
+ // engines.
320
325
if self . anyref {
321
326
anyref:: process ( & mut module) ?;
322
327
}
You can’t perform that action at this time.
0 commit comments