mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-24 02:09:28 +00:00
If we end up in a situation where the navigable no longer has an active window, we can't perform navigation or many other navigable operations. These are all ad-hoc, since the navigables spec is basically all written as if there's always an active window. Unfortunately, the active window comes from the active document's browsing context, which is a nullable concept even in the spec, so we do need to deal with null here. This removes all the locally reproducible crashes when running WPT over the legacy Japanese encoding directory on my computer. Yes, this is a bit of a monkey patch, but it should be harmless since we're (as I understand it) dealing with navigables that are still hanging around with related tasks queued on them. Once all these tasks have been completed, the navigables will go away anyway.
73 KiB
73 KiB