LibWebView+WebContent+headless-browser: Make the page info IPCs async

The IPCs to request a page's text, layout tree, etc. are currently all
synchronous. This can result in a deadlock when WebContent also makes
a synchronous IPC call, as both ends will be waiting on each other.

This replaces the page info IPCs with a single, asynchronous IPC. This
new IPC is promise-based, much like our screenshot IPC.
This commit is contained in:
Timothy Flynn 2024-09-19 10:40:00 -04:00 committed by Andreas Kling
commit 3332230cef
Notes: github-actions[bot] 2024-09-19 16:08:09 +00:00
11 changed files with 174 additions and 90 deletions

View file

@ -78,6 +78,7 @@ private:
virtual void did_finish_editing_dom_node(u64 page_id, Optional<i32> const& node_id) override;
virtual void did_get_dom_node_html(u64 page_id, String const& html) override;
virtual void did_take_screenshot(u64 page_id, Gfx::ShareableBitmap const& screenshot) override;
virtual void did_get_internal_page_info(u64 page_id, PageInfoType, String const&) override;
virtual void did_output_js_console_message(u64 page_id, i32 message_index) override;
virtual void did_get_js_console_messages(u64 page_id, i32 start_index, Vector<ByteString> const& message_types, Vector<ByteString> const& messages) override;
virtual void did_change_favicon(u64 page_id, Gfx::ShareableBitmap const&) override;