Commit graph

29475 commits

Author SHA1 Message Date
Ali Mohammad Pur
d020d46846 Shell: Unwind execution after runtime errors
This commit makes the Shell check for errors after a node is run(), and
prevents further execution by unwinding until the error is cleared.
Fixes #10649.
2021-10-31 12:02:20 +01:00
Jelle Raaijmakers
8f332ac6a3 LibC: Add labs()
We defined it in `stdlib.h` but forgot to implement it.
2021-10-31 12:00:57 +01:00
Brendan Coles
3ce4d0f89a Ports: Add FreeDink port 2021-10-31 11:52:27 +01:00
Brendan Coles
287bbabbc1 Ports: Add OpenGL Mathematics (GLM) port 2021-10-31 11:52:27 +01:00
Marco Cutecchia
0086466b61 Utilities: Add option to suppress errors to grep 2021-10-31 14:18:29 +03:30
Marco Cutecchia
647f89f15e Utilities: Add 'quiet' mode to grep 2021-10-31 14:18:29 +03:30
Timothy Flynn
0f91b22795 js: Convert JavaScript REPL to ThrowCompletionOr 2021-10-31 07:50:30 +02:00
Timothy Flynn
e8f722fb27 LibJS: Convert %IteratorPrototype% to ThrowCompletionOr 2021-10-31 07:50:30 +02:00
Timothy Flynn
d1abf3d8ce LibJS: Convert ObjectConstructor to ThrowCompletionOr 2021-10-31 07:50:30 +02:00
Timothy Flynn
0f224779aa LibJS: Convert ObjectConstructor GetOwnPropertyKeys to ThrowCompletionOr 2021-10-31 07:50:30 +02:00
Timothy Flynn
e92d14d498 LibJS: Convert GlobalObject to ThrowCompletionOr 2021-10-31 07:50:30 +02:00
Timothy Flynn
875b563664 LibJS: Convert GlobalObject's Encode and Decode AOs to ThrowCompletionOr 2021-10-31 07:50:30 +02:00
Timothy Flynn
2a967fd107 LibJS: Convert Object.prototype to ThrowCompletionOr 2021-10-31 07:50:30 +02:00
Jelle Raaijmakers
a6c5ce11b8 Ports: Remove ScummVM FMOPL patch
This patch is no longer required after this PR fixes the x86_64 PLT
trampoline:
https://github.com/SerenityOS/serenity/pull/10711
2021-10-31 00:21:42 +02:00
Peter
24fdf99d8b LibELF: Store SSE registers in x86_64 PLT Trampoline
Save and restore XMM registers so userspace programs don't
randomly lose values from calls. This fixes a crash in ScummVM.
2021-10-31 00:21:31 +02:00
Peter
80aa1b93d1 Debugger: Add logging for the other 8 GPRs too 2021-10-31 00:20:35 +02:00
Brian Gianforcaro
35617ba2d3 Meta: Suppress rule v1047 in PVS-Studio Static Analysis
This rule appears to produce a lot of noise, most of them look like
false positives (400+). Lets suppress for now to try to move the signal
to noise ratio higher for PVS-Studio.

Reference: https://pvs-studio.com/en/docs/warnings/v1047/
2021-10-31 00:19:33 +02:00
Marco Cutecchia
5f04fb0ece Spreadsheet: Make the 'Help' window accessory 2021-10-31 00:58:05 +03:30
Linus Groh
2cbcb99ec7 LibJS: Update spec comment in parse_temporal_time_zone_string()
This is a normative change in the Temporal spec.

See: https://github.com/tc39/proposal-temporal/commit/19b693c
2021-10-30 23:15:18 +02:00
Linus Groh
a7cb042ca8 LibJS: Fix format_time_zone_offset_string() for negative offsets
This is a normative change in the Temporal spec.

See: https://github.com/tc39/proposal-temporal/commit/ec43be3
2021-10-30 23:14:50 +02:00
Linus Groh
5da8ae0020 LibJS: Update parse_temporal_time_zone_string() substring bounds
This is a normative change in the Temporal spec.

See: https://github.com/tc39/proposal-temporal/commit/73b9fe3
2021-10-30 23:14:43 +02: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
Ben Wiederhake
fa018d3ba1 Kernel: Fix common misuse of KString in debug messages 2021-10-30 17:35:18 +02:00
Brendan Coles
6ccfa3e75e LibPDF: Parser::parse_header() return false if remaining bytes is zero 2021-10-30 17:34:56 +02:00
Linus Groh
92fdae178b LibJS: Implement Temporal.TimeZone.prototype.getPreviousTransition() 2021-10-30 16:32:20 +02:00
Linus Groh
e9cbeeac45 LibJS: Implement Temporal.TimeZone.prototype.getNextTransition() 2021-10-30 16:32:20 +02:00
Linus Groh
5fde02184d LibJS: Implement Temporal.TimeZone.prototype.getPossibleInstantsFor() 2021-10-30 16:32:20 +02:00
Linus Groh
82792a6815 LibJS: Mark single argument BigInt() constructor as 'explicit' 2021-10-30 16:32:20 +02:00
Noah Haasis
05aeff1c4d LibGUI: Focus next tab after closing active tab
Focus the next tab after closing the currently active tab.
If the tab being closed is the last one then the new last
tab is active.
2021-10-30 17:13:25 +03:30
Linus Groh
de2e95b278 LibJS: Ensure make_day()'s temporary Core::DateTime is treated as UTC
DateTime::create() and subsequently DateTime::set_time() uses mktime()
internally to ensure out-of-range input values still result in a valid
date (Jan 32 -> Feb 1 etc.).
This however also means that the input is treated as local time, and
then shifted to UTC accordingly for the returned time_t - it is however
already in UTC in this case! The temporary solution is simply to set the
"TZ" environment variable to "UTC" and back after create(). The proper
solution is probably to have better timezone support in Core::DateTime.
This should only affect Lagom, as serenity itself has no timezone
support yet and always assumes UTC.
2021-10-30 10:15:49 +02:00
Linus Groh
28a9a248d6 LibJS: Fix off-by-one in make_day()'s temporary Core::DateTime
Just like in the previous commit, the day value of Core::DateTime is
one-based, not zero based.
Noticed while implementing a new Temporal function, this likely would've
been caught earlier if we'd also use it for the Date API (we don't).
2021-10-30 10:15:49 +02:00
Linus Groh
232f54cd9b LibCore: Fix off-by-one in DateTime::{create,set_time} day default arg
Just like month, the day value here is one-based. This resulted in the
following situation, which is obviously unexpected:

    Core::DateTime::create(1970); // 1970-01-00 -> 1969-12-31
2021-10-30 10:15:49 +02:00
Daniel Bertalan
e9f0ebd4bd LibHTTP: Fix logic error leading to buffer over-read
When we receive HTTP payloads, we have to ensure that the number of
bytes read is *at most* the value specified in the Content-Length
header.

However, we did not use the correct value when calculating the truncated
size of the last payload. `m_buffered_size` does not store the total
number of bytes received, but rather the number of bytes that haven't
been read from us.

This means that if some data has already been read from us,
`m_buffered_size` is smaller than `m_received_size`. Because of this, we
ended up resizing the `payload` ByteBuffer to a larger size than its
contents. This garbage data was then read by consumers, producing this
warning when executing scripts:

> Extension byte 0xdc in 1 position after first byte 0xdc doesn't make
> sense.
2021-10-30 00:54:34 +03:30
Andreas Kling
47b8d80864 Meta: Add note about abandoned PR's to CONTRIBUTING.md 2021-10-29 22:59:44 +02:00
Marco Cutecchia
3428e2a76c HackStudio: Add 'Show Dotfiles' option 2021-10-29 22:40:11 +02:00
Timothy Flynn
ef62118c8b LibWeb: Render any specified list-style-image for list items 2021-10-29 22:06:49 +02:00
Timothy Flynn
eb0fb38cac LibWeb: Support parsing some data: URLs in CSS
For now, data URLs are explicitly limited to expected MIME types. For
example, image-related styles accept image MIME types.
2021-10-29 22:06:49 +02:00
Timothy Flynn
1e6afa9fd5 Base: Add tests for data: URLs and large list-style-image to lists.html 2021-10-29 22:06:49 +02:00
Timothy Flynn
2fadbe176e LibWeb: Remove extraneous semi-colon 2021-10-29 22:06:49 +02:00
Musab Kılıç
39afbceb53 Minesweeper: Set time label to a fixed width
This ensures the label width doesn't sporadically change as time elapses
2021-10-29 23:02:24 +03:00
thislooksfun
7eaac7d2c1 CI: Notify Discord on all new PRs, even drafts 2021-10-29 22:37:48 +03:00
Rodrigo Tobar
f356c4ab91 wc: Count last line even if it doesn't end in newline 2021-10-29 22:37:34 +03:00
Idan Horowitz
040e29c7b9 LibJS: Convert ShadowRealmPrototype functions to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
Idan Horowitz
658056233e LibJS: Convert GeneratorObjectPrototype functions to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
Idan Horowitz
7b5ccbc5ed LibJS: Convert ProxyConstructor functions to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
Idan Horowitz
92bd64cb56 LibJS: Convert the ProxyCreate AO to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
Idan Horowitz
84681788c4 LibJS: Convert FinalizationRegistryPrototype funcs to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
Idan Horowitz
909e13c5e6 LibJS: Convert WeakSetPrototype functions to ThrowCompletionOr 2021-10-29 21:29:24 +03:00
Idan Horowitz
56e14ba09f LibJS: Convert WeakMapPrototype functions to ThrowCompletionOr 2021-10-29 21:29:24 +03:00