- 
                Notifications
    You must be signed in to change notification settings 
- Fork 3.3k
Cherry-pick 6 pull requests and 5 commits from Ladybird #26320
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
239bb02    to
    73a3a1b      
    Compare
  
    | From CI: I don't think that's something I've seen happen before (on CI or otherwise), but I'm also not sure which of these commits could lead to that happening. | 
| Can you repro locally and bisect? | 
| The backing store stuff isn't really needed for us, but I suppose it also doesn't hurt. The module map is I think for swift interop, but I suppose it also doesn't hurt. | 
| 
 Unfortunately, I couldn't repro this locally (all tests pass without any trouble on macOS even with UBSan + ASan). I could try this on Linux later, but that'll be some time away. 
 Yeah, I was just picking these fairly generously in case any of this helps with future cherry-picks. Though aren't (some of) the backing store changes needed for 386 on our side (based on the discussion in that PR)? At least that part seems to pass CI here now as well. | 
| Cherry-picking be2c484 seems to cause the following (non-fatal) diagnostics to be printed when running the pattern-from-video.html test on Linux: (this also seems to have happened in CI). I still couldn't replicate the invalid downcast though. | 
I forgot to include any when these we added in c972257.
By moving this up to ConnectionBase, we have less custom code for each templated subclass, and it gets a little easier to edit the code since you don't have to rebuild as much when making changes. (cherry picked from commit 6d9c4d8)
(cherry picked from commit 4fe21e6; amended to add missing includes to various serenity components)
(cherry picked from commit cf0912c)
(cherry picked from commit eba33b9)
This makes it consistent with other commands. (cherry picked from commit 877adcc)
This change makes all the pre-commit CI scripts runnable under Bash 3.2, by replacing “mapfile” invocations in them code that first explicitly creates an array, and then uses a while loop to populate the array. Otherwise, without this change, the scripts all fail to run under Bash 3.2 — due to lack of support for “mapfile”. Fixes LadybirdBrowser/ladybird#283 This also drops bash from the list of homebrew dependencies in the build instructions — because with this change, homebrew bash (v4) is no longer needed; things will now work with the Apple-provided bash (v3.2) (cherry picked from commit 570814a)
See: - whatwg/html@b2fdca1 (cherry picked from commit bab0866)
When adding tests for `ThreadPool` a handful of deadlocks can be observed when worker threads wait on `m_work_available`. The first deadlock is in the destruction of `ThreadPool` where it is possible for a worker thread to be in the process of acquiring `m_mutex` when the broadcast to `m_work_available` in the destructor happens. This causes the destructor to hang on joining the thread which is now perpetually waiting on `m_work_available`. This is solved by repeatedly broadcasting on `m_work_available` until the thread to join exits. The second deadlock occurs when the final signal to `m_work_done` is missed by the wait in `wait_for_all`. At this point all workers are in the hot loop of attempting to get work from the work queue, however since there is no work remaining all workers end up waiting on `m_work_available`. At this point the `wait_for_all` call is also waiting on `m_work_done`, which will never be signalled again as all workers are waiting on `m_work_available`. This requires 2 changes to fix, the first is that workers will signal `m_done_work` before waiting on `m_work_available`. The second change is to acquire `m_mutex` before checking the wait conditions as done when using `wait_while`. (cherry picked from commit a0fd7cf)
The `ThreadPoolLooper` should increment `m_busy_count` before attempting to access the global queue. Otherwise, there exists a possible race condition where `wait_for_all` checks the exit conditions before the looper increments `m_busy_count` but after it empties the `ThreadPool` queue. Next, incrementing / decrementing `m_busy_count` is moved to be the responsibility of `ThreadPoolLooper`. Otherwise, it is possible that decrementing `m_busy_count` in the caller of `Looper::next` causes `m_busy_count` to underflow if the call to `Looper::next` returns before incrementing `m_busy_count`. (cherry picked from commit 8d336d2)
This causes issues when loading the file into a clang module, such as when using Core::MachPort from Objective-C or Swift. (cherry picked from commit 422f1ed)
NavigatorBeaconMixin doesn't even need to know about Navigator (cherry picked from commit 35f4b8b)
The PageClient for SVGDecodedImageData needs to actually have the definition of PageClient available in order to inherit from it. This fixes importing this header from Objective-C or Swift. (cherry picked from commit e45b7b0)
On macOS, the first time TabBar::tabSizeHint is called, the count is reportedly zero, and results in a floating point exception on x64. (cherry picked from commit cbf1fd3)
Fixes an issue where old prices were not displayed with strike-through text on the PlayStation store. :^) (cherry picked from commit 8a6c8a1)
(cherry picked from commit 1b8c0cd)
(cherry picked from commit 74e12a9)
73a3a1b    to
    785fa6c      
    Compare
  
    | Removed the backing store / IOSurface changes. Those kind of cause unnecessary trouble, and we won't really be able to cherry-pick most painting-related commits without conflicts anyway. | 
| Thanks! | 
PRs cherry-picked:
LadybirdBrowser/ladybird#303 (except for the first commit)
LadybirdBrowser/ladybird#277LadybirdBrowser/ladybird#386LadybirdBrowser/ladybird#664
LadybirdBrowser/ladybird#1029
LadybirdBrowser/ladybird#929 (except for the last commit; the test was flaky, took a while to run, and was eventually removed along with the rest of
LibThreading)LadybirdBrowser/ladybird#1265 (manually rebaselined)
LadybirdBrowser/ladybird#1308 (manually rebaselined)
Commits cherry-picked:
be2c484e37071ac92f8abc62cc91eba33b9
877adcc
35f4b8b
e45b7b0
cbf1fd3
Also added more PRs and commits to
Meta/lb-cherry-picks.pyagain (and fixed up a mistake from last time).I feel like at this point the main thing that's blocking a lot of cherry-picks from LibWeb is the
DisplayListPlayer{GPU,CPU}situation, with neither of those existing upstream anymore. I guess we'd need to mirror changes made toDisplayListPlayerSkiain the players that we do have (though the GPU-accelerated player is already somewhat limited as-is) in order to properly cherry-pick any of the more involved painting-related commits (or those that depend on such commits; this has pretty heavy knock-on effects).