Backport another GCC build fix

epel8
Tomas Popela 5 years ago
parent c8be01a2e6
commit 247c850861

@ -0,0 +1,61 @@
From f08cb0022527081c078e8b96062e6c9b4fbda151 Mon Sep 17 00:00:00 2001
From: Jose Dapena Paz <jose.dapena@lge.com>
Date: Fri, 26 Jul 2019 16:48:06 +0000
Subject: [PATCH] BinaryUploadService: change parameter passing that cannot afford abstract class
The method UploadForDeepScanning gets a Request as parameter. But Request is an
abstract class, so GCC will not allow that declaration (polimorphycs should be
passed by reference). Use std::unique_ptr so BinaryUploadService can assume
ownership.
Bug: 819294
Change-Id: I9e8c75cc92b01abd704d9049b0421555377da5ba
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1713550
Reviewed-by: Daniel Rubery <drubery@chromium.org>
Commit-Queue: José Dapena Paz <jose.dapena@lge.com>
Cr-Commit-Position: refs/heads/master@{#681333}
---
diff --git a/chrome/browser/safe_browsing/download_protection/binary_upload_service.cc b/chrome/browser/safe_browsing/download_protection/binary_upload_service.cc
index 6430c89..4e90487 100644
--- a/chrome/browser/safe_browsing/download_protection/binary_upload_service.cc
+++ b/chrome/browser/safe_browsing/download_protection/binary_upload_service.cc
@@ -10,7 +10,7 @@
namespace safe_browsing {
void BinaryUploadService::UploadForDeepScanning(
- BinaryUploadService::Request request) {
+ std::unique_ptr<BinaryUploadService::Request> request) {
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
NOTREACHED();
}
diff --git a/chrome/browser/safe_browsing/download_protection/binary_upload_service.h b/chrome/browser/safe_browsing/download_protection/binary_upload_service.h
index d2dfd83..9b6f395 100644
--- a/chrome/browser/safe_browsing/download_protection/binary_upload_service.h
+++ b/chrome/browser/safe_browsing/download_protection/binary_upload_service.h
@@ -5,6 +5,8 @@
#ifndef CHROME_BROWSER_SAFE_BROWSING_DOWNLOAD_PROTECTION_BINARY_UPLOAD_SERVICE_H_
#define CHROME_BROWSER_SAFE_BROWSING_DOWNLOAD_PROTECTION_BINARY_UPLOAD_SERVICE_H_
+#include <memory>
+
#include "base/callback.h"
#include "components/safe_browsing/proto/webprotect.pb.h"
@@ -40,6 +42,7 @@
public:
// |callback| will run on the UI thread.
explicit Request(Callback callback);
+ virtual ~Request() = default;
Request(const Request&) = delete;
Request& operator=(const Request&) = delete;
@@ -67,7 +70,7 @@
// Upload the given file contents for deep scanning. The results will be
// returned asynchronously by calling |request|'s |callback|. This must be
// called on the UI thread.
- void UploadForDeepScanning(Request request);
+ void UploadForDeepScanning(std::unique_ptr<Request> request);
};
} // namespace safe_browsing

@ -279,6 +279,8 @@ Patch66: chromium-77.0.3865.75-gcc-include-memory.patch
Patch67: chromium-77.0.3865.75-base-gcc-no-alignas.patch
# https://chromium.googlesource.com/chromium/src/+/27e25336b8316ff3ec4e464058682ed85801fd06
Patch68: chromium-77.0.3865.75-harfbuzz-subset.patch
# https://chromium.googlesource.com/chromium/src.git/+/f08cb0022527081c078e8b96062e6c9b4fbda151
Patch69: chromium-77.0.3865.75-gcc-abstract-class.patch
# Apply these changes to work around EPEL7 compiler issues
Patch100: chromium-62.0.3202.62-kmaxskip-constexpr.patch
@ -843,6 +845,7 @@ udev.
%patch66 -p1 -b .gcc-include-memory
%patch67 -p1 -b .base-gcc-no-alignas
%patch68 -p1 -b .harfbuzz-subset
%patch69 -p1 -b .gcc-abstract-class
# EPEL specific patches
%if 0%{?rhel} == 7

Loading…
Cancel
Save