Commit Graph

2154 Commits

Author SHA1 Message Date
Caoimhe
fd4f00ee91 AK: Add SPICE_AGENT_DEBUG flag 2023-05-21 18:45:53 +02:00
Andreas Kling
cfe663435e LibWeb+LibJS: Don't lazily construct web prototypes in cell constructors
It's not safe to allocate from the GC heap while in the constructor of a
GC heap cell. (Because if this ends up triggering a collection, we may
end up trying to call through an uninitialized vtable).

This was already done safely in the initialize() virtual in much of
LibJS and LibWeb. This patch moves the logic for prototypes, mixins,
and CSSStyleDeclaration as well.

Fixes a long-standing GC crash that was pretty easy to reproduce by
refreshing https://vercel.com/
2023-05-21 14:23:58 +02:00
Ben Wiederhake
943ecaede6 LibIPC: Remove redundant IPC::Dictionary type
We already have and use HashMap<DeprecatedString, DeprecatedString>
nearly everywhere, which is essentially equivalent.
2023-05-21 07:53:45 +02:00
Ben Wiederhake
6055eed5a5 xml: Prefer LibFileSystem over DeprecatedFile 2023-05-21 07:50:52 +02:00
Ben Wiederhake
f43f83512e Meta: Also run markdown-check on markdown files in each Port subdir 2023-05-21 07:50:09 +02:00
Ben Wiederhake
2a051738ca Base: Move user nona from group 200 into existing group users
It seems that group 200 never existed, and group 100=users always did:
90bab5ea71
2023-05-20 14:40:24 +02:00
Ben Wiederhake
3be7d393b6 IPCCompiler: Nicer error message for invalid template spelling 2023-05-19 23:45:05 +02:00
Tim Schumacher
e2ec8f6584 Fuzzers: Add a fuzzer for roundtrip LZMA compression/decompression 2023-05-19 23:40:33 +02:00
Ben Wiederhake
5cfa883b9f LibUnicode: Explicitly mark HashMap copy 2023-05-19 22:33:57 +02:00
Ben Wiederhake
3cc98a32cf LibLocale: Avoid unnecessary HashMap copy 2023-05-19 22:33:57 +02:00
kleines Filmröllchen
b73b4d7533 Meta: Build abench on Lagom
This makes it possible to test audio decoding without much I/O overhead.
2023-05-18 07:05:25 -07:00
kleines Filmröllchen
79e76ae64c Meta/ShellCompletions: Use standard Serenity comment style 2023-05-17 12:55:15 +02:00
kleines Filmröllchen
e01941b41c Meta/ShellCompletions: Complete binaries for run lagom
This completion only works if you have lagom already built in some
capacity, since it scans the build directory tree for binaries, removing
known false positives. However, that is both more accurate than asking
ninja for the targets and filtering those, and it also makes it
independent of the build system used.
2023-05-17 12:55:15 +02:00
kleines Filmröllchen
97c95eca88 Meta/ShellCompletions: Mention $SERENITY_ARCH in target completions 2023-05-17 12:55:15 +02:00
kleines Filmröllchen
418f1f82e7 Meta/ShellCompletions: Add toolchain completion
This is very convenient for anyone like me who regularly runs the Clang
toolchain. The toolchain is not completed for Lagom and the
toolchain-independent help command.
2023-05-17 12:55:15 +02:00
kleines Filmröllchen
ef7afd8331 Meta/ShellCompletions: Complete command list
The command list was missing the help command, and the command order
was different from the help output.
2023-05-17 12:55:15 +02:00
Daniel Bertalan
0cbcdb227f Meta: Make SERENITY_RUN=ci work with AArch64
This in turn enables `./Meta/serenity.sh test aarch64` and the CI
scripts to work with the AArch64 port.

As the RPi doesn't have a debugcon-like device, we create two serial
devices. The system console, UART0 is redirected to `debug.log`, while
UART1 is made available to the userspace and is used as the stdout for
the test runner script.

We are not yet able to run the full test suite, as the kernel panics due
to some unimplemented features.

Note that Qemu `master` or our patched Qemu build is required for
`SystemServer` to recognize the `system_mode=self-test` parameter.
2023-05-17 01:32:43 -06:00
Tim Schumacher
df071d8a76 LibCompress: Add a lot of debug logging to LZMA 2023-05-17 09:08:53 +02:00
Tim Schumacher
7ab0de9190 Meta: Only enable the SPICE server when using the SPICE display
Newer versions of QEMU prevent the user from running a GL-rendered
display while a SPICE display is active due to incompatibilities.

Since there is no way to disable QEMUs (apparently implicit) SPICE
display, make sure that we only enable SPICE support if the user
requested running with SPICE specifically. In this case, QEMU picks the
default SPICE client instead of rendering a display using whatever our
default on that platform would be.
2023-05-17 08:53:57 +02:00
Karol Kosek
5035378b03 Meta: Copy GML source files to serenity install
We already install C++ source files to allow debugging applications
in HackStudio.

Installing GML files can make editing application widgets a bit faster
and easier, as you no longer need to copy files to the system. :^)
2023-05-16 12:57:34 +01:00
Ben Wiederhake
173f872cda Meta: Remove unused debug flags, add missing GENERATE_DEBUG
Commands that were helpful while investigating this:
```
grep -P '^set' Meta/CMake/all_the_debug_macros.cmake \
  | sed -Ee 's,set\((.+) ON\)$,\1,' > macros.lst
for i in $(cat macros.lst); do
  echo -n "$i "; git grep -Pn '\b'"$i"'\b' | wc -l
done | tee matches.lst
sort -k2 -n matches.lst
```
2023-05-14 16:01:57 -06:00
Ben Wiederhake
c56481e73f Meta: Make *.in files accessible to QtCreator 2023-05-14 16:01:57 -06:00
MacDue
7f3b98093e Meta: Enable DWARF 5 debug information
For our use case DWARF 5 seems to work fine now (see previous commit)
2023-05-14 09:21:08 +02:00
Fabian Dellwing
639aee037f Userland+Meta: Add new helper program for network settings
This little program allows us to take the NetworkSettings app away
from being an elevated GUI app.

It receives a JsonObject on STDIN and writes it to the global
Network configuration file.

If the write was successfull it will apply the changes.
2023-05-13 17:59:37 -06:00
Luke Wilde
d088619560 LibWeb: Capture realm in dictionary to C++ conversion
Some types use the realm when converting to C++, such as unions.
2023-05-13 16:31:10 +02:00
Ben Wiederhake
da394abe04 LibGfx+Fuzz: Convert ImageDecoder::initialize to ErrorOr
This prevents callers from accidentally discarding the result of
initialize(), which was the root cause of this OSS Fuzz bug:

https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=55896&q=label%3AProj-serenity&sort=summary
2023-05-12 09:40:24 +01:00
Lucas CHOLLET
8c34959b53 AK: Add the Input word to input-only buffered streams
This concerns both `BufferedSeekable` and `BufferedFile`.
2023-05-09 11:18:46 +02:00
Andreas Kling
15211cd753 Userland: Show "Ladybird" instead of "Browser" in titles, menus, etc
While the binary is still called "Browser" for now, let's make it clear
that we're converging on a single name for this application.
2023-05-09 06:12:09 +02:00
Kenneth Myhra
36c892ae14 Meta: Add get_number_of_processing_units() to shell_include.sh
This adds the method get_number_of_processing_units() which returns the
number of processing units the system has available.
2023-05-07 14:29:25 +02:00
Sam Atkins
f4d8a24fe4 LibWeb: Propagate errors from parse_css_value and property_initial_value 2023-05-06 08:07:28 +02:00
Andreas Kling
4b5cbe7931 Ladybird: Use vector icons in the browser toolbar
We now load SVG icons (via the Qt resource system) and render them into
a QIcon (with normal and disabled variants) using system colors.
We also re-render them if the system color theme changes.

This instantly makes Ladybird look less foreign on my Linux box.

I drew the icons myself, and they could definitely be more optimized,
but this was my first time using Inkscape. :^)
2023-05-05 16:58:08 +02:00
Daniel Bertalan
00b4976f2c Everywhere: Make Lagom build with GCC 13
GCC 13 was released on 2023-04-26. This commit fixes Lagom build errors
when using an updated host toolchain:
- Adds a workaround for a bug in constraint handling, which made LibJS
  fail to compile: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109683
- Silences the new `-Wdangling-reference` diagnostic globally. It
  produces multiple false positives with no clear way to silence them
  without `#pragmas`.
- Silences `-Wself-move` in `RefPtr` tests as GCC 13 adds this
  previously Clang-exclusive warning.
2023-05-02 07:03:57 -04:00
Matthew Olsson
48d92eecac Lagom: Enforce GC-allocated fields are visited in LibJSGCVerifier 2023-04-30 06:04:33 +02:00
Matthew Olsson
98ed74087f Lagom: Enforce uniform calls to Base::visit_edges in LibJSGCVerifier
This ensures that all visit_edges implementations include a call to
Base::visit_edges. In particular, this gives three nice benefits:

  - The call can't be forgotten (the main benefit, of course).
  - All of the calls look the same. In other words, always use "Base"
    instead of the actual concrete class.
  - Ensure the object has a call to JS_CELL or JS_OBJECT in the
    definition. Otherwise, Base will not be defined and the call will
    not compile.
2023-04-30 06:04:33 +02:00
Tim Schumacher
9ab598af49 Revert "Kernel/x86: Bake the Prekernel and the Kernel into one image"
Some hardware/software configurations crash KVM as soon as we try to
start Serenity. The exact cause is currently unknown, so just fully
revert it for now.

This reverts commit 897c4e5145.
2023-04-28 23:24:19 +02:00
MacDue
a5fa5e55ef LibWeb: Allow specifying a URL for an SVG fill
This does not do anything yet, but will allow for gradients later!
2023-04-28 09:42:28 +02:00
Liav A
897c4e5145 Kernel/x86: Bake the Prekernel and the Kernel into one image
The new baked image is a Prekernel and a Kernel baked together now, so
essentially we no longer need to pass the Prekernel as -kernel and the
actual  kernel image as -initrd to QEMU, leaving the option to pass an
actual initrd or initramfs module later on with multiboot.
2023-04-28 09:23:30 +02:00
Ali Mohammad Pur
7e6341587b AK+Everywhere: Disallow Error::from_string_view(FooString)
That pattern seems to show up a lot in code written by people that
aren't intimately familiar with the lifetime model of Error and Strings.
This commit makes the compiler detect it and present a more helpful
diagnostic than "garbage string at runtime".
2023-04-28 05:55:20 +02:00
Matthew Olsson
b57b3c54cc LibWeb: Add ReadableStreamBYOBReader to ReadableStreamReader type 2023-04-27 07:57:53 +02:00
Lucas CHOLLET
c50b072852 IPCMagicLinter: Port to Core::File 2023-04-27 07:26:32 +02:00
Lucas CHOLLET
b35a6b206b IPCMagicLinter: Use LibMain 2023-04-27 07:26:32 +02:00
Ali Mohammad Pur
7e4e9fdb8f LibWasm: Start implementing WASI
This commit starts adding support for WASI, along with the framework to
implement all the functions (though only a couple are currently
implemented).
2023-04-26 03:47:15 +03:30
Kenneth Myhra
9ef3704ce8 Meta: Use common method exit_if_running_as_root() in serenity.sh
This replaces the inline check for running as root with the common
method exit_if_running_as_root().
2023-04-25 01:53:42 -06:00
Kenneth Myhra
b4a0fee03d Meta: Add exit_if_running_as_root() to shell_include.sh
This adds the method exit_if_running_as_root() which checks if the
script is executed under root, and if that's the case exits the script.
2023-04-25 01:53:42 -06:00
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