1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 05:17:35 +00:00

Browser: Remove ability to run with AST interpreter

This commit is contained in:
Andreas Kling 2023-08-07 16:37:54 +02:00
parent e7e52f95ec
commit 4eb43cc107

View file

@ -96,12 +96,10 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
TRY(Core::System::pledge("stdio recvfd sendfd unix fattr cpath rpath wpath proc exec")); TRY(Core::System::pledge("stdio recvfd sendfd unix fattr cpath rpath wpath proc exec"));
Vector<DeprecatedString> specified_urls; Vector<DeprecatedString> specified_urls;
bool use_ast_interpreter = false;
Core::ArgsParser args_parser; Core::ArgsParser args_parser;
args_parser.add_positional_argument(specified_urls, "URLs to open", "url", Core::ArgsParser::Required::No); args_parser.add_positional_argument(specified_urls, "URLs to open", "url", Core::ArgsParser::Required::No);
args_parser.add_option(Browser::g_webdriver_content_ipc_path, "Path to WebDriver IPC for WebContent", "webdriver-content-path", 0, "path"); args_parser.add_option(Browser::g_webdriver_content_ipc_path, "Path to WebDriver IPC for WebContent", "webdriver-content-path", 0, "path");
args_parser.add_option(use_ast_interpreter, "Enable JavaScript AST interpreter (deprecated)", "ast", 0);
args_parser.parse(arguments); args_parser.parse(arguments);
@ -175,7 +173,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
first_url = TRY(url_from_argument_string(specified_urls.first())); first_url = TRY(url_from_argument_string(specified_urls.first()));
auto cookie_jar = TRY(Browser::CookieJar::create(*database)); auto cookie_jar = TRY(Browser::CookieJar::create(*database));
auto window = Browser::BrowserWindow::construct(cookie_jar, first_url, use_ast_interpreter ? WebView::UseJavaScriptBytecode::No : WebView::UseJavaScriptBytecode::Yes); auto window = Browser::BrowserWindow::construct(cookie_jar, first_url, WebView::UseJavaScriptBytecode::Yes);
auto content_filters_watcher = TRY(Core::FileWatcher::create()); auto content_filters_watcher = TRY(Core::FileWatcher::create());
content_filters_watcher->on_change = [&](Core::FileWatcherEvent const&) { content_filters_watcher->on_change = [&](Core::FileWatcherEvent const&) {