mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 07:48:11 +00:00
Ladybird+LibJS: Add CLI option to run browser with LibJS bytecode VM
This required quite a bit of plumbing, but now you can run ladybird --use-bytecode
This commit is contained in:
parent
7ec7015750
commit
9c568282dc
20 changed files with 91 additions and 38 deletions
|
@ -51,7 +51,7 @@
|
|||
|
||||
bool is_using_dark_system_theme(QWidget&);
|
||||
|
||||
WebContentView::WebContentView(StringView webdriver_content_ipc_path, WebView::EnableCallgrindProfiling enable_callgrind_profiling)
|
||||
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)
|
||||
{
|
||||
setMouseTracking(true);
|
||||
|
@ -72,7 +72,7 @@ WebContentView::WebContentView(StringView webdriver_content_ipc_path, WebView::E
|
|||
update_viewport_rect();
|
||||
});
|
||||
|
||||
create_client(enable_callgrind_profiling);
|
||||
create_client(enable_callgrind_profiling, use_javascript_bytecode);
|
||||
}
|
||||
|
||||
WebContentView::~WebContentView() = default;
|
||||
|
@ -512,12 +512,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)
|
||||
void WebContentView::create_client(WebView::EnableCallgrindProfiling enable_callgrind_profiling, WebView::UseJavaScriptBytecode use_javascript_bytecode)
|
||||
{
|
||||
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).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