Right now if you use the debug-mozjs feature, you get a big "YOU ARE LEAKING THE WORLD" warning when JS_ShutDown runs. This is because the implicit parent runtime still exists at program shutdown, but avoiding that is more complicated that manually destroying the runtime. Since it's created on the same thread as the first thread that invokes Runtime::new, it says a TLS with that runtime, and this TLS is invaliated when the runtime for the same thread is destroyed. This manifests as a segfault when destroying the parent runtime.
Depending on how urgent it is to fix this, it might make sense to just
leave it be for now: the next smup will bring the current parts of bug
1323066 and change
much of how this all works.
Right now if you use the debug-mozjs feature, you get a big "YOU ARE LEAKING THE WORLD" warning when JS_ShutDown runs. This is because the implicit parent runtime still exists at program shutdown, but avoiding that is more complicated that manually destroying the runtime. Since it's created on the same thread as the first thread that invokes
Runtime::new
, it says a TLS with that runtime, and this TLS is invaliated when the runtime for the same thread is destroyed. This manifests as a segfault when destroying the parent runtime.