mirror of
https://github.com/RGBCube/serenity
synced 2025-05-15 03:34:59 +00:00
Ladybird+LibWebView: Respawn with same JS interpreter after crash
WebView::ViewImplementation now remembers which JS interpreter it started with, and uses the same setting if the WebContent process crashes and we have to spawn a new one.
This commit is contained in:
parent
8b23bbf58e
commit
5d6169793a
7 changed files with 25 additions and 15 deletions
|
@ -52,7 +52,8 @@
|
|||
bool is_using_dark_system_theme(QWidget&);
|
||||
|
||||
WebContentView::WebContentView(StringView webdriver_content_ipc_path, WebView::EnableCallgrindProfiling enable_callgrind_profiling, WebView::UseJavaScriptBytecode use_javascript_bytecode)
|
||||
: m_webdriver_content_ipc_path(webdriver_content_ipc_path)
|
||||
: WebView::ViewImplementation(use_javascript_bytecode)
|
||||
, m_webdriver_content_ipc_path(webdriver_content_ipc_path)
|
||||
{
|
||||
setMouseTracking(true);
|
||||
setAcceptDrops(true);
|
||||
|
@ -72,7 +73,7 @@ WebContentView::WebContentView(StringView webdriver_content_ipc_path, WebView::E
|
|||
update_viewport_rect();
|
||||
});
|
||||
|
||||
create_client(enable_callgrind_profiling, use_javascript_bytecode);
|
||||
create_client(enable_callgrind_profiling);
|
||||
}
|
||||
|
||||
WebContentView::~WebContentView() = default;
|
||||
|
@ -525,12 +526,12 @@ void WebContentView::update_palette(PaletteMode mode)
|
|||
client().async_update_system_theme(make_system_theme_from_qt_palette(*this, mode));
|
||||
}
|
||||
|
||||
void WebContentView::create_client(WebView::EnableCallgrindProfiling enable_callgrind_profiling, WebView::UseJavaScriptBytecode use_javascript_bytecode)
|
||||
void WebContentView::create_client(WebView::EnableCallgrindProfiling enable_callgrind_profiling)
|
||||
{
|
||||
m_client_state = {};
|
||||
|
||||
auto candidate_web_content_paths = get_paths_for_helper_process("WebContent"sv).release_value_but_fixme_should_propagate_errors();
|
||||
auto new_client = launch_web_content_process(candidate_web_content_paths, enable_callgrind_profiling, WebView::IsLayoutTestMode::No, use_javascript_bytecode).release_value_but_fixme_should_propagate_errors();
|
||||
auto new_client = launch_web_content_process(candidate_web_content_paths, enable_callgrind_profiling, WebView::IsLayoutTestMode::No, use_javascript_bytecode()).release_value_but_fixme_should_propagate_errors();
|
||||
|
||||
m_client_state.client = new_client;
|
||||
m_client_state.client->on_web_content_process_crash = [this] {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue