Ah!  Of course we were somehow depending on the specifics of the previous
code.  Would you mind opening a bug for that?

cheers,
sam

On Mon, Oct 21, 2024 at 2:01 AM Stephan Bergmann <[email protected]>
wrote:

> When building my app with a build of latest emsdk 3.1.69, I found that
> the virtual file system would no longer be populated and only contained
> the bare hardcoded minimum.  Turned out that
>
> > commit 483cdcd5306780520a2de8856fcd13910e71497e
> > Author: Sam Clegg <[email protected]>
> > Date:   Thu Oct 3 14:35:51 2024 -0700
> >
> >     Micro-optimize preRun/postRun handling. NFC (#22671)
> [...]
> > diff --git a/src/preamble.js b/src/preamble.js
> > index d37cb9fe7..3a6aee9c9 100644
> > --- a/src/preamble.js
> > +++ b/src/preamble.js
> > @@ -195,11 +195,10 @@ function preRun() {
> >    assert(!ENVIRONMENT_IS_PTHREAD); // PThreads reuse the runtime from
> the main thread.
> >  #endif
> >  #if expectToReceiveOnModule('preRun')
> > -  if (Module['preRun']) {
> > -    if (typeof Module['preRun'] == 'function') Module['preRun'] =
> [Module['preRun']];
> > -    while (Module['preRun'].length) {
> > -      addOnPreRun(Module['preRun'].shift());
> > -    }
> > +  var preRuns = Module['preRun'];
> > +  if (preRuns) {
> > +    if (typeof preRuns == 'function') preRuns = [preRuns];
> > +    preRuns.forEach(addOnPreRun);
> >    }
> >  #endif
> >    callRuntimeCallbacks(__ATPRERUN__);
> [...]
>
> caused the function runWithFS to no longer be called, because it gets
> added to Module.preRun from within the function runMetaWithFS that
> itself is called from within the function preRun.
>
> --
> You received this message because you are subscribed to the Google Groups
> "emscripten-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/emscripten-discuss/feeb6609-50c3-4baf-8fd6-2a2294a5cb15%40gmail.com
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/emscripten-discuss/CAL_va2_tba_n0TrmBcsSqagS4t8Uy9UQr7quGs5gGYXf%2BvGtnA%40mail.gmail.com.

Reply via email to