src: unregister Isolate with platform before disposing
I previously thought the order of these calls was no longer relevant. I was wrong.
This commit undoes the changes from 312c02d2, adds a comment explaining why I was wrong, and flips the order of the calls elsewhere for consistency, the latter having been the goal of 312c02d2.
Fixes: https://github.com/nodejs/node/issues/30846 Refs: https://github.com/nodejs/node/pull/30181
/cc @codebytere
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
commit message follows commit guidelines