1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 21:18:14 +00:00

LibWebView: Protect the Inspector against rapid inspection requests

This was seen in Browser when hotkey activations were processed twice.
If we open the Inspector with a hotkey (F12) and quickly activate that
hotkey again, we could try sending a JS command (inspector.loadDOMTree)
before the inspector.js file was actually loaded in the WebContent.

The window for this bug is larger on Serenity, where loading WebContent
is a bit slower than on Linux. So even with the Browser bug fixed, it is
pretty easy to hit this window still.
This commit is contained in:
Timothy Flynn 2024-03-03 12:18:06 -05:00 committed by Andreas Kling
parent d392375a08
commit 552f63a283
2 changed files with 4 additions and 0 deletions

View file

@ -70,6 +70,7 @@ private:
Optional<i32> m_body_node_id;
Optional<i32> m_pending_selection;
bool m_inspector_loaded { false };
bool m_dom_tree_loaded { false };
struct ContextMenuData {