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.
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 withsetTimeout
and similar becauseiframe
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.