mirror of
https://github.com/lightpanda-io/browser.git
synced 2026-02-08 13:42:58 -05:00
Inspector has weak references to v8::Context, if we deinit the inspector and then shutdown contexts, we risk getting a use-after-free as those weak reference callback their finalizers on an inspector which no longer exists. To some degree, this means the Inspector doesn't clean up its weak references on shutdown. I assume this is because it expects us to always clean them up with destroyContext. This also keeps the inspector around until AFTER the page is killed (thus it's still alive to get the finalizer callback) and moves it off the session arena onto the browser context itself.