1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 18:18:12 +00:00

Browser+LibWebView: Run with the JavaScript bytecode VM by default

The AST interpreter is still available behind a new `--ast` flag.
This commit is contained in:
Andreas Kling 2023-07-25 17:42:22 +02:00
parent c3e5487f00
commit a3e97ea153
9 changed files with 25 additions and 7 deletions

View file

@ -14,6 +14,7 @@
#include <LibGfx/Bitmap.h>
#include <LibGfx/Font/FontDatabase.h>
#include <LibGfx/SystemTheme.h>
#include <LibJS/Bytecode/Interpreter.h>
#include <LibJS/Console.h>
#include <LibJS/Heap/Heap.h>
#include <LibJS/Runtime/ConsoleObject.h>
@ -64,6 +65,11 @@ Web::Page const& ConnectionFromClient::page() const
return m_page_host->page();
}
void ConnectionFromClient::set_use_javascript_bytecode(bool use_bytecode)
{
JS::Bytecode::Interpreter::set_enabled(use_bytecode);
}
Messages::WebContentServer::GetWindowHandleResponse ConnectionFromClient::get_window_handle()
{
return m_page_host->page().top_level_browsing_context().window_handle();