Commit graph

25180 commits

Author SHA1 Message Date
Linus Groh
b7b23d05d5 LibJS: Implement Temporal.ZonedDateTime.prototype.getISOFields() 2021-08-05 23:15:27 +01:00
Linus Groh
82ab5da4db LibJS: Implement Temporal.ZonedDateTime.prototype.toPlainDateTime() 2021-08-05 23:15:27 +01:00
Linus Groh
6ce631b023 LibJS: Implement Temporal.ZonedDateTime.prototype.toPlainTime() 2021-08-05 23:15:27 +01:00
Linus Groh
b4ea4e86a7 LibJS: Implement Temporal.ZonedDateTime.prototype.toPlainDate() 2021-08-05 23:15:27 +01:00
Linus Groh
96a0c201d5 LibJS: Implement Temporal.ZonedDateTime.prototype.toInstant() 2021-08-05 23:15:27 +01:00
Linus Groh
20300bd7c4 LibJS: Implement Temporal.ZonedDateTime.prototype.valueOf() 2021-08-05 23:15:27 +01:00
Idan Horowitz
3e909c0c49 Kernel: Remove double-counting of allocated pages in AnonymousVMObject
When constructing an AnonymousVMObject with the AllocateNow allocation
strategy we accidentally allocated the committed pages directly through
MemoryManager instead of taking them from our m_unused_physical_pages
CommittedPhysicalPageSet, which meant they were counted as allocated in
MemoryManager, but were still counted as unallocated in the PageSet,
who would then try to uncommit them on destruction, resulting in a
failed assertion.

To help prevent similar issues in the future a Badge<T> was added to
MM::allocate_committed_user_physical_page to prevent allocation of
commited pages not via a CommittedPhysicalPageSet.
2021-08-05 20:26:47 +02:00
K-Adam
e8d10fb429 LibWeb: Ignore svg elements outside of <svg> when building layout tree
An svg layout element without a `SVGSVGElement` ancestor caused a failed
assertion before, because the svg context does not exist when `paint()`
is called
2021-08-05 20:17:08 +02:00
K-Adam
758d816b23 LibWeb: Clear SVG context after SVGSVGBox children are painted 2021-08-05 20:17:08 +02:00
K-Adam
eb1578e7c8 LibWeb: Call before/after children_paint on parent in StackingContext
When it is called inside `box.for_each_child`, then it may not be called
for the root element. By missing `SVGSVGBox::before_children_paint`
the svg context is not created
2021-08-05 20:17:08 +02:00
Mandar Kulkarni
566702ffa2 Meta: Fix wrong path for AK Tests in check-ak-test-files.sh 2021-08-05 19:58:55 +02:00
Linus Groh
6c345c8107 LibJS: Implement Temporal.ZonedDateTime.prototype.offset 2021-08-05 19:19:40 +02:00
Linus Groh
f937e9b966 LibJS: Implement Temporal.ZonedDateTime.prototype.offsetNanoseconds 2021-08-05 19:19:40 +02:00
Linus Groh
dd36593c72 LibJS: Implement Temporal.ZonedDateTime.prototype.inLeapYear 2021-08-05 19:19:40 +02:00
Linus Groh
5a7db1b5f4 LibJS: Implement Temporal.ZonedDateTime.prototype.monthsInYear 2021-08-05 19:19:40 +02:00
Linus Groh
204ba01416 LibJS: Implement Temporal.ZonedDateTime.prototype.daysInYear 2021-08-05 19:19:40 +02:00
Linus Groh
6007fc4804 LibJS: Implement Temporal.ZonedDateTime.prototype.daysInMonth 2021-08-05 19:19:40 +02:00
Linus Groh
d89d55a7a3 LibJS: Implement Temporal.ZonedDateTime.prototype.daysInWeek 2021-08-05 19:19:40 +02:00
Linus Groh
540fdbcf5b LibJS: Implement Temporal.ZonedDateTime.prototype.weekOfYear 2021-08-05 19:19:40 +02:00
Linus Groh
d20a4fe43e LibJS: Implement Temporal.ZonedDateTime.prototype.dayOfYear 2021-08-05 19:19:40 +02:00
Linus Groh
39e67a5823 LibJS: Implement Temporal.ZonedDateTime.prototype.dayOfWeek 2021-08-05 19:19:40 +02:00
Linus Groh
f86bbb7a71 LibJS: Implement Temporal.ZonedDateTime.prototype.epochNanoseconds 2021-08-05 19:19:40 +02:00
Linus Groh
62294d62c5 LibJS: Implement Temporal.ZonedDateTime.prototype.epochMicroseconds 2021-08-05 19:19:40 +02:00
Linus Groh
a9162b7e98 LibJS: Implement Temporal.ZonedDateTime.prototype.epochMilliseconds 2021-08-05 19:19:40 +02:00
Linus Groh
47135af987 LibJS: Implement Temporal.ZonedDateTime.prototype.epochSeconds 2021-08-05 19:19:40 +02:00
Linus Groh
a1082412ef LibJS: Implement Temporal.ZonedDateTime.prototype.nanosecond 2021-08-05 19:19:40 +02:00
Linus Groh
4b22d0f2ce LibJS: Implement Temporal.ZonedDateTime.prototype.microsecond 2021-08-05 19:19:40 +02:00
Linus Groh
752b3eb0c0 LibJS: Implement Temporal.ZonedDateTime.prototype.millisecond 2021-08-05 19:19:40 +02:00
Linus Groh
9d9ab492df LibJS: Implement Temporal.ZonedDateTime.prototype.second 2021-08-05 19:19:40 +02:00
Linus Groh
a6775517ad LibJS: Implement Temporal.ZonedDateTime.prototype.minute 2021-08-05 19:19:40 +02:00
Linus Groh
32f1e17e71 LibJS: Implement Temporal.ZonedDateTime.prototype.hour 2021-08-05 19:19:40 +02:00
Linus Groh
0580f102e4 LibJS: Implement Temporal.ZonedDateTime.prototype.day 2021-08-05 19:19:40 +02:00
Linus Groh
30e27f6483 LibJS: Implement Temporal.ZonedDateTime.prototype.monthCode 2021-08-05 19:19:40 +02:00
Linus Groh
fd18dc782f LibJS: Implement Temporal.ZonedDateTime.prototype.month 2021-08-05 19:19:40 +02:00
Linus Groh
b8ac31500c LibJS: Implement Temporal.ZonedDateTime.prototype.year 2021-08-05 19:19:40 +02:00
Linus Groh
e036f4a786 LibJS: Make regulate_iso_date() and iso_date_from_fields() use ISODate
No need for TemporalDate, we don't use the calendar field here anyway.
2021-08-05 19:19:40 +02:00
Andreas Kling
dd58d0f650 Kernel: Uncommit a shared COW page when discovering it was unshared
When we hit a COW fault and discover than no other process is sharing
the physical page, we simply remap it r/w and save ourselves the
trouble. When this happens, we can also give back (uncommit) one of our
shared committed COW pages, since we won't be needing it.

We had this optimization before, but I mistakenly removed it in
50472fd69f since I had misunderstood
it to be the reason for a panic.
2021-08-05 17:41:58 +02:00
Andreas Kling
843d0d0d15 Kernel: Detach AnonymousVMObject from shared COW pages set once emptied
We currently overcommit for COW when forking a process and cloning its
memory regions. Both the parent and child process share a set of.
committed COW pages.

If there's COW sharing across more than two processeses within a lineage
(e.g parent, child & grandchild), it's possible to exhaust these pages.
When the shared set is emptied, the next COW fault in each process must
detach from the shared set and fall back to on demand allocation.

This patch makes sure that we detach from the shared set once we
discover it to be empty (during COW fault handling). This fixes an issue
where we'd try to allocate from an exhausted shared set while building
GNU binutils inside SerenityOS.
2021-08-05 17:41:58 +02:00
Andreas Kling
89a9ae7d0c Kernel: Handle AnonymousVMObject allocation failure when forking
Thanks to all the RAII, AnonymousVMObject::try_clone() can now
gracefully handle allocation failure.
2021-08-05 17:41:58 +02:00
Andreas Kling
0672163840 Kernel: Simplify AnonymousVMObject copy constructor
It was doing a bunch of things it didn't need to do. I think we had
misunderstood the base class as having copied m_lock in its copy
constructor but it's actually default initialized.
2021-08-05 17:41:58 +02:00
Andreas Kling
fa627c1eb2 Kernel: Use RAII to manage committed physical pages
We had issues with committed physical pages getting miscounted in some
situations, and instead of figuring out what was going wrong and making
sure all the commits had matching uncommits, this patch makes the
problem go away by adding an RAII class to manage this instead. :^)

MemoryManager::commit_user_physical_pages() now returns an (optional)
CommittedPhysicalPageSet. You can then allocate pages from the page set
by calling take_one() on it. Any unallocated pages are uncommitted upon
destruction of the page set.
2021-08-05 17:41:58 +02:00
Andreas Kling
ec49213f7b Kernel: Add MemoryManager to Forward.h 2021-08-05 17:41:58 +02:00
Jamie Mansfield
506363c08d Solitaire: Clear selection when starting new game
Fixes #9218.
2021-08-05 12:52:33 +02:00
Jamie Mansfield
22aeec1218 Spider: Clear selection when starting new game
Fixes #9217.
2021-08-05 12:52:33 +02:00
Karol Kosek
64ca51265d Assistant: Quit the application after losing focus
Prior to this change, Assistant would just stay in the background,
unless one pressed an Escape key or launched some app.
2021-08-05 11:43:12 +02:00
Karol Kosek
ac21c6625d LibGUI: Add on_active_window_change function object to the Window class 2021-08-05 11:43:12 +02:00
brapru
a037e0ffec Utilities: Improve the arp information output
This updates the arp command to use output styles similar to other
utilities.
2021-08-05 09:30:35 +02:00
brapru
3bd6905ea8 Utilities: Add pledge and unveil protections in arp 2021-08-05 09:30:35 +02:00
Gunnar Beutner
d9d2287a11 Meta: Detect nested KVM support for WSL2 and use that when available
This allows running QEMU inside WSL2 for hosts which have nested KVM
and WSLg support (e.g. Windows 11).

Running QEMU inside the WSL2 VM is slightly slower than running QEMU
on Windows, probably because of how WSLg handles screen updates.
2021-08-04 21:15:41 +02:00
Gunnar Beutner
723c89af67 Meta: Automatically enable WHPX when possible 2021-08-04 21:15:41 +02:00