| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
There was a problem hiding this comment.
Can you explain the motivation here? I feel like this is a step in an odd direction, and I'd still prefer to run these as tasks on an uv_async_t rather than doing so using the miceotask queue or running at the end of the callback scope...
Sorry, something went wrong.
|
|
||
| void HostCleanupFinalizationGroupMicrotask(void* data) { | ||
| FinalizationGroupCleanupTask* t = | ||
| reinterpret_cast<FinalizationGroupCleanupTask*>(data); |
There was a problem hiding this comment.
Can you use static_cast here?
Sorry, something went wrong.
| env->RegisterFinalizationGroupForCleanup(group); | ||
| env->isolate()->EnqueueMicrotask( | ||
| HostCleanupFinalizationGroupMicrotask, | ||
| new FinalizationGroupCleanupTask(env, group)); |
There was a problem hiding this comment.
I think this misses a corresponding delete?
Sorry, something went wrong.
|
@addaleax ClearKeptObjects is in the correct place either way. Why would a uv_async_t be preferable for the finalization cleanup? |
Sorry, something went wrong.
|
@devsnek I still think it’s preferable to run these callbacks after GC without an unbounded delay, like whatwg/html#4571 suggests it for HTML. |
Sorry, something went wrong.
|
Hm … ping @devsnek? I’m currently running into the “Cannot create a handle without a HandleScope” crash :) |
Sorry, something went wrong.
Schedule a task on the main event loop, similar to what the HTML spec recommends for browsers. Alternative to nodejs#30198
| Back | FazBrowse Home | New Git URL |
Checklist