servo / rust-mozjs

DEPRECATED - moved to servo/mozjs instead.
Mozilla Public License 2.0
293 stars 122 forks source link

Make JS shutdown explicit #348

Open nox opened 7 years ago

nox commented 7 years ago

Instead of forbidding users to ever be able to initialise a new Runtime after all previously created runtimes were destroyed, we should provide a function shutdown to be called explicitly whenever the user want to call it.

The function would panic if there are still runtimes existing, and creating a new runtime after it was successfully called would panic too.

nox commented 7 years ago

Cc @jdm @chrmod