mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-03 08:08:43 +00:00
LibWeb: Verify that all overloads contain Unscopable if present
It would be strange for the IDL to be defined as such, so instead of leaving a FIXME comment, let's just verify that this doesn't happen in practise incase it does end up happening in reality.
This commit is contained in:
parent
48bbebc636
commit
013c2a1c7c
Notes:
github-actions[bot]
2024-10-28 22:33:28 +00:00
Author: https://github.com/shannonbooth
Commit: 013c2a1c7c
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2022
1 changed files with 1 additions and 1 deletions
|
@ -3280,8 +3280,8 @@ void @class_name@::initialize(JS::Realm& realm)
|
|||
function_generator.set("function.name:snakecase", make_input_acceptable_cpp(overload_set.key.to_snakecase()));
|
||||
function_generator.set("function.length", ByteString::number(get_shortest_function_length(overload_set.value)));
|
||||
|
||||
// FIXME: What if only some of the overloads are Unscopable?
|
||||
if (any_of(overload_set.value, [](auto const& function) { return function.extended_attributes.contains("Unscopable"); })) {
|
||||
VERIFY(all_of(overload_set.value, [](auto const& function) { return function.extended_attributes.contains("Unscopable"); }));
|
||||
function_generator.append(R"~~~(
|
||||
MUST(unscopable_object->create_data_property("@function.name@", JS::Value(true)));
|
||||
)~~~");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue