[HTML5] Close IDBFS database on exit.

This should be made available in emscripten in a decent way.
Possibly after unmount, to free the database lock and allow performing
operations on it from javascript after the Emscripten Runtime has
exited.
This commit is contained in:
Fabio Alessandrelli 2020-09-23 21:11:07 +02:00
parent 47e82bcb58
commit 1bfc582633
2 changed files with 19 additions and 3 deletions

View file

@ -121,6 +121,7 @@ Function('return this')()['Engine'] = (function() {
me.rtenv['noExitRuntime'] = true;
me.rtenv['onExecute'] = me.onExecute;
me.rtenv['onExit'] = function(code) {
me.rtenv['deinitFS']();
if (me.onExit)
me.onExit(code);
me.rtenv = null;