ialex32x / unity-jsb

It brings Javascript runtime capability to Unity3D by integrating QuickJS.
MIT License
335 stars 41 forks source link

WebGL microtask fix #106

Closed KurtGokhan closed 1 year ago

KurtGokhan commented 1 year ago

There was a specific case where code would try to run after context is destroyed. This happened when a code was inside Promise.then. This does not happen with setTimeout and similar because iframe is unmounted when a context is destroyed, so the JavaScript engine should not be running anymore. But it was happening in Promise for some reason.

Also fixed a small memory leak when code throws error in eval.