Commit graph

13 commits

Author SHA1 Message Date
Timothy Flynn
c0ead1b01a LibIDL+LibWeb: Begin support for async iterator in IDL
This adds support for async iterators of the form:

    async iterable<value_type>;
    async iterable<value_type>(/* arguments... */);

It does not yet support the value pairs of the form:

    async iterable<key_type, value_type>;
    async iterable<key_type, value_type>(/* arguments... */);

Async iterators have an optional `return` data property. There's not a
particularly good way to know what interfaces implement this property.
So this adds a new extended attribute, DefinesAsyncIteratorReturn, which
interfaces can use to declare their support.
2025-04-14 17:43:11 -04:00
Timothy Flynn
398f1ce2a0 LibIDL: Fix typos in IDL error messages 2025-04-14 17:43:11 -04:00
Timothy Flynn
0a256b0a9a AK+Everywhere: Change StringView case conversions to return String
There's a bit of a UTF-8 assumption with this change. But nearly every
caller of these methods were immediately creating a String from the
resulting ByteString anyways.
2025-04-07 17:44:38 +02:00
Luke Wilde
c7d25301d3 LibWeb: Implement the LegacyUnforgeable attribute
Some checks are pending
CI / Lagom (arm64, Sanitizer_CI, false, macos-15, macOS, Clang) (push) Waiting to run
CI / Lagom (x86_64, Fuzzers_CI, false, ubuntu-24.04, Linux, Clang) (push) Waiting to run
CI / Lagom (x86_64, Sanitizer_CI, false, ubuntu-24.04, Linux, GNU) (push) Waiting to run
CI / Lagom (x86_64, Sanitizer_CI, true, ubuntu-24.04, Linux, Clang) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (macos-14, macOS, macOS-universal2) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (ubuntu-24.04, Linux, Linux-x86_64) (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Label PRs with merge conflicts / auto-labeler (push) Waiting to run
Push notes / build (push) Waiting to run
This fixes the frame-ancestors WPT tests from crashing when an iframe
is blocked from loading. This is because it would get an undefined
location.href from the cross-origin iframe, which causes a crash as it
expects it to be there.
2025-03-27 23:50:35 +00:00
Totto16
678f531fe5 LibWeb: Fix IDL Generation error for enums
In the case, where IDL enums start with a character, that is an invalid
start character for C++ identifiers (e.g. a number), the C++ generaion
for enums fails. An example would be "2d" see #3788
2025-03-04 08:31:26 +00:00
Totto16
1182ee6c69 LibIDL: Report empty types with a separate error
Previously the IDL Parser Complained, that a type with the name ''
(an empty string) couldn't be found. It wasn't that easy to see the
mistake, as the not named type is printed without '' around it, so the
message seemed to miss a type. This now catches this specify error
earlier and reports it cleanly to the user. An example of this
occurring would be ''typedef A (B or //FIXME: C )
2025-03-04 08:31:26 +00:00
devgianlu
348db1c445 LibIDL+IDLGenerators: Support generation of IDL partial dictionaries 2025-02-05 13:18:47 -07:00
Timothy Flynn
85b424464a AK+Everywhere: Rename verify_cast to as
Follow-up to fc20e61e72.
2025-01-21 11:34:06 -05:00
Andreas Kling
3bfb0534be LibGC: Rename MarkedVector => RootVector
Let's try to make it a bit more clear that this is a Vector of GC roots.
2024-12-26 19:10:44 +01:00
Jonne Ransijn
c3783cf3bd LibIDL: Fix use-after-free in GenerateWindowOrWorkerInterfaces
`lexical_bases` was storing `StringView`s into `ByteString`s returned
from `LexicalPath::string()` that might no longer exist.
2024-11-16 10:30:14 +01:00
Luke Wilde
d95ae629ee LibIDL: Allow overwriting the generated attribute callback name
This will allow the CSSStyleDeclaration IDL attribute generator to
implement it's own C++ acceptable identifier sanitization and
deduplication.
2024-11-14 19:50:22 +01:00
Luke Wilde
300f212044 LibIDL: Support multiple import base paths for resolving imports
This allows us to specify multiple base paths to look for imported IDL
files in. This will allow us to import IDL files from sources and from
the Build directory (i.e. for generated IDL files).
2024-11-14 19:50:22 +01:00
Timothy Flynn
93712b24bf Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00