How to `assumeMimimumCapture` during a compilation?

24 views
Skip to first unread message

sean.l

unread,
Aug 14, 2022, 8:39:18 AM8/14/22
to Closure Compiler Discuss
This seems to be governing function inline decisions made by the compiler.

It seems that, this is enabled only in "J2CL pass". I think, it would be nice if there is a way to enable this globally.
 - In a script running in a service worker environment, I suppose, there is less danger of memory leak, because there is no DOM and it shuts down often.

Well, I'm not exactly sure that it won't be a footgun, but if it is actually safe in service worker, it would be nice to have such a feature. There is a compiler option `--env` which can be used to specify "SERVICE_WORKER" which in turn would enable assumeMimimumCapture=true.
Reply all
Reply to author
Forward
0 new messages