mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 23:50:19 +00:00
headless-browser: Run with the JavaScript bytecode VM by default
The AST interpreter is still available behind a new `--ast` flag.
This commit is contained in:
parent
c93952f0fb
commit
c3e5487f00
Notes:
sideshowbarker
2024-07-17 23:02:37 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/c3e5487f00 Pull-request: https://github.com/SerenityOS/serenity/pull/20195
1 changed files with 3 additions and 3 deletions
|
@ -369,7 +369,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
bool dump_layout_tree = false;
|
||||
bool dump_text = false;
|
||||
bool is_layout_test_mode = false;
|
||||
bool use_javascript_bytecode = false;
|
||||
bool use_ast_interpreter = false;
|
||||
StringView test_root_path;
|
||||
|
||||
Core::ArgsParser args_parser;
|
||||
|
@ -381,7 +381,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
args_parser.add_option(resources_folder, "Path of the base resources folder (defaults to /res)", "resources", 'r', "resources-root-path");
|
||||
args_parser.add_option(web_driver_ipc_path, "Path to the WebDriver IPC socket", "webdriver-ipc-path", 0, "path");
|
||||
args_parser.add_option(is_layout_test_mode, "Enable layout test mode", "layout-test-mode", 0);
|
||||
args_parser.add_option(use_javascript_bytecode, "Enable JavaScript bytecode VM", "use-bytecode", 0);
|
||||
args_parser.add_option(use_ast_interpreter, "Enable JavaScript AST interpreter (deprecated)", "ast", 0);
|
||||
args_parser.add_positional_argument(url, "URL to open", "url", Core::ArgsParser::Required::No);
|
||||
args_parser.parse(arguments);
|
||||
|
||||
|
@ -403,7 +403,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
is_layout_test_mode = true;
|
||||
}
|
||||
|
||||
auto view = TRY(HeadlessWebContentView::create(move(theme), window_size, web_driver_ipc_path, is_layout_test_mode ? WebView::IsLayoutTestMode::Yes : WebView::IsLayoutTestMode::No, use_javascript_bytecode ? WebView::UseJavaScriptBytecode::Yes : WebView::UseJavaScriptBytecode::No));
|
||||
auto view = TRY(HeadlessWebContentView::create(move(theme), window_size, web_driver_ipc_path, is_layout_test_mode ? WebView::IsLayoutTestMode::Yes : WebView::IsLayoutTestMode::No, use_ast_interpreter ? WebView::UseJavaScriptBytecode::No : WebView::UseJavaScriptBytecode::Yes));
|
||||
RefPtr<Core::Timer> timer;
|
||||
|
||||
if (!test_root_path.is_empty()) {
|
||||
|
|
Loading…
Reference in a new issue