summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2017-04-27 11:09:20 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2022-12-13 16:44:06 +0100
commit3290eb564dd9a0f420ee2d688101ebd9aa2209db (patch)
tree2f9c7522ee4b8f9120d56e4f9a064cdf89f81767
parent5394daee1e902fc393bb08a96cfc8a3b62c66f28 (diff)
downloadqtwebengine-chromium-3290eb564dd9a0f420ee2d688101ebd9aa2209db.tar.gz
Fix building on macOS with Xcode
Fixes various issues were we differ from Google's clang. Task-number: QTBUG-60438 Change-Id: I5a97ba828f7267731e50010c4345caa19bb8939a Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
-rw-r--r--chromium/build/config/compiler/BUILD.gn2
-rw-r--r--chromium/cc/layers/surface_layer.cc2
-rw-r--r--chromium/content/browser/web_contents/web_contents_impl.cc4
-rw-r--r--chromium/device/fido/mac/authenticator.mm1
-rw-r--r--chromium/gin/v8_initializer.cc4
-rw-r--r--chromium/gpu/command_buffer/service/gles2_cmd_decoder.cc2
-rw-r--r--chromium/gpu/command_buffer/service/gles2_cmd_decoder_passthrough.cc2
-rw-r--r--chromium/net/cookies/cookie_monster_change_dispatcher.cc6
-rw-r--r--chromium/net/socket/ssl_server_socket_impl.cc3
-rw-r--r--chromium/net/websockets/websocket_handshake_stream_create_helper.cc2
-rw-r--r--chromium/services/shape_detection/barcode_detection_provider_mac.mm1
-rw-r--r--chromium/services/shape_detection/face_detection_provider_mac.mm1
-rw-r--r--chromium/services/shape_detection/shape_detection_service.cc1
-rw-r--r--chromium/third_party/blink/renderer/bindings/core/v8/referrer_script_info.h2
-rw-r--r--chromium/third_party/blink/renderer/modules/indexeddb/idb_transaction.cc1
-rw-r--r--chromium/third_party/blink/renderer/modules/peerconnection/rtc_peer_connection_handler.cc4
-rw-r--r--chromium/third_party/blink/renderer/platform/image-decoders/jpeg/jpeg_image_decoder.cc2
-rw-r--r--chromium/third_party/blink/renderer/platform/loader/fetch/script_fetch_options.h5
-rw-r--r--chromium/third_party/blink/renderer/platform/media/url_index.cc2
-rw-r--r--chromium/third_party/blink/renderer/platform/wtf/text/wtf_string.h2
-rw-r--r--chromium/third_party/webrtc/modules/desktop_capture/screen_capturer_darwin.mm2
-rw-r--r--chromium/ui/accelerated_widget_mac/ca_renderer_layer_tree.mm1
-rw-r--r--chromium/ui/gfx/mac/io_surface.cc2
23 files changed, 31 insertions, 23 deletions
diff --git a/chromium/build/config/compiler/BUILD.gn b/chromium/build/config/compiler/BUILD.gn
index e34f246438b..bb95b3d9baf 100644
--- a/chromium/build/config/compiler/BUILD.gn
+++ b/chromium/build/config/compiler/BUILD.gn
@@ -569,7 +569,7 @@ config("compiler") {
ldflags += [ "-Wl,-z,keep-text-section-prefix" ]
}
- if (is_clang && !is_nacl && current_os != "zos") {
+ if (is_clang && !is_nacl && current_os != "zos" && !is_qtwebengine) {
cflags += [ "-fcrash-diagnostics-dir=" + clang_diagnostic_dir ]
# TODO(hans): Remove this once Clang generates better optimized debug info
diff --git a/chromium/cc/layers/surface_layer.cc b/chromium/cc/layers/surface_layer.cc
index f85d61cf10f..226d3c9f890 100644
--- a/chromium/cc/layers/surface_layer.cc
+++ b/chromium/cc/layers/surface_layer.cc
@@ -143,7 +143,7 @@ std::unique_ptr<LayerImpl> SurfaceLayer::CreateLayerImpl(
LayerTreeImpl* tree_impl) const {
auto layer_impl = SurfaceLayerImpl::Create(
tree_impl, id(), update_submission_state_callback_.Read(*this));
- return layer_impl;
+ return std::move(layer_impl);
}
bool SurfaceLayer::HasDrawableContent() const {
diff --git a/chromium/content/browser/web_contents/web_contents_impl.cc b/chromium/content/browser/web_contents/web_contents_impl.cc
index e443aa1d2a5..479db72b98d 100644
--- a/chromium/content/browser/web_contents/web_contents_impl.cc
+++ b/chromium/content/browser/web_contents/web_contents_impl.cc
@@ -586,7 +586,7 @@ std::unique_ptr<WebContents> WebContents::CreateWithSessionStorage(
new_contents->Init(params, blink::FramePolicy());
if (outer_web_contents)
outer_web_contents->InnerWebContentsCreated(new_contents.get());
- return new_contents;
+ return std::unique_ptr<WebContents>(new_contents.release());
}
base::CallbackListSubscription
@@ -3028,7 +3028,7 @@ std::unique_ptr<WebContents> WebContentsImpl::Clone() {
tc->GetController().CopyStateFrom(&primary_frame_tree_.controller(), true);
observers_.NotifyObservers(&WebContentsObserver::DidCloneToNewWebContents,
this, tc.get());
- return tc;
+ return std::unique_ptr<WebContents>(tc.release());
}
WebContents* WebContentsImpl::DeprecatedGetWebContents() {
diff --git a/chromium/device/fido/mac/authenticator.mm b/chromium/device/fido/mac/authenticator.mm
index 8b8f7c7c2f7..f791627e262 100644
--- a/chromium/device/fido/mac/authenticator.mm
+++ b/chromium/device/fido/mac/authenticator.mm
@@ -9,6 +9,7 @@
#include "base/bind.h"
#include "base/feature_list.h"
#include "base/logging.h"
+#include "base/mac/mac_util.h"
#include "base/memory/ptr_util.h"
#include "base/strings/string_piece.h"
#include "base/threading/sequenced_task_runner_handle.h"
diff --git a/chromium/gin/v8_initializer.cc b/chromium/gin/v8_initializer.cc
index ec89b58257d..c7fcbcd71ce 100644
--- a/chromium/gin/v8_initializer.cc
+++ b/chromium/gin/v8_initializer.cc
@@ -44,13 +44,11 @@
#include "base/win/windows_version.h"
#endif
-#if defined(V8_USE_EXTERNAL_STARTUP_DATA)
-#if BUILDFLAG(IS_ANDROID)
+#if defined(V8_USE_EXTERNAL_STARTUP_DATA) && BUILDFLAG(IS_ANDROID)
#include "base/android/apk_assets.h"
#elif BUILDFLAG(IS_MAC)
#include "base/mac/foundation_util.h"
#endif
-#endif // V8_USE_EXTERNAL_STARTUP_DATA
namespace gin {
diff --git a/chromium/gpu/command_buffer/service/gles2_cmd_decoder.cc b/chromium/gpu/command_buffer/service/gles2_cmd_decoder.cc
index 87cf5861bf1..8cbda3a3ceb 100644
--- a/chromium/gpu/command_buffer/service/gles2_cmd_decoder.cc
+++ b/chromium/gpu/command_buffer/service/gles2_cmd_decoder.cc
@@ -19445,7 +19445,7 @@ std::unique_ptr<AbstractTexture> GLES2DecoderImpl::CreateAbstractTexture(
base::Unretained(this)));
abstract_textures_.insert(abstract_texture.get());
- return abstract_texture;
+ return std::unique_ptr<AbstractTexture>(abstract_texture.release());
}
void GLES2DecoderImpl::OnAbstractTextureDestroyed(
diff --git a/chromium/gpu/command_buffer/service/gles2_cmd_decoder_passthrough.cc b/chromium/gpu/command_buffer/service/gles2_cmd_decoder_passthrough.cc
index ab2f90ae704..74936b27e17 100644
--- a/chromium/gpu/command_buffer/service/gles2_cmd_decoder_passthrough.cc
+++ b/chromium/gpu/command_buffer/service/gles2_cmd_decoder_passthrough.cc
@@ -1962,7 +1962,7 @@ GLES2DecoderPassthroughImpl::CreateAbstractTexture(GLenum target,
std::make_unique<PassthroughAbstractTextureImpl>(texture, this);
abstract_textures_.insert(abstract_texture.get());
- return abstract_texture;
+ return std::unique_ptr<AbstractTexture>(abstract_texture.release());
}
void GLES2DecoderPassthroughImpl::OnAbstractTextureDestroyed(
diff --git a/chromium/net/cookies/cookie_monster_change_dispatcher.cc b/chromium/net/cookies/cookie_monster_change_dispatcher.cc
index 4c1b532f9f1..c92517f9a7f 100644
--- a/chromium/net/cookies/cookie_monster_change_dispatcher.cc
+++ b/chromium/net/cookies/cookie_monster_change_dispatcher.cc
@@ -158,7 +158,7 @@ CookieMonsterChangeDispatcher::AddCallbackForCookie(
cookie_partition_key, same_party_attribute_enabled_, std::move(callback));
LinkSubscription(subscription.get());
- return subscription;
+ return std::move(subscription);
}
std::unique_ptr<CookieChangeSubscription>
@@ -174,7 +174,7 @@ CookieMonsterChangeDispatcher::AddCallbackForUrl(
same_party_attribute_enabled_, std::move(callback));
LinkSubscription(subscription.get());
- return subscription;
+ return std::move(subscription);
}
std::unique_ptr<CookieChangeSubscription>
@@ -188,7 +188,7 @@ CookieMonsterChangeDispatcher::AddCallbackForAllChanges(
same_party_attribute_enabled_, std::move(callback));
LinkSubscription(subscription.get());
- return subscription;
+ return std::move(subscription);
}
void CookieMonsterChangeDispatcher::DispatchChange(
diff --git a/chromium/net/socket/ssl_server_socket_impl.cc b/chromium/net/socket/ssl_server_socket_impl.cc
index 5ead995848c..af244c3fec1 100644
--- a/chromium/net/socket/ssl_server_socket_impl.cc
+++ b/chromium/net/socket/ssl_server_socket_impl.cc
@@ -934,7 +934,8 @@ SSLServerContextImpl::SSLServerContextImpl(
X509Certificate* certificate,
EVP_PKEY* pkey,
const SSLServerConfig& ssl_server_config)
- : ssl_server_config_(ssl_server_config), cert_(certificate) {
+ : ssl_server_config_(ssl_server_config), cert_(certificate),
+ private_key_(nullptr) {
CHECK(pkey);
pkey_ = bssl::UpRef(pkey);
Init();
diff --git a/chromium/net/websockets/websocket_handshake_stream_create_helper.cc b/chromium/net/websockets/websocket_handshake_stream_create_helper.cc
index 38606f99b72..ed866d36791 100644
--- a/chromium/net/websockets/websocket_handshake_stream_create_helper.cc
+++ b/chromium/net/websockets/websocket_handshake_stream_create_helper.cc
@@ -57,7 +57,7 @@ WebSocketHandshakeStreamCreateHelper::CreateHttp2Stream(
session, connect_delegate_, requested_subprotocols_, extensions, request_,
std::move(dns_aliases));
request_->OnHttp2HandshakeStreamCreated(stream.get());
- return stream;
+ return std::unique_ptr<WebSocketHandshakeStreamBase>(stream.release());
}
} // namespace net
diff --git a/chromium/services/shape_detection/barcode_detection_provider_mac.mm b/chromium/services/shape_detection/barcode_detection_provider_mac.mm
index 4f020b0f2c1..885f0c6ce3a 100644
--- a/chromium/services/shape_detection/barcode_detection_provider_mac.mm
+++ b/chromium/services/shape_detection/barcode_detection_provider_mac.mm
@@ -8,6 +8,7 @@
#include <utility>
#include "base/logging.h"
+#include "base/mac/mac_util.h"
#include "mojo/public/cpp/bindings/pending_receiver.h"
#include "mojo/public/cpp/bindings/self_owned_receiver.h"
#include "services/shape_detection/barcode_detection_impl_mac.h"
diff --git a/chromium/services/shape_detection/face_detection_provider_mac.mm b/chromium/services/shape_detection/face_detection_provider_mac.mm
index 61b1fcb0cfa..50095e22eea 100644
--- a/chromium/services/shape_detection/face_detection_provider_mac.mm
+++ b/chromium/services/shape_detection/face_detection_provider_mac.mm
@@ -7,6 +7,7 @@
#include <memory>
#include <utility>
+#include "base/mac/mac_util.h"
#include "mojo/public/cpp/bindings/pending_receiver.h"
#include "mojo/public/cpp/bindings/self_owned_receiver.h"
#include "services/shape_detection/face_detection_impl_mac.h"
diff --git a/chromium/services/shape_detection/shape_detection_service.cc b/chromium/services/shape_detection/shape_detection_service.cc
index eb051f1adc7..ca2f10ffbf5 100644
--- a/chromium/services/shape_detection/shape_detection_service.cc
+++ b/chromium/services/shape_detection/shape_detection_service.cc
@@ -18,6 +18,7 @@
#endif
#if BUILDFLAG(IS_MAC)
+#include "base/mac/mac_util.h"
#include "services/shape_detection/barcode_detection_provider_mac.h"
#elif BUILDFLAG(IS_ANDROID)
// No C++ code, barcode detection comes from Java.
diff --git a/chromium/third_party/blink/renderer/bindings/core/v8/referrer_script_info.h b/chromium/third_party/blink/renderer/bindings/core/v8/referrer_script_info.h
index 0119624a028..f323657b69b 100644
--- a/chromium/third_party/blink/renderer/bindings/core/v8/referrer_script_info.h
+++ b/chromium/third_party/blink/renderer/bindings/core/v8/referrer_script_info.h
@@ -23,7 +23,7 @@ class CORE_EXPORT ReferrerScriptInfo {
STACK_ALLOCATED();
public:
- ReferrerScriptInfo() {}
+ ReferrerScriptInfo() : nonce_() {}
ReferrerScriptInfo(const KURL& base_url,
network::mojom::CredentialsMode credentials_mode,
const String& nonce,
diff --git a/chromium/third_party/blink/renderer/modules/indexeddb/idb_transaction.cc b/chromium/third_party/blink/renderer/modules/indexeddb/idb_transaction.cc
index bcc266d7574..25094e9d23d 100644
--- a/chromium/third_party/blink/renderer/modules/indexeddb/idb_transaction.cc
+++ b/chromium/third_party/blink/renderer/modules/indexeddb/idb_transaction.cc
@@ -131,6 +131,7 @@ IDBTransaction::IDBTransaction(
open_db_request_(open_db_request),
mode_(mojom::IDBTransactionMode::VersionChange),
durability_(mojom::IDBTransactionDurability::Default),
+ scope_(),
state_(kInactive),
old_database_metadata_(old_metadata),
event_queue_(
diff --git a/chromium/third_party/blink/renderer/modules/peerconnection/rtc_peer_connection_handler.cc b/chromium/third_party/blink/renderer/modules/peerconnection/rtc_peer_connection_handler.cc
index 58168b98601..933c96ca6bc 100644
--- a/chromium/third_party/blink/renderer/modules/peerconnection/rtc_peer_connection_handler.cc
+++ b/chromium/third_party/blink/renderer/modules/peerconnection/rtc_peer_connection_handler.cc
@@ -1775,7 +1775,7 @@ RTCPeerConnectionHandler::AddTrack(
->IncrementStreamCounter();
}
}
- return platform_transceiver;
+ return std::unique_ptr<RTCRtpTransceiverPlatform>(platform_transceiver.release());
}
void RTCPeerConnectionHandler::AddTrackOnSignalingThread(
@@ -1849,7 +1849,7 @@ RTCPeerConnectionHandler::RemoveTrack(blink::RTCRtpSenderPlatform* web_sender) {
}
std::unique_ptr<RTCRtpTransceiverPlatform> platform_transceiver =
std::move(transceiver);
- return platform_transceiver;
+ return std::unique_ptr<RTCRtpTransceiverPlatform>(platform_transceiver.release());
}
void RTCPeerConnectionHandler::RemoveTrackOnSignalingThread(
diff --git a/chromium/third_party/blink/renderer/platform/image-decoders/jpeg/jpeg_image_decoder.cc b/chromium/third_party/blink/renderer/platform/image-decoders/jpeg/jpeg_image_decoder.cc
index 86f6bd5953e..7c106b87568 100644
--- a/chromium/third_party/blink/renderer/platform/image-decoders/jpeg/jpeg_image_decoder.cc
+++ b/chromium/third_party/blink/renderer/platform/image-decoders/jpeg/jpeg_image_decoder.cc
@@ -1201,7 +1201,7 @@ cc::ImageHeaderMetadata JPEGImageDecoder::MakeMetadataForDecodeAcceleration()
// If you need a specific implementation for other J_COLOR_SPACE values,
// please add a full template specialization for this function below.
template <J_COLOR_SPACE colorSpace>
-void SetPixel(ImageFrame::PixelData*, JSAMPARRAY samples, int column) = delete;
+void SetPixel(ImageFrame::PixelData*, JSAMPARRAY samples, int column);
// Used only for debugging with libjpeg (instead of libjpeg-turbo).
template <>
diff --git a/chromium/third_party/blink/renderer/platform/loader/fetch/script_fetch_options.h b/chromium/third_party/blink/renderer/platform/loader/fetch/script_fetch_options.h
index 2394ce624ab..1b77b50ebc6 100644
--- a/chromium/third_party/blink/renderer/platform/loader/fetch/script_fetch_options.h
+++ b/chromium/third_party/blink/renderer/platform/loader/fetch/script_fetch_options.h
@@ -41,7 +41,10 @@ class PLATFORM_EXPORT ScriptFetchOptions final {
// string, parser metadata is "not-parser-inserted", credentials mode is
// "same-origin", and referrer policy is the empty string." [spec text]
ScriptFetchOptions()
- : parser_state_(ParserDisposition::kNotParserInserted),
+ : nonce_(),
+ integrity_metadata_(),
+ integrity_attribute_(),
+ parser_state_(ParserDisposition::kNotParserInserted),
credentials_mode_(network::mojom::CredentialsMode::kSameOrigin),
referrer_policy_(network::mojom::ReferrerPolicy::kDefault),
fetch_priority_hint_(mojom::blink::FetchPriorityHint::kAuto) {}
diff --git a/chromium/third_party/blink/renderer/platform/media/url_index.cc b/chromium/third_party/blink/renderer/platform/media/url_index.cc
index fa203d693e3..f908c39b0df 100644
--- a/chromium/third_party/blink/renderer/platform/media/url_index.cc
+++ b/chromium/third_party/blink/renderer/platform/media/url_index.cc
@@ -37,7 +37,7 @@ std::unique_ptr<MultiBuffer::DataProvider> ResourceMultiBuffer::CreateWriter(
auto writer = std::make_unique<ResourceMultiBufferDataProvider>(
url_data_, pos, is_client_audio_element, task_runner_);
writer->Start();
- return writer;
+ return std::move(writer);
}
bool ResourceMultiBuffer::RangeSupported() const {
diff --git a/chromium/third_party/blink/renderer/platform/wtf/text/wtf_string.h b/chromium/third_party/blink/renderer/platform/wtf/text/wtf_string.h
index aeadc11b699..961d2b10431 100644
--- a/chromium/third_party/blink/renderer/platform/wtf/text/wtf_string.h
+++ b/chromium/third_party/blink/renderer/platform/wtf/text/wtf_string.h
@@ -60,7 +60,7 @@ class WTF_EXPORT String {
public:
// Construct a null string, distinguishable from an empty string.
- String() = default;
+ String() {}
// Construct a string with UTF-16 data.
String(const UChar* characters, unsigned length);
diff --git a/chromium/third_party/webrtc/modules/desktop_capture/screen_capturer_darwin.mm b/chromium/third_party/webrtc/modules/desktop_capture/screen_capturer_darwin.mm
index d5a7bb0522b..72b7661ab07 100644
--- a/chromium/third_party/webrtc/modules/desktop_capture/screen_capturer_darwin.mm
+++ b/chromium/third_party/webrtc/modules/desktop_capture/screen_capturer_darwin.mm
@@ -27,7 +27,7 @@ std::unique_ptr<DesktopCapturer> DesktopCapturer::CreateRawScreenCapturer(
return nullptr;
}
- return capturer;
+ return std::move(capturer);
}
} // namespace webrtc
diff --git a/chromium/ui/accelerated_widget_mac/ca_renderer_layer_tree.mm b/chromium/ui/accelerated_widget_mac/ca_renderer_layer_tree.mm
index 780dc7ab88b..efc05b2a2e7 100644
--- a/chromium/ui/accelerated_widget_mac/ca_renderer_layer_tree.mm
+++ b/chromium/ui/accelerated_widget_mac/ca_renderer_layer_tree.mm
@@ -14,6 +14,7 @@
#include "base/command_line.h"
#include "base/feature_list.h"
#include "base/logging.h"
+#include "base/mac/mac_util.h"
#include "base/mac/foundation_util.h"
#include "base/metrics/histogram_functions.h"
#include "base/trace_event/trace_event.h"
diff --git a/chromium/ui/gfx/mac/io_surface.cc b/chromium/ui/gfx/mac/io_surface.cc
index d346af4fa91..85ae672213e 100644
--- a/chromium/ui/gfx/mac/io_surface.cc
+++ b/chromium/ui/gfx/mac/io_surface.cc
@@ -169,7 +169,7 @@ bool IOSurfaceSetColorSpace(IOSurfaceRef io_surface,
// also not available in some SDK versions.
// https://crbug.com/1101041: Introduces the HDR copier.
// https://crbug.com/1061723: Discussion of issues related to HLG.
- if (__builtin_available(macos 10.15, *)) {
+ if (base::mac::IsAtLeastOS10_15()) {
if (color_space == ColorSpace(ColorSpace::PrimaryID::BT2020,
ColorSpace::TransferID::PQ,
ColorSpace::MatrixID::BT2020_NCL,