LibIDL+LibWeb: Mark [FIXME] interfaces as [[Unimplemented]]

Methods and attributes marked with [FIXME] are now implemented as
direct properties with the value `undefined` and are marked with the
[[Unimplemented]] attribute. This allows accesses to these properties
to be reported, while having no other side-effects.

This fixes an issue where [FIXME] methods broke feature detection on
some sites.
This commit is contained in:
Tim Ledbetter 2024-06-11 07:20:22 +01:00 committed by Andreas Kling
commit 2f5cf8ac20
Notes: sideshowbarker 2024-07-17 22:41:14 +09:00
3 changed files with 46 additions and 31 deletions

View file

@ -81,6 +81,9 @@ ErrorOr<void> initialize_main_thread_vm()
VERIFY(!s_main_thread_vm);
s_main_thread_vm = TRY(JS::VM::create(make<WebEngineCustomData>()));
s_main_thread_vm->on_unimplemented_property_access = [](auto const& object, auto const& property_key) {
dbgln("FIXME: Unimplemented IDL interface: '{}.{}'", object.class_name(), property_key.to_string());
};
// NOTE: We intentionally leak the main thread JavaScript VM.
// This avoids doing an exhaustive garbage collection on process exit.