Skip to content
This repository has been archived by the owner on Sep 13, 2023. It is now read-only.

Commit

Permalink
additional patches for chromium-110
Browse files Browse the repository at this point in the history
Signed-off-by: Stephan Hartmann <[email protected]>
  • Loading branch information
stha09 committed Jan 7, 2023
1 parent 26a0471 commit 944cfe6
Show file tree
Hide file tree
Showing 2 changed files with 100 additions and 0 deletions.
26 changes: 26 additions & 0 deletions chromium-110-Presenter-include.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
From c69b818a9fce2bf0fb81b280d6f4cc15e6fdb8af Mon Sep 17 00:00:00 2001
From: Stephan Hartmann <[email protected]>
Date: Fri, 16 Dec 2022 17:13:43 +0000
Subject: [PATCH] GCC: fix incomplete type of gl::Presenter

GCC requires full definition of gl::Presenter for return type
of gl::GLOzoneEGL::CreateGLContext() with base::scoped_refptr.
---
ui/ozone/common/gl_ozone_egl.cc | 1 +
1 file changed, 1 insertion(+)

diff --git a/ui/ozone/common/gl_ozone_egl.cc b/ui/ozone/common/gl_ozone_egl.cc
index 9b1d37e..e745dd7 100644
--- a/ui/ozone/common/gl_ozone_egl.cc
+++ b/ui/ozone/common/gl_ozone_egl.cc
@@ -13,6 +13,7 @@
#include "ui/gl/gl_share_group.h"
#include "ui/gl/gl_surface.h"
#include "ui/gl/gl_utils.h"
+#include "ui/gl/presenter.h"

namespace ui {

--
2.37.4

74 changes: 74 additions & 0 deletions chromium-110-StorageQueue-decltype.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
From 200fc7c3ec95bc86f6afb55ca3c691e923463104 Mon Sep 17 00:00:00 2001
From: Leonid Baraz <[email protected]>
Date: Mon, 19 Dec 2022 21:46:04 +0000
Subject: [PATCH] GCC: fix usage of decltype in reporting::StorageQueue

GCC does not allow to use decltype for the default value of
a function parameter.

Bug: 819294
Change-Id: I7ebb255634375ce889933f8b67acb10f0e56ca8d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4111548
Reviewed-by: Leonid Baraz <[email protected]>
Commit-Queue: Leonid Baraz <[email protected]>
Reviewed-by: Hong Xu <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1085129}
---

diff --git a/components/reporting/storage/storage_queue.cc b/components/reporting/storage/storage_queue.cc
index c546d55a..49e0f2c 100644
--- a/components/reporting/storage/storage_queue.cc
+++ b/components/reporting/storage/storage_queue.cc
@@ -203,7 +203,6 @@
encryption_module_(encryption_module),
compression_module_(compression_module) {
DETACH_FROM_SEQUENCE(storage_queue_sequence_checker_);
- DCHECK(write_contexts_queue_.empty());
}

StorageQueue::~StorageQueue() {
@@ -2133,9 +2132,7 @@
}

void StorageQueue::TestInjectErrorsForOperation(
- base::RepeatingCallback<
- Status(test::StorageQueueOperationKind operation_kind, int64_t)>
- handler) {
+ test::ErrorInjectionHandlerType handler) {
test_injection_handler_ = handler;
}

diff --git a/components/reporting/storage/storage_queue.h b/components/reporting/storage/storage_queue.h
index 39edd8b..04d5f9f 100644
--- a/components/reporting/storage/storage_queue.h
+++ b/components/reporting/storage/storage_queue.h
@@ -52,6 +52,9 @@
kWriteLowDiskSpace,
};

+using ErrorInjectionHandlerType =
+ base::RepeatingCallback<Status(test::StorageQueueOperationKind, int64_t)>;
+
} // namespace test

// Storage queue represents single queue of data to be collected and stored
@@ -142,8 +145,7 @@
// can be returned as a resulting operation status too.
// If `handler` is null, error injections is disabled.
void TestInjectErrorsForOperation(
- base::RepeatingCallback<Status(test::StorageQueueOperationKind, int64_t)>
- handler = decltype(handler)());
+ test::ErrorInjectionHandlerType handler = base::NullCallback());

// Access queue options.
const QueueOptions& options() const { return options_; }
@@ -492,8 +494,7 @@
// Test only: records callback to be invoked. It will be called with operation
// kind and seq id, and will return Status (non-OK status indicates the
// failure to be injected). In production code must be null.
- base::RepeatingCallback<Status(test::StorageQueueOperationKind, int64_t)>
- test_injection_handler_;
+ test::ErrorInjectionHandlerType test_injection_handler_{base::NullCallback()};

// Weak pointer factory (must be last member in class).
base::WeakPtrFactory<StorageQueue> weakptr_factory_{this};

0 comments on commit 944cfe6

Please sign in to comment.