Commit Graph

2110 Commits

Author SHA1 Message Date
Zaggy1024
ba5bf412e5 LibThreading: Create WorkerThread class run a single task concurrently
This class can be used to run a task in another thread, and allows the
caller to wait for the task to complete to retrieve any error that may
have occurred.

Currently, it doesn't support functions returning a value on success,
but with some template magic that should be possible. :^)
2023-04-23 23:14:30 +02:00
Aliaksandr Kalenik
8cf0cc4d0a Meta: Add coreutils in macos Azure setup
coreutils include timeout tool that is going to be used in layout
tests script.
2023-04-21 11:00:21 +01:00
Luke Wilde
1b6492d0fb LibWeb: Return typed array and ArrayBuffer for BufferSource in IDL union
Previous this ignored typed arrays and ArrayBuffer, hitting the
fallback JS -> C++ conversion case, typically stringifying them.
2023-04-21 07:59:50 +02:00
Nico Weber
8f988b7bae Meta: Move more common flags to common_compile_options.cmake
For the most part no behavior change, except that we now pass
-Wno-implicit-const-int-float-conversion and -Wno-literal-suffix
only to clang and gcc each in both lagom and serenity builds,
while we previously passed them to both in lagom builds (and
passed them to one each in serenity builds). The former is
a clang flag, the latter a gcc flag, but since we also use
-Wno-unknown-warning-option it doesn't really matter.
2023-04-18 10:05:49 +02:00
Matthew Olsson
c40109628d LibWeb: Properly reject abrupt completion in clean_up_on_return 2023-04-17 10:27:40 +02:00
Nico Weber
4aaefeb1d5 Meta: Move some flags to common_compile_options.cmake
No behavior change.
2023-04-17 00:52:21 +02:00
Tim Schumacher
f7ac121ac4 Meta: Allow overriding the calculated disk image inode count 2023-04-15 19:41:08 -07:00
Tim Schumacher
e887989c23 Meta: Add missing quotation marks for INODE_COUNT and INODE_SIZE 2023-04-15 19:41:08 -07:00
Linus Groh
aff1ec6014 LibJS: Port iterator_step() to GCPtr 2023-04-15 16:23:03 +02:00
Tim Schumacher
dcd462a050 Lagom: Add an option for standalone fuzzers to BuildFuzzers.sh
This builds simple fuzzing binaries without any oss-fuzz specific
configuration and without any LibFuzzer instrumentation.
2023-04-14 16:08:00 +01:00
Linus Groh
b33b0d60e6 LibJS: Port Value::get_method() to GCPtr 2023-04-14 09:59:29 +02:00
Linus Groh
f345f72b55 LibJS: Port Value::to_object() to NonnullGCPtr 2023-04-14 09:59:29 +02:00
Timothy Flynn
f80c05424e LibLocale: Update to CLDR version 43.0.0
https://cldr.unicode.org/index/downloads/cldr-43
2023-04-13 18:22:04 +02:00
Timothy Flynn
0b69e9f974 LibLocale: Prepare locale data generator for breaking changes in CLDR 43
In CLDR 42 and earlier, we were able to assume all cldr-localename files
existed for every locale. They now do not exist for locales that don't
provide any localized data. Namely, this is the "und" locale (which is
an alias for the root locale, i.e. the locale we fall back to when a
user provides an unknown locale).

Further, we were previously able to assume that each currencies.json in
cldr-numbers contained all currencies. This file now excludes currencies
whose localized names are the same as the currency key. Therefore, we
now preprocess currencies.json to discover all currencies ahead of time,
much like we already do for languages.json.
2023-04-13 18:22:04 +02:00
Linus Groh
2555d7a36a LibJS: Make well-known symbol getters return NonnullGCPtr
None of these are ever null after the VM has been initialized, as proved
by virtually every caller immediately dereferencing the raw pointer.
2023-04-13 14:29:42 +02:00
Linus Groh
b84f8fb55b LibJS: Make intrinsics getters return NonnullGCPtr
Some of these are allocated upon initialization of the intrinsics, and
some lazily, but in neither case the getters actually return a nullptr.

This saves us a whole bunch of pointer dereferences (as NonnullGCPtr has
an `operator T&()`), and also has the interesting side effect of forcing
us to explicitly use the FunctionObject& overload of call(), as passing
a NonnullGCPtr is ambigous - it could implicitly be turned into a Value
_or_ a FunctionObject& (so we have to dereference manually).
2023-04-13 14:29:42 +02:00
Tim Schumacher
ad60a0b522 Fuzzers: Stop loading audio frames once the end is reached
Previously, the condition was reversed, so we would stop immediately on
a file that has at least one working chunk, and we would infinitely loop
on a file with no chunks.
2023-04-12 14:03:20 -04:00
Coderdreams
38bdf4d159 Meta: Do not require Tmux for lagom gdb 2023-04-11 07:16:25 -04:00
Daniel Bertalan
5ca1bd55a0 Toolchain: Move GDB build to a separate script
Target GDB is only used for debugging the kernel, which is not relevant
to most people. Starting with 924758c6f8, GDB would always be built
as part of the toolchain if the user didn't have it installed. This is
unnecessary.

This commit adds a separate script for building GDB, which the user
needs to explicitly invoke. A message is added to Meta/debug-kernel.sh
which alerts the user to this fact.
2023-04-11 06:44:13 -04:00
Cameron Youell
1c54c8a01c ConfigureComponents: Use FileSystem instead of DeprecatedFile 2023-04-09 20:58:54 -06:00
Ben Wiederhake
560133a0c6 Everywhere: Remove unused DeprecatedString includes 2023-04-09 22:00:54 +02:00
Tim Schumacher
83701ec54b Meta+Toolchain: Redirect GDB error output to stdout before grepping 2023-04-09 16:51:11 +02:00
Tim Schumacher
022a55e825 Meta: Add a missing dash to the GDB detection code 2023-04-09 16:51:11 +02:00
Liav A
9f217222b7 Meta: Run the QEMU ISA-PC machine with a 64-bit capable CPU
When we had 32 bit support in the OS kernel and userland, the very bare
minimum CPU we supported was Pentium 3, but now the CPU is just required
to support x86-64 long mode to be supported, so the exact model is not
very important.

I chose the QEMU64 virtual CPU model, because the whole concept of the
QEMU ISA-PC machine is that it checks how the kernel handles arbitrarily
old hardware setup.
2023-04-09 10:25:20 +02:00
Nico Weber
a34b300393 Fuzzers: Add a WebP fuzzer 2023-04-08 18:58:14 +02:00
Timothy Flynn
44cf92616e LibTimeZone: Update to TZDB version 2023c
https://mm.icann.org/pipermail/tz-announce/2023-March/000079.html
2023-04-07 20:52:01 +02:00
Timothy Flynn
3f1badf9b2 LibWeb: Implement VideoTrack and VideoTrackList
This implements the IDL for these types and some event handling around
them.
2023-04-07 16:02:22 +02:00
Matthew Olsson
bdab61ad93 LibWeb: Add the WritableStreamDefaultWriter interface 2023-04-06 22:54:58 +02:00
Luke Wilde
6ebdb9f824 LibWeb: Implement the HTMLConstructor extended attribute 2023-04-06 11:36:56 +02:00
Luke Wilde
e3c3cc9e19 LibWeb: Implement the CEReactions extended attribute 2023-04-06 11:36:56 +02:00
Luke Wilde
686e3a0d94 LibWeb: Support returning a callback function in IDL 2023-04-06 11:36:56 +02:00
stelar7
d527edf0ab LibTLS: Change Certificate parsing to use ErrorOr
Loads of changes that are tightly connected... :/
* Change lambdas to static functions
* Add spec docs to those functions
* Keep the current scope around as a parameter
* Add wrapping classes for some Certificate members
* Parse ec and ecdsa data from certificates
2023-04-06 09:57:31 +03:30
Daniel Bertalan
924758c6f8 Toolchain+Meta: Support kernel debugging with host AArch64 GDB
Previously, we would unconditionally build GDB from source for the
AArch64 toolchain. This commit makes it possible to use the system's
`gdb` binary if it supports the architecture, or `aarch64-elf-gdb` if
such a package is installed.

An `aarch64-elf-gdb` package will be available through Homebrew once
this PR is merged: https://github.com/Homebrew/homebrew-core/pull/127323
2023-04-03 19:56:09 -06:00
MacDue
de4ab4f69e Meta: Lazily initialize initial property values
This solves the longhands must be initialized before shorthands
problem by just initializing the value when it is first requested.

This will be needed for background-position-x/y which is a longhand
of a longhand, which otherwise breaks the longhands before shorthands
rule.
2023-04-03 07:10:33 +02:00
Andrew Kaster
875c3d109f Meta: Check if SERENITY_USE_SDCARD is set before checking its value
This avoids a bash complaint for the new option
2023-04-02 13:07:31 -06:00
Marco Cutecchia
f7608ba269 Meta: Add SERENITY_USE_SDCARD to boot from an SD card 2023-04-02 12:43:17 -06:00
Idan Horowitz
8da31764b9 Meta: Enable asm-view symbol demangling in the gdb kernel debug script
This makes sure that symbol names are demangled in the assembly view.
2023-04-02 20:05:17 +03:00
Idan Horowitz
b8437a03e7 Meta: Update AArch64 kernel base address in the gdb kernel debug script
The correct value for now is 0, since the AArch64 linker script uses
a hard-coded memory layout, so the offset is already automatically
applied.
2023-04-02 20:05:17 +03:00
Matthew Olsson
36ca1386e8 LibWeb: Add ReadableStream.locked/cancel()/getReader() 2023-04-01 23:43:07 +01:00
Matthew Olsson
f99d6e177f IDLGenerators: Support nullable double values 2023-04-01 23:43:07 +01:00
Tim Schumacher
afa158bf99 Lagom: Add targets for lzcat, xzcat and tar 2023-03-30 14:39:31 +02:00
Timothy Flynn
a944eed013 CI: Bump clang used by the Fuzzer build to clang-15
This is required for an upcoming use of a constexpr function.
2023-03-29 07:19:14 +02:00
Andrew Kaster
1c01856021 Meta: Diable Wshorten-64-to-32 explicitly to silence Xcode defaults
Xcode will set this by default when creating a new project unless we
set an xcode property to disable it. Instead of doing that, disable
it globally.
2023-03-28 09:18:50 +01:00
Cameron Youell
0471ec0567 Toolchain: Update binutils to version 2.40 2023-03-27 16:13:48 +01:00
Aliaksandr Kalenik
9220cdc285 LibHTTP+WebDriver+WebServer: Return error from HTTP request parser 2023-03-26 17:56:17 +02:00
Timothy Flynn
04b51e39d6 LibTimeZone: Update to TZDB version 2023b
https://mm.icann.org/pipermail/tz-announce/2023-March/000078.html
2023-03-26 15:43:40 +01:00
Nico Weber
ee6843a13c Meta: Add "gunzip" and "gzip" to lagom build
This makes it easy to compare the performance of Serenity's
deflate implementation to the host system implementation.

On my M1 Max MBP:

    % time gunzip -c \
        /Users/thakis/Downloads/trace_bug.json.gz > /dev/null

takes between 0.064s and 0.082s.

    % time Build/lagom/gunzip -c \
        /Users/thakis/Downloads/trace_bug.json.gz > /dev/null

on the other hand takes 4 seconds.

(That .gz file is a 5.8M file -- the largest .gz file that happend to be
in my Downloads folder.)
2023-03-25 21:42:50 +00:00
Jelle Raaijmakers
e18c87c60c Meta: Make audio hardware configurable through environment variable
The new environment variable `SERENITY_AUDIO_HARDWARE` accepts the
values `ac97` and `intelhda` (default).
2023-03-25 21:27:03 +01:00
Jelle Raaijmakers
dd0a25de4d Meta: Use more aptly named variable for PC speaker configuration 2023-03-25 21:27:03 +01:00
Jelle Raaijmakers
dd8fa73da1 Kernel: Add support for Intel HDA
This is an implementation that tries to follow the spec as closely as
possible, and works with Qemu's Intel HDA and some bare metal HDA
controllers out there. Compiling with `INTEL_HDA_DEBUG=on` will provide
a lot of detailed information that could help us getting this to work
on more bare metal controllers as well :^)

Output format is limited to `i16` samples for now.
2023-03-25 21:27:03 +01:00