mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 23:50:19 +00:00
LibWeb: Catch null browsing context in destroy_top_level_traversable
When WebDriver asks to destroy a window, we can hit this case with no active browsing context. This seems odd, but perhaps is a spec issue as well. Just log to dbgln for now.
This commit is contained in:
parent
d508a02f25
commit
813c66403d
Notes:
sideshowbarker
2024-07-17 22:01:16 +09:00
Author: https://github.com/ADKaster Commit: https://github.com/SerenityOS/serenity/commit/813c66403d Pull-request: https://github.com/SerenityOS/serenity/pull/23063
1 changed files with 5 additions and 1 deletions
|
@ -888,7 +888,11 @@ void TraversableNavigable::destroy_top_level_traversable()
|
|||
}
|
||||
|
||||
// 3. Remove browsingContext.
|
||||
browsing_context->remove();
|
||||
if (!browsing_context) {
|
||||
dbgln("TraversableNavigable::destroy_top_level_traversable: No browsing context?");
|
||||
} else {
|
||||
browsing_context->remove();
|
||||
}
|
||||
|
||||
// 4. Remove traversable from the user interface (e.g., close or hide its tab in a tabbed browser).
|
||||
page().client().page_did_close_top_level_traversable();
|
||||
|
|
Loading…
Reference in a new issue