1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 04:48:14 +00:00
Commit graph

1326 commits

Author SHA1 Message Date
Linus Groh
8b9f5b0286 js: Implement pretty-printing of WeakRef objects 2022-07-01 00:13:21 +01:00
Linus Groh
dee8e53773 js: Implement pretty-printing of WeakSet objects 2022-07-01 00:13:21 +01:00
Linus Groh
28e184e5cc js: Implement pretty-printing of WeakMap objects 2022-07-01 00:13:21 +01:00
Linus Groh
18f27c2e64 js: Fix pretty-printing of primitive wrapper objects
Currently, they print `[Type] <already printed Object 0x...>` as, for
some reason, we were simply trying to print the object again.
2022-07-01 00:13:21 +01:00
Linus Groh
c6cd784d4e js: Prefix global variables with 'g_'
This makes it much clearer that they are, in fact, global variables.
Also avoids name shadowing issues, especially with 'vm'.
2022-07-01 00:13:21 +01:00
Linus Groh
c87e01dcfd js: Fix a couple of const correctness issues 2022-07-01 00:13:21 +01:00
Linus Groh
098310f425 js: Move static_cast responsibility out of the pretty-print functions
This is something the caller should do.
2022-07-01 00:13:21 +01:00
Idan Horowitz
b910183351 js: Implement pretty-printing of Intl.DurationFormat 2022-07-01 01:00:05 +03:00
Kenneth Myhra
fbe22af86e Everywhere: Use my fairly new and shiny serenityos.org email :^) 2022-06-30 15:59:42 +01:00
Tim Schumacher
93488d6d5a pls: Implement support for --preserve-env 2022-06-28 19:09:23 +01:00
Tim Schumacher
38677f63c6 pls: Don't rely on getenv to find TERM
This allows us to skip storing the actual backing data in a separate
`Vector`, as we know that we are working with `environ`-backed storage
here.

Also, while the logic is currently very similar to what `getenv` does
internally, this allows us to eventually implement custom environment
variable filters while remaining linear in run time.
2022-06-28 19:09:23 +01:00
Maciej
4fbe43f282 ln: Fix typo in arguments argument 2022-06-28 09:20:30 +01:00
Lucas CHOLLET
662711fa26 Browser+LibWeb+WebContent: Allow Browser to load local files
To achieve this goal:
 - The Browser unveils "/tmp/portal/filesystemaccess"
 - Pass the page through LoadRequest => ResourceLoader
 - ResourceLoader requests a file to the FileSystemAccessServer via IPC
 - OutOfProcessWebView handles it and sends a file descriptor back to
 the Page.
2022-06-27 20:22:15 +01:00
Paweł Łukasik
a0ffdeb58a Keymap: Fix switching selected keymap
Previously keymap did switching of the selected keymap twice when the
command was executed. First set it to the first keymap on the list and
later, if present, to the chosen one.

Currently the switching to the first keymap on the list is done only
when the selection is not present or it's not on the list of keymaps.
2022-06-16 14:58:43 +01:00
Andreas Kling
a786b374b6 Utilities: Remove ddate joke program 2022-06-15 17:15:04 +02:00
Matthias Zimmerman
c10d48b72c AK/ByteBuffer+Everywhere: Handle errors in ByteBuffer::slice() 2022-06-13 15:38:51 +01:00
Linus Groh
857c3501df js: Add a loadINI() function for loading INI files :^)
This works the same way as loadJSON, except it loads INI files and
always returns an object.
2022-06-06 20:14:28 +01:00
Tim Schumacher
87da3e0004 tar: Implement support for GNU longname headers 2022-06-06 20:12:30 +01:00
Idan Horowitz
610afb21ac js: Create throw completions instead of raw error values on SyntaxError
This ensures that js's error printing logic is used instead of the
generic value printing logic, which then lets eshost correctly parse
thrown SyntaxErrors using the normal LibJS exception format.
2022-06-03 17:17:54 +01:00
Jesse Buhagiar
a88e3bde18 lsusb: Add -v flag to lsusb :^)
We can now get a more verbose print out from `lsusb` that spits out all
of the devices descriptors :^)
2022-06-02 13:14:29 +02:00
DexesTTP
a2161d8eb7 Utilities: Add networking to headless-browser
With this, the headless browser can now connect to the web.

Thanks a lot to Ali and Sin-ack for their help with this!

Co-authored-by: Ali Mohammad Pur <mpfard@serenityos.org>
Co-authored-by: sin-ack <sin-ack@users.noreply.github.com>
2022-05-29 23:00:04 +01:00
DexesTTP
f9d4c0ecbc Utilities: Add image decoding to headless-browser
With this, the headless browser can now decode images on its own!
2022-05-29 23:00:04 +01:00
DexesTTP
355e74cf65 Utilities: Add a simple headless-browser
This utility creates a 'screenshot' of the given page after a
few seconds of loading.
2022-05-29 23:00:04 +01:00
Linus Groh
bf5caf254f lscpu: Show size of L1 data/instruction, L2, and L3 CPU caches 2022-05-29 15:23:57 +02:00
Liav A
58b46d9e37 Utilities: Add edid-dump program to dump EDID from Display connectors 2022-05-27 22:27:44 +01:00
Maciej
7fba41321e netstat: Stop needing LookupServer for parsing arguments
Previously the netstat utility crashed when LookupServer wasn't running
because it tried to unveil nonexistent /tmp/portal/lookup socket. This
commit fixes that.
2022-05-26 21:49:52 +01:00
brapru
1297f81ddf route: Add the flags column 2022-05-26 16:33:10 +02:00
Andrew Kaster
ca42da23c2 Meta+Userland: Add jakt as an optional Lagom Tool
We can now use ENABLE_JAKT to pull jakt as a host tool and use it to
pre-process .jakt files into .cpp files for use in serenity applications
2022-05-23 23:05:45 +02:00
Ariel Don
a2c34554cd touch: Support custom timestamps
Previously, `touch` remained limited to creating files and updating
their current access and modifications time to the current time. It's
now capable of accepting two different timestamp formats with flags `-d`
and `-t` and referencing timestamps of other files with flag `-r`.

`touch` can also update only the last access time with `-a`, only the
last access time with `-m`, or update both as usual. `touch` updates
both left unspecified.

With `-c`, `touch` does not create a file if it doesn't already exist.
2022-05-21 18:15:00 +02:00
Ali Mohammad Pur
1830996ac9 xml: Avoid UAF in Error return from serenity_main()
ErrorOr<int> cannot own a string, and the string is scrubbed when freed,
so we'd get garbage when errors were printed.
2022-05-08 16:34:58 +02:00
Tim Schumacher
89da0f2da5 LibELF: Name library maps with the full file path 2022-05-07 20:02:00 +02:00
Luke Wilde
05748ed607 LibJS: Convert Console to use MarkedVector<Value>
Using a Vector<Value> is unsafe as GC cannot see the stored values.
This is then vended to outside users of ConsoleClient, e.g. LibWeb and
WebContent, which is then outside of LibJS's control.

An example issue is if the client stores it for later use and forgets
to visit the stored values, meaning they can be destroyed at any time.
We can save the client from this by vending a MarkedVector<Value> to
them.
2022-05-07 01:22:09 +02:00
Linus Groh
88f637a505 js: Print different type for each kind of ECMAScript function object
Instead of just printing 'ECMAScriptFunctionObject' (and leaking an
implementation detail in the process - this is not a public facing name)
let's instead print a different type string for each function kind, and
only keep the old class_name() printing for other JS::FunctionObject
subclasses.
2022-05-05 22:42:10 +02:00
Linus Groh
2ad9641315 js: Implement pretty-printing of generator objects 2022-05-05 22:40:57 +02:00
Liav A
e301af8352 Everywhere: Purge all support and usage of framebuffer devices
Long live the DisplayConnector object!
2022-05-05 20:55:57 +02:00
Liav A
d2e93ec50a Everywhere: Rename FB prefix name ioctls => GRAPHICS 2022-05-05 20:55:57 +02:00
Undefine
4054c35e9a su: Change the HOME enviroment variable on login 2022-05-05 20:49:18 +02:00
kleines Filmröllchen
ab49fcfb7c LibAudio+Userland: Remove Audio::LegacyBuffer
The file is now renamed to Queue.h, and the Resampler APIs with
LegacyBuffer are also removed. These changes look large because nobody
actually needs Buffer.h (or Queue.h). It was mostly transitive
dependencies on the massive list of includes in that header, which are
now almost all gone. Instead, we include common things like Sample.h
directly, which should give faster compile times as very few files
actually need Queue.h.
2022-05-03 23:09:20 +02:00
Kenneth Myhra
b8de830683 base64: Replace char pointer with StringView 2022-05-02 22:18:27 +02:00
Kenneth Myhra
bd81e15bc9 base64: Use TRY() instead of VERIFY(!result.is_error()) 2022-05-02 22:18:27 +02:00
Kenneth Myhra
ec1f5fd20f base64: Use Core::File standard_input() standard_output() 2022-05-02 22:18:27 +02:00
Patrick Meyer
0bd131ad06 Kernel: Stop requiring working malloc for syscall.h includes
Fixes #13869
2022-05-02 12:44:34 +02:00
Andrew Kaster
9b041786ac readelf: Don't error out on invalid interpreter path
This lets us inspect ELF binaries with un-loadable program interpreters,
same as binutils and llvm-readelf.
2022-05-02 01:45:49 +02:00
Maciej
06c90b35ec ifconfig: Stop supporting setting/displaying default gateway
The `route` command allows more sophiscated control over routing tables
now, and supporting this in ifconfig is no longer meaningful.
2022-05-01 13:34:27 +02:00
Daniel Bertalan
484f70fb43 readelf: Add printing for STT_GNU_IFUNC 2022-05-01 12:42:01 +02:00
brapru
0866a0cd1e Kernel+route: Support global routing table deletion 2022-04-30 16:24:33 +02:00
brapru
19912a0b32 Kernel+Utilities: Add the route utility
This exposes the global routing table in the /proc directory and adds
the userspace utility to query dynamically add from the table.
2022-04-28 08:41:11 -07:00
Tim Schumacher
a87c85f401 unzip: Create parent directory before extracting files 2022-04-27 11:54:57 +02:00
Ralf Donau
e11fb83bb7 config: Allow setting a key to the empty string 2022-04-26 22:42:54 +02:00
Ralf Donau
69a896cb82 ini: Use String for arguments 2022-04-25 10:47:56 +02:00