mirror of
https://github.com/denoland/rusty_v8.git
synced 2025-03-09 21:47:00 -04:00
![]() Currently, when a finalizer callback is registered, it is not guaranteed to be called if there is a global reference to the corresponding object that survives the isolate. This is because the finalizer callback takes a `&mut Isolate`, and so it must be called before the isolate is fully destroyed, but all existing globals (including possibly the one being currently finalized) are still usable while there still exists a mutable reference to the isolate. However, there are still use cases for having finalizers that are guaranteed to run regardless of any remaining globals, but that don't require any interaction with the isolate. This change adds them. This change also changes the context annex to use a guaranteed finalizer, fixing a bug with context slots not being freed if there were any globals to the context at the time the isolate is dropped. |
||
---|---|---|
.. | ||
compile_fail | ||
slots.rs | ||
test_api.rs | ||
test_api_entropy_source.rs | ||
test_api_flags.rs | ||
test_concurrent_isolate_creation_and_disposal.rs | ||
test_platform_atomics_pump_message_loop.rs | ||
test_single_threaded_default_platform.rs | ||
test_ui.rs |