From 132e6a5f0cf0e7412dce1b129f0c624c2de2708c Mon Sep 17 00:00:00 2001 From: Jelle Foks Date: Tue, 16 Jan 2024 09:04:05 -0800 Subject: [PATCH] Address comments --- .../absl/base/internal/raw_logging.cc | 1 + .../absl/base/internal/spinlock_starboard.inc | 8 +-- .../absl/container/inlined_vector_test.cc | 2 +- .../abseil-cpp/absl/log/check_test_impl.h | 4 +- .../absl/log/internal/stderr_log_sink_test.cc | 4 +- .../abseil-cpp/absl/synchronization/BUILD.gn | 4 ++ third_party/boringssl/BUILD.generated.gni | 15 +++-- third_party/chromium/media/BUILD.gn | 64 +++++++++++-------- 8 files changed, 61 insertions(+), 41 deletions(-) diff --git a/third_party/abseil-cpp/absl/base/internal/raw_logging.cc b/third_party/abseil-cpp/absl/base/internal/raw_logging.cc index 90e797f9d64c..f7ce36d185cc 100644 --- a/third_party/abseil-cpp/absl/base/internal/raw_logging.cc +++ b/third_party/abseil-cpp/absl/base/internal/raw_logging.cc @@ -30,6 +30,7 @@ #if defined(STARBOARD) #include "starboard/log.h" #endif + // We know how to perform low-level writes to stderr in POSIX and Windows. For // these platforms, we define the token ABSL_LOW_LEVEL_WRITE_SUPPORTED. // Much of raw_logging.cc becomes a no-op when we can't output messages, diff --git a/third_party/abseil-cpp/absl/base/internal/spinlock_starboard.inc b/third_party/abseil-cpp/absl/base/internal/spinlock_starboard.inc index d39a33f82a88..1c43df4585c4 100644 --- a/third_party/abseil-cpp/absl/base/internal/spinlock_starboard.inc +++ b/third_party/abseil-cpp/absl/base/internal/spinlock_starboard.inc @@ -1,18 +1,18 @@ -// Copyright 2017 The Abseil Authors. +// Copyright 2024 The Cobalt Authors. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// -// This file is a Posix-specific part of spinlock_wait.cc + +// This file is a Starboard-specific part of spinlock_wait.cc #if defined(STARBOARD) #include "starboard/thread.h" diff --git a/third_party/abseil-cpp/absl/container/inlined_vector_test.cc b/third_party/abseil-cpp/absl/container/inlined_vector_test.cc index 6f3aedae2299..fd89f2d030b6 100644 --- a/third_party/abseil-cpp/absl/container/inlined_vector_test.cc +++ b/third_party/abseil-cpp/absl/container/inlined_vector_test.cc @@ -196,7 +196,7 @@ TEST(IntVec, PopBackNoOverflow) { EXPECT_EQ(v.size(), 0u); } -// ABSL_BASE_INTERNAL_EXPECT_FAIL doesn't work (yet) for +// TODO(b/320478127): ABSL_BASE_INTERNAL_EXPECT_FAIL doesn't work (yet) for // googletest in Cobalt. #if !defined(STARBOARD) TEST(IntVec, AtThrows) { diff --git a/third_party/abseil-cpp/absl/log/check_test_impl.h b/third_party/abseil-cpp/absl/log/check_test_impl.h index 25d8d5a373b6..d71ee58d28cc 100644 --- a/third_party/abseil-cpp/absl/log/check_test_impl.h +++ b/third_party/abseil-cpp/absl/log/check_test_impl.h @@ -511,8 +511,8 @@ TEST(CHECKTest, TestCheckInMethod) { v.MethodWithCheck(1); } -// EXPECT_DEATH_IF_SUPPORTED() doesn't work with HasSubstr() (yet) for -// googletest in Cobalt. +// TODO(b/320478127): EXPECT_DEATH_IF_SUPPORTED() doesn't work with HasSubstr() +// (yet) for googletest in Cobalt. #if !defined(STARBOARD) TEST(CHECKDeathTest, TestUserDefinedStreaming_DISABLED) { diff --git a/third_party/abseil-cpp/absl/log/internal/stderr_log_sink_test.cc b/third_party/abseil-cpp/absl/log/internal/stderr_log_sink_test.cc index dd9e46946a0b..6efb3b843a8e 100644 --- a/third_party/abseil-cpp/absl/log/internal/stderr_log_sink_test.cc +++ b/third_party/abseil-cpp/absl/log/internal/stderr_log_sink_test.cc @@ -74,8 +74,8 @@ TEST(StderrLogSinkDeathTest, ErrorMessagesInStderr) { "ERROR message"); } -// EXPECT_DEATH_IF_SUPPORTED() doesn't work with AllOf() (yet) for googletest -// in Cobalt. +// TODO(b/320478127): EXPECT_DEATH_IF_SUPPORTED() doesn't work with AllOf() +// (yet) for googletest in Cobalt. #if !defined(STARBOARD) TEST(StderrLogSinkDeathTest, FatalMessagesInStderr_DISBALED) { diff --git a/third_party/abseil-cpp/absl/synchronization/BUILD.gn b/third_party/abseil-cpp/absl/synchronization/BUILD.gn index 252b59fff3e6..d8803b4699c0 100644 --- a/third_party/abseil-cpp/absl/synchronization/BUILD.gn +++ b/third_party/abseil-cpp/absl/synchronization/BUILD.gn @@ -42,6 +42,8 @@ absl_test("kernel_timeout_internal_test") { } absl_source_set("synchronization") { + # Synchronization is not Starboardized since at this time it's banned for use + # in Chromium code. if (!use_cobalt_customizations) { sources = [ "barrier.cc", @@ -92,6 +94,8 @@ absl_source_set("synchronization") { } absl_test("waiter_test") { + # Synchronization is not Starboardized since at this time it's banned for use + # in Chromium code. if (!use_cobalt_customizations) { sources = [ "internal/waiter_test.cc" ] deps = [ diff --git a/third_party/boringssl/BUILD.generated.gni b/third_party/boringssl/BUILD.generated.gni index d740b0f2d993..09faf169dae5 100644 --- a/third_party/boringssl/BUILD.generated.gni +++ b/third_party/boringssl/BUILD.generated.gni @@ -40,11 +40,14 @@ crypto_sources = [ "src/crypto/base64/base64.c", "src/crypto/bio/bio.c", "src/crypto/bio/bio_mem.c", + "src/crypto/bio/connect.c", + "src/crypto/bio/fd.c", "src/crypto/bio/file.c", "src/crypto/bio/hexdump.c", "src/crypto/bio/internal.h", "src/crypto/bio/pair.c", "src/crypto/bio/printf.c", + "src/crypto/bio/socket.c", "src/crypto/bio/socket_helper.c", "src/crypto/bn_extra/bn_asn1.c", "src/crypto/bn_extra/convert.c", @@ -273,12 +276,12 @@ crypto_sources = [ "src/third_party/fiat/p256_64.h", ] -if (is_native_target_build) { -crypto_sources += [ - "src/crypto/bio/connect.c", - "src/crypto/bio/fd.c", - "src/crypto/bio/socket.c", -] +if (is_starboard) { + crypto_sources -= [ + "src/crypto/bio/connect.c", + "src/crypto/bio/fd.c", + "src/crypto/bio/socket.c", + ] } crypto_headers = [ diff --git a/third_party/chromium/media/BUILD.gn b/third_party/chromium/media/BUILD.gn index 44c46e1476de..62acc411b9a8 100644 --- a/third_party/chromium/media/BUILD.gn +++ b/third_party/chromium/media/BUILD.gn @@ -18,6 +18,7 @@ config("media_config") { cflags = [ "/wd4267", # Conversion from 'size_t' to 'type', possible loss of data. "/wd4715", # Not all control paths return a value. + # Conversion from 'size_t' to 'int' requires a narrowing conversion. "/wd4838", ] @@ -34,11 +35,21 @@ config("media_config") { config("media_config_public") { # TODO: Make include_dirs other than the first one private. - include_dirs = [ "//third_party/abseil-cpp", "..", "cobalt", "../../skia" ] + include_dirs = [ + "//third_party/abseil-cpp", + "..", + "cobalt", + "../../skia", + ] } config("external_config") { - include_dirs = [ "//third_party/abseil-cpp", "..", "cobalt", "../../skia" ] + include_dirs = [ + "//third_party/abseil-cpp", + "..", + "cobalt", + "../../skia", + ] } component("media") { @@ -63,10 +74,10 @@ component("media") { "base/decrypt_config.h", "base/demuxer.cc", "base/demuxer.h", + "base/demuxer_memory_limit.h", "base/demuxer_memory_limit_starboard.cc", "base/demuxer_stream.cc", "base/demuxer_stream.h", - "base/demuxer_memory_limit.h", "base/encryption_pattern.cc", "base/encryption_pattern.h", "base/encryption_scheme.cc", @@ -78,10 +89,10 @@ component("media") { "base/media_track.h", "base/media_tracks.cc", "base/media_tracks.h", - "base/media_util.cc", - "base/media_util.h", "base/media_url_params.cc", "base/media_url_params.h", + "base/media_util.cc", + "base/media_util.h", "base/mime_util.cc", "base/mime_util.h", "base/mime_util_internal.cc", @@ -104,10 +115,10 @@ component("media") { "base/text_track_config.h", "base/video_aspect_ratio.cc", "base/video_aspect_ratio.h", - "base/video_color_space.cc", - "base/video_color_space.h", "base/video_codecs.cc", "base/video_codecs.h", + "base/video_color_space.cc", + "base/video_color_space.h", "base/video_decoder_config.cc", "base/video_decoder_config.h", "base/video_transformation.cc", @@ -203,33 +214,34 @@ component("media") { ] sources += [ + "cobalt/base/bind_post_task.h", + "cobalt/base/check.h", + "cobalt/base/check_op.h", + "cobalt/base/cxx17_backports.h", + "cobalt/base/hash/md5.h", + "cobalt/base/notreached.h", + "cobalt/base/types/strong_alias.h", + "cobalt/net/cookies/site_for_cookies.h", + + #"cobalt/ui/gfx/hdr_metadata.cc", + "cobalt/ui/gfx/color_space.h", + "cobalt/ui/gfx/color_space_export.h", + "cobalt/ui/gfx/geometry/point.cc", + "cobalt/ui/gfx/geometry/point.h", "cobalt/ui/gfx/geometry/point3_f.h", "cobalt/ui/gfx/geometry/point_base.h", - "cobalt/ui/gfx/geometry/rect.h", - "cobalt/ui/gfx/geometry/size_base.h", - "cobalt/ui/gfx/geometry/rect_base_impl.h", - "cobalt/ui/gfx/geometry/vector2d_f.h", - "cobalt/ui/gfx/geometry/rect_base.h", - "cobalt/ui/gfx/geometry/size_f.h", "cobalt/ui/gfx/geometry/point_f.cc", "cobalt/ui/gfx/geometry/point_f.h", - "cobalt/ui/gfx/geometry/point.cc", - "cobalt/ui/gfx/geometry/point.h", + "cobalt/ui/gfx/geometry/rect.h", + "cobalt/ui/gfx/geometry/rect_base.h", + "cobalt/ui/gfx/geometry/rect_base_impl.h", "cobalt/ui/gfx/geometry/size.h", + "cobalt/ui/gfx/geometry/size_base.h", + "cobalt/ui/gfx/geometry/size_f.h", "cobalt/ui/gfx/geometry/vector2d.h", - "cobalt/ui/gfx/color_space_export.h", + "cobalt/ui/gfx/geometry/vector2d_f.h", "cobalt/ui/gfx/hdr_metadata.h", "cobalt/ui/gfx/native_pixmap_handle.h", - #"cobalt/ui/gfx/hdr_metadata.cc", - "cobalt/ui/gfx/color_space.h", - "cobalt/base/notreached.h", - "cobalt/base/cxx17_backports.h", - "cobalt/base/bind_post_task.h", - "cobalt/base/check.h", - "cobalt/base/types/strong_alias.h", - "cobalt/base/hash/md5.h", - "cobalt/base/check_op.h", - "cobalt/net/cookies/site_for_cookies.h", ] configs -= [ "//starboard/build/config:size" ]