1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-24 23:27:42 +00:00
Commit graph

1086 commits

Author SHA1 Message Date
Ali Mohammad Pur
ae68d1f865 strace: Add a chdir formatter 2022-02-12 12:16:59 +01:00
Daniel Bertalan
10c629055f Utilities/readelf: Add printing for RELR relocations 2022-02-11 18:07:53 +01:00
Riccardo Arena
a9b387a1bf pgrep: Port to LibMain
Use unveil to allow access only to required paths. 
Switch to new pledge format.
2022-02-10 14:10:58 +00:00
Riccardo Arena
5c63537ae9 pidof: Port to LibMain
Use pledge/unveil to allow access only to required paths and syscalls.
2022-02-10 14:10:58 +00:00
Timothy Flynn
19d4f52a9e js: Add a command line argument to evaluate a string as a script
For example:

    $ js -c "console.log(42)"
    42
2022-02-10 10:26:12 +00:00
Ryan Chandler
65de0d2910 Utilities: Port realpath to LibMain 2022-02-10 10:25:36 +00:00
Ali Mohammad Pur
3bfcd7b52d LibJS: Implement Sets using Maps
This implements ordered sets using Maps with a sentinel value, and
includes some extra set tests.
Fixes #11004.

Co-Authored-By: davidot <davidot@serenityos.org>
2022-02-09 20:57:41 +00:00
Ali Mohammad Pur
4a73ec07c5 LibJS: Make Map iterators independent of the underlying hashmap
This implements ordered maps as a pair of an RBTree for key order, and
an underlying unordered hash map for storage.
Fixes (part of) #11004.
2022-02-09 20:57:41 +00:00
davidot
9264f9d24e LibJS+Everywhere: Remove VM::exception() and most related functions
This commit removes all exception related code:
Remove VM::exception(), VM::throw_exception() etc. Any leftover
throw_exception calls are moved to throw_completion.
The one method left is clear_exception() which is now a no-op. Most of
these calls are just to clear whatever exception might have been thrown
when handling a Completion. So to have a cleaner commit this will be
removed in a next commit.

It also removes the actual Exception and TemporaryClearException classes
since these are no longer used.

In any spot where the exception was actually used an attempt was made to
preserve that behavior. However since it is no longer tracked by the VM
we cannot access exceptions which were thrown in previous calls.
There are two such cases which might have different behavior:
- In Web::DOM::Document::interpreter() the on_call_stack_emptied hook
  used to print any uncaught exception but this is now no longer
  possible as the VM does not store uncaught exceptions.
- In js the code used to be interruptable by throwing an exception on
  the VM. This is no longer possible but was already somewhat fragile
  before as you could happen to throw an exception just before a VERIFY.
2022-02-08 09:12:42 +00:00
kleines Filmröllchen
4931c88b13 LibGUI: Remove GML prefix in favor of proper namespace
Prefixes are very much a C thing which we don't need in C++. This commit
moves all GML-related classes in LibGUI into the GUI::GML namespace, a
change somewhat overdue.
2022-02-07 18:39:50 +01:00
Miika Hämynen
46ed6303a2 less: Add hotkeys f and b to scroll screen up/down 2022-02-06 13:44:53 +01:00
Sam Atkins
24c4d7a842 Utilities/run-tests: Add command-line switch to also run "skipped" tests
Among other things, this lets you run flaky tests to check if they are
still flaky. :^)

This is done in two ways: It makes should_skip_test() always return
false; and skips reading and generating the skipped-tests lists since
we won't use them.
2022-02-05 18:12:19 +00:00
davidot
8da6c01d8f LibJS: Remove the JS_TRACK_ZOMBIE_CELLS option
This feature had bitrotted somewhat and would trigger errors because
PrimitiveStrings were "destroyed" but because of this mode they were not
removed from the string cache. Even fixing that case running test-js
with the options still failed in more places.
2022-02-05 11:52:51 +01:00
Timur Sultanov
c7bd47c87c Base+WindowsServer+keymap: Store multiple keymaps in a config 2022-02-03 00:47:22 +01:00
Kenneth Myhra
760eeb20da mount: Do not print usage if executed without any arguments
If 'mount' is executed without any arguments we should print the mount
points and return early not printing the usage statement.

This fixes a regression introduced in commit: 9d48406
2022-02-02 21:43:27 +01:00
Brian Gianforcaro
8215b99df1 mount: Exit without error when handling mount all on system boot
At the point at which `mount -a` is executed by SystemServer, the
/proc fs is not yet mounted. That means that opening /proc/fd in
the `print_mounts()` function will always fail with an error.

    0.976 mount(8:8): Exiting with runtime error:
                      No such file or directory (errno=2)

The fix is simple, just return gracefully after we execute mount all.
2022-02-02 11:21:43 +01:00
alexmajor
a79e730839 sleep: Port to LibMain 2022-02-01 04:58:24 +00:00
alexmajor
55496ab7fb shutdown: Port to LibMain 2022-02-01 04:58:24 +00:00
alexmajor
2f1717182e stty: Port to LibMain 2022-02-01 04:58:24 +00:00
alexmajor
e3dbe19018 sql: Port to LibMain 2022-02-01 04:58:24 +00:00
alexmajor
c72930fdef shot: Port to LibMain 2022-02-01 04:58:24 +00:00
alexmajor
ad7845ed7d sysctl: Port to LibMain 2022-02-01 04:58:24 +00:00
alexmajor
61f2b7434f syscall: Port to LibMain 2022-02-01 04:58:24 +00:00
alexmajor
6deb032335 sync: Port to LibMain 2022-02-01 04:58:24 +00:00
Timothy Flynn
6efbafa6e0 Everywhere: Update copyrights with my new serenityos.org e-mail :^) 2022-01-31 18:23:22 +00:00
Andreas Kling
7a742b17da LibJS: Store ECMAScriptFunctionObject bytecode in an OwnPtr
Using an Optional was extremely wasteful for function objects that don't
even have a bytecode executable.

This allows ECMAScriptFunctionObject to fit in a smaller size class.
2022-01-31 16:19:23 +01:00
Kenneth Myhra
9773c3cabc pape: Port to LibMain 2022-01-31 15:25:07 +01:00
Kenneth Myhra
0dc46da99f open: Use more StringView instead of const char* 2022-01-31 15:25:07 +01:00
Kenneth Myhra
71c004b75f open: Port to LibMain 2022-01-31 15:25:07 +01:00
Kenneth Myhra
73f431a7cb ntpquery: Port to LibMain 2022-01-31 15:25:07 +01:00
Kenneth Myhra
5d41f993cd notify: Port to LibMain 2022-01-31 15:25:07 +01:00
Kenneth Myhra
a64b44377d nl: Port to LibMain 2022-01-31 15:25:07 +01:00
Kenneth Myhra
cf207ad938 mount: Use more StringView instead of const char* 2022-01-31 15:25:07 +01:00
Kenneth Myhra
9d48406312 mount: Port to LibMain 2022-01-31 15:25:07 +01:00
Kenneth Myhra
46c4988568 lsof: Use more StringView instead of const char* 2022-01-31 15:25:07 +01:00
Kenneth Myhra
262161481f lsof: Port to LibMain 2022-01-31 15:25:07 +01:00
Kenneth Myhra
6a7ffcddba lsirq: Port to LibMain 2022-01-31 15:25:07 +01:00
Idan Horowitz
9802b16298 js: Implement pretty-printing of Intl Segments objects 2022-01-30 19:47:01 +00:00
Idan Horowitz
7cf3f11815 js: Implement pretty-printing of Intl.Segmenter 2022-01-30 19:47:01 +00:00
Timothy Flynn
5a1eefcc1d js: Implement pretty-printing of Intl.Collator 2022-01-29 20:27:24 +00:00
Ali Mohammad Pur
6d64b13a1b LibDebug+Everywhere: Avoid void* -> FlatPtr -> void* dance
And limit the `void*` to the functions that interface the system (i.e.
ptrace wrappers).
This generally makes the code less riddled with casts.
2022-01-28 22:51:27 +00:00
Timothy Flynn
5ca1c54c27 date: Use an explicit time format string for default option
This is to prepare for removing the time zone from DateTime's default
format string. The date utility on most system show time zone by default
so let's keep that.
2022-01-28 20:19:05 +00:00
Ali Mohammad Pur
58ed00f633 run-tests: Dump a backtrace for crashed tests
It only makes sense to see what a crashed test was up to, so generate a
backtrace if we can find the coredump and read it.
2022-01-28 20:18:46 +00:00
Ali Mohammad Pur
1c121d7488 js: Use generic reference instead of Variant<A,B>
As the two types are used in exactly the same way, just make the lambda
generic over the type instead of explicitly moving them into a variant
and then visiting with a generic lambda.
2022-01-28 20:18:46 +00:00
Timothy Flynn
624fad3821 js: Implement pretty-printing of Intl.PluralRules 2022-01-28 19:38:47 +00:00
Idan Horowitz
fa7ae7288b zip: Ignore symlinks when recursively zipping files
This prevents infinite loops when symlinks point to a parent directory.
2022-01-28 19:05:52 +02:00
Timothy Flynn
0a1e717e40 Revert "ls: Display times in the user's local time zone"
This reverts commit 0c13a3a8ff.
2022-01-28 15:13:35 +00:00
Timothy Flynn
8599ee3049 Revert "Userland: Invoke tzset in apps that care about time zones"
This reverts most of commit ede5c9548e.
The one change not reverted is ClockWidget.h, so that the taskbar clock
can continue to notice time zone changes.
2022-01-28 15:13:35 +00:00
Timothy Flynn
0c13a3a8ff ls: Display times in the user's local time zone
ls is already using local time, but needs tzset() for that to actually
work.
2022-01-28 12:25:20 +00:00
brapru
2af9a8e862 ping: Port to LibMain 2022-01-27 12:56:07 +01:00