Commit Graph

859 Commits

Author SHA1 Message Date
Ben Wiederhake
3e420b7590 Meta: Remove useless lint-ipc-ids.sh script
This script was silently broken in commit
62af6cd4f9.
2021-11-05 00:17:01 +03:30
Ben Wiederhake
8f65153b03 Meta: Run IPC magic number linter during CI and pre-commit 2021-11-05 00:17:01 +03:30
Ben Wiederhake
585554a245 Meta: Implement checker for IPC magic number collisions 2021-11-05 00:17:01 +03:30
Ben Wiederhake
93356ee3df IPCCompiler: Remove now-unused ability to hardcode magic number 2021-11-05 00:17:01 +03:30
thislooksfun
03494ed6ba Meta: Add a check to ensure grep -P stays gone
grep -P does not work on macOS, but grep -E does.
2021-11-02 12:23:30 +01:00
thislooksfun
a984545a94 Meta: Run find in the current dir
macOS's find requires a leading search scope. Without this change this
lint step fails.
2021-11-02 12:23:30 +01:00
thislooksfun
19bd302f6a Meta: Adhere to latest ScriptCheck standards (SC2268) 2021-11-02 12:23:30 +01:00
thislooksfun
3e32acc3e4 Meta: Add special case for macOS
macOS's `find` does not support the '-executable' flag, nor does it
support the '-perm /' syntax, but we can make it work with a special
case.
2021-11-02 12:23:30 +01:00
thislooksfun
170e956c80 Meta: Remove unnecessary -i
Using `xargs -i <cmd> {}` is just doing the default behavior of xargs,
but with extra steps that also don't work on macOS.
2021-11-02 12:23:30 +01:00
thislooksfun
c2d44209a8 Meta: Use grep -E/F, not grep -P
grep -E and -F are POSIX standard, and meets all our matching needs.
2021-11-02 12:23:30 +01:00
Ben Wiederhake
686efb6737 ConfigureComponents: Reduce duplicated code 2021-11-02 11:36:23 +01:00
Linus Groh
897471c852 Meta: Don't check for toolchain if serenity.sh target is lagom
This is just silly :^)

    $ serenity run lagom js
    WARNING: unknown toolchain 'js'. Defaulting to GNU.
             Valid values are 'Clang', 'GNU' (default)
2021-11-02 11:09:05 +01:00
Idan Horowitz
19e28d5798 LibWeb: Convert is_named_property_exposed_on_object to ThrowCompletions
This is the last usage of old-style exceptions in the WrapperGenerator.
2021-11-02 10:41:25 +02:00
Ben Wiederhake
55e1edd51b Meta: Check auto-generated manpages for completeness on CI 2021-11-01 21:12:58 +01:00
Ben Wiederhake
a4e805756d Meta: Add script to generate and export manpages 2021-11-01 21:12:58 +01:00
Ben Wiederhake
2caad04d23 Base: Add new system-mode that just generates manpages 2021-11-01 21:12:58 +01:00
Timothy Flynn
95e492de59 LibWeb: Convert throw_dom_exception_if_needed() to ThrowCompletionOr
This changes Web::Bindings::throw_dom_exception_if_needed() to return a
JS::ThrowCompletionOr instead of an Optional. This allows callers to
wrap the invocation with a TRY() macro instead of making a follow-up
call to should_return_empty(). Further, this removes all invocations to
vm.exception() in the generated bindings.
2021-10-31 18:51:07 +01:00
Ben Wiederhake
f20a42e871 Kernel: Write test that crashes ProcFS 2021-10-31 18:44:12 +01:00
Idan Horowitz
ae510db72c FuzzilliJS: Convert native functions to ThrowCompletionOr 2021-10-31 18:20:37 +02:00
Timothy Flynn
c19c306744 LibWeb: Convert all generated bindings to ThrowCompletionOr
This also required converting URLSearchParams::for_each and the callback
function it invokes to ThrowCompletionOr. With this, the ReturnType enum
used by WrapperGenerator is removed as all callers would be using
ReturnType::Completion.
2021-10-31 15:48:36 +01:00
Brendan Coles
91de60d912 Lagom/Fuzzers: Add fuzzer for PDF document 2021-10-30 10:33:56 -07:00
Andreas Kling
34cc4803af Websites: Import serenityos.org website changes
I hadn't synced this for a while. The repo copy now matches the live
site once again.
2021-10-30 17:42:26 +02:00
Idan Horowitz
2882a90dec Kernel: Add the IFF_* SIOCGIFFLAGS flag macros 2021-10-28 11:24:36 +02:00
Ben Wiederhake
a6ccf6659a Meta: Reimplement license checker in python
On my machine, this script took about 3.4 seconds, and was responsible
for essentially all of the time taken by the precommit hook.

The script is a faithful 1:1 reimplementation, even the regexes are
identical. And yet, it takes about 0.02 seconds, making the pre-commit
hook lightning fast again. Apparently python is just faster in this
case.

Fun fact:
- Just reading all ~4000 files took bash about 1.2 seconds
- Checking the license took another 1.8 seconds in total
- Checking for math.h took another 0.4 seconds in total
- Checking for '#pragma once' took another 0.4 seconds in total

The timing is highly load-dependent, so they don't exactly add up to 3.4
seconds. However, it's good enough to determine that bash is no longer
fit for the purpose of this script.
2021-10-27 11:35:47 -07:00
Ben Wiederhake
8d13f6ddce Kernel+SystemServer: Change bootmode to system_mode
'bootmode' now only controls which set of services are started by
SystemServer, so it is more appropriate to rename it to system_mode, and
no longer validate it in the Kernel.
2021-10-25 23:38:28 +02:00
Ben Wiederhake
09432a8241 Kernel: Separate panic behavior from bootmode
Bootmode used to control panic behavior and SystemServer.
This patch factors panic behavior control into a separate flag.
2021-10-25 23:38:28 +02:00
Ben Wiederhake
542a88a7be Kernel: Separate framebuffers from bootmode
Bootmode used to control framebuffers, panic behavior, and SystemServer.
This patch factors framebuffer control into a separate flag.
Note that the combination 'bootmode=self-test fbdev=on' leads to
unexpected behavior, which can only be fixed in a later commit.
2021-10-25 23:38:28 +02:00
Andreas Kling
398c181c79 LibJS: Rename PropertyName to PropertyKey
Let's use the same name as the spec. :^)
2021-10-24 17:18:07 +02:00
Ben Wiederhake
fc519d43ba Fuzzing: Update build instructions
The project needs clang-12, which is not on all systems the default
(e.g. Debian Testing).
2021-10-23 19:29:59 +01:00
Ben Wiederhake
20bfd549e9 man.serenityos.org: Make section titles more descriptive 2021-10-22 19:49:28 +03:00
Ben Wiederhake
dad47a3dd1 man.serenityos.org: Use pandoc for listings and landing page
This makes all pages look and feel the same, because they all use the
default CSS generated by pandoc. Also, it inserts the banner everywhere
at the top, not only into the top-level index.html.

Credit to @xSlendiX for suggesting that `-B` works here.
2021-10-22 19:49:28 +03:00
Ben Wiederhake
2e613db999 man.serenityos.org: Fix links to man(1), avoid unnecessary shells
This fixes the current bug at the end of less(1), which links to the
wrong file ".html" instead of "man.html".
2021-10-22 19:49:28 +03:00
Ben Wiederhake
7e52b6fa24 man.serenityos.org: Simplify local builds
I simply extracted the script from .github/workflows/manpages.yml,
without significant modification.
2021-10-22 19:49:28 +03:00
Ben Wiederhake
5c04a2d4b3 man.serenityos.org: Add section descriptions to overview page 2021-10-22 19:49:28 +03:00
Idan Horowitz
db5df26841 LibJS: Convert Array AOs to ThrowCompletionOr 2021-10-22 15:07:04 +03:00
Liav A
cf0dbc9069 Tests: Add a unit test to ensure the /dev/mem device works correctly
To ensure everything works as expected, a unit test was added with
multiple scenarios.
This binary has to have the SetUID flag, and we also bind-mount the
/usr/Tests directory to allow running of SetUID binaries.
2021-10-22 13:13:00 +02:00
Timothy Flynn
8a57885494 Meta: Enable ccache for Lagom by default 2021-10-21 04:35:10 -07:00
Linus Groh
5832de62fe LibJS: Convert NativeFunction::{call,construct}() to ThrowCompletionOr
Both at the same time because many of them call construct() in call()
and I'm not keen on adding a bunch of temporary plumbing to turn
exceptions into throw completions.
Also changes the return value of construct() to Object* instead of Value
as it always needs to return an object; allowing an arbitrary Value is a
massive foot gun.
2021-10-21 09:02:23 +01:00
Idan Horowitz
40eb3a39d4 LibJS: Rename define_native_function => define_old_native_function
This method will eventually be removed once all native functions are
converted to ThrowCompletionOr
2021-10-20 12:27:19 +01:00
Idan Horowitz
20163c0584 LibJS: Add ThrowCompletionOr versions of the JS native function macros
The old versions were renamed to JS_DECLARE_OLD_NATIVE_FUNCTION and
JS_DEFINE_OLD_NATIVE_FUNCTION, and will be eventually removed once all
native functions were converted to the new format.
2021-10-20 12:27:19 +01:00
Ben Wiederhake
8de696bdd0 HeaderCheck: It checks some of your headers 2021-10-20 09:20:18 +01:00
Sam Atkins
04c0c103e0 LibWeb: Distinguish between integer and number when checking StyleValues 2021-10-19 19:12:09 +02:00
Sam Atkins
450b782c18 LibWeb: Distinguish between length and percentage values
Though most CSS properties accept either, some do not, so distinguishing
between them lets us catch some invalid values at parse time.
2021-10-19 19:12:09 +02:00
Timothy Flynn
d24ae8063b LibWeb: Implement DOMTokenList for managing space-separated tokens lists
DOMTokenList is used as the return type of, e.g., the Element.classList
property.
2021-10-18 23:33:56 +02:00
Timothy Flynn
4d8320a49a LibWeb: Add initial support for IDL methods with variadic parameters
Adds support for methods whose last parameter is a variadic DOMString.
We constructor a Vector<String> of the remaining arguments to pass to
the C++ implementation.
2021-10-18 23:33:56 +02:00
Brian Gianforcaro
8c2a88e492 Meta: Add a gdb pretty printer for AK::Array 2021-10-18 03:27:27 -07:00
Timothy Flynn
b11a34330a CI: Build the Clang toolchain a single time for both onboard pipelines
As of the Clang 13 upgrade, we only need to build the toolchain once and
can use that toolchain for both x86_64 and i686. To do this, this breaks
the main Azure configuration into 3 "stages" (Lagom, Toolchain, and
Serenity), where the Serenity stage depends on the Toolchain stage.

This has the added benefit of uploading a new prebuilt toolchain cache
sooner than before, which should help alleviate pressure from PRs.
2021-10-18 03:25:26 -07:00
Idan Horowitz
7bbb92dfe9 LibJS: Convert to_u16() to ThrowCompletionOr 2021-10-18 08:01:38 +03:00
Idan Horowitz
cc94bba5c0 LibJS: Convert to_u32() to ThrowCompletionOr 2021-10-18 08:01:38 +03:00
Idan Horowitz
f6a5ff7b00 LibJS: Convert to_i32() to ThrowCompletionOr 2021-10-18 08:01:38 +03:00