mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-20 00:08:55 +00:00
WebContent: Enable in Windows CI
This commit is contained in:
parent
e497303e94
commit
0a699132f3
Notes:
github-actions[bot]
2025-08-23 22:07:16 +00:00
Author: https://github.com/ayeteadoe
Commit: 0a699132f3
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5229
Reviewed-by: https://github.com/ADKaster ✅
9 changed files with 70 additions and 31 deletions
|
@ -148,4 +148,9 @@ Completion throw_completion(Value value)
|
|||
return { Completion::Type::Throw, value };
|
||||
}
|
||||
|
||||
void set_log_all_js_exceptions(bool const enabled)
|
||||
{
|
||||
g_log_all_js_exceptions = enabled;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -348,4 +348,6 @@ inline Completion normal_completion(Value value)
|
|||
// 6.2.4.2 ThrowCompletion ( value ), https://tc39.es/ecma262/#sec-throwcompletion
|
||||
JS_API Completion throw_completion(Value);
|
||||
|
||||
JS_API void set_log_all_js_exceptions(bool enabled);
|
||||
|
||||
}
|
||||
|
|
|
@ -66,7 +66,7 @@
|
|||
|
||||
namespace Web::Fetch::Fetching {
|
||||
|
||||
bool g_http_cache_enabled;
|
||||
bool g_http_cache_enabled = false;
|
||||
|
||||
#define TRY_OR_IGNORE(expression) \
|
||||
({ \
|
||||
|
@ -2841,4 +2841,9 @@ void append_fetch_metadata_headers_for_request(Infrastructure::Request& request)
|
|||
set_sec_fetch_user_header(request);
|
||||
}
|
||||
|
||||
void set_http_cache_enabled(bool const enabled)
|
||||
{
|
||||
g_http_cache_enabled = enabled;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -54,4 +54,6 @@ void set_sec_fetch_site_header(Infrastructure::Request&);
|
|||
void set_sec_fetch_user_header(Infrastructure::Request&);
|
||||
void append_fetch_metadata_headers_for_request(Infrastructure::Request&);
|
||||
|
||||
void set_http_cache_enabled(bool enabled);
|
||||
|
||||
}
|
||||
|
|
|
@ -13,6 +13,7 @@ namespace Web::WebIDL {
|
|||
|
||||
bool g_enable_idl_tracing = false;
|
||||
|
||||
static void log_trace_impl(JS::VM&, char const*);
|
||||
void log_trace_impl(JS::VM& vm, char const* function)
|
||||
{
|
||||
if (!g_enable_idl_tracing)
|
||||
|
@ -39,4 +40,15 @@ void log_trace_impl(JS::VM& vm, char const* function)
|
|||
dbgln("{}({})", function, builder.string_view());
|
||||
}
|
||||
|
||||
void log_trace(JS::VM& vm, char const* function)
|
||||
{
|
||||
if (g_enable_idl_tracing)
|
||||
log_trace_impl(vm, function);
|
||||
}
|
||||
|
||||
void set_enable_idl_tracing(bool const enabled)
|
||||
{
|
||||
g_enable_idl_tracing = enabled;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -10,14 +10,8 @@
|
|||
|
||||
namespace Web::WebIDL {
|
||||
|
||||
extern bool g_enable_idl_tracing;
|
||||
void log_trace(JS::VM& vm, char const* function);
|
||||
|
||||
void log_trace_impl(JS::VM&, char const*);
|
||||
|
||||
inline void log_trace(JS::VM& vm, char const* function)
|
||||
{
|
||||
if (g_enable_idl_tracing)
|
||||
log_trace_impl(vm, function);
|
||||
}
|
||||
void set_enable_idl_tracing(bool enabled);
|
||||
|
||||
}
|
||||
|
|
|
@ -51,6 +51,40 @@ endif()
|
|||
|
||||
target_link_libraries(WebContent PRIVATE webcontentservice LibURL)
|
||||
|
||||
if(WIN32)
|
||||
# FIXME: This is a hack to get around lld-link error undefined symbols in various libraries
|
||||
target_link_libraries(WebContent PRIVATE
|
||||
$<FILTER:$<TARGET_OBJECTS:LibWeb>,INCLUDE,AbortSignal>
|
||||
$<FILTER:$<TARGET_OBJECTS:LibWeb>,INCLUDE,AttributeNames>
|
||||
$<FILTER:$<TARGET_OBJECTS:LibWeb>,INCLUDE,Buffers>
|
||||
$<FILTER:$<TARGET_OBJECTS:LibWeb>,INCLUDE,CallbackType>
|
||||
$<FILTER:$<TARGET_OBJECTS:LibWeb>,INCLUDE,DocumentObserver>
|
||||
$<FILTER:$<TARGET_OBJECTS:LibWeb>,INCLUDE,EventNames>
|
||||
$<FILTER:$<TARGET_OBJECTS:LibWeb>,INCLUDE,Fetching>
|
||||
$<FILTER:$<TARGET_OBJECTS:LibWeb>,INCLUDE,HeapTimer>
|
||||
$<FILTER:$<TARGET_OBJECTS:LibWeb>,INCLUDE,MutationType>
|
||||
$<FILTER:$<TARGET_OBJECTS:LibWeb>,INCLUDE,Namespace>
|
||||
$<FILTER:$<TARGET_OBJECTS:LibWeb>,INCLUDE,NavigationObserver>
|
||||
$<FILTER:$<TARGET_OBJECTS:LibWeb>,INCLUDE,PaintableBox>
|
||||
$<FILTER:$<TARGET_OBJECTS:LibWeb>,INCLUDE,Policy>
|
||||
$<FILTER:$<TARGET_OBJECTS:LibWeb>,INCLUDE,PolicyContainer>
|
||||
$<FILTER:$<TARGET_OBJECTS:LibWeb>,INCLUDE,PullIntoDescriptor>
|
||||
$<FILTER:$<TARGET_OBJECTS:LibWeb>,INCLUDE,ReadableByteStreamController>
|
||||
$<FILTER:$<TARGET_OBJECTS:LibWeb>,INCLUDE,ReadableStream>
|
||||
$<FILTER:$<TARGET_OBJECTS:LibWeb>,INCLUDE,ShadowRoot>
|
||||
$<FILTER:$<TARGET_OBJECTS:LibWeb>,INCLUDE,TagNames>
|
||||
$<FILTER:$<TARGET_OBJECTS:LibWeb>,INCLUDE,Text>
|
||||
$<FILTER:$<TARGET_OBJECTS:LibWeb>,INCLUDE,Tracing>
|
||||
$<FILTER:$<TARGET_OBJECTS:LibWeb>,INCLUDE,TransformStream>
|
||||
$<FILTER:$<TARGET_OBJECTS:LibWeb>,INCLUDE,WebUI>
|
||||
$<FILTER:$<TARGET_OBJECTS:LibWeb>,INCLUDE,WritableStream>
|
||||
$<FILTER:$<TARGET_OBJECTS:LibWebView>,INCLUDE,Utilities>
|
||||
)
|
||||
find_package(unofficial-angle REQUIRED CONFIG)
|
||||
target_link_libraries(WebContent PRIVATE LibTextCodec unofficial::angle::libGLESv2)
|
||||
endif()
|
||||
|
||||
|
||||
target_sources(webcontentservice PUBLIC FILE_SET server TYPE HEADERS
|
||||
BASE_DIRS ${LADYBIRD_SOURCE_DIR}/Services
|
||||
FILES ConnectionFromClient.h
|
||||
|
|
|
@ -74,7 +74,7 @@ void ConnectionFromClient::die()
|
|||
Messages::WebContentServer::InitTransportResponse ConnectionFromClient::init_transport([[maybe_unused]] int peer_pid)
|
||||
{
|
||||
#ifdef AK_OS_WINDOWS
|
||||
m_transport.set_peer_pid(peer_pid);
|
||||
m_transport->set_peer_pid(peer_pid);
|
||||
return Core::System::getpid();
|
||||
#endif
|
||||
VERIFY_NOT_REACHED();
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
#include <LibMedia/Audio/Loader.h>
|
||||
#include <LibRequests/RequestClient.h>
|
||||
#include <LibWeb/Bindings/MainThreadVM.h>
|
||||
#include <LibWeb/Fetch/Fetching/Fetching.h>
|
||||
#include <LibWeb/HTML/Window.h>
|
||||
#include <LibWeb/Internals/Internals.h>
|
||||
#include <LibWeb/Loader/ContentFilter.h>
|
||||
|
@ -28,6 +29,7 @@
|
|||
#include <LibWeb/Painting/PaintableBox.h>
|
||||
#include <LibWeb/Platform/AudioCodecPluginAgnostic.h>
|
||||
#include <LibWeb/Platform/EventLoopPluginSerenity.h>
|
||||
#include <LibWeb/WebIDL/Tracing.h>
|
||||
#include <LibWebView/Plugins/FontPlugin.h>
|
||||
#include <LibWebView/Plugins/ImageCodecPlugin.h>
|
||||
#include <LibWebView/SiteIsolation.h>
|
||||
|
@ -54,24 +56,6 @@ static ErrorOr<void> reinitialize_resource_loader(IPC::File const& image_decoder
|
|||
static ErrorOr<void> initialize_image_decoder(int image_decoder_socket);
|
||||
static ErrorOr<void> reinitialize_image_decoder(IPC::File const& image_decoder_socket);
|
||||
|
||||
namespace JS {
|
||||
|
||||
extern bool g_log_all_js_exceptions;
|
||||
|
||||
}
|
||||
|
||||
namespace Web::WebIDL {
|
||||
|
||||
extern bool g_enable_idl_tracing;
|
||||
|
||||
}
|
||||
|
||||
namespace Web::Fetch::Fetching {
|
||||
|
||||
extern bool g_http_cache_enabled;
|
||||
|
||||
}
|
||||
|
||||
ErrorOr<int> ladybird_main(Main::Arguments arguments)
|
||||
{
|
||||
AK::set_rich_debug_enabled(true);
|
||||
|
@ -168,7 +152,8 @@ ErrorOr<int> ladybird_main(Main::Arguments arguments)
|
|||
WebView::disable_site_isolation();
|
||||
|
||||
if (enable_http_cache) {
|
||||
Web::Fetch::Fetching::g_http_cache_enabled = true;
|
||||
|
||||
Web::Fetch::Fetching::set_http_cache_enabled(true);
|
||||
}
|
||||
|
||||
Web::Painting::g_paint_viewport_scrollbars = !disable_scrollbar_painting;
|
||||
|
@ -206,11 +191,11 @@ ErrorOr<int> ladybird_main(Main::Arguments arguments)
|
|||
TRY(initialize_resource_loader(Web::Bindings::main_thread_vm().heap(), request_server_socket));
|
||||
|
||||
if (log_all_js_exceptions) {
|
||||
JS::g_log_all_js_exceptions = true;
|
||||
JS::set_log_all_js_exceptions(true);
|
||||
}
|
||||
|
||||
if (enable_idl_tracing) {
|
||||
Web::WebIDL::g_enable_idl_tracing = true;
|
||||
Web::WebIDL::set_enable_idl_tracing(true);
|
||||
}
|
||||
|
||||
auto maybe_content_filter_error = load_content_filters(config_path);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue