Unverified Commit 6d9aa73b authored by Anna Henningsen's avatar Anna Henningsen
Browse files

src: clean up MultiIsolatePlatform interface

- Since this was introduced, V8 has effectively started requiring
  that the platform knows of the `Isolate*` before we (or an embedder)
  create our `IsolateData` structure; therefore, (un)registering it
  from the `IsolateData` constructor/destructor doesn’t make much
  sense anymore.
- Instead, we can require that the register/unregister functions
  are only called once, simplifying the implementation a bit.
- Add a callback that we can use to know when the platform has
  cleaned up its resources associated with a given `Isolate`.
  In particular, this means that in the Worker code, we don’t need
  to rely on what are essentially guesses about the number of event
  loop turns that we need in order to have everything cleaned up.

PR-URL: https://github.com/nodejs/node/pull/26384


Reviewed-By: default avatarDaniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: default avatarJames M Snell <jasnell@gmail.com>
Reviewed-By: default avatarMatteo Collina <matteo.collina@gmail.com>
Reviewed-By: Joyee C...
parent 377c5835
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment