Accepting request 1175065 from home:oertel:branches:network:chromium

next attempt, an actually running chromium-125

OBS-URL: https://build.opensuse.org/request/show/1175065
OBS-URL: https://build.opensuse.org/package/show/network:chromium/chromium-beta?expand=0&rev=1
This commit is contained in:
2024-05-19 04:52:11 +00:00
committed by Git OBS Bridge
parent 7e1d3e39a8
commit f220692e7a
48 changed files with 8591 additions and 1048 deletions

View File

@@ -178,7 +178,7 @@ index 3c97e4a6cf4c7..a55e4ab51d5b3 100644
- smpte_st_2086.luminance_min = av_q2d(mdcv->min_luminance); - smpte_st_2086.luminance_min = av_q2d(mdcv->min_luminance);
- } - }
- -
- // TODO(crbug.com/40268540): Consider rejecting metadata that - // TODO(https://crbug.com/1446302): Consider rejecting metadata that
- // does not specify all values. - // does not specify all values.
- if (mdcv->has_primaries || mdcv->has_luminance) { - if (mdcv->has_primaries || mdcv->has_luminance) {
- hdr_metadata.smpte_st_2086 = smpte_st_2086; - hdr_metadata.smpte_st_2086 = smpte_st_2086;
@@ -221,7 +221,7 @@ index 3c97e4a6cf4c7..a55e4ab51d5b3 100644
+ smpte_st_2086.luminance_min = av_q2d(mdcv->min_luminance); + smpte_st_2086.luminance_min = av_q2d(mdcv->min_luminance);
+ } + }
+ +
+ // TODO(crbug.com/40268540): Consider rejecting metadata that + // TODO(https://crbug.com/1446302): Consider rejecting metadata that
+ // does not specify all values. + // does not specify all values.
+ if (mdcv->has_primaries || mdcv->has_luminance) { + if (mdcv->has_primaries || mdcv->has_luminance) {
+ hdr_metadata.smpte_st_2086 = smpte_st_2086; + hdr_metadata.smpte_st_2086 = smpte_st_2086;

View File

@@ -12,8 +12,8 @@ done
SHLIB_PERMS="755" SHLIB_PERMS="755"
PROGNAME="chrome" PROGNAME="chrome"
PACKAGE="chromium-browser" PACKAGE="chromium-browser"
MENUNAME="Chromium Web Browser" MENUNAME="Chromium Web Browser (Beta)"
CHANNEL="stable" CHANNEL="beta"
INSTALLDIR="${LIBDIR}/chromium" INSTALLDIR="${LIBDIR}/chromium"
install -m 755 -d \ install -m 755 -d \

View File

@@ -13,7 +13,7 @@ HERE="`dirname "$CHROME_WRAPPER"`"
# This also makes RPMs find the compatibly-named library symlinks. # This also makes RPMs find the compatibly-named library symlinks.
export LD_LIBRARY_PATH="$HERE${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" export LD_LIBRARY_PATH="$HERE${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
export CHROME_VERSION_EXTRA="@@CHANNEL@@" export CHROME_VERSION_EXTRA="beta"
# We don't want bug-buddy intercepting our crashes. http://crbug.com/24120 # We don't want bug-buddy intercepting our crashes. http://crbug.com/24120
export GNOME_DISABLE_CRASH_DIALOG=SET_BY_GOOGLE_CHROME export GNOME_DISABLE_CRASH_DIALOG=SET_BY_GOOGLE_CHROME

View File

@@ -0,0 +1,26 @@
diff -up chromium-115.0.5790.40/third_party/blink/renderer/modules/canvas/canvas2d/canvas_style.cc.me chromium-115.0.5790.40/third_party/blink/renderer/modules/canvas/canvas2d/canvas_style.cc
--- chromium-115.0.5790.40/third_party/blink/renderer/modules/canvas/canvas2d/canvas_style.cc.me 2023-06-24 10:38:11.011511463 +0200
+++ chromium-115.0.5790.40/third_party/blink/renderer/modules/canvas/canvas2d/canvas_style.cc 2023-06-24 13:07:35.865375884 +0200
@@ -84,6 +84,7 @@ CanvasStyle::CanvasStyle(const CanvasSty
void CanvasStyle::ApplyToFlags(cc::PaintFlags& flags,
float global_alpha) const {
+ SkColor4f custom_color = SkColor4f{0.0f, 0.0f, 0.0f, global_alpha};
switch (type_) {
case kColor:
ApplyColorToFlags(flags, global_alpha);
@@ -91,12 +92,12 @@ void CanvasStyle::ApplyToFlags(cc::Paint
case kGradient:
GetCanvasGradient()->GetGradient()->ApplyToFlags(flags, SkMatrix::I(),
ImageDrawOptions());
- flags.setColor(SkColor4f(0.0f, 0.0f, 0.0f, global_alpha));
+ flags.setColor(custom_color);
break;
case kImagePattern:
GetCanvasPattern()->GetPattern()->ApplyToFlags(
flags, AffineTransformToSkMatrix(GetCanvasPattern()->GetTransform()));
- flags.setColor(SkColor4f(0.0f, 0.0f, 0.0f, global_alpha));
+ flags.setColor(custom_color);
break;
default:
NOTREACHED();

View File

@@ -0,0 +1,47 @@
From ae3ae3711784865bdc38bf119a6182a7b8dae91c Mon Sep 17 00:00:00 2001
From: Matt Jolly <Matt.Jolly@footclan.ninja>
Date: Sun, 17 Sep 2023 16:51:42 +1000
Subject: [PATCH] Add system-zstd
Index: chromium-120.0.6099.18/build/linux/unbundle/replace_gn_files.py
===================================================================
--- chromium-120.0.6099.18.orig/build/linux/unbundle/replace_gn_files.py
+++ chromium-120.0.6099.18/build/linux/unbundle/replace_gn_files.py
@@ -79,6 +79,7 @@ REPLACEMENTS = {
'vulkan_memory_allocator' : 'third_party/vulkan_memory_allocator/BUILD.gn',
'woff2': 'third_party/woff2/BUILD.gn',
'zlib': 'third_party/zlib/BUILD.gn',
+ 'zstd': 'third_party/zstd/BUILD.gn',
}
Index: chromium-120.0.6099.18/build/linux/unbundle/zstd.gn
===================================================================
--- /dev/null
+++ chromium-120.0.6099.18/build/linux/unbundle/zstd.gn
@@ -0,0 +1,25 @@
+import("//build/config/linux/pkg_config.gni")
+import("//build/shim_headers.gni")
+
+pkg_config("system_zstd") {
+ packages = [ "libzstd" ]
+}
+
+shim_headers("zstd_shim") {
+ root_path = "src/lib"
+ headers = [
+ "zdict.h",
+ "zstd.h",
+ "zstd_errors.h",
+ ]
+}
+
+source_set("zstd") {
+ deps = [ ":zstd_shim" ]
+ public_configs = [ ":system_zstd" ]
+}
+
+source_set("decompress") {
+ deps = [ ":zstd_shim" ]
+ public_configs = [ ":system_zstd" ]
+}

463
chromium-120-emplace.patch Normal file
View File

@@ -0,0 +1,463 @@
Index: chromium-123.0.6312.46/third_party/webrtc/modules/congestion_controller/goog_cc/loss_based_bwe_v2.cc
===================================================================
--- chromium-123.0.6312.46.orig/third_party/webrtc/modules/congestion_controller/goog_cc/loss_based_bwe_v2.cc
+++ chromium-123.0.6312.46/third_party/webrtc/modules/congestion_controller/goog_cc/loss_based_bwe_v2.cc
@@ -549,7 +549,7 @@ absl::optional<LossBasedBweV2::Config> L
if (!enabled.Get()) {
return config;
}
- config.emplace();
+ config.emplace(Config());
config->bandwidth_rampup_upper_bound_factor =
bandwidth_rampup_upper_bound_factor.Get();
config->bandwidth_rampup_upper_bound_factor_in_hold =
Index: chromium-123.0.6312.46/ui/gfx/x/generated_protos/randr.cc
===================================================================
--- chromium-123.0.6312.46.orig/ui/gfx/x/generated_protos/randr.cc
+++ chromium-123.0.6312.46/ui/gfx/x/generated_protos/randr.cc
@@ -305,7 +305,7 @@ void ReadEvent<RandR::NotifyEvent>(RandR
// data
auto data_expr = subCode;
if (CaseEq(data_expr, RandR::Notify::CrtcChange)) {
- data.cc.emplace();
+ data.cc.emplace(RandR::NotifyEvent::Cc());
auto& timestamp = (*data.cc).timestamp;
auto& window = (*data.cc).window;
auto& crtc = (*data.cc).crtc;
@@ -349,7 +349,7 @@ void ReadEvent<RandR::NotifyEvent>(RandR
Read(&height, &buf);
}
if (CaseEq(data_expr, RandR::Notify::OutputChange)) {
- data.oc.emplace();
+ data.oc.emplace(RandR::NotifyEvent::Oc());
auto& timestamp = (*data.oc).timestamp;
auto& config_timestamp = (*data.oc).config_timestamp;
auto& window = (*data.oc).window;
@@ -394,7 +394,7 @@ void ReadEvent<RandR::NotifyEvent>(RandR
subpixel_order = static_cast<Render::SubPixel>(tmp6);
}
if (CaseEq(data_expr, RandR::Notify::OutputProperty)) {
- data.op.emplace();
+ data.op.emplace(RandR::NotifyEvent::Op());
auto& window = (*data.op).window;
auto& output = (*data.op).output;
auto& atom = (*data.op).atom;
@@ -422,7 +422,7 @@ void ReadEvent<RandR::NotifyEvent>(RandR
Pad(&buf, 11);
}
if (CaseEq(data_expr, RandR::Notify::ProviderChange)) {
- data.pc.emplace();
+ data.pc.emplace(RandR::NotifyEvent::Pc());
auto& timestamp = (*data.pc).timestamp;
auto& window = (*data.pc).window;
auto& provider = (*data.pc).provider;
@@ -440,7 +440,7 @@ void ReadEvent<RandR::NotifyEvent>(RandR
Pad(&buf, 16);
}
if (CaseEq(data_expr, RandR::Notify::ProviderProperty)) {
- data.pp.emplace();
+ data.pp.emplace(RandR::NotifyEvent::Pp());
auto& window = (*data.pp).window;
auto& provider = (*data.pp).provider;
auto& atom = (*data.pp).atom;
@@ -466,7 +466,7 @@ void ReadEvent<RandR::NotifyEvent>(RandR
Pad(&buf, 11);
}
if (CaseEq(data_expr, RandR::Notify::ResourceChange)) {
- data.rc.emplace();
+ data.rc.emplace(RandR::NotifyEvent::Rc());
auto& timestamp = (*data.rc).timestamp;
auto& window = (*data.rc).window;
@@ -480,7 +480,7 @@ void ReadEvent<RandR::NotifyEvent>(RandR
Pad(&buf, 20);
}
if (CaseEq(data_expr, RandR::Notify::Lease)) {
- data.lc.emplace();
+ data.lc.emplace(RandR::NotifyEvent::Lc());
auto& timestamp = (*data.lc).timestamp;
auto& window = (*data.lc).window;
auto& lease = (*data.lc).lease;
Index: chromium-123.0.6312.46/ui/gfx/x/generated_protos/xkb.cc
===================================================================
--- chromium-123.0.6312.46.orig/ui/gfx/x/generated_protos/xkb.cc
+++ chromium-123.0.6312.46/ui/gfx/x/generated_protos/xkb.cc
@@ -5276,7 +5276,7 @@ std::unique_ptr<Xkb::GetKbdByNameReply>
if (CaseAnd(replies_expr, Xkb::GBNDetail::Types) ||
CaseAnd(replies_expr, Xkb::GBNDetail::ClientSymbols) ||
CaseAnd(replies_expr, Xkb::GBNDetail::ServerSymbols)) {
- replies.types.emplace();
+ replies.types.emplace(Xkb::GetKbdByNameReply::Types());
auto& getmap_type = (*replies.types).getmap_type;
auto& typeDeviceID = (*replies.types).typeDeviceID;
auto& getmap_sequence = (*replies.types).getmap_sequence;
@@ -5708,7 +5708,7 @@ std::unique_ptr<Xkb::GetKbdByNameReply>
}
}
if (CaseAnd(replies_expr, Xkb::GBNDetail::CompatMap)) {
- replies.compat_map.emplace();
+ replies.compat_map.emplace(Xkb::GetKbdByNameReply::CompatMap());
auto& compatmap_type = (*replies.compat_map).compatmap_type;
auto& compatDeviceID = (*replies.compat_map).compatDeviceID;
auto& compatmap_sequence = (*replies.compat_map).compatmap_sequence;
@@ -5832,7 +5832,7 @@ std::unique_ptr<Xkb::GetKbdByNameReply>
}
}
if (CaseAnd(replies_expr, Xkb::GBNDetail::IndicatorMaps)) {
- replies.indicator_maps.emplace();
+ replies.indicator_maps.emplace(Xkb::GetKbdByNameReply::IndicatorMaps());
auto& indicatormap_type = (*replies.indicator_maps).indicatormap_type;
auto& indicatorDeviceID = (*replies.indicator_maps).indicatorDeviceID;
auto& indicatormap_sequence =
@@ -5926,7 +5926,7 @@ std::unique_ptr<Xkb::GetKbdByNameReply>
}
if (CaseAnd(replies_expr, Xkb::GBNDetail::KeyNames) ||
CaseAnd(replies_expr, Xkb::GBNDetail::OtherNames)) {
- replies.key_names.emplace();
+ replies.key_names.emplace(Xkb::GetKbdByNameReply::KeyNames());
auto& keyname_type = (*replies.key_names).keyname_type;
auto& keyDeviceID = (*replies.key_names).keyDeviceID;
auto& keyname_sequence = (*replies.key_names).keyname_sequence;
@@ -6185,7 +6185,7 @@ std::unique_ptr<Xkb::GetKbdByNameReply>
}
}
if (CaseAnd(replies_expr, Xkb::GBNDetail::Geometry)) {
- replies.geometry.emplace();
+ replies.geometry.emplace(Xkb::GetKbdByNameReply::Geometry());
auto& geometry_type = (*replies.geometry).geometry_type;
auto& geometryDeviceID = (*replies.geometry).geometryDeviceID;
auto& geometry_sequence = (*replies.geometry).geometry_sequence;
Index: chromium-123.0.6312.46/mojo/public/cpp/bindings/lib/multiplex_router.cc
===================================================================
--- chromium-123.0.6312.46.orig/mojo/public/cpp/bindings/lib/multiplex_router.cc
+++ chromium-123.0.6312.46/mojo/public/cpp/bindings/lib/multiplex_router.cc
@@ -870,7 +870,7 @@ bool MultiplexRouter::ExclusiveSyncWaitF
DCHECK(!exclusive_sync_wait_);
scoped_refptr<MultiplexRouter> keep_alive(this);
- exclusive_sync_wait_.emplace();
+ exclusive_sync_wait_.emplace(MultiplexRouter::ExclusiveSyncWaitInfo());
exclusive_sync_wait_->interface_id = interface_id;
exclusive_sync_wait_->request_id = request_id;
while (!exclusive_sync_wait_->finished) {
Index: chromium-123.0.6312.46/ui/gfx/x/generated_protos/xinput.cc
===================================================================
--- chromium-123.0.6312.46.orig/ui/gfx/x/generated_protos/xinput.cc
+++ chromium-123.0.6312.46/ui/gfx/x/generated_protos/xinput.cc
@@ -567,7 +567,7 @@ void ReadEvent<Input::DeviceChangedEvent
// data
auto data_expr = type;
if (CaseEq(data_expr, Input::DeviceClassType::Key)) {
- data.key.emplace();
+ data.key.emplace(Input::DeviceClass::Key());
uint16_t num_keys{};
auto& keys = (*data.key).keys;
size_t keys_len = keys.size();
@@ -583,7 +583,7 @@ void ReadEvent<Input::DeviceChangedEvent
}
}
if (CaseEq(data_expr, Input::DeviceClassType::Button)) {
- data.button.emplace();
+ data.button.emplace(Input::DeviceClass::Button());
uint16_t num_buttons{};
auto& state = (*data.button).state;
size_t state_len = state.size();
@@ -608,7 +608,7 @@ void ReadEvent<Input::DeviceChangedEvent
}
}
if (CaseEq(data_expr, Input::DeviceClassType::Valuator)) {
- data.valuator.emplace();
+ data.valuator.emplace(Input::DeviceClass::Valuator());
auto& number = (*data.valuator).number;
auto& label = (*data.valuator).label;
auto& min = (*data.valuator).min;
@@ -671,7 +671,7 @@ void ReadEvent<Input::DeviceChangedEvent
Pad(&buf, 3);
}
if (CaseEq(data_expr, Input::DeviceClassType::Scroll)) {
- data.scroll.emplace();
+ data.scroll.emplace(Input::DeviceClass::Scroll());
auto& number = (*data.scroll).number;
auto& scroll_type = (*data.scroll).scroll_type;
auto& flags = (*data.scroll).flags;
@@ -706,7 +706,7 @@ void ReadEvent<Input::DeviceChangedEvent
}
}
if (CaseEq(data_expr, Input::DeviceClassType::Touch)) {
- data.touch.emplace();
+ data.touch.emplace(Input::DeviceClass::Touch());
auto& mode = (*data.touch).mode;
auto& num_touches = (*data.touch).num_touches;
@@ -719,7 +719,7 @@ void ReadEvent<Input::DeviceChangedEvent
Read(&num_touches, &buf);
}
if (CaseEq(data_expr, Input::DeviceClassType::Gesture)) {
- data.gesture.emplace();
+ data.gesture.emplace(Input::DeviceClass::Gesture());
auto& num_touches = (*data.gesture).num_touches;
// num_touches
@@ -2206,7 +2206,7 @@ std::unique_ptr<Input::ListInputDevicesR
// info
auto info_expr = class_id;
if (CaseEq(info_expr, Input::InputClass::Key)) {
- info.key.emplace();
+ info.key.emplace(Input::InputInfo::Key());
auto& min_keycode = (*info.key).min_keycode;
auto& max_keycode = (*info.key).max_keycode;
auto& num_keys = (*info.key).num_keys;
@@ -2224,14 +2224,14 @@ std::unique_ptr<Input::ListInputDevicesR
Pad(&buf, 2);
}
if (CaseEq(info_expr, Input::InputClass::Button)) {
- info.button.emplace();
+ info.button.emplace(Input::InputInfo::Button());
auto& num_buttons = (*info.button).num_buttons;
// num_buttons
Read(&num_buttons, &buf);
}
if (CaseEq(info_expr, Input::InputClass::Valuator)) {
- info.valuator.emplace();
+ info.valuator.emplace(Input::InputInfo::Valuator());
uint8_t axes_len{};
auto& mode = (*info.valuator).mode;
auto& motion_size = (*info.valuator).motion_size;
@@ -3844,7 +3844,7 @@ std::unique_ptr<Input::GetFeedbackContro
// data
auto data_expr = class_id;
if (CaseEq(data_expr, Input::FeedbackClass::Keyboard)) {
- data.keyboard.emplace();
+ data.keyboard.emplace(Input::FeedbackState::Keyboard());
auto& pitch = (*data.keyboard).pitch;
auto& duration = (*data.keyboard).duration;
auto& led_mask = (*data.keyboard).led_mask;
@@ -3886,7 +3886,7 @@ std::unique_ptr<Input::GetFeedbackContro
}
}
if (CaseEq(data_expr, Input::FeedbackClass::Pointer)) {
- data.pointer.emplace();
+ data.pointer.emplace(Input::FeedbackState::Pointer());
auto& accel_num = (*data.pointer).accel_num;
auto& accel_denom = (*data.pointer).accel_denom;
auto& threshold = (*data.pointer).threshold;
@@ -3904,7 +3904,7 @@ std::unique_ptr<Input::GetFeedbackContro
Read(&threshold, &buf);
}
if (CaseEq(data_expr, Input::FeedbackClass::String)) {
- data.string.emplace();
+ data.string.emplace(Input::FeedbackState::String());
auto& max_symbols = (*data.string).max_symbols;
uint16_t num_keysyms{};
auto& keysyms = (*data.string).keysyms;
@@ -3924,7 +3924,7 @@ std::unique_ptr<Input::GetFeedbackContro
}
}
if (CaseEq(data_expr, Input::FeedbackClass::Integer)) {
- data.integer.emplace();
+ data.integer.emplace(Input::FeedbackState::Integer());
auto& resolution = (*data.integer).resolution;
auto& min_value = (*data.integer).min_value;
auto& max_value = (*data.integer).max_value;
@@ -3939,7 +3939,7 @@ std::unique_ptr<Input::GetFeedbackContro
Read(&max_value, &buf);
}
if (CaseEq(data_expr, Input::FeedbackClass::Led)) {
- data.led.emplace();
+ data.led.emplace(Input::FeedbackState::Led());
auto& led_mask = (*data.led).led_mask;
auto& led_values = (*data.led).led_values;
@@ -3950,7 +3950,7 @@ std::unique_ptr<Input::GetFeedbackContro
Read(&led_values, &buf);
}
if (CaseEq(data_expr, Input::FeedbackClass::Bell)) {
- data.bell.emplace();
+ data.bell.emplace(Input::FeedbackState::Bell());
auto& percent = (*data.bell).percent;
auto& pitch = (*data.bell).pitch;
auto& duration = (*data.bell).duration;
@@ -4768,7 +4768,7 @@ std::unique_ptr<Input::QueryDeviceStateR
// data
auto data_expr = class_id;
if (CaseEq(data_expr, Input::InputClass::Key)) {
- data.key.emplace();
+ data.key.emplace(Input::InputState::Key());
auto& num_keys = (*data.key).num_keys;
auto& keys = (*data.key).keys;
size_t keys_len = keys.size();
@@ -4786,7 +4786,7 @@ std::unique_ptr<Input::QueryDeviceStateR
}
}
if (CaseEq(data_expr, Input::InputClass::Button)) {
- data.button.emplace();
+ data.button.emplace(Input::InputState::Button());
auto& num_buttons = (*data.button).num_buttons;
auto& buttons = (*data.button).buttons;
size_t buttons_len = buttons.size();
@@ -4804,7 +4804,7 @@ std::unique_ptr<Input::QueryDeviceStateR
}
}
if (CaseEq(data_expr, Input::InputClass::Valuator)) {
- data.valuator.emplace();
+ data.valuator.emplace(Input::InputState::Valuator());
uint8_t num_valuators{};
auto& mode = (*data.valuator).mode;
auto& valuators = (*data.valuator).valuators;
@@ -5075,7 +5075,7 @@ std::unique_ptr<Input::GetDeviceControlR
// data
auto data_expr = control_id;
if (CaseEq(data_expr, Input::DeviceControl::resolution)) {
- data.resolution.emplace();
+ data.resolution.emplace(Input::DeviceState::Resolution());
uint32_t num_valuators{};
auto& resolution_values = (*data.resolution).resolution_values;
size_t resolution_values_len = resolution_values.size();
@@ -5109,7 +5109,7 @@ std::unique_ptr<Input::GetDeviceControlR
}
}
if (CaseEq(data_expr, Input::DeviceControl::abs_calib)) {
- data.abs_calib.emplace();
+ data.abs_calib.emplace(Input::DeviceState::AbsCalib());
auto& min_x = (*data.abs_calib).min_x;
auto& max_x = (*data.abs_calib).max_x;
auto& min_y = (*data.abs_calib).min_y;
@@ -5144,7 +5144,7 @@ std::unique_ptr<Input::GetDeviceControlR
Read(&button_threshold, &buf);
}
if (CaseEq(data_expr, Input::DeviceControl::core)) {
- data.core.emplace();
+ data.core.emplace(Input::DeviceState::Core());
auto& status = (*data.core).status;
auto& iscore = (*data.core).iscore;
@@ -5158,7 +5158,7 @@ std::unique_ptr<Input::GetDeviceControlR
Pad(&buf, 2);
}
if (CaseEq(data_expr, Input::DeviceControl::enable)) {
- data.enable.emplace();
+ data.enable.emplace(Input::DeviceState::Enable());
auto& enable = (*data.enable).enable;
// enable
@@ -5168,7 +5168,7 @@ std::unique_ptr<Input::GetDeviceControlR
Pad(&buf, 3);
}
if (CaseEq(data_expr, Input::DeviceControl::abs_area)) {
- data.abs_area.emplace();
+ data.abs_area.emplace(Input::DeviceState::AbsArea());
auto& offset_x = (*data.abs_area).offset_x;
auto& offset_y = (*data.abs_area).offset_y;
auto& width = (*data.abs_area).width;
@@ -6659,7 +6659,7 @@ std::unique_ptr<Input::XIQueryDeviceRepl
// data
auto data_expr = type;
if (CaseEq(data_expr, Input::DeviceClassType::Key)) {
- data.key.emplace();
+ data.key.emplace(Input::DeviceClass::Key());
uint16_t num_keys{};
auto& keys = (*data.key).keys;
size_t keys_len = keys.size();
@@ -6675,7 +6675,7 @@ std::unique_ptr<Input::XIQueryDeviceRepl
}
}
if (CaseEq(data_expr, Input::DeviceClassType::Button)) {
- data.button.emplace();
+ data.button.emplace(Input::DeviceClass::Button());
uint16_t num_buttons{};
auto& state = (*data.button).state;
size_t state_len = state.size();
@@ -6700,7 +6700,7 @@ std::unique_ptr<Input::XIQueryDeviceRepl
}
}
if (CaseEq(data_expr, Input::DeviceClassType::Valuator)) {
- data.valuator.emplace();
+ data.valuator.emplace(Input::DeviceClass::Valuator());
auto& number = (*data.valuator).number;
auto& label = (*data.valuator).label;
auto& min = (*data.valuator).min;
@@ -6763,7 +6763,7 @@ std::unique_ptr<Input::XIQueryDeviceRepl
Pad(&buf, 3);
}
if (CaseEq(data_expr, Input::DeviceClassType::Scroll)) {
- data.scroll.emplace();
+ data.scroll.emplace(Input::DeviceClass::Scroll());
auto& number = (*data.scroll).number;
auto& scroll_type = (*data.scroll).scroll_type;
auto& flags = (*data.scroll).flags;
@@ -6798,7 +6798,7 @@ std::unique_ptr<Input::XIQueryDeviceRepl
}
}
if (CaseEq(data_expr, Input::DeviceClassType::Touch)) {
- data.touch.emplace();
+ data.touch.emplace(Input::DeviceClass::Touch());
auto& mode = (*data.touch).mode;
auto& num_touches = (*data.touch).num_touches;
@@ -6811,7 +6811,7 @@ std::unique_ptr<Input::XIQueryDeviceRepl
Read(&num_touches, &buf);
}
if (CaseEq(data_expr, Input::DeviceClassType::Gesture)) {
- data.gesture.emplace();
+ data.gesture.emplace(Input::DeviceClass::Gesture());
auto& num_touches = (*data.gesture).num_touches;
// num_touches
Index: chromium-123.0.6312.46/components/viz/service/display/surface_aggregator.cc
===================================================================
--- chromium-123.0.6312.46.orig/components/viz/service/display/surface_aggregator.cc
+++ chromium-123.0.6312.46/components/viz/service/display/surface_aggregator.cc
@@ -2236,7 +2236,7 @@ AggregatedFrame SurfaceAggregator::Aggre
root_surface_id_ = surface_id;
// Start recording new stats for this aggregation.
- stats_.emplace();
+ stats_.emplace(SurfaceAggregator::AggregateStatistics());
base::ElapsedTimer prewalk_timer;
ResolvedFrameData* resolved_frame = GetResolvedFrame(surface_id);
Index: chromium-123.0.6312.46/third_party/blink/renderer/modules/media_controls/elements/media_control_timeline_element.cc
===================================================================
--- chromium-123.0.6312.46.orig/third_party/blink/renderer/modules/media_controls/elements/media_control_timeline_element.cc
+++ chromium-123.0.6312.46/third_party/blink/renderer/modules/media_controls/elements/media_control_timeline_element.cc
@@ -101,7 +101,7 @@ void MediaControlTimelineElement::Update
void MediaControlTimelineElement::SetPosition(double current_time,
bool suppress_aria) {
if (is_live_ && !live_anchor_time_ && current_time != 0) {
- live_anchor_time_.emplace();
+ live_anchor_time_.emplace(MediaControlTimelineElement::LiveAnchorTime());
live_anchor_time_->clock_time_ = base::TimeTicks::Now();
live_anchor_time_->media_time_ = MediaElement().currentTime();
}
Index: chromium-123.0.6312.46/third_party/blink/renderer/platform/graphics/paint/geometry_mapper_transform_cache.cc
===================================================================
--- chromium-123.0.6312.46.orig/third_party/blink/renderer/platform/graphics/paint/geometry_mapper_transform_cache.cc
+++ chromium-123.0.6312.46/third_party/blink/renderer/platform/graphics/paint/geometry_mapper_transform_cache.cc
@@ -70,7 +70,7 @@ void GeometryMapperTransformCache::Updat
to_2d_translation_root_ += translation;
if (parent.plane_root_transform_) {
- plane_root_transform_.emplace();
+ plane_root_transform_.emplace(GeometryMapperTransformCache::PlaneRootTransform());
plane_root_transform_->plane_root = parent.plane_root();
plane_root_transform_->to_plane_root = parent.to_plane_root();
plane_root_transform_->to_plane_root.Translate(translation.x(),
@@ -98,7 +98,7 @@ void GeometryMapperTransformCache::Updat
// as the 2d translation root.
plane_root_transform_ = std::nullopt;
} else {
- plane_root_transform_.emplace();
+ plane_root_transform_.emplace(GeometryMapperTransformCache::PlaneRootTransform());
plane_root_transform_->plane_root = parent.plane_root();
plane_root_transform_->to_plane_root.MakeIdentity();
parent.ApplyToPlaneRoot(plane_root_transform_->to_plane_root);
@@ -140,7 +140,7 @@ void GeometryMapperTransformCache::Updat
parent_node->UpdateScreenTransform();
const auto& parent = parent_node->GetTransformCache();
- screen_transform_.emplace();
+ screen_transform_.emplace(GeometryMapperTransformCache::ScreenTransform());
parent.ApplyToScreen(screen_transform_->to_screen);
if (node.FlattensInheritedTransform())
screen_transform_->to_screen.Flatten();

View File

@@ -0,0 +1,12 @@
diff -up chromium-120.0.6099.56/third_party/blink/renderer/core/paint/fragment_data_iterator.h.than chromium-120.0.6099.56/third_party/blink/renderer/core/paint/fragment_data_iterator.h
--- chromium-120.0.6099.56/third_party/blink/renderer/core/paint/fragment_data_iterator.h.than 2023-12-04 10:20:45.350540897 +0100
+++ chromium-120.0.6099.56/third_party/blink/renderer/core/paint/fragment_data_iterator.h 2023-12-04 10:23:17.335339670 +0100
@@ -21,7 +21,7 @@ class FragmentDataIteratorBase {
public:
explicit FragmentDataIteratorBase(Head& head) : fragment_head_(head) {}
- explicit FragmentDataIteratorBase(nullptr_t) {}
+ explicit FragmentDataIteratorBase(std::nullptr_t) {}
Data* GetFragmentData() const {
return !IsDone() ? &fragment_head_.at(idx_) : nullptr;

View File

@@ -0,0 +1,70 @@
Index: chromium-123.0.6312.46/media/base/cdm_promise_adapter.cc
===================================================================
--- chromium-123.0.6312.46.orig/media/base/cdm_promise_adapter.cc
+++ chromium-123.0.6312.46/media/base/cdm_promise_adapter.cc
@@ -94,7 +94,9 @@ void CdmPromiseAdapter::RejectPromise(ui
void CdmPromiseAdapter::Clear(ClearReason reason) {
// Reject all outstanding promises.
DCHECK(thread_checker_.CalledOnValidThread());
- for (auto& [promise_id, promise] : promises_) {
+ for (auto& [p_i, p_e] : promises_) {
+ auto& promise_id = p_i;
+ auto& promise = p_e;
TRACE_EVENT_NESTABLE_ASYNC_END1(
"media", "CdmPromise", TRACE_ID_WITH_SCOPE("CdmPromise", promise_id),
"status", "cleared");
Index: chromium-123.0.6312.46/content/browser/service_worker/service_worker_context_wrapper.cc
===================================================================
--- chromium-123.0.6312.46.orig/content/browser/service_worker/service_worker_context_wrapper.cc
+++ chromium-123.0.6312.46/content/browser/service_worker/service_worker_context_wrapper.cc
@@ -1474,7 +1474,8 @@ void ServiceWorkerContextWrapper::MaybeP
return;
}
- auto [document_url, key, callback] = std::move(*request);
+ auto [d_u, key, callback] = std::move(*request);
+ auto document_url = d_u;
DCHECK(document_url.is_valid());
TRACE_EVENT1("ServiceWorker",
Index: chromium-123.0.6312.46/third_party/blink/renderer/core/layout/grid/grid_layout_algorithm.cc
===================================================================
--- chromium-123.0.6312.46.orig/third_party/blink/renderer/core/layout/grid/grid_layout_algorithm.cc
+++ chromium-123.0.6312.46/third_party/blink/renderer/core/layout/grid/grid_layout_algorithm.cc
@@ -3503,8 +3503,8 @@ void GridLayoutAlgorithm::PlaceGridItems
DCHECK(out_row_break_between);
const auto& container_space = GetConstraintSpace();
- const auto& [grid_items, layout_data, tree_size] = sizing_tree.TreeRootData();
-
+ const auto& [grid_items, l_d, tree_size] = sizing_tree.TreeRootData();
+ const auto& layout_data = l_d;
const auto* cached_layout_subtree = container_space.GetGridLayoutSubtree();
const auto container_writing_direction =
container_space.GetWritingDirection();
@@ -3666,8 +3666,9 @@ void GridLayoutAlgorithm::PlaceGridItems
// TODO(ikilpatrick): Update |SetHasSeenAllChildren| and early exit if true.
const auto& constraint_space = GetConstraintSpace();
- const auto& [grid_items, layout_data, tree_size] = sizing_tree.TreeRootData();
-
+ const auto& [g_i, l_d, tree_size] = sizing_tree.TreeRootData();
+ const auto& grid_items = g_i;
+ const auto& layout_data = l_d;
const auto* cached_layout_subtree = constraint_space.GetGridLayoutSubtree();
const auto container_writing_direction =
constraint_space.GetWritingDirection();
Index: chromium-123.0.6312.46/chrome/browser/predictors/lcp_critical_path_predictor/prewarm_http_disk_cache_manager.cc
===================================================================
--- chromium-123.0.6312.46.orig/chrome/browser/predictors/lcp_critical_path_predictor/prewarm_http_disk_cache_manager.cc
+++ chromium-123.0.6312.46/chrome/browser/predictors/lcp_critical_path_predictor/prewarm_http_disk_cache_manager.cc
@@ -136,7 +136,8 @@ void PrewarmHttpDiskCacheManager::MaybeP
std::pair<url::Origin, GURL> origin_and_url;
std::swap(origin_and_url, queued_jobs_.front());
queued_jobs_.pop();
- const auto& [origin, url] = origin_and_url;
+ const auto& [origin, u] = origin_and_url;
+ const auto& url = u;
TRACE_EVENT_WITH_FLOW1(
"loading", "PrewarmHttpDiskCacheManager::MaybeProcessNextQueuedJob",
TRACE_ID_LOCAL(this),

View File

@@ -0,0 +1,19 @@
reported upstream: https://issues.chromium.org/issues/330361615
The forward header includes the declaration of deallocate(), but not the
definition. Since the definition is in a header (and presumably it gets
inlined by the compiler), the definition doesn't actually end up in an
object file unless the non-forward header gets included. Not having the
definition makes the linker sad.
--- a/base/allocator/partition_allocator/src/partition_alloc/starscan/stats_collector.h
+++ b/base/allocator/partition_allocator/src/partition_alloc/starscan/stats_collector.h
@@ -14,7 +14,7 @@
#include <unordered_map>
#include <utility>
-#include "partition_alloc/internal_allocator_forward.h"
+#include "partition_alloc/internal_allocator.h"
#include "partition_alloc/partition_alloc_base/threading/platform_thread.h"
#include "partition_alloc/partition_alloc_base/time/time.h"
#include "partition_alloc/partition_alloc_check.h"

View File

@@ -0,0 +1,26 @@
commit 54c4f460f35e0a4003aa4dd01007188ff00295cc
Author: Jose Dapena Paz <jdapena@igalia.com>
Date: Wed Apr 17 08:19:26 2024 +0000
IWYU: missing include for std::optional usage in app_types.h
Bug: 40939315
Change-Id: I845f4dd1598e38cbe5b22fe472079c41d24a8bd5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5456358
Reviewed-by: Tim Sergeant <tsergeant@chromium.org>
Commit-Queue: José Dapena Paz <jdapena@igalia.com>
Cr-Commit-Position: refs/heads/main@{#1288572}
diff --git a/components/services/app_service/public/cpp/app_types.h b/components/services/app_service/public/cpp/app_types.h
index 988b6b30f48ff..833ce6d975b0b 100644
--- a/components/services/app_service/public/cpp/app_types.h
+++ b/components/services/app_service/public/cpp/app_types.h
@@ -5,6 +5,8 @@
#ifndef COMPONENTS_SERVICES_APP_SERVICE_PUBLIC_CPP_APP_TYPES_H_
#define COMPONENTS_SERVICES_APP_SERVICE_PUBLIC_CPP_APP_TYPES_H_
+#include <optional>
+
#include "base/component_export.h"
#include "components/services/app_service/public/cpp/macros.h"
#include "components/services/app_service/public/protos/app_types.pb.h"

View File

@@ -7,11 +7,11 @@ Subject: [PATCH] Disable various compiler configs
build/config/compiler/BUILD.gn | 134 +++++---------------------------- build/config/compiler/BUILD.gn | 134 +++++----------------------------
1 file changed, 17 insertions(+), 117 deletions(-) 1 file changed, 17 insertions(+), 117 deletions(-)
Index: chromium-126.0.6478.8/build/config/compiler/BUILD.gn Index: chromium-120.0.6099.35/build/config/compiler/BUILD.gn
=================================================================== ===================================================================
--- chromium-126.0.6478.8.orig/build/config/compiler/BUILD.gn --- chromium-120.0.6099.35.orig/build/config/compiler/BUILD.gn
+++ chromium-126.0.6478.8/build/config/compiler/BUILD.gn +++ chromium-120.0.6099.35/build/config/compiler/BUILD.gn
@@ -305,9 +305,7 @@ config("compiler") { @@ -320,9 +320,7 @@ config("compiler") {
configs += [ configs += [
# See the definitions below. # See the definitions below.
@@ -21,11 +21,11 @@ Index: chromium-126.0.6478.8/build/config/compiler/BUILD.gn
":compiler_codegen", ":compiler_codegen",
":compiler_deterministic", ":compiler_deterministic",
] ]
@@ -554,55 +554,6 @@ config("compiler") { @@ -591,55 +589,6 @@ config("compiler") {
ldflags += [ "-Wl,-z,keep-text-section-prefix" ] ldflags += [ "-Wl,-z,keep-text-section-prefix" ]
} }
- if (is_clang && !is_nacl) { - if (is_clang && !is_nacl && current_os != "zos") {
- cflags += [ "-fcrash-diagnostics-dir=" + clang_diagnostic_dir ] - cflags += [ "-fcrash-diagnostics-dir=" + clang_diagnostic_dir ]
- if (save_reproducers_on_lld_crash && use_lld) { - if (save_reproducers_on_lld_crash && use_lld) {
- ldflags += [ - ldflags += [
@@ -48,9 +48,9 @@ Index: chromium-126.0.6478.8/build/config/compiler/BUILD.gn
- } - }
- } - }
- -
- # TODO(crbug.com/40283598): This causes binary size growth and potentially - # TODO(crbug.com/1488374): This causes binary size growth and potentially
- # other problems. - # other problems.
- # TODO(crbug.com/40284925): This isn't supported by Cronet's mainline llvm version. - # TODO(crbug.com/1491036): This isn't supported by Cronet's mainline llvm version.
- if (default_toolchain != "//build/toolchain/cros:target" && - if (default_toolchain != "//build/toolchain/cros:target" &&
- !llvm_android_mainline) { - !llvm_android_mainline) {
- cflags += [ - cflags += [
@@ -66,7 +66,7 @@ Index: chromium-126.0.6478.8/build/config/compiler/BUILD.gn
- } - }
- } - }
- -
- # TODO(crbug.com/40192287): Investigate why/if this should be needed. - # TODO(crbug.com/1235145): Investigate why/if this should be needed.
- if (is_win) { - if (is_win) {
- cflags += [ "/clang:-ffp-contract=off" ] - cflags += [ "/clang:-ffp-contract=off" ]
- } else { - } else {
@@ -77,7 +77,7 @@ Index: chromium-126.0.6478.8/build/config/compiler/BUILD.gn
# C11/C++11 compiler flags setup. # C11/C++11 compiler flags setup.
# --------------------------- # ---------------------------
if (is_linux || is_chromeos || is_android || (is_nacl && is_clang) || if (is_linux || is_chromeos || is_android || (is_nacl && is_clang) ||
@@ -1538,52 +1489,6 @@ config("compiler_deterministic") { @@ -1488,46 +1488,6 @@
} }
} }
@@ -100,13 +100,7 @@ Index: chromium-126.0.6478.8/build/config/compiler/BUILD.gn
- # -ffile-compilation-dir is an alias for both -fdebug-compilation-dir= - # -ffile-compilation-dir is an alias for both -fdebug-compilation-dir=
- # and -fcoverage-compilation-dir=. - # and -fcoverage-compilation-dir=.
- cflags += [ "-ffile-compilation-dir=." ] - cflags += [ "-ffile-compilation-dir=." ]
- - swiftflags += [ "-file-compilation-dir=." ]
- # Convert absolute paths to relative paths. Expands to, for example:
- # -file-prefix-map /path/to/chromium/src=../..
- swiftflags += [
- "-file-prefix-map",
- rebase_path("//.", "") + "=" + rebase_path("//.", root_build_dir),
- ]
- } - }
- if (!is_win) { - if (!is_win) {
- # We don't use clang -cc1as on Windows (yet? https://crbug.com/762167) - # We don't use clang -cc1as on Windows (yet? https://crbug.com/762167)
@@ -130,13 +124,12 @@ Index: chromium-126.0.6478.8/build/config/compiler/BUILD.gn
# Tells the compiler not to use absolute paths when passing the default # Tells the compiler not to use absolute paths when passing the default
# paths to the tools it invokes. We don't want this because we don't # paths to the tools it invokes. We don't want this because we don't
# really need it and it can mess up the RBE cache entries. # really need it and it can mess up the RBE cache entries.
@@ -1602,28 +1507,6 @@ config("compiler_deterministic") { @@ -1572,27 +1481,6 @@ config("compiler_deterministic") {
} }
} }
-config("clang_revision") { -config("clang_revision") {
- if (is_clang && clang_base_path == default_clang_base_path && - if (is_clang && clang_base_path == default_clang_base_path) {
- current_os != "zos") {
- update_args = [ - update_args = [
- "--print-revision", - "--print-revision",
- "--verify-version=$clang_version", - "--verify-version=$clang_version",
@@ -159,7 +152,7 @@ Index: chromium-126.0.6478.8/build/config/compiler/BUILD.gn
config("rustc_revision") { config("rustc_revision") {
if (rustc_revision != "") { if (rustc_revision != "") {
# Similar to the above config, this is here so that all files get recompiled # Similar to the above config, this is here so that all files get recompiled
@@ -1983,10 +1871,6 @@ config("chromium_code") { @@ -1959,10 +1847,6 @@ config("chromium_code") {
} }
} else { } else {
cflags = [ "-Wall" ] cflags = [ "-Wall" ]
@@ -170,7 +163,7 @@ Index: chromium-126.0.6478.8/build/config/compiler/BUILD.gn
# In Chromium code, we define __STDC_foo_MACROS in order to get the # In Chromium code, we define __STDC_foo_MACROS in order to get the
# C99 macros on Mac and Linux. # C99 macros on Mac and Linux.
@@ -1995,24 +1879,6 @@ config("chromium_code") { @@ -1971,24 +1855,6 @@ config("chromium_code") {
"__STDC_FORMAT_MACROS", "__STDC_FORMAT_MACROS",
] ]
@@ -195,7 +188,7 @@ Index: chromium-126.0.6478.8/build/config/compiler/BUILD.gn
if (is_apple) { if (is_apple) {
cflags_objc = [ "-Wimplicit-retain-self" ] cflags_objc = [ "-Wimplicit-retain-self" ]
cflags_objcc = [ "-Wimplicit-retain-self" ] cflags_objcc = [ "-Wimplicit-retain-self" ]
@@ -2442,7 +2325,8 @@ config("default_stack_frames") { @@ -2335,7 +2295,8 @@
# [0]: https://pinpoint-dot-chromeperf.appspot.com/job/147634a8be0000 # [0]: https://pinpoint-dot-chromeperf.appspot.com/job/147634a8be0000
# [1]: https://pinpoint-dot-chromeperf.appspot.com/job/132bc772be0000 # [1]: https://pinpoint-dot-chromeperf.appspot.com/job/132bc772be0000
# [2]: https://crrev.com/c/5447532 # [2]: https://crrev.com/c/5447532
@@ -203,9 +196,9 @@ Index: chromium-126.0.6478.8/build/config/compiler/BUILD.gn
+config("optimize") { } +config("optimize") { }
+config("xoptimize") { +config("xoptimize") {
if (is_win) { if (is_win) {
# clang-cl's /O2 corresponds to clang's -O3, and really want -O2 for cflags = [ "/O2" ] + common_optimize_on_cflags
# consistency with the other platforms.
@@ -2450,7 +2317,8 @@ config("optimize") { @@ -2430,7 +2297,8 @@ config("optimize") {
} }
# Turn off optimizations. # Turn off optimizations.
@@ -215,7 +208,7 @@ Index: chromium-126.0.6478.8/build/config/compiler/BUILD.gn
if (is_win) { if (is_win) {
cflags = [ cflags = [
"/Od", # Disable optimization. "/Od", # Disable optimization.
@@ -2490,7 +2358,8 @@ config("no_optimize") { @@ -2417,7 +2377,8 @@
# Turns up the optimization level. Used to explicitly enable -O2 instead of # Turns up the optimization level. Used to explicitly enable -O2 instead of
# -Os for select targets on platforms that use optimize_for_size. No-op # -Os for select targets on platforms that use optimize_for_size. No-op
# elsewhere. # elsewhere.
@@ -225,9 +218,9 @@ Index: chromium-126.0.6478.8/build/config/compiler/BUILD.gn
if (is_nacl && is_nacl_irt) { if (is_nacl && is_nacl_irt) {
# The NaCl IRT is a special case and always wants its own config. # The NaCl IRT is a special case and always wants its own config.
# Various components do: # Various components do:
@@ -2523,7 +2392,8 @@ config("optimize_max") { @@ -2503,7 +2372,8 @@ config("optimize_max") {
# #
# TODO(crbug.com/41259697) - rework how all of these configs are related # TODO(crbug.com/621335) - rework how all of these configs are related
# so that we don't need this disclaimer. # so that we don't need this disclaimer.
-config("optimize_speed") { -config("optimize_speed") {
+config("optimize_speed") { } +config("optimize_speed") { }
@@ -235,7 +228,7 @@ Index: chromium-126.0.6478.8/build/config/compiler/BUILD.gn
if (is_nacl && is_nacl_irt) { if (is_nacl && is_nacl_irt) {
# The NaCl IRT is a special case and always wants its own config. # The NaCl IRT is a special case and always wants its own config.
# Various components do: # Various components do:
@@ -2552,7 +2422,8 @@ config("optimize_speed") { @@ -2529,7 +2399,8 @@ config("optimize_speed") {
} }
} }
@@ -245,7 +238,7 @@ Index: chromium-126.0.6478.8/build/config/compiler/BUILD.gn
cflags = [ "-O1" ] + common_optimize_on_cflags cflags = [ "-O1" ] + common_optimize_on_cflags
rustflags = [ "-Copt-level=1" ] rustflags = [ "-Copt-level=1" ]
ldflags = common_optimize_on_ldflags ldflags = common_optimize_on_ldflags
@@ -2685,7 +2556,8 @@ config("win_pdbaltpath") { @@ -2662,7 +2533,8 @@ config("win_pdbaltpath") {
} }
# Full symbols. # Full symbols.
@@ -253,9 +246,9 @@ Index: chromium-126.0.6478.8/build/config/compiler/BUILD.gn
+config("symbols") { } +config("symbols") { }
+config("xsymbols") { +config("xsymbols") {
rustflags = [] rustflags = []
configs = []
if (is_win) { if (is_win) {
@@ -2835,7 +2707,8 @@ config("symbols") { if (is_clang) {
@@ -2811,7 +2683,8 @@ config("symbols") {
# Minimal symbols. # Minimal symbols.
# This config guarantees to hold symbol for stack trace which are shown to user # This config guarantees to hold symbol for stack trace which are shown to user
# when crash happens in unittests running on buildbot. # when crash happens in unittests running on buildbot.
@@ -265,7 +258,7 @@ Index: chromium-126.0.6478.8/build/config/compiler/BUILD.gn
rustflags = [] rustflags = []
if (is_win) { if (is_win) {
# Functions, files, and line tables only. # Functions, files, and line tables only.
@@ -2920,7 +2793,8 @@ config("minimal_symbols") { @@ -2896,7 +2769,8 @@ config("minimal_symbols") {
# This configuration contains function names only. That is, the compiler is # This configuration contains function names only. That is, the compiler is
# told to not generate debug information and the linker then just puts function # told to not generate debug information and the linker then just puts function
# names in the final debug information. # names in the final debug information.

View File

@@ -0,0 +1,250 @@
Revert the following commit:
commit 886c849ee96e3026d28d7615cdd5af9628a2e5c8
Author: Ian Kilpatrick <ikilpatrick@chromium.org>
Date: Tue Feb 20 18:18:04 2024 +0000
[gc] Make UnicodeRangeSet gc'd.
There should be no user-visible behaviour change.
Bug: 41490008
Change-Id: I7f0003b7ff7c464d4ee36442bcff8c63da79b20c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5302778
Reviewed-by: Dominik Röttsches <drott@chromium.org>
Commit-Queue: Ian Kilpatrick <ikilpatrick@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1262789}
--- a/third_party/blink/renderer/core/css/css_font_face.cc
+++ b/third_party/blink/renderer/core/css/css_font_face.cc
@@ -291,7 +291,6 @@ bool CSSFontFace::UpdatePeriod() {
void CSSFontFace::Trace(Visitor* visitor) const {
visitor->Trace(segmented_font_faces_);
visitor->Trace(sources_);
- visitor->Trace(ranges_);
visitor->Trace(font_face_);
}
--- a/third_party/blink/renderer/core/css/css_font_face.h
+++ b/third_party/blink/renderer/core/css/css_font_face.h
@@ -47,8 +47,8 @@ class SimpleFontData;
class CORE_EXPORT CSSFontFace final : public GarbageCollected<CSSFontFace> {
public:
- CSSFontFace(FontFace* font_face, HeapVector<UnicodeRange>&& ranges)
- : ranges_(MakeGarbageCollected<UnicodeRangeSet>(std::move(ranges))),
+ CSSFontFace(FontFace* font_face, Vector<UnicodeRange>& ranges)
+ : ranges_(base::AdoptRef(new UnicodeRangeSet(ranges))),
font_face_(font_face) {
DCHECK(font_face_);
}
@@ -61,7 +61,7 @@ class CORE_EXPORT CSSFontFace final : pu
}
FontFace* GetFontFace() const { return font_face_.Get(); }
- const UnicodeRangeSet* Ranges() { return ranges_.Get(); }
+ scoped_refptr<UnicodeRangeSet> Ranges() { return ranges_; }
void AddSegmentedFontFace(CSSSegmentedFontFace*);
void RemoveSegmentedFontFace(CSSSegmentedFontFace*);
@@ -98,9 +98,9 @@ class CORE_EXPORT CSSFontFace final : pu
private:
void SetLoadStatus(FontFace::LoadStatusType);
+ scoped_refptr<UnicodeRangeSet> ranges_;
HeapHashSet<Member<CSSSegmentedFontFace>> segmented_font_faces_;
HeapDeque<Member<CSSFontFaceSource>> sources_;
- Member<const UnicodeRangeSet> ranges_;
Member<FontFace> font_face_;
};
--- a/third_party/blink/renderer/core/css/font_face.cc
+++ b/third_party/blink/renderer/core/css/font_face.cc
@@ -90,7 +90,7 @@ const CSSValue* ParseCSSValue(const Exec
CSSFontFace* CreateCSSFontFace(FontFace* font_face,
const CSSValue* unicode_range) {
- HeapVector<UnicodeRange> ranges;
+ Vector<UnicodeRange> ranges;
if (const auto* range_list = To<CSSValueList>(unicode_range)) {
unsigned num_ranges = range_list->length();
for (unsigned i = 0; i < num_ranges; i++) {
@@ -100,7 +100,7 @@ CSSFontFace* CreateCSSFontFace(FontFace*
}
}
- return MakeGarbageCollected<CSSFontFace>(font_face, std::move(ranges));
+ return MakeGarbageCollected<CSSFontFace>(font_face, ranges);
}
const CSSValue* ConvertFontMetricOverrideValue(const CSSValue* parsed_value) {
--- a/third_party/blink/renderer/platform/fonts/font_data_for_range_set.h
+++ b/third_party/blink/renderer/platform/fonts/font_data_for_range_set.h
@@ -39,18 +39,16 @@ class SimpleFontData;
class PLATFORM_EXPORT FontDataForRangeSet
: public GarbageCollected<FontDataForRangeSet> {
public:
- explicit FontDataForRangeSet(const SimpleFontData* font_data = nullptr,
- const UnicodeRangeSet* range_set = nullptr)
- : font_data_(font_data), range_set_(range_set) {}
+ explicit FontDataForRangeSet(
+ const SimpleFontData* font_data = nullptr,
+ scoped_refptr<UnicodeRangeSet> range_set = nullptr)
+ : font_data_(font_data), range_set_(std::move(range_set)) {}
FontDataForRangeSet(const FontDataForRangeSet& other);
virtual ~FontDataForRangeSet() = default;
- void Trace(Visitor* visitor) const {
- visitor->Trace(font_data_);
- visitor->Trace(range_set_);
- }
+ void Trace(Visitor* visitor) const { visitor->Trace(font_data_); }
bool Contains(UChar32 test_char) const {
return !range_set_ || range_set_->Contains(test_char);
@@ -58,7 +56,7 @@ class PLATFORM_EXPORT FontDataForRangeSe
bool IsEntireRange() const {
return !range_set_ || range_set_->IsEntireRange();
}
- const UnicodeRangeSet* Ranges() const { return range_set_.Get(); }
+ UnicodeRangeSet* Ranges() const { return range_set_.get(); }
bool HasFontData() const { return font_data_; }
const SimpleFontData* FontData() const { return font_data_.Get(); }
@@ -74,7 +72,7 @@ class PLATFORM_EXPORT FontDataForRangeSe
protected:
Member<const SimpleFontData> font_data_;
- Member<const UnicodeRangeSet> range_set_;
+ scoped_refptr<UnicodeRangeSet> range_set_;
};
} // namespace blink
--- a/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_face.cc
+++ b/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_face.cc
@@ -508,10 +508,10 @@ const OpenTypeVerticalData& HarfBuzzFace
return *harfbuzz_font_data_->VerticalData();
}
-hb_font_t* HarfBuzzFace::GetScaledFont(const UnicodeRangeSet* range_set,
+hb_font_t* HarfBuzzFace::GetScaledFont(scoped_refptr<UnicodeRangeSet> range_set,
VerticalLayoutCallbacks vertical_layout,
float specified_size) const {
- harfbuzz_font_data_->range_set_ = range_set;
+ harfbuzz_font_data_->range_set_ = std::move(range_set);
harfbuzz_font_data_->UpdateFallbackMetricsAndScale(*platform_data_,
vertical_layout);
--- a/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_face.h
+++ b/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_face.h
@@ -66,7 +66,7 @@ class HarfBuzzFace final : public Garbag
// Passing in specified_size in order to control selecting the right value
// from the trak table. If not set, the size of the internal FontPlatformData
// object will be used.
- hb_font_t* GetScaledFont(const UnicodeRangeSet*,
+ hb_font_t* GetScaledFont(scoped_refptr<UnicodeRangeSet>,
VerticalLayoutCallbacks,
float specified_size) const;
--- a/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_font_data.h
+++ b/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_font_data.h
@@ -32,7 +32,7 @@ struct HarfBuzzFontData final : public G
HarfBuzzFontData(const HarfBuzzFontData&) = delete;
HarfBuzzFontData& operator=(const HarfBuzzFontData&) = delete;
- void Trace(Visitor* visitor) const { visitor->Trace(range_set_); }
+ void Trace(Visitor*) const {}
// The vertical origin and vertical advance functions in HarfBuzzFace require
// the ascent and height metrics as fallback in case no specific vertical
@@ -98,7 +98,7 @@ struct HarfBuzzFontData final : public G
SpaceGlyphInOpenTypeTables::kUnknown;
scoped_refptr<OpenTypeVerticalData> vertical_data_;
- Member<const UnicodeRangeSet> range_set_;
+ scoped_refptr<UnicodeRangeSet> range_set_;
};
} // namespace blink
--- a/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_shaper.cc
+++ b/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_shaper.cc
@@ -289,7 +289,7 @@ void RoundHarfBuzzBufferPositions(hb_buf
inline bool ShapeRange(hb_buffer_t* buffer,
const FontFeatures& font_features,
const SimpleFontData* current_font,
- const UnicodeRangeSet* current_font_range_set,
+ scoped_refptr<UnicodeRangeSet> current_font_range_set,
UScriptCode current_run_script,
hb_direction_t direction,
hb_language_t language,
@@ -325,7 +325,7 @@ inline bool ShapeRange(hb_buffer_t* buff
hb_buffer_set_direction(buffer, direction);
hb_font_t* hb_font =
- face->GetScaledFont(current_font_range_set,
+ face->GetScaledFont(std::move(current_font_range_set),
HB_DIRECTION_IS_VERTICAL(direction)
? HarfBuzzFace::kPrepareForVerticalLayout
: HarfBuzzFace::kNoVerticalLayout,
--- a/third_party/blink/renderer/platform/fonts/unicode_range_set.cc
+++ b/third_party/blink/renderer/platform/fonts/unicode_range_set.cc
@@ -31,8 +31,8 @@
namespace blink {
-UnicodeRangeSet::UnicodeRangeSet(HeapVector<UnicodeRange>&& ranges)
- : ranges_(std::move(ranges)) {
+UnicodeRangeSet::UnicodeRangeSet(const Vector<UnicodeRange>& ranges)
+ : ranges_(ranges) {
if (ranges_.empty())
return;
--- a/third_party/blink/renderer/platform/fonts/unicode_range_set.h
+++ b/third_party/blink/renderer/platform/fonts/unicode_range_set.h
@@ -26,12 +26,13 @@
#ifndef THIRD_PARTY_BLINK_RENDERER_PLATFORM_FONTS_UNICODE_RANGE_SET_H_
#define THIRD_PARTY_BLINK_RENDERER_PLATFORM_FONTS_UNICODE_RANGE_SET_H_
-#include "third_party/blink/renderer/platform/heap/collection_support/heap_vector.h"
-#include "third_party/blink/renderer/platform/heap/garbage_collected.h"
#include "third_party/blink/renderer/platform/platform_export.h"
+#include "third_party/blink/renderer/platform/wtf/allocator/allocator.h"
#include "third_party/blink/renderer/platform/wtf/text/character_names.h"
#include "third_party/blink/renderer/platform/wtf/text/wtf_string.h"
#include "third_party/blink/renderer/platform/wtf/text/wtf_uchar.h"
+#include "third_party/blink/renderer/platform/wtf/thread_safe_ref_counted.h"
+#include "third_party/blink/renderer/platform/wtf/vector.h"
namespace blink {
@@ -55,14 +56,13 @@ struct PLATFORM_EXPORT UnicodeRange fina
UChar32 to_;
};
-class PLATFORM_EXPORT UnicodeRangeSet
- : public GarbageCollected<UnicodeRangeSet> {
+class PLATFORM_EXPORT UnicodeRangeSet : public RefCounted<UnicodeRangeSet> {
+ USING_FAST_MALLOC(UnicodeRangeSet);
+
public:
- explicit UnicodeRangeSet(HeapVector<UnicodeRange>&&);
+ explicit UnicodeRangeSet(const Vector<UnicodeRange>&);
UnicodeRangeSet() = default;
- void Trace(Visitor* visitor) const { visitor->Trace(ranges_); }
-
bool Contains(UChar32) const;
bool IntersectsWith(const String&) const;
bool IsEntireRange() const { return ranges_.empty(); }
@@ -71,8 +71,7 @@ class PLATFORM_EXPORT UnicodeRangeSet
bool operator==(const UnicodeRangeSet& other) const;
private:
- HeapVector<UnicodeRange>
- ranges_; // If empty, represents the whole code space.
+ Vector<UnicodeRange> ranges_; // If empty, represents the whole code space.
};
} // namespace blink

View File

@@ -0,0 +1,159 @@
Revert the following commit:
commit 59daae50fc3c47f7a8dbcc828446fdaa9f8c12c4
Author: Ian Kilpatrick <ikilpatrick@chromium.org>
Date: Tue Feb 20 18:35:11 2024 +0000
[gc] Make OpenTypeVerticalData gc'd.
There should be no user-visible behaviour change.
Bug: 41490008
Change-Id: Id93c85a7beb710944e07cff614cff2409c818436
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5302893
Commit-Queue: Ian Kilpatrick <ikilpatrick@chromium.org>
Reviewed-by: Dominik Röttsches <drott@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1262805}
--- a/third_party/blink/renderer/platform/fonts/font_platform_data.cc
+++ b/third_party/blink/renderer/platform/fonts/font_platform_data.cc
@@ -308,6 +308,11 @@ SkFont FontPlatformData::CreateSkFont(co
}
#endif // !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_WIN) && !BUILDFLAG(IS_IOS)
+scoped_refptr<OpenTypeVerticalData> FontPlatformData::CreateVerticalData()
+ const {
+ return OpenTypeVerticalData::CreateUnscaled(typeface_);
+}
+
IdentifiableToken FontPlatformData::ComputeTypefaceDigest() const {
DCHECK(typeface_);
int table_count = typeface_->countTables();
--- a/third_party/blink/renderer/platform/fonts/font_platform_data.h
+++ b/third_party/blink/renderer/platform/fonts/font_platform_data.h
@@ -59,6 +59,7 @@ typedef const struct __CTFont* CTFontRef
namespace blink {
class HarfBuzzFace;
+class OpenTypeVerticalData;
class PLATFORM_EXPORT FontPlatformData
: public GarbageCollected<FontPlatformData> {
@@ -137,6 +138,8 @@ class PLATFORM_EXPORT FontPlatformData
SkFont CreateSkFont(const FontDescription* = nullptr) const;
+ scoped_refptr<OpenTypeVerticalData> CreateVerticalData() const;
+
// Computes a digest from the typeface. The digest only depends on the
// underlying font itself, and does not vary by the style (size, weight,
// italics, etc). This is aimed at discovering the fingerprinting information
--- a/third_party/blink/renderer/platform/fonts/opentype/open_type_vertical_data.h
+++ b/third_party/blink/renderer/platform/fonts/opentype/open_type_vertical_data.h
@@ -27,10 +27,10 @@
#include "base/memory/scoped_refptr.h"
#include "third_party/blink/renderer/platform/fonts/glyph.h"
-#include "third_party/blink/renderer/platform/heap/garbage_collected.h"
#include "third_party/blink/renderer/platform/platform_export.h"
#include "third_party/blink/renderer/platform/wtf/allocator/allocator.h"
#include "third_party/blink/renderer/platform/wtf/hash_map.h"
+#include "third_party/blink/renderer/platform/wtf/ref_counted.h"
#include "third_party/blink/renderer/platform/wtf/vector.h"
#include "third_party/skia/include/core/SkRefCnt.h"
#include "third_party/skia/include/core/SkTypeface.h"
@@ -40,11 +40,14 @@ class SkFont;
namespace blink {
class PLATFORM_EXPORT OpenTypeVerticalData
- : public GarbageCollected<OpenTypeVerticalData> {
- public:
- explicit OpenTypeVerticalData(sk_sp<SkTypeface>);
+ : public RefCounted<OpenTypeVerticalData> {
+ USING_FAST_MALLOC(OpenTypeVerticalData);
- void Trace(Visitor*) const {}
+ public:
+ static scoped_refptr<OpenTypeVerticalData> CreateUnscaled(
+ sk_sp<SkTypeface> typeface) {
+ return base::AdoptRef(new OpenTypeVerticalData(typeface));
+ }
void SetScaleAndFallbackMetrics(float size_per_unit,
float ascent,
@@ -60,6 +63,8 @@ class PLATFORM_EXPORT OpenTypeVerticalDa
float* out_xy_array) const;
private:
+ explicit OpenTypeVerticalData(sk_sp<SkTypeface>);
+
void LoadMetrics(sk_sp<SkTypeface>);
bool HasVORG() const { return !vert_origin_y_.empty(); }
--- a/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_face.cc
+++ b/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_face.cc
@@ -202,7 +202,8 @@
void* user_data) {
HarfBuzzFontData* hb_font_data =
reinterpret_cast<HarfBuzzFontData*>(font_data);
- OpenTypeVerticalData* vertical_data = hb_font_data->VerticalData();
+ scoped_refptr<OpenTypeVerticalData> vertical_data =
+ hb_font_data->VerticalData();
if (!vertical_data) {
return false;
}
@@ -223,7 +223,8 @@ static hb_position_t HarfBuzzGetGlyphVer
void* user_data) {
HarfBuzzFontData* hb_font_data =
reinterpret_cast<HarfBuzzFontData*>(font_data);
- OpenTypeVerticalData* vertical_data = hb_font_data->VerticalData();
+ scoped_refptr<OpenTypeVerticalData> vertical_data =
+ hb_font_data->VerticalData();
if (!vertical_data) {
return SkiaScalarToHarfBuzzPosition(hb_font_data->height_fallback_);
}
--- a/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_font_data.h
+++ b/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_font_data.h
@@ -32,10 +32,7 @@ struct HarfBuzzFontData final : public G
HarfBuzzFontData(const HarfBuzzFontData&) = delete;
HarfBuzzFontData& operator=(const HarfBuzzFontData&) = delete;
- void Trace(Visitor* visitor) const {
- visitor->Trace(vertical_data_);
- visitor->Trace(range_set_);
- }
+ void Trace(Visitor* visitor) const { visitor->Trace(range_set_); }
// The vertical origin and vertical advance functions in HarfBuzzFace require
// the ascent and height metrics as fallback in case no specific vertical
@@ -70,18 +67,18 @@ struct HarfBuzzFontData final : public G
}
}
- OpenTypeVerticalData* VerticalData() {
+ scoped_refptr<OpenTypeVerticalData> VerticalData() {
if (!vertical_data_) {
DCHECK_NE(ascent_fallback_, kInvalidFallbackMetricsValue);
DCHECK_NE(height_fallback_, kInvalidFallbackMetricsValue);
DCHECK_NE(size_per_unit_, kInvalidFallbackMetricsValue);
vertical_data_ =
- MakeGarbageCollected<OpenTypeVerticalData>(font_.refTypeface());
+ OpenTypeVerticalData::CreateUnscaled(font_.refTypeface());
}
vertical_data_->SetScaleAndFallbackMetrics(size_per_unit_, ascent_fallback_,
height_fallback_);
- return vertical_data_.Get();
+ return vertical_data_;
}
const hb::unique_ptr<hb_font_t> unscaled_font_;
@@ -100,7 +97,7 @@ struct HarfBuzzFontData final : public G
SpaceGlyphInOpenTypeTables space_in_gsub_ =
SpaceGlyphInOpenTypeTables::kUnknown;
- Member<OpenTypeVerticalData> vertical_data_;
+ scoped_refptr<OpenTypeVerticalData> vertical_data_;
Member<const UnicodeRangeSet> range_set_;
};

View File

@@ -0,0 +1,107 @@
Revert the following commit:
commit 5ffa0446f51e34d06dc0539810a8a5d35ec9e3fc
Author: Ian Kilpatrick <ikilpatrick@chromium.org>
Date: Thu Feb 22 17:08:22 2024 +0000
[fonts][perf] Explicitly leak SimpleFontDatas via a LRU cache.
This adds a strong LRU cache to FontDataCache to retain the most
recently used fonts.
This covers the case where a large amount of DOM is destroyed, and
previously we'd release all the font related objects if the GC kicked
in.
Speedometer3 appears to peak at ~75 objects in the cache.
Results for different cache sizes:
Cache size: 64 | 32 | 16
Speedometer3: +0.9% | +0.5% | +0%
Bug: 41490008
Change-Id: I131b6a79f246e61e13a7d44dddbc1f9e625ed44a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5314842
Reviewed-by: Dominik Röttsches <drott@chromium.org>
Commit-Queue: Ian Kilpatrick <ikilpatrick@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1264027}
--- a/third_party/blink/renderer/platform/fonts/font_data_cache.cc
+++ b/third_party/blink/renderer/platform/fonts/font_data_cache.cc
@@ -36,15 +36,6 @@
namespace blink {
-namespace {
-
-// The maximum number of strong references to retain via the LRU.
-// This explicitly leaks fonts (and related objects) unless under extreme
-// memory pressure where it will be cleared. DO NOT increase unnecessarily.
-const wtf_size_t kMaxSize = 64;
-
-} // namespace
-
const SimpleFontData* FontDataCache::Get(const FontPlatformData* platform_data,
bool subpixel_ascent_descent) {
if (!platform_data)
@@ -64,16 +55,7 @@ const SimpleFontData* FontDataCache::Get
add_result.stored_value->value = MakeGarbageCollected<SimpleFontData>(
platform_data, nullptr, subpixel_ascent_descent);
}
-
- const SimpleFontData* result = add_result.stored_value->value;
-
- // Update our LRU to keep a strong reference to `result`.
- strong_reference_lru_.PrependOrMoveToFirst(result);
- while (strong_reference_lru_.size() > kMaxSize) {
- strong_reference_lru_.pop_back();
- }
-
- return result;
+ return add_result.stored_value->value;
}
} // namespace blink
--- a/third_party/blink/renderer/platform/fonts/font_data_cache.h
+++ b/third_party/blink/renderer/platform/fonts/font_data_cache.h
@@ -34,7 +34,6 @@
#include "third_party/blink/renderer/platform/fonts/font_platform_data.h"
#include "third_party/blink/renderer/platform/fonts/simple_font_data.h"
#include "third_party/blink/renderer/platform/heap/collection_support/heap_hash_map.h"
-#include "third_party/blink/renderer/platform/heap/collection_support/heap_linked_hash_set.h"
namespace blink {
@@ -59,29 +58,17 @@ class FontDataCache final {
FontDataCache(const FontDataCache&) = delete;
FontDataCache& operator=(const FontDataCache&) = delete;
- void Trace(Visitor* visitor) const {
- visitor->Trace(cache_);
- visitor->Trace(strong_reference_lru_);
- }
+ void Trace(Visitor* visitor) const { visitor->Trace(cache_); }
const SimpleFontData* Get(const FontPlatformData*,
bool subpixel_ascent_descent = false);
- void Clear() {
- cache_.clear();
- strong_reference_lru_.clear();
- }
+ void Clear() { cache_.clear(); }
private:
HeapHashMap<Member<const FontPlatformData>,
WeakMember<const SimpleFontData>,
FontDataCacheKeyHashTraits>
cache_;
-
- // The above `cache_` is weak, meaning its entries will potentially be
- // cleared if no other references exist.
- // This LRU keeps a small (limited) number of strong references alive so they
- // won't be cleared in the above cache for performance reasons.
- HeapLinkedHashSet<Member<const SimpleFontData>> strong_reference_lru_;
};
} // namespace blink

View File

@@ -0,0 +1,425 @@
Revert the following commit:
commit cc6c0b2a9e1dbc96f3ebed713dc71960a29dc4f1
Author: Ian Kilpatrick <ikilpatrick@chromium.org>
Date: Tue Mar 5 20:27:13 2024 +0000
Reland "[gc] Make FontFamily immutable."
This reverts commit 748ed11510ec5bb09cc8b92f67f1f62964f023fa.
Reason for revert: Previous patch which caused MSAN issue was reapplied.
Original change's description:
> Revert "[gc] Make FontFamily immutable."
>
> This reverts commit ca3d3085d8b01fc74623d639c615fc57842cd26d.
>
> Reason for revert: crrev.com/c/5328767 is the reason for failure on some tests on MSAN. Please see crbug.com/327969288 for more details.
>
> Original change's description:
> > [gc] Make FontFamily immutable.
> >
> > Previously we'd build up font-family lists front to back, but would
> > need to mutate them to do so. Instead just build them backwards.
> >
> > This removes a bunch of problematic APIs (like AppendFamily - which
> > doesn't append), and simplifies the code.
> >
> > This will help avoid atomic write barriers once converted to oilpan.
> >
> > Bug: 41490008
> > Change-Id: Icfcec2d0a1716585cf42985616c02b42b6647943
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5322929
> > Commit-Queue: Ian Kilpatrick <ikilpatrick@chromium.org>
> > Reviewed-by: Dominik Röttsches <drott@chromium.org>
> > Cr-Commit-Position: refs/heads/main@{#1267168}
>
> Bug: 41490008, 327969288
> Change-Id: Ic69a5707d00cc98b97dcae3f4b8207b452ce5cbd
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5333950
> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
> Commit-Queue: Taiyo Mizuhashi <taiyo@chromium.org>
> Owners-Override: Taiyo Mizuhashi <taiyo@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1267674}
Bug: 41490008, 327969288
Change-Id: If1d395e324b0be15488ef5410e9bcdb219bb19c6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5344844
Commit-Queue: Ian Kilpatrick <ikilpatrick@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#1268654}
--- a/third_party/blink/renderer/core/css/css_font_face.cc
+++ b/third_party/blink/renderer/core/css/css_font_face.cc
@@ -216,8 +216,9 @@ bool CSSFontFace::MaybeLoadFont(const Fo
void CSSFontFace::Load() {
FontDescription font_description;
- font_description.SetFamily(
- FontFamily(font_face_->family(), FontFamily::Type::kFamilyName));
+ FontFamily font_family;
+ font_family.SetFamily(font_face_->family(), FontFamily::Type::kFamilyName);
+ font_description.SetFamily(font_family);
Load(font_description);
}
--- a/third_party/blink/renderer/core/css/font_face_set_document.cc
+++ b/third_party/blink/renderer/core/css/font_face_set_document.cc
@@ -195,10 +195,13 @@ bool FontFaceSetDocument::ResolveFontSty
ComputedStyleBuilder builder =
GetDocument()->GetStyleResolver().CreateComputedStyleBuilder();
- FontDescription default_font_description;
- default_font_description.SetFamily(FontFamily(
+ FontFamily font_family;
+ font_family.SetFamily(
FontFaceSet::DefaultFontFamily(),
- FontFamily::InferredTypeFor(FontFaceSet::DefaultFontFamily())));
+ FontFamily::InferredTypeFor(FontFaceSet::DefaultFontFamily()));
+
+ FontDescription default_font_description;
+ default_font_description.SetFamily(font_family);
default_font_description.SetSpecifiedSize(FontFaceSet::kDefaultFontSize);
default_font_description.SetComputedSize(FontFaceSet::kDefaultFontSize);
--- a/third_party/blink/renderer/core/css/font_face_set_worker.cc
+++ b/third_party/blink/renderer/core/css/font_face_set_worker.cc
@@ -84,10 +84,13 @@ bool FontFaceSetWorker::ResolveFontStyle
return false;
}
- FontDescription default_font_description;
- default_font_description.SetFamily(FontFamily(
+ FontFamily font_family;
+ font_family.SetFamily(
FontFaceSet::DefaultFontFamily(),
- FontFamily::InferredTypeFor(FontFaceSet::DefaultFontFamily())));
+ FontFamily::InferredTypeFor(FontFaceSet::DefaultFontFamily()));
+
+ FontDescription default_font_description;
+ default_font_description.SetFamily(font_family);
default_font_description.SetSpecifiedSize(FontFaceSet::kDefaultFontSize);
default_font_description.SetComputedSize(FontFaceSet::kDefaultFontSize);
--- a/third_party/blink/renderer/core/css/resolver/font_builder.cc
+++ b/third_party/blink/renderer/core/css/resolver/font_builder.cc
@@ -54,9 +54,11 @@ void FontBuilder::DidChangeWritingMode()
}
FontFamily FontBuilder::StandardFontFamily() const {
+ FontFamily family;
const AtomicString& standard_font_family = StandardFontFamilyName();
- return FontFamily(standard_font_family,
- FontFamily::InferredTypeFor(standard_font_family));
+ family.SetFamily(standard_font_family,
+ FontFamily::InferredTypeFor(standard_font_family));
+ return family;
}
AtomicString FontBuilder::StandardFontFamilyName() const {
--- a/third_party/blink/renderer/core/css/resolver/style_builder_converter.cc
+++ b/third_party/blink/renderer/core/css/resolver/style_builder_converter.cc
@@ -379,8 +379,8 @@ FontDescription::FamilyDescription Style
if (const auto* system_font =
DynamicTo<cssvalue::CSSPendingSystemFontValue>(value)) {
- desc.family = FontFamily(system_font->ResolveFontFamily(),
- FontFamily::Type::kFamilyName);
+ desc.family.SetFamily(system_font->ResolveFontFamily(),
+ FontFamily::Type::kFamilyName);
return desc;
}
@@ -410,8 +410,10 @@ FontDescription::FamilyDescription Style
// Take the previous value and wrap it in a `SharedFontFamily` adding to
// the linked list.
if (has_value) {
- next =
- SharedFontFamily::Create(family_name, family_type, std::move(next));
+ scoped_refptr<SharedFontFamily> shared = SharedFontFamily::Create();
+ shared->SetFamily(family_name, family_type);
+ shared->AppendFamily(next);
+ next = shared;
}
family_name = next_family_name;
family_type = is_generic ? FontFamily::Type::kGenericFamily
@@ -442,7 +444,8 @@ FontDescription::FamilyDescription Style
}
#endif
- desc.family = FontFamily(family_name, family_type, std::move(next));
+ desc.family.SetFamily(family_name, family_type);
+ desc.family.AppendFamily(next);
return desc;
}
--- a/third_party/blink/renderer/core/html/canvas/canvas_font_cache.cc
+++ b/third_party/blink/renderer/core/html/canvas/canvas_font_cache.cc
@@ -29,9 +29,11 @@ const int defaultFontSize = 10;
const ComputedStyle* CreateDefaultFontStyle(const Document& document) {
const AtomicString& default_font_family = font_family_names::kSansSerif;
+ FontFamily font_family;
+ font_family.SetFamily(default_font_family,
+ FontFamily::InferredTypeFor(default_font_family));
FontDescription default_font_description;
- default_font_description.SetFamily(FontFamily(
- default_font_family, FontFamily::InferredTypeFor(default_font_family)));
+ default_font_description.SetFamily(font_family);
default_font_description.SetSpecifiedSize(defaultFontSize);
default_font_description.SetComputedSize(defaultFontSize);
ComputedStyleBuilder builder =
--- a/third_party/blink/renderer/core/page/drag_image.cc
+++ b/third_party/blink/renderer/core/page/drag_image.cc
@@ -127,9 +127,11 @@ static Font DeriveDragLabelFont(int size
const AtomicString& family =
LayoutThemeFontProvider::SystemFontFamily(CSSValueID::kNone);
+ FontFamily font_family;
+ font_family.SetFamily(family, FontFamily::InferredTypeFor(family));
+
FontDescription description;
- description.SetFamily(
- FontFamily(family, FontFamily::InferredTypeFor(family)));
+ description.SetFamily(font_family);
description.SetWeight(font_weight);
description.SetSpecifiedSize(size);
description.SetComputedSize(size);
--- a/third_party/blink/renderer/core/paint/embedded_object_painter.cc
+++ b/third_party/blink/renderer/core/paint/embedded_object_painter.cc
@@ -32,9 +32,11 @@ static Font ReplacementTextFont(const Do
const float size = LayoutThemeFontProvider::SystemFontSize(
CSSValueID::kWebkitSmallControl, document);
+ FontFamily font_family;
+ font_family.SetFamily(family, FontFamily::InferredTypeFor(family));
+
FontDescription font_description;
- font_description.SetFamily(
- FontFamily(family, FontFamily::InferredTypeFor(family)));
+ font_description.SetFamily(font_family);
font_description.SetWeight(kBoldWeightValue);
font_description.SetSpecifiedSize(size);
font_description.SetComputedSize(size);
--- a/third_party/blink/renderer/platform/exported/web_font_description.cc
+++ b/third_party/blink/renderer/platform/exported/web_font_description.cc
@@ -49,10 +49,13 @@ WebFontDescription::WebFontDescription(c
}
WebFontDescription::operator FontDescription() const {
+ FontFamily font_family;
+ font_family.SetFamily(family, family_is_generic
+ ? FontFamily::Type::kGenericFamily
+ : FontFamily::Type::kFamilyName);
+
FontDescription desc;
- desc.SetFamily(FontFamily(family, family_is_generic
- ? FontFamily::Type::kGenericFamily
- : FontFamily::Type::kFamilyName));
+ desc.SetFamily(font_family);
desc.SetGenericFamily(
static_cast<FontDescription::GenericFamilyType>(generic_family));
desc.SetSpecifiedSize(size);
--- a/third_party/blink/renderer/platform/fonts/font_description.h
+++ b/third_party/blink/renderer/platform/fonts/font_description.h
@@ -195,6 +195,7 @@ class PLATFORM_EXPORT FontDescription {
FamilyDescription GetFamilyDescription() const {
return FamilyDescription(GenericFamily(), Family());
}
+ FontFamily& FirstFamily() { return family_list_; }
const FontFamily& FirstFamily() const { return family_list_; }
Size GetSize() const {
return Size(KeywordSize(), SpecifiedSize(), IsAbsoluteSize());
@@ -450,6 +451,10 @@ class PLATFORM_EXPORT FontDescription {
return fields_.subpixel_ascent_descent_;
}
+ void SetHashCategory(HashCategory category) {
+ fields_.hash_category_ = category;
+ }
+
HashCategory GetHashCategory() const {
return static_cast<HashCategory>(fields_.hash_category_);
}
--- a/third_party/blink/renderer/platform/fonts/font_fallback_list.cc
+++ b/third_party/blink/renderer/platform/fonts/font_fallback_list.cc
@@ -178,8 +178,9 @@ const FontData* FontFallbackList::GetFon
if (font_selector_) {
// Try the user's preferred standard font.
- FontFamily font_family(font_family_names::kWebkitStandard,
- FontFamily::Type::kGenericFamily);
+ FontFamily font_family;
+ font_family.SetFamily(font_family_names::kWebkitStandard,
+ FontFamily::Type::kGenericFamily);
if (const FontData* data =
font_selector_->GetFontData(font_description, font_family)) {
return data;
--- a/third_party/blink/renderer/platform/fonts/font_family.cc
+++ b/third_party/blink/renderer/platform/fonts/font_family.cc
@@ -49,6 +49,20 @@ bool operator==(const FontFamily& a, con
return true;
}
+wtf_size_t FontFamily::CountNames() const {
+ wtf_size_t count = 0;
+ for (const FontFamily* font_family = this; font_family;
+ font_family = font_family->Next())
+ ++count;
+ return count;
+}
+
+void FontFamily::AppendFamily(AtomicString family_name, Type family_type) {
+ scoped_refptr<SharedFontFamily> appended_family = SharedFontFamily::Create();
+ appended_family->SetFamily(family_name, family_type);
+ AppendFamily(appended_family);
+}
+
String FontFamily::ToString() const {
StringBuilder builder;
builder.Append(family_name_);
--- a/third_party/blink/renderer/platform/fonts/font_family.h
+++ b/third_party/blink/renderer/platform/fonts/font_family.h
@@ -39,18 +39,16 @@ class PLATFORM_EXPORT FontFamily {
DISALLOW_NEW();
public:
- // https://drafts.csswg.org/css-fonts/#font-family-prop
- enum class Type : uint8_t { kFamilyName, kGenericFamily };
-
- FontFamily(const AtomicString& family_name,
- Type family_type,
- scoped_refptr<SharedFontFamily> next = nullptr)
- : family_name_(family_name),
- next_(std::move(next)),
- family_type_(family_type) {}
FontFamily() = default;
~FontFamily();
+ // https://drafts.csswg.org/css-fonts/#font-family-prop
+ enum class Type : uint8_t { kFamilyName, kGenericFamily };
+
+ void SetFamily(const AtomicString& family_name, Type family_type) {
+ family_name_ = family_name;
+ family_type_ = family_type;
+ }
// Return this font family's name. Note that it is never quoted nor escaped.
// For web-exposed serialization, please rely instead on the functions
// ComputedStyleUtils::ValueForFontFamily(const FontFamily&) and
@@ -59,8 +57,13 @@ class PLATFORM_EXPORT FontFamily {
const AtomicString& FamilyName() const { return family_name_; }
bool FamilyIsGeneric() const { return family_type_ == Type::kGenericFamily; }
+ // Returns number of linked `FontFamily` including `this`, so return value is
+ // greater than or equal to 1. When `Next()` is `nullptr`, return value is 1.
+ wtf_size_t CountNames() const;
const FontFamily* Next() const;
+ void AppendFamily(scoped_refptr<SharedFontFamily>);
+ void AppendFamily(AtomicString family_name, Type family_type);
scoped_refptr<SharedFontFamily> ReleaseNext();
bool IsPrewarmed() const { return is_prewarmed_; }
@@ -93,19 +96,12 @@ class PLATFORM_EXPORT SharedFontFamily :
SharedFontFamily(const SharedFontFamily&) = delete;
SharedFontFamily& operator=(const SharedFontFamily&) = delete;
- static scoped_refptr<SharedFontFamily> Create(
- const AtomicString& family_name,
- Type family_type,
- scoped_refptr<SharedFontFamily> next = nullptr) {
- return base::AdoptRef(
- new SharedFontFamily(family_name, family_type, std::move(next)));
+ static scoped_refptr<SharedFontFamily> Create() {
+ return base::AdoptRef(new SharedFontFamily);
}
private:
- SharedFontFamily(const AtomicString& family_name,
- Type family_type,
- scoped_refptr<SharedFontFamily> next)
- : FontFamily(family_name, family_type, std::move(next)) {}
+ SharedFontFamily() = default;
};
PLATFORM_EXPORT bool operator==(const FontFamily&, const FontFamily&);
@@ -125,6 +121,10 @@ inline const FontFamily* FontFamily::Nex
return next_.get();
}
+inline void FontFamily::AppendFamily(scoped_refptr<SharedFontFamily> family) {
+ next_ = std::move(family);
+}
+
inline scoped_refptr<SharedFontFamily> FontFamily::ReleaseNext() {
return std::move(next_);
}
--- a/third_party/blink/renderer/platform/graphics/placeholder_image.cc
+++ b/third_party/blink/renderer/platform/graphics/placeholder_image.cc
@@ -85,18 +85,23 @@ void DrawCenteredIcon(cc::PaintCanvas* c
}
FontDescription CreatePlaceholderFontDescription(float scale_factor) {
- scoped_refptr<SharedFontFamily> arial = SharedFontFamily::Create(
- font_family_names::kArial, FontFamily::Type::kFamilyName);
- scoped_refptr<SharedFontFamily> helvetica = SharedFontFamily::Create(
- font_family_names::kHelvetica, FontFamily::Type::kFamilyName, arial);
- scoped_refptr<SharedFontFamily> helvetica_neue =
- SharedFontFamily::Create(font_family_names::kHelveticaNeue,
- FontFamily::Type::kFamilyName, helvetica);
- FontFamily roboto(font_family_names::kRoboto, FontFamily::Type::kFamilyName,
- helvetica_neue);
-
FontDescription description;
- description.SetFamily(roboto);
+ description.FirstFamily().SetFamily(font_family_names::kRoboto,
+ FontFamily::Type::kFamilyName);
+
+ scoped_refptr<SharedFontFamily> helvetica_neue = SharedFontFamily::Create();
+ helvetica_neue->SetFamily(font_family_names::kHelveticaNeue,
+ FontFamily::Type::kFamilyName);
+ scoped_refptr<SharedFontFamily> helvetica = SharedFontFamily::Create();
+ helvetica->SetFamily(font_family_names::kHelvetica,
+ FontFamily::Type::kFamilyName);
+ scoped_refptr<SharedFontFamily> arial = SharedFontFamily::Create();
+ arial->SetFamily(font_family_names::kArial, FontFamily::Type::kFamilyName);
+
+ helvetica->AppendFamily(std::move(arial));
+ helvetica_neue->AppendFamily(std::move(helvetica));
+ description.FirstFamily().AppendFamily(std::move(helvetica_neue));
+
description.SetGenericFamily(FontDescription::kSansSerifFamily);
description.SetComputedSize(scale_factor * kFontSize);
description.SetWeight(FontSelectionValue(500));
--- a/third_party/blink/renderer/platform/testing/font_test_helpers.cc
+++ b/third_party/blink/renderer/platform/testing/font_test_helpers.cc
@@ -127,9 +127,11 @@ Font CreateTestFont(const AtomicString&
size_t data_size,
float size,
const FontDescription::VariantLigatures* ligatures) {
+ FontFamily family;
+ family.SetFamily(family_name, FontFamily::Type::kFamilyName);
+
FontDescription font_description;
- font_description.SetFamily(
- FontFamily(family_name, FontFamily::Type::kFamilyName));
+ font_description.SetFamily(family);
font_description.SetSpecifiedSize(size);
font_description.SetComputedSize(size);
if (ligatures)
@@ -143,9 +145,11 @@ Font CreateTestFont(const AtomicString&
float size,
const FontDescription::VariantLigatures* ligatures,
void (*init_font_description)(FontDescription*)) {
+ FontFamily family;
+ family.SetFamily(family_name, FontFamily::Type::kFamilyName);
+
FontDescription font_description;
- font_description.SetFamily(
- FontFamily(family_name, FontFamily::Type::kFamilyName));
+ font_description.SetFamily(family);
font_description.SetSpecifiedSize(size);
font_description.SetComputedSize(size);
if (ligatures)

View File

@@ -0,0 +1,258 @@
This is a revert of the commit below. While it doesn't strictly fix any
bugs, it's needed to support bad-font-gc2.patch building.
commit 9a8fc2e22363c954af239c06798bf85a9c928295
Author: Ian Kilpatrick <ikilpatrick@chromium.org>
Date: Wed Feb 14 19:35:11 2024 +0000
[gc] Make FontCustomPlatformData gc'd.
There should be no user-visible behaviour change.
Bug: 41490008
Change-Id: I6364bf4c5b5dce9f99d8e2d7e1f84537c5493c33
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5293060
Commit-Queue: Ian Kilpatrick <ikilpatrick@chromium.org>
Reviewed-by: Dominik Röttsches <drott@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1260637}
--- a/third_party/blink/renderer/core/css/binary_data_font_face_source.cc
+++ b/third_party/blink/renderer/core/css/binary_data_font_face_source.cc
@@ -27,16 +27,13 @@ BinaryDataFontFaceSource::BinaryDataFont
return;
}
probe::FontsUpdated(context, font_face, String(),
- custom_platform_data_.Get());
+ custom_platform_data_.get());
}
-void BinaryDataFontFaceSource::Trace(Visitor* visitor) const {
- visitor->Trace(custom_platform_data_);
- CSSFontFaceSource::Trace(visitor);
-}
+BinaryDataFontFaceSource::~BinaryDataFontFaceSource() = default;
bool BinaryDataFontFaceSource::IsValid() const {
- return custom_platform_data_;
+ return custom_platform_data_.get();
}
SimpleFontData* BinaryDataFontFaceSource::CreateFontData(
--- a/third_party/blink/renderer/core/css/binary_data_font_face_source.h
+++ b/third_party/blink/renderer/core/css/binary_data_font_face_source.h
@@ -16,14 +16,14 @@ class FontCustomPlatformData;
class BinaryDataFontFaceSource final : public CSSFontFaceSource {
public:
BinaryDataFontFaceSource(CSSFontFace*, SharedBuffer*, String&);
- void Trace(Visitor*) const override;
+ ~BinaryDataFontFaceSource() override;
bool IsValid() const override;
private:
SimpleFontData* CreateFontData(const FontDescription&,
const FontSelectionCapabilities&) override;
- Member<const FontCustomPlatformData> custom_platform_data_;
+ scoped_refptr<FontCustomPlatformData> custom_platform_data_;
};
} // namespace blink
--- a/third_party/blink/renderer/core/css/remote_font_face_source.cc
+++ b/third_party/blink/renderer/core/css/remote_font_face_source.cc
@@ -262,7 +262,7 @@ void RemoteFontFaceSource::NotifyFinishe
FontInvalidationReason::kFontFaceLoaded);
if (custom_font_data_) {
probe::FontsUpdated(execution_context, face_->GetFontFace(),
- resource->Url().GetString(), custom_font_data_.Get());
+ resource->Url().GetString(), custom_font_data_.get());
}
}
}
@@ -456,7 +456,6 @@ void RemoteFontFaceSource::BeginLoadIfNe
void RemoteFontFaceSource::Trace(Visitor* visitor) const {
visitor->Trace(face_);
visitor->Trace(font_selector_);
- visitor->Trace(custom_font_data_);
CSSFontFaceSource::Trace(visitor);
FontResourceClient::Trace(visitor);
}
--- a/third_party/blink/renderer/core/css/remote_font_face_source.h
+++ b/third_party/blink/renderer/core/css/remote_font_face_source.h
@@ -43,7 +43,7 @@ class RemoteFontFaceSource final : publi
bool IsPendingDataUrl() const override;
const FontCustomPlatformData* GetCustomPlaftormData() const override {
- return custom_font_data_.Get();
+ return custom_font_data_.get();
}
void BeginLoadIfNeeded() override;
@@ -157,7 +157,7 @@ class RemoteFontFaceSource final : publi
Member<FontSelector> font_selector_;
// |nullptr| if font is not loaded or failed to decode.
- Member<const FontCustomPlatformData> custom_font_data_;
+ scoped_refptr<FontCustomPlatformData> custom_font_data_;
// |nullptr| if font is not loaded or failed to decode.
String url_;
--- a/third_party/blink/renderer/core/loader/resource/font_resource.cc
+++ b/third_party/blink/renderer/core/loader/resource/font_resource.cc
@@ -112,7 +112,7 @@ void FontResource::StartLoadLimitTimersI
kFontLoadWaitLong);
}
-const FontCustomPlatformData* FontResource::GetCustomFontData() {
+scoped_refptr<FontCustomPlatformData> FontResource::GetCustomFontData() {
if (!font_data_ && !ErrorOccurred() && !IsLoading()) {
if (Data()) {
auto decode_start_time = base::TimeTicks::Now();
@@ -225,7 +225,6 @@ void FontResource::AddClearDataObserver(
}
void FontResource::Trace(Visitor* visitor) const {
- visitor->Trace(font_data_);
visitor->Trace(clear_data_observers_);
Resource::Trace(visitor);
}
--- a/third_party/blink/renderer/core/loader/resource/font_resource.h
+++ b/third_party/blink/renderer/core/loader/resource/font_resource.h
@@ -72,7 +72,7 @@ class CORE_EXPORT FontResource final : p
String OtsParsingMessage() const { return ots_parsing_message_; }
- const FontCustomPlatformData* GetCustomFontData();
+ scoped_refptr<FontCustomPlatformData> GetCustomFontData();
// Returns true if the loading priority of the remote font resource can be
// lowered. The loading priority of the font can be lowered only if the
@@ -112,7 +112,7 @@ class CORE_EXPORT FontResource final : p
kMaxValue = kLongLimitExceeded,
};
- Member<FontCustomPlatformData> font_data_;
+ scoped_refptr<FontCustomPlatformData> font_data_;
String ots_parsing_message_;
LoadLimitState load_limit_state_;
bool cors_failed_;
--- a/third_party/blink/renderer/platform/fonts/font_custom_platform_data.cc
+++ b/third_party/blink/renderer/platform/fonts/font_custom_platform_data.cc
@@ -115,7 +115,7 @@ const FontPlatformData* FontCustomPlatfo
const ResolvedFontFeatures& resolved_font_features,
FontOrientation orientation,
const FontVariationSettings* variation_settings,
- const FontPalette* palette) const {
+ const FontPalette* palette) {
DCHECK(base_typeface_);
sk_sp<SkTypeface> return_typeface = base_typeface_;
@@ -304,7 +304,7 @@ String FontCustomPlatformData::FamilyNam
localized_string.fString.size());
}
-FontCustomPlatformData* FontCustomPlatformData::Create(
+scoped_refptr<FontCustomPlatformData> FontCustomPlatformData::Create(
SharedBuffer* buffer,
String& ots_parse_message) {
DCHECK(buffer);
@@ -321,8 +321,8 @@ FontCustomPlatformData* FontCustomPlatfo
if (v8::Isolate* isolate = v8::Isolate::TryGetCurrent()) {
isolate->AdjustAmountOfExternalAllocatedMemory(data_size);
}
- return MakeGarbageCollected<FontCustomPlatformData>(std::move(typeface),
- data_size);
+ return base::AdoptRef(
+ new FontCustomPlatformData(std::move(typeface), data_size));
}
bool FontCustomPlatformData::MayBeIconFont() const {
--- a/third_party/blink/renderer/platform/fonts/font_custom_platform_data.h
+++ b/third_party/blink/renderer/platform/fonts/font_custom_platform_data.h
@@ -39,7 +39,6 @@
#include "third_party/blink/renderer/platform/fonts/opentype/variable_axes_names.h"
#include "third_party/blink/renderer/platform/fonts/resolved_font_features.h"
#include "third_party/blink/renderer/platform/fonts/text_rendering_mode.h"
-#include "third_party/blink/renderer/platform/heap/garbage_collected.h"
#include "third_party/blink/renderer/platform/platform_export.h"
#include "third_party/blink/renderer/platform/wtf/allocator/allocator.h"
#include "third_party/blink/renderer/platform/wtf/forward.h"
@@ -55,17 +54,16 @@ class FontPlatformData;
class FontVariationSettings;
class PLATFORM_EXPORT FontCustomPlatformData
- : public GarbageCollected<FontCustomPlatformData> {
+ : public RefCounted<FontCustomPlatformData> {
+ USING_FAST_MALLOC(FontCustomPlatformData);
+
public:
- static FontCustomPlatformData* Create(SharedBuffer*,
- String& ots_parse_message);
- FontCustomPlatformData(sk_sp<SkTypeface>, size_t data_size);
+ static scoped_refptr<FontCustomPlatformData> Create(SharedBuffer*,
+ String& ots_parse_message);
FontCustomPlatformData(const FontCustomPlatformData&) = delete;
FontCustomPlatformData& operator=(const FontCustomPlatformData&) = delete;
~FontCustomPlatformData();
- void Trace(Visitor*) const {}
-
// The size argument should come from EffectiveFontSize() and
// adjusted_specified_size should come from AdjustedSpecifiedSize() of
// FontDescription. The latter is needed for correctly applying
@@ -82,7 +80,7 @@ class PLATFORM_EXPORT FontCustomPlatform
const ResolvedFontFeatures& resolved_font_features,
FontOrientation = FontOrientation::kHorizontal,
const FontVariationSettings* = nullptr,
- const FontPalette* = nullptr) const;
+ const FontPalette* = nullptr);
String FamilyNameForInspector() const;
@@ -93,6 +91,7 @@ class PLATFORM_EXPORT FontCustomPlatform
bool MayBeIconFont() const;
private:
+ FontCustomPlatformData(sk_sp<SkTypeface>, size_t data_size);
sk_sp<SkTypeface> base_typeface_;
size_t data_size_;
--- a/third_party/blink/renderer/platform/testing/font_test_helpers.cc
+++ b/third_party/blink/renderer/platform/testing/font_test_helpers.cc
@@ -29,7 +29,7 @@ class TestFontSelector : public FontSele
static TestFontSelector* Create(const uint8_t* data, size_t size) {
scoped_refptr<SharedBuffer> font_buffer = SharedBuffer::Create(data, size);
String ots_parse_message;
- FontCustomPlatformData* font_custom_platform_data =
+ scoped_refptr<FontCustomPlatformData> font_custom_platform_data =
FontCustomPlatformData::Create(font_buffer.get(), ots_parse_message);
if (!font_custom_platform_data)
return nullptr;
@@ -37,17 +37,12 @@ class TestFontSelector : public FontSele
std::move(font_custom_platform_data));
}
- TestFontSelector(FontCustomPlatformData* custom_platform_data)
- : custom_platform_data_(custom_platform_data) {
+ TestFontSelector(scoped_refptr<FontCustomPlatformData> custom_platform_data)
+ : custom_platform_data_(std::move(custom_platform_data)) {
DCHECK(custom_platform_data_);
}
~TestFontSelector() override = default;
- void Trace(Visitor* visitor) const override {
- visitor->Trace(custom_platform_data_);
- FontSelector::Trace(visitor);
- }
-
FontData* GetFontData(const FontDescription& font_description,
const FontFamily&) override {
FontSelectionCapabilities normal_capabilities(
@@ -117,7 +112,7 @@ class TestFontSelector : public FontSele
}
private:
- Member<FontCustomPlatformData> custom_platform_data_;
+ scoped_refptr<FontCustomPlatformData> custom_platform_data_;
};
} // namespace

View File

@@ -0,0 +1,420 @@
Revert the following commit:
commit 2eefeabb12fb7e92f2508116a5ed959c57659be1
Author: Ian Kilpatrick <ikilpatrick@chromium.org>
Date: Tue Feb 20 17:40:39 2024 +0000
[gc] Make HarfBuzzFontData & friends gc'd.
Previously we had a HbFontCacheEntry which was used to hold onto the
HarfBuzzFontData, and a hb_font_t.
HarfBuzzFontData is used for holding data specific for various
harfbuzz callbacks, but we can also hold onto the hb_font_t there.
There should be no user-visible behaviour change.
Bug: 41490008
Change-Id: Icaa7ad3b2f75e9807b88014a9a15406cb76eb52e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5302175
Reviewed-by: Dominik Röttsches <drott@chromium.org>
Commit-Queue: Ian Kilpatrick <ikilpatrick@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1262752}
--- a/third_party/blink/renderer/platform/fonts/font_global_context.cc
+++ b/third_party/blink/renderer/platform/fonts/font_global_context.cc
@@ -8,6 +8,7 @@
#include "third_party/blink/renderer/platform/fonts/font_cache.h"
#include "third_party/blink/renderer/platform/fonts/font_unique_name_lookup.h"
#include "third_party/blink/renderer/platform/fonts/shaping/harfbuzz_face.h"
+#include "third_party/blink/renderer/platform/fonts/shaping/harfbuzz_font_cache.h"
#include "third_party/blink/renderer/platform/privacy_budget/identifiability_digest_helpers.h"
#include "third_party/blink/renderer/platform/wtf/thread_specific.h"
@@ -50,6 +51,15 @@ FontUniqueNameLookup* FontGlobalContext:
return Get().font_unique_name_lookup_.get();
}
+HarfBuzzFontCache& FontGlobalContext::GetHarfBuzzFontCache() {
+ std::unique_ptr<HarfBuzzFontCache>& global_context_harfbuzz_font_cache =
+ Get().harfbuzz_font_cache_;
+ if (!global_context_harfbuzz_font_cache) {
+ global_context_harfbuzz_font_cache = std::make_unique<HarfBuzzFontCache>();
+ }
+ return *global_context_harfbuzz_font_cache;
+}
+
IdentifiableToken FontGlobalContext::GetOrComputeTypefaceDigest(
const FontPlatformData& source) {
SkTypeface* typeface = source.Typeface();
--- a/third_party/blink/renderer/platform/fonts/font_global_context.h
+++ b/third_party/blink/renderer/platform/fonts/font_global_context.h
@@ -9,7 +9,6 @@
#include "base/types/pass_key.h"
#include "third_party/blink/public/common/privacy_budget/identifiable_token.h"
#include "third_party/blink/renderer/platform/fonts/font_cache.h"
-#include "third_party/blink/renderer/platform/fonts/shaping/harfbuzz_font_cache.h"
#include "third_party/blink/renderer/platform/platform_export.h"
#include "third_party/blink/renderer/platform/text/layout_locale.h"
#include "third_party/blink/renderer/platform/wtf/allocator/allocator.h"
@@ -34,19 +33,14 @@ class PLATFORM_EXPORT FontGlobalContext
static FontGlobalContext& Get();
static FontGlobalContext* TryGet();
- void Trace(Visitor* visitor) const {
- visitor->Trace(font_cache_);
- visitor->Trace(harfbuzz_font_cache_);
- }
+ void Trace(Visitor* visitor) const { visitor->Trace(font_cache_); }
FontGlobalContext(const FontGlobalContext&) = delete;
FontGlobalContext& operator=(const FontGlobalContext&) = delete;
static inline FontCache& GetFontCache() { return Get().font_cache_; }
- static HarfBuzzFontCache& GetHarfBuzzFontCache() {
- return Get().harfbuzz_font_cache_;
- }
+ static HarfBuzzFontCache& GetHarfBuzzFontCache();
static FontUniqueNameLookup* GetFontUniqueNameLookup();
@@ -62,7 +56,7 @@ class PLATFORM_EXPORT FontGlobalContext
private:
FontCache font_cache_;
- HarfBuzzFontCache harfbuzz_font_cache_;
+ std::unique_ptr<HarfBuzzFontCache> harfbuzz_font_cache_;
std::unique_ptr<FontUniqueNameLookup> font_unique_name_lookup_;
base::HashingLRUCache<SkTypefaceID, IdentifiableToken> typeface_digest_cache_;
base::HashingLRUCache<SkTypefaceID, IdentifiableToken>
--- a/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_face.cc
+++ b/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_face.cc
@@ -65,14 +65,20 @@
HarfBuzzFace::HarfBuzzFace(const FontPlatformData* platform_data,
uint64_t unique_id)
- : platform_data_(platform_data),
- harfbuzz_font_data_(FontGlobalContext::GetHarfBuzzFontCache().GetOrCreate(
- unique_id,
- platform_data)) {}
+ : platform_data_(platform_data), unique_id_(unique_id) {
+ HbFontCacheEntry* const cache_entry =
+ FontGlobalContext::GetHarfBuzzFontCache().RefOrNew(unique_id_,
+ platform_data);
+ unscaled_font_ = cache_entry->HbFont();
+ harfbuzz_font_data_ = cache_entry->HbFontData();
+}
+
+HarfBuzzFace::~HarfBuzzFace() {
+ FontGlobalContext::GetHarfBuzzFontCache().Remove(unique_id_);
+}
void HarfBuzzFace::Trace(Visitor* visitor) const {
visitor->Trace(platform_data_);
- visitor->Trace(harfbuzz_font_data_);
}
bool HarfBuzzFace::ignore_variation_selectors_ = false;
@@ -234,17 +240,14 @@ bool HarfBuzzFace::HasSpaceInLigaturesOr
hb::unique_ptr<hb_set_t> glyphs(hb_set_create());
- hb_font_t* unscaled_font = harfbuzz_font_data_->unscaled_font_.get();
-
// Check whether computing is needed and compute for gpos/gsub.
if (features & kKerning &&
harfbuzz_font_data_->space_in_gpos_ ==
HarfBuzzFontData::SpaceGlyphInOpenTypeTables::kUnknown) {
- if (space == kInvalidCodepoint && !GetSpaceGlyph(unscaled_font, space)) {
+ if (space == kInvalidCodepoint && !GetSpaceGlyph(unscaled_font_, space))
return false;
- }
// Compute for gpos.
- hb_face_t* face = hb_font_get_face(unscaled_font);
+ hb_face_t* face = hb_font_get_face(unscaled_font_);
DCHECK(face);
harfbuzz_font_data_->space_in_gpos_ =
hb_ot_layout_has_positioning(face) &&
@@ -258,11 +261,10 @@ bool HarfBuzzFace::HasSpaceInLigaturesOr
if (features & kLigatures &&
harfbuzz_font_data_->space_in_gsub_ ==
HarfBuzzFontData::SpaceGlyphInOpenTypeTables::kUnknown) {
- if (space == kInvalidCodepoint && !GetSpaceGlyph(unscaled_font, space)) {
+ if (space == kInvalidCodepoint && !GetSpaceGlyph(unscaled_font_, space))
return false;
- }
// Compute for gpos.
- hb_face_t* face = hb_font_get_face(unscaled_font);
+ hb_face_t* face = hb_font_get_face(unscaled_font_);
DCHECK(face);
harfbuzz_font_data_->space_in_gsub_ =
hb_ot_layout_has_substitution(face) &&
@@ -280,14 +282,14 @@ bool HarfBuzzFace::HasSpaceInLigaturesOr
}
unsigned HarfBuzzFace::UnitsPerEmFromHeadTable() {
- hb_face_t* face = hb_font_get_face(harfbuzz_font_data_->unscaled_font_.get());
+ hb_face_t* face = hb_font_get_face(unscaled_font_);
return hb_face_get_upem(face);
}
Glyph HarfBuzzFace::HbGlyphForCharacter(UChar32 character) {
hb_codepoint_t glyph = 0;
- HarfBuzzGetNominalGlyph(harfbuzz_font_data_->unscaled_font_.get(),
- harfbuzz_font_data_, character, &glyph, nullptr);
+ HarfBuzzGetNominalGlyph(unscaled_font_, harfbuzz_font_data_, character,
+ &glyph, nullptr);
return glyph;
}
@@ -329,7 +331,7 @@ hb_codepoint_t HarfBuzzFace::HarfBuzzGet
UChar32 variation_selector) {
DCHECK(RuntimeEnabledFeatures::FontVariationSequencesEnabled());
hb_codepoint_t glyph = 0;
- HarfBuzzGetGlyph(harfbuzz_font_data_->unscaled_font_.get(),
+ HarfBuzzGetGlyph(unscaled_font_,
harfbuzz_font_data_, character, variation_selector, &glyph,
nullptr);
return glyph;
@@ -444,10 +446,9 @@ static hb::unique_ptr<hb_face_t> CreateF
return face;
}
-namespace {
-
-HarfBuzzFontData* CreateHarfBuzzFontData(hb_face_t* face,
- SkTypeface* typeface) {
+static scoped_refptr<HbFontCacheEntry> CreateHbFontCacheEntry(
+ hb_face_t* face,
+ SkTypeface* typeface) {
hb::unique_ptr<hb_font_t> ot_font(hb_font_create(face));
hb_ot_font_set_funcs(ot_font.get());
@@ -466,26 +467,25 @@ HarfBuzzFontData* CreateHarfBuzzFontData
// Creating a sub font means that non-available functions
// are found from the parent.
hb_font_t* const unscaled_font = hb_font_create_sub_font(ot_font.get());
- HarfBuzzFontData* data =
- MakeGarbageCollected<HarfBuzzFontData>(unscaled_font);
+ scoped_refptr<HbFontCacheEntry> cache_entry =
+ HbFontCacheEntry::Create(unscaled_font);
hb_font_set_funcs(unscaled_font,
- HarfBuzzSkiaFontFuncs::Get().GetFunctions(typeface), data,
- nullptr);
- return data;
+ HarfBuzzSkiaFontFuncs::Get().GetFunctions(typeface),
+ cache_entry->HbFontData(), nullptr);
+ return cache_entry;
}
-} // namespace
-
-HarfBuzzFontData* HarfBuzzFontCache::GetOrCreate(
+HbFontCacheEntry* HarfBuzzFontCache::RefOrNew(
uint64_t unique_id,
const FontPlatformData* platform_data) {
const auto& result = font_map_.insert(unique_id, nullptr);
if (result.is_new_entry) {
hb::unique_ptr<hb_face_t> face = CreateFace(platform_data);
result.stored_value->value =
- CreateHarfBuzzFontData(face.get(), platform_data->Typeface());
+ CreateHbFontCacheEntry(face.get(), platform_data->Typeface());
}
- return result.stored_value->value.Get();
+ result.stored_value->value->AddRef();
+ return result.stored_value->value.get();
}
static_assert(
@@ -516,18 +516,17 @@ hb_font_t* HarfBuzzFace::GetScaledFont(s
vertical_layout);
int scale = SkiaScalarToHarfBuzzPosition(platform_data_->size());
- hb_font_t* unscaled_font = harfbuzz_font_data_->unscaled_font_.get();
- hb_font_set_scale(unscaled_font, scale, scale);
+ hb_font_set_scale(unscaled_font_, scale, scale);
// See contended discussion in https://github.com/harfbuzz/harfbuzz/pull/1484
// Setting ptem here is critical for HarfBuzz to know where to lookup spacing
// offset in the AAT trak table, the unit pt in ptem here means "CoreText"
// points. After discussion on the pull request and with Apple developers, the
// meaning of HarfBuzz' hb_font_set_ptem API was changed to expect the
// equivalent of CSS pixels here.
- hb_font_set_ptem(unscaled_font, specified_size > 0 ? specified_size
- : platform_data_->size());
+ hb_font_set_ptem(unscaled_font_, specified_size > 0 ? specified_size
+ : platform_data_->size());
- return unscaled_font;
+ return unscaled_font_;
}
hb_font_t* HarfBuzzFace::GetScaledFont() const {
--- a/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_face.h
+++ b/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_face.h
@@ -55,6 +55,7 @@ class HarfBuzzFace final : public Garbag
HarfBuzzFace(const FontPlatformData* platform_data, uint64_t);
HarfBuzzFace(const HarfBuzzFace&) = delete;
HarfBuzzFace& operator=(const HarfBuzzFace&) = delete;
+ ~HarfBuzzFace();
void Trace(Visitor*) const;
@@ -106,7 +106,11 @@
void PrepareHarfBuzzFontData();
Member<const FontPlatformData> platform_data_;
- Member<HarfBuzzFontData> harfbuzz_font_data_;
+ const uint64_t unique_id_;
+ // TODO(crbug.com/1489080): When briefly given MiraclePtr protection,
+ // these members were both found dangling.
+ hb_font_t* unscaled_font_;
+ HarfBuzzFontData* harfbuzz_font_data_;
static bool ignore_variation_selectors_;
};
--- a/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_font_cache.cc
+++ b/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_font_cache.cc
@@ -8,8 +8,38 @@
namespace blink {
-void HarfBuzzFontCache::Trace(Visitor* visitor) const {
- visitor->Trace(font_map_);
+HbFontCacheEntry::HbFontCacheEntry(hb_font_t* font)
+ : hb_font_(hb::unique_ptr<hb_font_t>(font)),
+ hb_font_data_(std::make_unique<HarfBuzzFontData>()) {}
+
+HbFontCacheEntry::~HbFontCacheEntry() = default;
+
+scoped_refptr<HbFontCacheEntry> HbFontCacheEntry::Create(hb_font_t* hb_font) {
+ DCHECK(hb_font);
+ return base::AdoptRef(new HbFontCacheEntry(hb_font));
+}
+
+HarfBuzzFontCache::HarfBuzzFontCache() = default;
+HarfBuzzFontCache::~HarfBuzzFontCache() = default;
+
+// See "harfbuzz_face.cc" for |HarfBuzzFontCache::GetOrCreateFontData()|
+// implementation.
+
+void HarfBuzzFontCache::Remove(uint64_t unique_id) {
+ auto it = font_map_.find(unique_id);
+ // TODO(https://crbug.com/1417160): In tests such as FontObjectThreadedTest
+ // that test taking down FontGlobalContext an object may not be found due to
+ // existing issues with refcounting of font objects at thread destruction
+ // time.
+ if (it == font_map_.end()) {
+ return;
+ }
+ DCHECK(!it.Get()->value->HasOneRef());
+ it.Get()->value->Release();
+ if (!it.Get()->value->HasOneRef()) {
+ return;
+ }
+ font_map_.erase(it);
}
} // namespace blink
--- a/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_font_cache.h
+++ b/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_font_cache.h
@@ -6,9 +6,12 @@
#define THIRD_PARTY_BLINK_RENDERER_PLATFORM_FONTS_SHAPING_HARFBUZZ_FONT_CACHE_H_
#include "third_party/blink/renderer/platform/fonts/font_metrics.h"
-#include "third_party/blink/renderer/platform/heap/collection_support/heap_hash_map.h"
-#include "third_party/blink/renderer/platform/heap/garbage_collected.h"
-#include "third_party/blink/renderer/platform/heap/member.h"
+#include "third_party/blink/renderer/platform/fonts/unicode_range_set.h"
+
+#include <hb.h>
+#include <hb-cplusplus.hh>
+
+#include <memory>
namespace blink {
@@ -22,21 +25,39 @@ struct HarfBuzzFontData;
// FIXME, crbug.com/609099: We should fix the FontCache to only keep one
// FontPlatformData object independent of size, then consider using this here.
-class HarfBuzzFontCache final {
- DISALLOW_NEW();
+class HbFontCacheEntry : public RefCounted<HbFontCacheEntry> {
+ USING_FAST_MALLOC(HbFontCacheEntry);
+
+ public:
+ static scoped_refptr<HbFontCacheEntry> Create(hb_font_t* hb_font);
+
+ hb_font_t* HbFont() { return hb_font_.get(); }
+ HarfBuzzFontData* HbFontData() { return hb_font_data_.get(); }
+
+ ~HbFontCacheEntry();
+ private:
+ explicit HbFontCacheEntry(hb_font_t* font);
+
+ hb::unique_ptr<hb_font_t> hb_font_;
+ std::unique_ptr<HarfBuzzFontData> hb_font_data_;
+};
+
+class HarfBuzzFontCache final {
public:
- void Trace(Visitor* visitor) const;
- // See "harfbuzz_face.cc" for |HarfBuzzFontCache::GetOrCreateFontData()|
- // implementation.
- HarfBuzzFontData* GetOrCreate(uint64_t unique_id,
- const FontPlatformData* platform_data);
+ HarfBuzzFontCache();
+ ~HarfBuzzFontCache();
+
+ HbFontCacheEntry* RefOrNew(uint64_t unique_id,
+ const FontPlatformData* platform_data);
+ void Remove(uint64_t unique_id);
private:
- HeapHashMap<uint64_t,
- WeakMember<HarfBuzzFontData>,
- IntWithZeroKeyHashTraits<uint64_t>>
- font_map_;
+ using HbFontDataMap = HashMap<uint64_t,
+ scoped_refptr<HbFontCacheEntry>,
+ IntWithZeroKeyHashTraits<uint64_t>>;
+
+ HbFontDataMap font_map_;
};
} // namespace blink
--- a/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_font_data.h
+++ b/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_font_data.h
@@ -22,18 +22,15 @@ const unsigned kInvalidFallbackMetricsVa
// The HarfBuzzFontData struct carries user-pointer data for
// |hb_font_t| callback functions/operations. It contains metrics and OpenType
// layout information related to a font scaled to a particular size.
-struct HarfBuzzFontData final : public GarbageCollected<HarfBuzzFontData> {
+struct HarfBuzzFontData final {
+ USING_FAST_MALLOC(HarfBuzzFontData);
+
public:
- explicit HarfBuzzFontData(hb_font_t* unscaled_font)
- : unscaled_font_(hb::unique_ptr<hb_font_t>(unscaled_font)),
- vertical_data_(nullptr),
- range_set_(nullptr) {}
+ HarfBuzzFontData() : vertical_data_(nullptr), range_set_(nullptr) {}
HarfBuzzFontData(const HarfBuzzFontData&) = delete;
HarfBuzzFontData& operator=(const HarfBuzzFontData&) = delete;
- void Trace(Visitor*) const {}
-
// The vertical origin and vertical advance functions in HarfBuzzFace require
// the ascent and height metrics as fallback in case no specific vertical
// layout information is found from the font.
@@ -81,7 +78,6 @@ struct HarfBuzzFontData final : public G
return vertical_data_;
}
- const hb::unique_ptr<hb_font_t> unscaled_font_;
SkFont font_;
// Capture these scaled fallback metrics from FontPlatformData so that a

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,38 @@
Revert the following commit (to support bad-font-gc2.patch):
commit d4806d20fda56e9bac259fddf10b7439ce749add
Author: Hao Liu <haoliuk@chromium.org>
Date: Mon Mar 18 22:56:31 2024 +0000
Cleanup leftover non-used custom_font_data methods
This is to clean up non-used custom_font_data methods. Their usage has
been deleted in a previous CL.
https://chromium-review.googlesource.com/c/chromium/src/+/5262982/29/third_party/blink/renderer/core/css/css_font_face_source.cc#b95
Change-Id: I90c3ae794a6caf71526c81a56795e95c23cc3fb5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5368244
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
Commit-Queue: Ian Kilpatrick <ikilpatrick@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1274525}
--- a/third_party/blink/renderer/core/css/css_custom_font_data.h
+++ b/third_party/blink/renderer/core/css/css_custom_font_data.h
@@ -55,6 +55,7 @@ class CSSCustomFontData final : public C
bool IsLoading() const override { return is_loading_; }
bool IsLoadingFallback() const override { return true; }
+ void ClearFontFaceSource() override { font_face_source_ = nullptr; }
bool IsPendingDataUrl() const override {
return font_face_source_ && font_face_source_->IsPendingDataUrl();
--- a/third_party/blink/renderer/platform/fonts/custom_font_data.h
+++ b/third_party/blink/renderer/platform/fonts/custom_font_data.h
@@ -46,6 +46,7 @@ class PLATFORM_EXPORT CustomFontData : p
virtual bool IsLoading() const { return false; }
virtual bool IsLoadingFallback() const { return false; }
virtual bool ShouldSkipDrawing() const { return false; }
+ virtual void ClearFontFaceSource() {}
virtual bool IsPendingDataUrl() const { return false; }
protected:

View File

@@ -0,0 +1,68 @@
diff --git a/shared_image_backing.h b/shared_image_backing.h.new
index 97ebd0b..fc6179c 100644
--- a/gpu/command_buffer/service/shared_image/shared_image_backing.h
+++ b/gpu/command_buffer/service/shared_image/shared_image_backing.h
@@ -338,7 +338,7 @@ class GPU_GLES2_EXPORT SharedImageBacking {
private:
class ScopedWriteUMA {
public:
- ScopedWriteUMA() = default;
+ ScopedWriteUMA() : content_consumed_(false) {}
ScopedWriteUMA(const ScopedWriteUMA&) = delete;
ScopedWriteUMA& operator=(const ScopedWriteUMA&) = delete;
@@ -352,7 +352,7 @@ class GPU_GLES2_EXPORT SharedImageBacking {
void SetConsumed() { content_consumed_ = true; }
private:
- bool content_consumed_ = false;
+ bool content_consumed_;
};
const Mailbox mailbox_;
diff --git a/history_item.h b/history_item.h.new
index 15fea48..ba59305 100644
--- a/third_party/blink/renderer/core/loader/history_item.h
+++ b/third_party/blink/renderer/core/loader/history_item.h
@@ -77,13 +77,13 @@ class CORE_EXPORT HistoryItem final : public GarbageCollected<HistoryItem> {
DISALLOW_NEW();
public:
- ViewState() = default;
+ ViewState() : page_scale_factor_(0) {}
ViewState(const ViewState&) = default;
ViewState& operator=(const ViewState&) = default;
ScrollOffset visual_viewport_scroll_offset_;
ScrollOffset scroll_offset_;
- float page_scale_factor_ = 0;
+ float page_scale_factor_;
ScrollAnchorData scroll_anchor_data_;
};
diff --git a/third_party/blink/public/common/interest_group/auction_config.h b/third_party/blink/public/common/interest_group/auction_config.h.new
index 5eb6378..4187556 100644
--- a/third_party/blink/public/common/interest_group/auction_config.h
+++ b/third_party/blink/public/common/interest_group/auction_config.h
@@ -243,9 +243,11 @@ struct BLINK_COMMON_EXPORT AuctionConfig {
// Povides whether debug mode is enabled and, if it is, any debug key.
struct BLINK_COMMON_EXPORT AuctionReportBuyerDebugModeConfig {
- bool is_enabled = false;
+ bool is_enabled;
std::optional<uint64_t> debug_key;
+ AuctionReportBuyerDebugModeConfig() : is_enabled(false) {}
+
friend BLINK_COMMON_EXPORT bool operator==(
const AuctionReportBuyerDebugModeConfig&,
const AuctionReportBuyerDebugModeConfig&);
@@ -447,7 +449,7 @@ struct BLINK_COMMON_EXPORT AuctionConfig {
// Origin for the Coordinator to be used for Private Aggregation.
std::optional<url::Origin> aggregation_coordinator_origin;
- static_assert(__LINE__ == 455, R"(
+ static_assert(__LINE__ == 457, R"(
If modifying AuctionConfig fields, please make sure to also modify:
* third_party/blink/public/mojom/interest_group/interest_group_types.mojom

View File

@@ -0,0 +1,25 @@
commit 251c365ea2c268a475f91c9913fabba6b41e2b6b
Author: Jose Dapena Paz <jdapena@igalia.com>
Date: Tue Apr 23 08:04:27 2024 +0000
IWYU: missing include for usage of std::optional in lens_overlay_url_builder.h
Bug: 41455655
Change-Id: I5ef0752f0cea84b64b5b5fde84d5203d9a5bccbb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5475524
Reviewed-by: Colin Blundell <blundell@chromium.org>
Commit-Queue: José Dapena Paz <jdapena@igalia.com>
Cr-Commit-Position: refs/heads/main@{#1291135}
diff --git a/chrome/browser/lens/lens_overlay/lens_overlay_url_builder.h b/chrome/browser/lens/lens_overlay/lens_overlay_url_builder.h
index 00ffff4902114..1be9c645e5fea 100644
--- a/chrome/browser/lens/lens_overlay/lens_overlay_url_builder.h
+++ b/chrome/browser/lens/lens_overlay/lens_overlay_url_builder.h
@@ -5,6 +5,7 @@
#ifndef CHROME_BROWSER_LENS_LENS_OVERLAY_LENS_OVERLAY_URL_BUILDER_H_
#define CHROME_BROWSER_LENS_LENS_OVERLAY_LENS_OVERLAY_URL_BUILDER_H_
+#include <optional>
#include <string>
#include "third_party/lens_server_proto/lens_overlay_cluster_info.pb.h"

View File

@@ -0,0 +1,376 @@
fixed error: missing 'typename' prior to dependent type name
Index: chromium-123.0.6312.46/base/containers/map_util.h
===================================================================
--- chromium-123.0.6312.46.orig/base/containers/map_util.h
+++ chromium-123.0.6312.46/base/containers/map_util.h
@@ -42,7 +42,7 @@ constexpr internal::MappedType<Map>* Fin
template <typename Map,
typename Key,
typename MappedElementType =
- std::pointer_traits<internal::MappedType<Map>>::element_type>
+ typename std::pointer_traits<internal::MappedType<Map>>::element_type>
constexpr const MappedElementType* FindPtrOrNull(const Map& map,
const Key& key) {
auto it = map.find(key);
@@ -60,7 +60,7 @@
template <typename Map,
typename Key,
typename MappedElementType =
- std::pointer_traits<internal::MappedType<Map>>::element_type>
+ typename std::pointer_traits<internal::MappedType<Map>>::element_type>
constexpr MappedElementType* FindPtrOrNull(Map& map, const Key& key) {
auto it = map.find(key);
return it != map.end() ? base::to_address(it->second) : nullptr;
Index: chromium-123.0.6312.46/base/functional/bind_internal.h
===================================================================
--- chromium-123.0.6312.46.orig/base/functional/bind_internal.h
+++ chromium-123.0.6312.46/base/functional/bind_internal.h
@@ -1497,11 +1497,11 @@ template <int i,
typename Param>
struct ParamCanBeBound {
private:
- using UnwrappedParam = BindArgument<i>::template ForwardedAs<
+ using UnwrappedParam = typename BindArgument<i>::template ForwardedAs<
Unwrapped>::template ToParamWithType<Param>;
- using ParamStorage = BindArgument<i>::template ToParamWithType<
+ using ParamStorage = typename BindArgument<i>::template ToParamWithType<
Param>::template StoredAs<Storage>;
- using BoundStorage =
+ using BoundStorage = typename
BindArgument<i>::template BoundAs<Arg>::template StoredAs<Storage>;
template <bool v = !UnwrappedParam::kRawPtr ||
Index: chromium-123.0.6312.46/chrome/browser/download/bubble/download_bubble_update_service.cc
===================================================================
--- chromium-123.0.6312.46.orig/chrome/browser/download/bubble/download_bubble_update_service.cc
+++ chromium-123.0.6312.46/chrome/browser/download/bubble/download_bubble_update_service.cc
@@ -90,7 +90,7 @@ ItemSortKey GetSortKey(const Item& item)
// Helper to get an iterator to the last element in the cache. The cache
// must not be empty.
template <typename Item>
-SortedItems<Item>::const_iterator GetLastIter(const SortedItems<Item>& cache) {
+typename SortedItems<Item>::const_iterator GetLastIter(const SortedItems<Item>& cache) {
CHECK(!cache.empty());
auto it = cache.end();
return std::prev(it);
@@ -1090,9 +1090,9 @@ bool DownloadBubbleUpdateService::CacheM
}
template <typename Id, typename Item>
-SortedItems<Item>::iterator
+typename SortedItems<Item>::iterator
DownloadBubbleUpdateService::CacheManager::RemoveItemFromCacheByIter(
- SortedItems<Item>::iterator iter,
+ typename SortedItems<Item>::iterator iter,
SortedItems<Item>& cache,
IterMap<Id, Item>& iter_map) {
CHECK(iter != cache.end());
Index: chromium-123.0.6312.46/components/optimization_guide/core/model_execution/model_execution_util.h
===================================================================
--- chromium-123.0.6312.46.orig/components/optimization_guide/core/model_execution/model_execution_util.h
+++ chromium-123.0.6312.46/components/optimization_guide/core/model_execution/model_execution_util.h
@@ -25,7 +25,7 @@ void SetExecutionRequestTemplate(
// Request is set by the feature and should always be typed.
auto typed_request =
- static_cast<const FeatureType::Request&>(request_metadata);
+ static_cast<const typename FeatureType::Request&>(request_metadata);
*(logging_data->mutable_request_data()) = typed_request;
}
Index: chromium-123.0.6312.46/components/optimization_guide/core/model_quality/model_quality_log_entry.h
===================================================================
--- chromium-123.0.6312.46.orig/components/optimization_guide/core/model_quality/model_quality_log_entry.h
+++ chromium-123.0.6312.46/components/optimization_guide/core/model_quality/model_quality_log_entry.h
@@ -29,7 +29,7 @@ class ModelQualityLogEntry {
}
template <typename FeatureType>
- FeatureType::Quality* quality_data() {
+ typename FeatureType::Quality* quality_data() {
return FeatureType::GetLoggingData(*log_ai_data_request_)
->mutable_quality_data();
}
Index: chromium-123.0.6312.46/components/optimization_guide/core/tflite_model_executor.h
===================================================================
--- chromium-123.0.6312.46.orig/components/optimization_guide/core/tflite_model_executor.h
+++ chromium-123.0.6312.46/components/optimization_guide/core/tflite_model_executor.h
@@ -242,7 +242,7 @@ class TFLiteModelExecutor : public Model
void SendForBatchExecution(
BatchExecutionCallback callback_on_complete,
base::TimeTicks start_time,
- ModelExecutor<OutputType, InputType>::ConstRefInputVector inputs)
+ typename ModelExecutor<OutputType, InputType>::ConstRefInputVector inputs)
override {
DCHECK(execution_task_runner_->RunsTasksInCurrentSequence());
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
@@ -264,7 +264,7 @@ class TFLiteModelExecutor : public Model
// Starts the synchronous execution of the model. Returns model outputs.
// Model needs to be loaded. Synchronous calls do not load or unload model.
std::vector<std::optional<OutputType>> SendForBatchExecutionSync(
- ModelExecutor<OutputType, InputType>::ConstRefInputVector inputs)
+ typename ModelExecutor<OutputType, InputType>::ConstRefInputVector inputs)
override {
DCHECK(execution_task_runner_->RunsTasksInCurrentSequence());
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
@@ -422,7 +422,7 @@ class TFLiteModelExecutor : public Model
// executes it on the model execution thread.
void LoadModelFileAndBatchExecute(
BatchExecutionCallback callback_on_complete,
- ModelExecutor<OutputType, InputType>::ConstRefInputVector inputs) {
+ typename ModelExecutor<OutputType, InputType>::ConstRefInputVector inputs) {
DCHECK(execution_task_runner_->RunsTasksInCurrentSequence());
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
@@ -439,7 +439,7 @@ class TFLiteModelExecutor : public Model
// Batch executes the loaded model for inputs.
void BatchExecuteLoadedModel(
- ModelExecutor<OutputType, InputType>::ConstRefInputVector inputs,
+ typename ModelExecutor<OutputType, InputType>::ConstRefInputVector inputs,
std::vector<std::optional<OutputType>>* outputs) {
DCHECK(execution_task_runner_->RunsTasksInCurrentSequence());
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
@@ -499,7 +499,7 @@ class TFLiteModelExecutor : public Model
// Unloads the model if needed.
void BatchExecuteLoadedModelAndRunCallback(
BatchExecutionCallback callback_on_complete,
- ModelExecutor<OutputType, InputType>::ConstRefInputVector inputs,
+ typename ModelExecutor<OutputType, InputType>::ConstRefInputVector inputs,
ExecutionStatus execution_status) {
DCHECK(execution_task_runner_->RunsTasksInCurrentSequence());
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
Index: chromium-123.0.6312.46/mojo/public/cpp/bindings/array_traits.h
===================================================================
--- chromium-123.0.6312.46.orig/mojo/public/cpp/bindings/array_traits.h
+++ chromium-123.0.6312.46/mojo/public/cpp/bindings/array_traits.h
@@ -90,7 +90,7 @@ template <typename Container>
{ c[i] } -> std::same_as<typename Container::reference>;
}
struct ArrayTraits<Container> {
- using Element = Container::value_type;
+ using Element = typename Container::value_type;
// vector-like containers have no built-in null.
static bool IsNull(const Container& c) { return false; }
Index: chromium-123.0.6312.46/third_party/blink/renderer/bindings/core/v8/async_iterable.h
===================================================================
--- chromium-123.0.6312.46.orig/third_party/blink/renderer/bindings/core/v8/async_iterable.h
+++ chromium-123.0.6312.46/third_party/blink/renderer/bindings/core/v8/async_iterable.h
@@ -245,7 +245,7 @@
private:
virtual IterationSource* CreateIterationSource(
ScriptState* script_state,
- IterationSource::Kind kind,
+ typename IterationSource::Kind kind,
InitArgs... args,
ExceptionState& exception_state) = 0;
};
@@ -291,7 +291,7 @@
private:
virtual IterationSource* CreateIterationSource(
ScriptState* script_state,
- IterationSource::Kind kind,
+ typename IterationSource::Kind kind,
InitArgs... args,
ExceptionState& exception_state) = 0;
};
Index: chromium-123.0.6312.46/third_party/blink/renderer/core/html/parser/html_document_parser_fastpath.cc
===================================================================
--- chromium-123.0.6312.46.orig/third_party/blink/renderer/core/html/parser/html_document_parser_fastpath.cc
+++ chromium-123.0.6312.46/third_party/blink/renderer/core/html/parser/html_document_parser_fastpath.cc
@@ -210,7 +210,7 @@ class HTMLFastPathParser {
using Span = base::span<const Char>;
using USpan = base::span<const UChar>;
// 32 matches that used by HTMLToken::Attribute.
- typedef std::conditional<std::is_same_v<Char, UChar>,
+ typedef typename std::conditional<std::is_same_v<Char, UChar>,
UCharLiteralBuffer<32>,
LCharLiteralBuffer<32>>::type LiteralBufferType;
static_assert(std::is_same_v<Char, UChar> || std::is_same_v<Char, LChar>);
Index: chromium-123.0.6312.46/base/functional/function_ref.h
===================================================================
--- chromium-123.0.6312.46.orig/base/functional/function_ref.h
+++ chromium-123.0.6312.46/base/functional/function_ref.h
@@ -64,7 +64,7 @@ class FunctionRef;
template <typename R, typename... Args>
class FunctionRef<R(Args...)> {
template <typename Functor,
- typename RunType = internal::FunctorTraits<Functor>::RunType>
+ typename RunType = typename internal::FunctorTraits<Functor>::RunType>
static constexpr bool kCompatibleFunctor =
std::convertible_to<internal::ExtractReturnType<RunType>, R> &&
std::same_as<internal::ExtractArgs<RunType>, internal::TypeList<Args...>>;
Index: chromium-123.0.6312.46/base/containers/heap_array.h
===================================================================
--- chromium-123.0.6312.46.orig/base/containers/heap_array.h
+++ chromium-123.0.6312.46/base/containers/heap_array.h
@@ -32,8 +32,8 @@
static_assert(!std::is_reference_v<T>,
"HeapArray cannot hold reference types");
- using iterator = base::span<T>::iterator;
- using const_iterator = base::span<const T>::iterator;
+ using iterator = typename base::span<T>::iterator;
+ using const_iterator = typename base::span<const T>::iterator;
// We don't put this default value in the template parameter list to allow the
// static_assert on is_reference_v to give a nicer error message.
using deleter_type = std::
Index: chromium-123.0.6312.46/mojo/public/cpp/bindings/type_converter.h
===================================================================
--- chromium-123.0.6312.46.orig/mojo/public/cpp/bindings/type_converter.h
+++ chromium-123.0.6312.46/mojo/public/cpp/bindings/type_converter.h
@@ -127,7 +127,7 @@ using VecValueType = typename Vec::value
template <typename Vec>
using VecPtrLikeUnderlyingValueType =
- std::pointer_traits<VecValueType<Vec>>::element_type;
+ typename std::pointer_traits<VecValueType<Vec>>::element_type;
} // namespace internal
Index: chromium-123.0.6312.46/third_party/blink/renderer/platform/wtf/hash_table.h
===================================================================
--- chromium-123.0.6312.46.orig/third_party/blink/renderer/platform/wtf/hash_table.h
+++ chromium-123.0.6312.46/third_party/blink/renderer/platform/wtf/hash_table.h
@@ -2004,7 +2004,7 @@ struct HashTableConstIteratorAdapter {
static_assert(!IsTraceable<typename Traits::TraitType>::value);
using iterator_category = std::bidirectional_iterator_tag;
- using value_type = HashTableType::ValueType;
+ using value_type = typename HashTableType::ValueType;
using difference_type = ptrdiff_t;
using pointer = value_type*;
using reference = value_type&;
@@ -2056,7 +2056,7 @@ struct HashTableConstIteratorAdapter<
public:
using iterator_category = std::bidirectional_iterator_tag;
- using value_type = HashTableType::ValueType;
+ using value_type = typename HashTableType::ValueType;
using difference_type = ptrdiff_t;
using pointer = value_type*;
using reference = value_type&;
@@ -2110,7 +2110,7 @@ struct HashTableIteratorAdapter {
static_assert(!IsTraceable<typename Traits::TraitType>::value);
using iterator_category = std::bidirectional_iterator_tag;
- using value_type = HashTableType::ValueType;
+ using value_type = typename HashTableType::ValueType;
using difference_type = ptrdiff_t;
using pointer = value_type*;
using reference = value_type&;
@@ -2158,7 +2158,7 @@ struct HashTableIteratorAdapter<
public:
using iterator_category = std::bidirectional_iterator_tag;
- using value_type = HashTableType::ValueType;
+ using value_type = typename HashTableType::ValueType;
using difference_type = ptrdiff_t;
using pointer = value_type*;
using reference = value_type&;
Index: chromium-123.0.6312.46/base/types/fixed_array.h
===================================================================
--- chromium-123.0.6312.46.orig/base/types/fixed_array.h
+++ chromium-123.0.6312.46/base/types/fixed_array.h
@@ -27,8 +27,8 @@ template <typename T,
class FixedArray : public absl::FixedArray<T, N, A> {
public:
using absl::FixedArray<T, N, A>::FixedArray;
- explicit FixedArray(absl::FixedArray<T, N, A>::size_type n,
- const absl::FixedArray<T, N, A>::allocator_type& a =
+ explicit FixedArray(typename absl::FixedArray<T, N, A>::size_type n,
+ const typename absl::FixedArray<T, N, A>::allocator_type& a =
typename absl::FixedArray<T, N, A>::allocator_type())
: FixedArray(n, T(), a) {}
};
Index: chromium-123.0.6312.46/chrome/browser/web_applications/commands/internal/command_internal.h
===================================================================
--- chromium-123.0.6312.46.orig/chrome/browser/web_applications/commands/internal/command_internal.h
+++ chromium-123.0.6312.46/chrome/browser/web_applications/commands/internal/command_internal.h
@@ -121,7 +121,7 @@ class CommandBase {
template <typename LockType>
class CommandWithLock : public CommandBase {
public:
- using LockDescription = LockType::LockDescription;
+ using LockDescription = typename LockType::LockDescription;
explicit CommandWithLock(const std::string& name,
LockDescription initial_lock_request);
Index: chromium-123.0.6312.46/chrome/browser/web_applications/commands/web_app_command.h
===================================================================
--- chromium-123.0.6312.46.orig/chrome/browser/web_applications/commands/web_app_command.h
+++ chromium-123.0.6312.46/chrome/browser/web_applications/commands/web_app_command.h
@@ -106,7 +106,7 @@ class WebAppLockManager;
template <typename LockType, typename... CallbackArgs>
class WebAppCommand : public internal::CommandWithLock<LockType> {
public:
- using LockDescription = LockType::LockDescription;
+ using LockDescription = typename LockType::LockDescription;
using CallbackType = base::OnceCallback<void(CallbackArgs...)>;
using ShutdownArgumentsTuple = std::tuple<std::decay_t<CallbackArgs>...>;
Index: chromium-123.0.6312.46/chrome/browser/web_applications/web_app_command_scheduler.h
===================================================================
--- chromium-123.0.6312.46.orig/chrome/browser/web_applications/web_app_command_scheduler.h
+++ chromium-123.0.6312.46/chrome/browser/web_applications/web_app_command_scheduler.h
@@ -363,7 +363,7 @@ class WebAppCommandScheduler {
// command system.
template <typename LockType>
void ScheduleCallback(const std::string& operation_name,
- LockType::LockDescription lock_description,
+ typename LockType::LockDescription lock_description,
CallbackCommand<LockType, void> callback,
base::OnceClosure on_complete,
const base::Location& location = FROM_HERE) {
@@ -381,7 +381,7 @@ class WebAppCommandScheduler {
typename CallbackReturnValue = std::decay_t<CompletionCallbackArg>>
void ScheduleCallbackWithResult(
const std::string& operation_name,
- LockType::LockDescription lock_description,
+ typename LockType::LockDescription lock_description,
CallbackCommand<LockType, CallbackReturnValue> callback,
base::OnceCallback<void(CompletionCallbackArg)> on_complete,
CallbackReturnValue arg_for_shutdown,
Index: chromium-123.0.6312.46/components/supervised_user/core/browser/proto_fetcher.h
===================================================================
--- chromium-123.0.6312.46.orig/components/supervised_user/core/browser/proto_fetcher.h
+++ chromium-123.0.6312.46/components/supervised_user/core/browser/proto_fetcher.h
@@ -424,7 +424,7 @@ class RetryingFetcherImpl final : public
RetryingFetcherImpl(const RetryingFetcherImpl&) = delete;
RetryingFetcherImpl& operator=(const RetryingFetcherImpl&) = delete;
- void Start(ProtoFetcher<Response>::Callback callback) override {
+ void Start(typename ProtoFetcher<Response>::Callback callback) override {
callback_ = std::move(callback);
Retry();
}
@@ -469,7 +469,7 @@ class RetryingFetcherImpl final : public
}
// Client callback.
- TypedProtoFetcher<Response>::Callback callback_;
+ typename TypedProtoFetcher<Response>::Callback callback_;
// Retry controls.
base::OneShotTimer timer_;
@@ -490,7 +490,7 @@ class ParallelFetchManager {
// Deferred fetcher is required because it should be started after it is
// stored internally.
using Fetcher = ProtoFetcher<Response>;
- using KeyType = base::IDMap<std::unique_ptr<Fetcher>>::KeyType;
+ using KeyType = typename base::IDMap<std::unique_ptr<Fetcher>>::KeyType;
public:
// Provides fresh instances of a deferred fetcher for each fetch.
@@ -506,7 +506,7 @@ class ParallelFetchManager {
// Starts the fetch. Underlying fetcher is stored internally, and will be
// cleaned up after finish or when this manager is destroyed.
- void Fetch(const Request& request, Fetcher::Callback callback) {
+ void Fetch(const Request& request, typename Fetcher::Callback callback) {
CHECK(callback) << "Use base::DoNothing() instead of empty callback.";
KeyType key = requests_in_flight_.Add(MakeFetcher(request));
requests_in_flight_.Lookup(key)->Start(

View File

@@ -0,0 +1,246 @@
Index: chromium-123.0.6312.46/base/check_op.h
===================================================================
--- chromium-123.0.6312.46.orig/base/check_op.h
+++ chromium-123.0.6312.46/base/check_op.h
@@ -5,6 +5,7 @@
#ifndef BASE_CHECK_OP_H_
#define BASE_CHECK_OP_H_
+#include <cstdint>
#include <cstddef>
#include <string>
#include <string_view>
Index: chromium-123.0.6312.46/base/containers/flat_map.h
===================================================================
--- chromium-123.0.6312.46.orig/base/containers/flat_map.h
+++ chromium-123.0.6312.46/base/containers/flat_map.h
@@ -5,6 +5,7 @@
#ifndef BASE_CONTAINERS_FLAT_MAP_H_
#define BASE_CONTAINERS_FLAT_MAP_H_
+#include <cstdint>
#include <functional>
#include <tuple>
#include <type_traits>
Index: chromium-123.0.6312.46/chrome/browser/webauthn/authenticator_request_dialog_model.h
===================================================================
--- chromium-123.0.6312.46.orig/chrome/browser/webauthn/authenticator_request_dialog_model.h
+++ chromium-123.0.6312.46/chrome/browser/webauthn/authenticator_request_dialog_model.h
@@ -10,6 +10,7 @@
#include <string>
#include <string_view>
#include <vector>
+#include <variant>
#include "base/containers/span.h"
#include "base/functional/callback_forward.h"
Index: chromium-123.0.6312.46/components/feature_engagement/internal/never_event_storage_validator.h
===================================================================
--- chromium-123.0.6312.46.orig/components/feature_engagement/internal/never_event_storage_validator.h
+++ chromium-123.0.6312.46/components/feature_engagement/internal/never_event_storage_validator.h
@@ -5,6 +5,7 @@
#ifndef COMPONENTS_FEATURE_ENGAGEMENT_INTERNAL_NEVER_EVENT_STORAGE_VALIDATOR_H_
#define COMPONENTS_FEATURE_ENGAGEMENT_INTERNAL_NEVER_EVENT_STORAGE_VALIDATOR_H_
+#include <cstdint>
#include <string>
#include "components/feature_engagement/internal/event_storage_validator.h"
Index: chromium-123.0.6312.46/gin/time_clamper.h
===================================================================
--- chromium-123.0.6312.46.orig/gin/time_clamper.h
+++ chromium-123.0.6312.46/gin/time_clamper.h
@@ -6,6 +6,7 @@
#define GIN_TIME_CLAMPER_H_
#include <algorithm>
+#include <cstdlib>
#include "base/rand_util.h"
#include "base/time/time.h"
Index: chromium-123.0.6312.46/net/base/net_export.h
===================================================================
--- chromium-123.0.6312.46.orig/net/base/net_export.h
+++ chromium-123.0.6312.46/net/base/net_export.h
@@ -5,6 +5,8 @@
#ifndef NET_BASE_NET_EXPORT_H_
#define NET_BASE_NET_EXPORT_H_
+#include <cstdint>
+
// Defines NET_EXPORT so that functionality implemented by the net module can
// be exported to consumers, and NET_EXPORT_PRIVATE that allows unit tests to
// access features not intended to be used directly by real consumers.
Index: chromium-123.0.6312.46/third_party/abseil-cpp/absl/strings/string_view.h
===================================================================
--- chromium-123.0.6312.46.orig/third_party/abseil-cpp/absl/strings/string_view.h
+++ chromium-123.0.6312.46/third_party/abseil-cpp/absl/strings/string_view.h
@@ -27,6 +27,7 @@
#ifndef ABSL_STRINGS_STRING_VIEW_H_
#define ABSL_STRINGS_STRING_VIEW_H_
+#include <cstdint>
#include <algorithm>
#include <cassert>
#include <cstddef>
Index: chromium-123.0.6312.46/third_party/dawn/src/tint/lang/spirv/reader/ast_parser/namer.h
===================================================================
--- chromium-123.0.6312.46.orig/third_party/dawn/src/tint/lang/spirv/reader/ast_parser/namer.h
+++ chromium-123.0.6312.46/third_party/dawn/src/tint/lang/spirv/reader/ast_parser/namer.h
@@ -28,6 +28,7 @@
#ifndef SRC_TINT_LANG_SPIRV_READER_AST_PARSER_NAMER_H_
#define SRC_TINT_LANG_SPIRV_READER_AST_PARSER_NAMER_H_
+#include <cstdint>
#include <string>
#include <unordered_map>
#include <vector>
Index: chromium-123.0.6312.46/third_party/material_color_utilities/src/cpp/palettes/tones.cc
===================================================================
--- chromium-123.0.6312.46.orig/third_party/material_color_utilities/src/cpp/palettes/tones.cc
+++ chromium-123.0.6312.46/third_party/material_color_utilities/src/cpp/palettes/tones.cc
@@ -14,6 +14,7 @@
* limitations under the License.
*/
+#include <cmath>
#include "cpp/palettes/tones.h"
#include <cmath>
Index: chromium-123.0.6312.46/third_party/ruy/src/ruy/profiler/instrumentation.h
===================================================================
--- chromium-123.0.6312.46.orig/third_party/ruy/src/ruy/profiler/instrumentation.h
+++ chromium-123.0.6312.46/third_party/ruy/src/ruy/profiler/instrumentation.h
@@ -17,6 +17,7 @@
#define RUY_RUY_PROFILER_INSTRUMENTATION_H_
#ifdef RUY_PROFILER
+#include <string>
#include <cstdio>
#include <mutex>
#include <vector>
Index: chromium-123.0.6312.46/third_party/swiftshader/third_party/llvm-10.0/llvm/lib/Support/Unix/Signals.inc
===================================================================
--- chromium-123.0.6312.46.orig/third_party/swiftshader/third_party/llvm-10.0/llvm/lib/Support/Unix/Signals.inc
+++ chromium-123.0.6312.46/third_party/swiftshader/third_party/llvm-10.0/llvm/lib/Support/Unix/Signals.inc
@@ -45,6 +45,7 @@
#include "llvm/Support/SaveAndRestore.h"
#include "llvm/Support/raw_ostream.h"
#include <algorithm>
+#include <cstdint>
#include <string>
#include <sysexits.h>
#ifdef HAVE_BACKTRACE
Index: chromium-123.0.6312.46/third_party/tflite/src/tensorflow/lite/kernels/internal/spectrogram.h
===================================================================
--- chromium-123.0.6312.46.orig/third_party/tflite/src/tensorflow/lite/kernels/internal/spectrogram.h
+++ chromium-123.0.6312.46/third_party/tflite/src/tensorflow/lite/kernels/internal/spectrogram.h
@@ -31,6 +31,7 @@ limitations under the License.
#ifndef TENSORFLOW_LITE_KERNELS_INTERNAL_SPECTROGRAM_H_
#define TENSORFLOW_LITE_KERNELS_INTERNAL_SPECTROGRAM_H_
+#include <cstdint>
#include <complex>
#include <deque>
#include <vector>
Index: chromium-123.0.6312.46/third_party/vulkan-deps/vulkan-validation-layers/src/layers/external/vma/vk_mem_alloc.h
===================================================================
--- chromium-123.0.6312.46.orig/third_party/vulkan-deps/vulkan-validation-layers/src/layers/external/vma/vk_mem_alloc.h
+++ chromium-123.0.6312.46/third_party/vulkan-deps/vulkan-validation-layers/src/layers/external/vma/vk_mem_alloc.h
@@ -2884,6 +2884,7 @@ static void vma_aligned_free(void* VMA_N
// Define this macro to 1 to enable functions: vmaBuildStatsString, vmaFreeStatsString.
#if VMA_STATS_STRING_ENABLED
+#include <stdio.h>
static inline void VmaUint32ToStr(char* VMA_NOT_NULL outStr, size_t strLen, uint32_t num)
{
snprintf(outStr, strLen, "%u", static_cast<unsigned int>(num));
Index: chromium-123.0.6312.46/third_party/webrtc/audio/utility/channel_mixer.cc
===================================================================
--- chromium-123.0.6312.46.orig/third_party/webrtc/audio/utility/channel_mixer.cc
+++ chromium-123.0.6312.46/third_party/webrtc/audio/utility/channel_mixer.cc
@@ -8,6 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include <cstring>
+
#include "audio/utility/channel_mixer.h"
#include "audio/utility/channel_mixing_matrix.h"
Index: chromium-123.0.6312.46/third_party/webrtc/modules/include/module_common_types_public.h
===================================================================
--- chromium-123.0.6312.46.orig/third_party/webrtc/modules/include/module_common_types_public.h
+++ chromium-123.0.6312.46/third_party/webrtc/modules/include/module_common_types_public.h
@@ -11,6 +11,7 @@
#ifndef MODULES_INCLUDE_MODULE_COMMON_TYPES_PUBLIC_H_
#define MODULES_INCLUDE_MODULE_COMMON_TYPES_PUBLIC_H_
+#include <cstdint>
#include <limits>
#include "absl/types/optional.h"
Index: chromium-123.0.6312.46/ui/gfx/linux/drm_util_linux.h
===================================================================
--- chromium-123.0.6312.46.orig/ui/gfx/linux/drm_util_linux.h
+++ chromium-123.0.6312.46/ui/gfx/linux/drm_util_linux.h
@@ -9,6 +9,8 @@
#include "ui/gfx/buffer_types.h"
+#include <cstdint>
+
namespace ui {
int GetFourCCFormatFromBufferFormat(gfx::BufferFormat format);
Index: chromium-123.0.6312.46/third_party/blink/renderer/platform/peerconnection/resolution_monitor.cc
===================================================================
--- chromium-123.0.6312.46.orig/third_party/blink/renderer/platform/peerconnection/resolution_monitor.cc
+++ chromium-123.0.6312.46/third_party/blink/renderer/platform/peerconnection/resolution_monitor.cc
@@ -6,6 +6,8 @@
#include <bitset>
+#include <bitset>
+
#include "base/containers/span.h"
#include "base/logging.h"
#include "base/memory/ptr_util.h"
Index: chromium-123.0.6312.46/components/search_engines/util.h
===================================================================
--- chromium-123.0.6312.46.orig/components/search_engines/util.h
+++ chromium-123.0.6312.46/components/search_engines/util.h
@@ -8,6 +8,7 @@
// This file contains utility functions for search engine functionality.
#include <memory>
+#include <optional>
#include <set>
#include <string>
#include <vector>
Index: chromium-123.0.6312.46/content/common/service_worker/race_network_request_write_buffer_manager.h
===================================================================
--- chromium-123.0.6312.46.orig/content/common/service_worker/race_network_request_write_buffer_manager.h
+++ chromium-123.0.6312.46/content/common/service_worker/race_network_request_write_buffer_manager.h
@@ -7,6 +7,8 @@
#include <optional>
+#include <optional>
+
#include "base/containers/span.h"
#include "content/common/content_export.h"
#include "mojo/public/cpp/system/data_pipe.h"
Index: chromium-123.0.6312.46/third_party/blink/renderer/core/layout/hit_test_request.h
===================================================================
--- chromium-123.0.6312.46.orig/third_party/blink/renderer/core/layout/hit_test_request.h
+++ chromium-123.0.6312.46/third_party/blink/renderer/core/layout/hit_test_request.h
@@ -25,6 +25,8 @@
#include <optional>
+#include <optional>
+
#include "base/functional/callback.h"
#include "third_party/blink/renderer/platform/heap/garbage_collected.h"
#include "third_party/blink/renderer/platform/heap/member.h"

View File

@@ -0,0 +1,25 @@
commit 39735a1167272326da5ff85e0096b52ca7f47d6c
Author: Jose Dapena Paz <jdapena@igalia.com>
Date: Tue Apr 16 14:36:36 2024 +0000
IWYU: missing include for std::optional usage in bindings_internal.h
Bug: 41455655
Change-Id: Id3e3ade6c8cc89a526462ea9ff6c8bc1dc93a375
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5456954
Reviewed-by: Ken Rockot <rockot@google.com>
Commit-Queue: Ken Rockot <rockot@google.com>
Cr-Commit-Position: refs/heads/main@{#1288018}
diff --git a/mojo/public/cpp/bindings/lib/bindings_internal.h b/mojo/public/cpp/bindings/lib/bindings_internal.h
index 759ceaf7e641d..9f4202b6481b1 100644
--- a/mojo/public/cpp/bindings/lib/bindings_internal.h
+++ b/mojo/public/cpp/bindings/lib/bindings_internal.h
@@ -8,6 +8,7 @@
#include <stdint.h>
#include <functional>
+#include <optional>
#include <type_traits>
#include <utility>

27
chromium-125-ninja.patch Normal file
View File

@@ -0,0 +1,27 @@
commit a976cb05b4024b7a6452d1541378d718cdfe33e6
Author: Takuto Ikuta <tikuta@chromium.org>
Date: Thu Apr 25 07:25:32 2024 +0000
[devtools] fix a missing build dependency to a generated file
Bug: 336911498
Change-Id: I6e6d3afaf33ace53a68271b70165b8c3ab596340
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5487538
Auto-Submit: Takuto Ikuta <tikuta@chromium.org>
Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
Reviewed-by: Danil Somsikov <dsv@chromium.org>
Commit-Queue: Danil Somsikov <dsv@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1292300}
diff --git a/chrome/browser/devtools/BUILD.gn b/chrome/browser/devtools/BUILD.gn
index f0c07cad8cfb4..053199e462f55 100644
--- a/chrome/browser/devtools/BUILD.gn
+++ b/chrome/browser/devtools/BUILD.gn
@@ -117,6 +117,7 @@ static_library("devtools") {
"//chrome/browser/autofill:autofill",
"//components/autofill/content/browser:browser",
"//components/autofill/core/browser:browser",
+ "//components/enterprise/buildflags",
"//components/paint_preview/buildflags:buildflags",
"//components/variations/service:service",
"//components/webapps/common:common",

View File

@@ -0,0 +1,259 @@
commit 0bed9a54baa5058e711a1f051a766f67e1842ec5
Author: Jose Dapena Paz <jdapena@igalia.com>
Date: Tue Apr 16 10:59:08 2024 +0000
Remove more instances of std::vector<const T>
Bug: 323708866
Change-Id: I50ef671f18f0d152ecccbf0f345f84db005c06d7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5440252
Reviewed-by: Yuzhu Shen <yzshen@chromium.org>
Reviewed-by: Vasilii Sukhanov <vasilii@chromium.org>
Commit-Queue: José Dapena Paz <jdapena@igalia.com>
Reviewed-by: Matthew Jones <mdjones@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1287935}
diff --git a/chrome/browser/sync/test/integration/product_specifications_helper.cc b/chrome/browser/sync/test/integration/product_specifications_helper.cc
index d664b952801f8..3ed308b4b7ad8 100644
--- a/chrome/browser/sync/test/integration/product_specifications_helper.cc
+++ b/chrome/browser/sync/test/integration/product_specifications_helper.cc
@@ -41,9 +41,9 @@ bool ProductSpecificationsChecker::IsExitConditionSatisfied(std::ostream* os) {
bool ProductSpecificationsChecker::IsSpecificsAvailableAndEqual() {
for (const ProductSpecificationsSet& product_specifications_set :
service_->GetAllProductSpecifications()) {
- std::vector<const GURL> specifics_urls;
+ std::vector<GURL> specifics_urls;
for (sync_pb::ComparisonData data : compare_specifics_->data()) {
- specifics_urls.push_back(GURL(data.url()));
+ specifics_urls.emplace_back(data.url());
}
if (product_specifications_set.uuid().AsLowercaseString() ==
compare_specifics_->uuid() &&
diff --git a/components/commerce/core/product_specifications/product_specifications_service.cc b/components/commerce/core/product_specifications/product_specifications_service.cc
index eaa362dd46ea0..171ea09f0a6b3 100644
--- a/components/commerce/core/product_specifications/product_specifications_service.cc
+++ b/components/commerce/core/product_specifications/product_specifications_service.cc
@@ -24,11 +24,11 @@ ProductSpecificationsService::GetSyncControllerDelegate() {
return bridge_->change_processor()->GetControllerDelegate();
}
-const std::vector<const ProductSpecificationsSet>
+const std::vector<ProductSpecificationsSet>
ProductSpecificationsService::GetAllProductSpecifications() {
- std::vector<const ProductSpecificationsSet> product_specifications;
+ std::vector<ProductSpecificationsSet> product_specifications;
for (auto& entry : bridge_->entries()) {
- std::vector<const GURL> urls;
+ std::vector<GURL> urls;
for (auto& data : entry.second.data()) {
urls.emplace_back(data.url());
}
@@ -43,7 +43,7 @@ ProductSpecificationsService::GetAllProductSpecifications() {
const std::optional<const ProductSpecificationsSet>
ProductSpecificationsService::AddProductSpecificationsSet(
const std::string& name,
- const std::vector<const GURL>& urls) {
+ const std::vector<GURL>& urls) {
// TODO(crbug.com/332545064) add for a product specification set being added.
std::optional<sync_pb::CompareSpecifics> specifics =
bridge_->AddProductSpecifications(name, urls);
diff --git a/components/commerce/core/product_specifications/product_specifications_service.h b/components/commerce/core/product_specifications/product_specifications_service.h
index 4afe013a0869f..0f84ae04fd228 100644
--- a/components/commerce/core/product_specifications/product_specifications_service.h
+++ b/components/commerce/core/product_specifications/product_specifications_service.h
@@ -26,14 +26,13 @@ class ProductSpecificationsService : public KeyedService {
base::WeakPtr<syncer::ModelTypeControllerDelegate>
GetSyncControllerDelegate();
- const std::vector<const ProductSpecificationsSet>
- GetAllProductSpecifications();
+ const std::vector<ProductSpecificationsSet> GetAllProductSpecifications();
// Add new product specifications set called |name| with product pages
// corresponding to |urls|.
const std::optional<const ProductSpecificationsSet>
AddProductSpecificationsSet(const std::string& name,
- const std::vector<const GURL>& urls);
+ const std::vector<GURL>& urls);
// Deletes product specification set corresponding to identifier |uuid|.
void DeleteProductSpecificationsSet(const std::string& uuid);
diff --git a/components/commerce/core/product_specifications/product_specifications_service_unittest.cc b/components/commerce/core/product_specifications/product_specifications_service_unittest.cc
index 6e0072a5318e8..4087d7f19424a 100644
--- a/components/commerce/core/product_specifications/product_specifications_service_unittest.cc
+++ b/components/commerce/core/product_specifications/product_specifications_service_unittest.cc
@@ -82,9 +82,9 @@ void AddTestSpecifics(commerce::ProductSpecificationsSyncBridge* bridge) {
}
MATCHER_P(HasAllProductSpecs, compare_specifics, "") {
- std::vector<const GURL> specifics_urls;
+ std::vector<GURL> specifics_urls;
for (const sync_pb::ComparisonData& data : compare_specifics.data()) {
- specifics_urls.push_back(GURL(data.url()));
+ specifics_urls.emplace_back(data.url());
}
return arg.uuid().AsLowercaseString() == compare_specifics.uuid() &&
arg.creation_time() ==
@@ -217,7 +217,7 @@ class ProductSpecificationsServiceTest : public testing::Test {
specifics.update_time_unix_epoch_micros()),
specifications.update_time());
EXPECT_EQ(specifics.name(), specifications.name());
- std::vector<const GURL> urls;
+ std::vector<GURL> urls;
for (const sync_pb::ComparisonData& data : specifics.data()) {
urls.emplace_back(data.url());
}
@@ -243,7 +243,7 @@ TEST_F(ProductSpecificationsServiceTest, TestGetProductSpecifications) {
for (const sync_pb::CompareSpecifics& specifics : kCompareSpecifics) {
bridge()->AddCompareSpecifics(specifics);
}
- const std::vector<const ProductSpecificationsSet> specifications =
+ const std::vector<ProductSpecificationsSet> specifications =
service()->GetAllProductSpecifications();
EXPECT_EQ(2u, specifications.size());
for (uint64_t i = 0; i < specifications.size(); i++) {
@@ -252,8 +252,8 @@ TEST_F(ProductSpecificationsServiceTest, TestGetProductSpecifications) {
}
TEST_F(ProductSpecificationsServiceTest, TestAddProductSpecificationsSuccess) {
- std::vector<const GURL> expected_product_urls{GURL(kProductOneUrl),
- GURL(kProductTwoUrl)};
+ std::vector<GURL> expected_product_urls{GURL(kProductOneUrl),
+ GURL(kProductTwoUrl)};
EXPECT_CALL(*observer(),
OnProductSpecificationsSetAdded(HasProductSpecsNameUrl(
kProductSpecsName, expected_product_urls)))
diff --git a/components/commerce/core/product_specifications/product_specifications_set.cc b/components/commerce/core/product_specifications/product_specifications_set.cc
index 7005b6c5b3448..408bfde664f2a 100644
--- a/components/commerce/core/product_specifications/product_specifications_set.cc
+++ b/components/commerce/core/product_specifications/product_specifications_set.cc
@@ -12,7 +12,7 @@ ProductSpecificationsSet::ProductSpecificationsSet(
const std::string& uuid,
const int64_t creation_time_usec_since_epoch,
const int64_t update_time_usec_since_epoch,
- const std::vector<const GURL>& urls,
+ const std::vector<GURL>& urls,
const std::string& name)
: uuid_(base::Uuid::ParseLowercase(uuid)),
creation_time_(base::Time::FromMillisecondsSinceUnixEpoch(
@@ -34,9 +34,9 @@ ProductSpecificationsSet::~ProductSpecificationsSet() = default;
ProductSpecificationsSet ProductSpecificationsSet::FromProto(
const sync_pb::CompareSpecifics& specifics) {
- std::vector<const GURL> urls;
+ std::vector<GURL> urls;
for (const sync_pb::ComparisonData& data : specifics.data()) {
- urls.push_back(GURL(data.url()));
+ urls.emplace_back(data.url());
}
return ProductSpecificationsSet(
specifics.uuid(), specifics.creation_time_unix_epoch_micros(),
diff --git a/components/commerce/core/product_specifications/product_specifications_set.h b/components/commerce/core/product_specifications/product_specifications_set.h
index d761fabafb702..18e3aa113120b 100644
--- a/components/commerce/core/product_specifications/product_specifications_set.h
+++ b/components/commerce/core/product_specifications/product_specifications_set.h
@@ -43,7 +43,7 @@ class ProductSpecificationsSet {
ProductSpecificationsSet(const std::string& uuid,
const int64_t creation_time_usec_since_epoch,
const int64_t update_time_usec_since_epoch,
- const std::vector<const GURL>& urls,
+ const std::vector<GURL>& urls,
const std::string& name);
ProductSpecificationsSet(const ProductSpecificationsSet&);
@@ -61,7 +61,7 @@ class ProductSpecificationsSet {
const base::Time& update_time() const { return update_time_; }
// Product urls for each item in the set
- const std::vector<const GURL>& urls() const { return urls_; }
+ const std::vector<GURL>& urls() const { return urls_; }
// Name of the set
const std::string& name() const { return name_; }
@@ -76,7 +76,7 @@ class ProductSpecificationsSet {
const base::Uuid uuid_;
const base::Time creation_time_;
const base::Time update_time_;
- const std::vector<const GURL> urls_;
+ const std::vector<GURL> urls_;
const std::string name_;
};
diff --git a/components/commerce/core/product_specifications/product_specifications_sync_bridge.cc b/components/commerce/core/product_specifications/product_specifications_sync_bridge.cc
index 09c3fc5f5cede..40e1c4690aa49 100644
--- a/components/commerce/core/product_specifications/product_specifications_sync_bridge.cc
+++ b/components/commerce/core/product_specifications/product_specifications_sync_bridge.cc
@@ -131,7 +131,7 @@ void ProductSpecificationsSyncBridge::GetAllDataForDebugging(
const std::optional<sync_pb::CompareSpecifics>
ProductSpecificationsSyncBridge::AddProductSpecifications(
const std::string& name,
- const std::vector<const GURL>& urls) {
+ const std::vector<GURL>& urls) {
if (!change_processor()->IsTrackingMetadata()) {
return std::nullopt;
}
diff --git a/components/commerce/core/product_specifications/product_specifications_sync_bridge.h b/components/commerce/core/product_specifications/product_specifications_sync_bridge.h
index 0988e7b91ea97..aa7b7a6ba24eb 100644
--- a/components/commerce/core/product_specifications/product_specifications_sync_bridge.h
+++ b/components/commerce/core/product_specifications/product_specifications_sync_bridge.h
@@ -64,7 +64,7 @@ class ProductSpecificationsSyncBridge : public syncer::ModelTypeSyncBridge {
virtual const std::optional<sync_pb::CompareSpecifics>
AddProductSpecifications(const std::string& name,
- const std::vector<const GURL>& urls);
+ const std::vector<GURL>& urls);
void DeleteProductSpecificationsSet(const std::string& uuid);
diff --git a/components/commerce/core/product_specifications/product_specifications_sync_bridge_unittest.cc b/components/commerce/core/product_specifications/product_specifications_sync_bridge_unittest.cc
index 3525177044541..7d0409dfe715d 100644
--- a/components/commerce/core/product_specifications/product_specifications_sync_bridge_unittest.cc
+++ b/components/commerce/core/product_specifications/product_specifications_sync_bridge_unittest.cc
@@ -178,7 +178,7 @@ class ProductSpecificationsSyncBridgeTest : public testing::Test {
std::optional<sync_pb::CompareSpecifics> AddProductSpecifications(
const std::string& name,
- const std::vector<const GURL> urls) {
+ const std::vector<GURL> urls) {
return bridge().AddProductSpecifications(name, urls);
}
diff --git a/components/commerce/core/shopping_service.cc b/components/commerce/core/shopping_service.cc
index 236a8befae286..ae17aea1053d0 100644
--- a/components/commerce/core/shopping_service.cc
+++ b/components/commerce/core/shopping_service.cc
@@ -1734,7 +1734,7 @@ void ShoppingService::GetProductIdentifierForUrl(
std::move(callback)));
}
-const std::vector<const ProductSpecificationsSet>
+const std::vector<ProductSpecificationsSet>
ShoppingService::GetAllProductSpecificationSets() {
return product_specifications_service_->GetAllProductSpecifications();
}
diff --git a/components/commerce/core/shopping_service.h b/components/commerce/core/shopping_service.h
index 304e33d7c5260..5b6d9d2321281 100644
--- a/components/commerce/core/shopping_service.h
+++ b/components/commerce/core/shopping_service.h
@@ -624,7 +624,7 @@ class ShoppingService : public KeyedService,
UrlProductIdentifierTupleCallback callback);
// Return all ProductSpecificationsSets from ProductSpecificationsService.
- virtual const std::vector<const ProductSpecificationsSet>
+ virtual const std::vector<ProductSpecificationsSet>
GetAllProductSpecificationSets();
// Updates the bookmark model used for sync (and shopping) if needed. Invoked
diff --git a/mojo/public/cpp/base/proto_wrapper.cc b/mojo/public/cpp/base/proto_wrapper.cc
index ad5b76632d76e..c5fa9f48a1a46 100644
--- a/mojo/public/cpp/base/proto_wrapper.cc
+++ b/mojo/public/cpp/base/proto_wrapper.cc
@@ -57,7 +57,7 @@ bool ProtoWrapper::DeserializeToMessage(
// Make an in-process copy here as protobuf is not designed to
// safely parse data that might be changing underneath it.
auto as_span = base::make_span(bytes_->data(), bytes_->size());
- const std::vector<const uint8_t> copy(as_span.begin(), as_span.end());
+ const std::vector<uint8_t> copy(as_span.begin(), as_span.end());
return message.ParseFromArray(copy.data(), copy.size());
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,26 @@
commit 2958f58a84ebaacce716929f1cc4ba4a8076daee
Author: Ivan Murashov <ivan.murashov@lge.com>
Date: Wed May 15 19:30:45 2024 +0000
IWYU: Add missing include for std::variant usage in tab_strip_model.h
Bug: 41455655
Change-Id: I1b028ee1340f0697f147b5d0bfef3c916e1a5729
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5537958
Reviewed-by: Vasilii Sukhanov <vasilii@chromium.org>
Reviewed-by: Dana Fried <dfried@chromium.org>
Commit-Queue: Ivan Murashov <ivan.murashov@lge.com>
Cr-Commit-Position: refs/heads/main@{#1301505}
diff --git a/chrome/browser/ui/tabs/tab_strip_model.h b/chrome/browser/ui/tabs/tab_strip_model.h
index 735c379a8cd1d..6711d565101ab 100644
--- a/chrome/browser/ui/tabs/tab_strip_model.h
+++ b/chrome/browser/ui/tabs/tab_strip_model.h
@@ -12,6 +12,7 @@
#include <memory>
#include <optional>
#include <string>
+#include <variant>
#include <vector>
#include "base/containers/span.h"

View File

@@ -0,0 +1,16 @@
commit bbd4b7752f0a9e5f486fa55c9f2b80071ef99d01
Author: lauren n. liberda <lauren@selfisekai.rocks>
Date: Thu Apr 25 04:24:47 2024 +0200
iwyu: missing #include <memory> for std::unique_ptr
--- a/third_party/vulkan-deps/vulkan-utility-libraries/src/include/vulkan/utility/vk_small_containers.hpp
+++ b/third_party/vulkan-deps/vulkan-utility-libraries/src/include/vulkan/utility/vk_small_containers.hpp
@@ -9,6 +9,7 @@
#pragma once
#include <cassert>
+#include <memory>
#include <unordered_map>
#include <unordered_set>

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:93f5850101225945d7ec80959b38460e6a63777055bf2d9e893860c33cb60080
size 3453234996

View File

@@ -1,285 +0,0 @@
author: Andres Salomon <dilinger@debian.org>
Work around the following:
In file included from ../../mojo/public/cpp/bindings/lib/native_s:32
truct_serialization.cc:5:
In file included from ../../mojo/public/cpp/bindings/lib/native_struct_serialization.h:13:
In file included from ../../base/check_op.h:9:
In file included from /usr/bin/../include/c++/v1/string:545:
In file included from /usr/bin/../include/c++/v1/__functional/hash.h:24:
In file included from /usr/bin/../include/c++/v1/__utility/pair.h:16:
In file included from /usr/bin/../include/c++/v1/__fwd/get.h:16:
In file included from /usr/bin/../include/c++/v1/__fwd/subrange.h:20:
In file included from /usr/bin/../include/c++/v1/__iterator/concepts.h:34:
/usr/bin/../include/c++/v1/__memory/pointer_traits.h:118:22: error: implicit instantiation of undefined template 'std::__pointer_traits_element_type<IPC::MessageAttachment::Type, false>'
typedef typename __pointer_traits_element_type<pointer>::type element_type;
^
../../base/types/to_address.h:32:40: note: in instantiation of template class 'std::pointer_traits<IPC::MessageAttachment::Type>' requested here
requires requires(const P& p) { std::pointer_traits<P>::to_address(p); } ||
^
../../base/types/to_address.h:32:35: note: in instantiation of requirement here
../../mojo/public/cpp/bindings/lib/native_struct_serialization.cc requires requires(const P& p) { std::pointer_traits<P>::to_address(p); } ||
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../base/types/to_address.h:32:12: note: while substituting template arguments into constraint expression here
requires requires(const P& p) { std::pointer_traits<P>::to_address(p); } ||
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../mojo/public/cpp/bindings/type_converter.h:103:26: note: while checking constraint satisfaction for template 'to_address<IPC::MessageAttachment::Type>' required here
{ mojo::ConvertTo<T>(base::to_address(obj)) } -> std::same_as<T>;
^~~~
This turns out to be a clang-16 bug, fixed in clang-18:
https://github.com/llvm/llvm-project/issues/67449
This is just the pointer_traits.h header from libc++-18-dev,
with a minor tweak to get things building.
--- /dev/null
+++ b/__memory/pointer_traits.h
@@ -0,0 +1,245 @@
+// -*- C++ -*-
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef _LIBCPP___MEMORY_POINTER_TRAITS_H
+#define _LIBCPP___MEMORY_POINTER_TRAITS_H
+
+#include <__config>
+#include <__memory/addressof.h>
+#include <__type_traits/conditional.h>
+#include <__type_traits/conjunction.h>
+#include <__type_traits/decay.h>
+#include <__type_traits/is_class.h>
+#include <__type_traits/is_function.h>
+#include <__type_traits/is_void.h>
+#include <__type_traits/void_t.h>
+#include <__utility/declval.h>
+#include <cstddef>
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+# pragma GCC system_header
+#endif
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+template <class _Tp, class = void>
+struct __has_element_type : false_type {};
+
+template <class _Tp>
+struct __has_element_type<_Tp, __void_t<typename _Tp::element_type> > : true_type {};
+
+template <class _Ptr, bool = __has_element_type<_Ptr>::value>
+struct __pointer_traits_element_type {};
+
+template <class _Ptr>
+struct __pointer_traits_element_type<_Ptr, true> {
+ typedef _LIBCPP_NODEBUG typename _Ptr::element_type type;
+};
+
+template <template <class, class...> class _Sp, class _Tp, class... _Args>
+struct __pointer_traits_element_type<_Sp<_Tp, _Args...>, true> {
+ typedef _LIBCPP_NODEBUG typename _Sp<_Tp, _Args...>::element_type type;
+};
+
+template <template <class, class...> class _Sp, class _Tp, class... _Args>
+struct __pointer_traits_element_type<_Sp<_Tp, _Args...>, false> {
+ typedef _LIBCPP_NODEBUG _Tp type;
+};
+
+template <class _Tp, class = void>
+struct __has_difference_type : false_type {};
+
+template <class _Tp>
+struct __has_difference_type<_Tp, __void_t<typename _Tp::difference_type> > : true_type {};
+
+template <class _Ptr, bool = __has_difference_type<_Ptr>::value>
+struct __pointer_traits_difference_type {
+ typedef _LIBCPP_NODEBUG ptrdiff_t type;
+};
+
+template <class _Ptr>
+struct __pointer_traits_difference_type<_Ptr, true> {
+ typedef _LIBCPP_NODEBUG typename _Ptr::difference_type type;
+};
+
+template <class _Tp, class _Up>
+struct __has_rebind {
+private:
+ template <class _Xp>
+ static false_type __test(...);
+ _LIBCPP_SUPPRESS_DEPRECATED_PUSH
+ template <class _Xp>
+ static true_type __test(typename _Xp::template rebind<_Up>* = 0);
+ _LIBCPP_SUPPRESS_DEPRECATED_POP
+
+public:
+ static const bool value = decltype(__test<_Tp>(0))::value;
+};
+
+template <class _Tp, class _Up, bool = __has_rebind<_Tp, _Up>::value>
+struct __pointer_traits_rebind {
+#ifndef _LIBCPP_CXX03_LANG
+ typedef _LIBCPP_NODEBUG typename _Tp::template rebind<_Up> type;
+#else
+ typedef _LIBCPP_NODEBUG typename _Tp::template rebind<_Up>::other type;
+#endif
+};
+
+template <template <class, class...> class _Sp, class _Tp, class... _Args, class _Up>
+struct __pointer_traits_rebind<_Sp<_Tp, _Args...>, _Up, true> {
+#ifndef _LIBCPP_CXX03_LANG
+ typedef _LIBCPP_NODEBUG typename _Sp<_Tp, _Args...>::template rebind<_Up> type;
+#else
+ typedef _LIBCPP_NODEBUG typename _Sp<_Tp, _Args...>::template rebind<_Up>::other type;
+#endif
+};
+
+template <template <class, class...> class _Sp, class _Tp, class... _Args, class _Up>
+struct __pointer_traits_rebind<_Sp<_Tp, _Args...>, _Up, false> {
+ typedef _Sp<_Up, _Args...> type;
+};
+
+template <class _Ptr, class = void>
+struct __pointer_traits_impl {};
+
+template <class _Ptr>
+struct __pointer_traits_impl<_Ptr, __void_t<typename __pointer_traits_element_type<_Ptr>::type> > {
+ typedef _Ptr pointer;
+ typedef typename __pointer_traits_element_type<pointer>::type element_type;
+ typedef typename __pointer_traits_difference_type<pointer>::type difference_type;
+
+#ifndef _LIBCPP_CXX03_LANG
+ template <class _Up>
+ using rebind = typename __pointer_traits_rebind<pointer, _Up>::type;
+#else
+ template <class _Up>
+ struct rebind {
+ typedef typename __pointer_traits_rebind<pointer, _Up>::type other;
+ };
+#endif // _LIBCPP_CXX03_LANG
+
+private:
+ struct __nat {};
+
+public:
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 static pointer
+ pointer_to(__conditional_t<is_void<element_type>::value, __nat, element_type>& __r) {
+ return pointer::pointer_to(__r);
+ }
+};
+
+template <class _Ptr>
+struct _LIBCPP_TEMPLATE_VIS pointer_traits : __pointer_traits_impl<_Ptr> {};
+
+template <class _Tp>
+struct _LIBCPP_TEMPLATE_VIS pointer_traits<_Tp*> {
+ typedef _Tp* pointer;
+ typedef _Tp element_type;
+ typedef ptrdiff_t difference_type;
+
+#ifndef _LIBCPP_CXX03_LANG
+ template <class _Up>
+ using rebind = _Up*;
+#else
+ template <class _Up>
+ struct rebind {
+ typedef _Up* other;
+ };
+#endif
+
+private:
+ struct __nat {};
+
+public:
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 static pointer
+ pointer_to(__conditional_t<is_void<element_type>::value, __nat, element_type>& __r) _NOEXCEPT {
+ return std::addressof(__r);
+ }
+};
+
+#ifndef _LIBCPP_CXX03_LANG
+template <class _From, class _To>
+using __rebind_pointer_t = typename pointer_traits<_From>::template rebind<_To>;
+#else
+template <class _From, class _To>
+using __rebind_pointer_t = typename pointer_traits<_From>::template rebind<_To>::other;
+#endif
+
+// to_address
+
+template <class _Pointer, class = void>
+struct __to_address_helper;
+
+template <class _Tp>
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR _Tp* __to_address(_Tp* __p) _NOEXCEPT {
+ static_assert(!is_function<_Tp>::value, "_Tp is a function type");
+ return __p;
+}
+
+template <class _Pointer, class = void>
+struct _HasToAddress : false_type {};
+
+template <class _Pointer>
+struct _HasToAddress<_Pointer, decltype((void)pointer_traits<_Pointer>::to_address(std::declval<const _Pointer&>())) >
+ : true_type {};
+
+template <class _Pointer, class = void>
+struct _HasArrow : false_type {};
+
+template <class _Pointer>
+struct _HasArrow<_Pointer, decltype((void)std::declval<const _Pointer&>().operator->()) > : true_type {};
+
+template <class _Pointer>
+struct _IsFancyPointer {
+ static const bool value = _HasArrow<_Pointer>::value || _HasToAddress<_Pointer>::value;
+};
+
+// enable_if is needed here to avoid instantiating checks for fancy pointers on raw pointers
+template <class _Pointer, class = __enable_if_t< _And<is_class<_Pointer>, _IsFancyPointer<_Pointer> >::value > >
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR
+ decay_t<decltype(__to_address_helper<_Pointer>::__call(std::declval<const _Pointer&>()))>
+ __to_address(const _Pointer& __p) _NOEXCEPT {
+ return __to_address_helper<_Pointer>::__call(__p);
+}
+
+template <class _Pointer, class>
+struct __to_address_helper {
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR static decltype(std::__to_address(
+ std::declval<const _Pointer&>().operator->()))
+ __call(const _Pointer& __p) _NOEXCEPT {
+ return std::__to_address(__p.operator->());
+ }
+};
+
+template <class _Pointer>
+struct __to_address_helper<_Pointer,
+ decltype((void)pointer_traits<_Pointer>::to_address(std::declval<const _Pointer&>()))> {
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR static decltype(pointer_traits<_Pointer>::to_address(
+ std::declval<const _Pointer&>()))
+ __call(const _Pointer& __p) _NOEXCEPT {
+ return pointer_traits<_Pointer>::to_address(__p);
+ }
+};
+
+#if _LIBCPP_STD_VER >= 20
+template <class _Tp>
+inline _LIBCPP_HIDE_FROM_ABI constexpr auto to_address(_Tp* __p) noexcept {
+ return std::__to_address(__p);
+}
+
+template <class _Pointer>
+inline _LIBCPP_HIDE_FROM_ABI constexpr auto to_address(const _Pointer& __p) noexcept
+ -> decltype(std::__to_address(__p)) {
+ return std::__to_address(__p);
+}
+#endif
+
+_LIBCPP_END_NAMESPACE_STD
+
+#endif // _LIBCPP___MEMORY_POINTER_TRAITS_H

View File

@@ -33,8 +33,8 @@ author: Andres Salomon <dilinger@debian.org>
.prefix_list = "/", .prefix_list = "/",
.sensitive = true, .sensitive = true,
.strict = true}; .strict = true};
--- a/components/autofill/core/browser/data_model/autofill_i18n_api.h --- a/components/autofill/core/browser/data_model/addresses/autofill_i18n_api.h
+++ b/components/autofill/core/browser/data_model/autofill_i18n_api.h +++ b/components/autofill/core/browser/data_model/addresses/autofill_i18n_api.h
@@ -16,8 +16,8 @@ namespace autofill::i18n_model_definitio @@ -16,8 +16,8 @@ namespace autofill::i18n_model_definitio
// Country code that represents autofill's legacy address hierarchy model as // Country code that represents autofill's legacy address hierarchy model as
// stored `kAutofillModelRules`. As a workaround for GCC we declare the // stored `kAutofillModelRules`. As a workaround for GCC we declare the
@@ -74,8 +74,8 @@ author: Andres Salomon <dilinger@debian.org>
using PrefetchContainerIdForTesting = using PrefetchContainerIdForTesting =
base::StrongAlias<class PrefetchContainerIdForTestingTag, std::string>; base::StrongAlias<class PrefetchContainerIdForTestingTag, std::string>;
-static constexpr PrefetchContainerIdForTesting -inline constexpr PrefetchContainerIdForTesting
+static const PrefetchContainerIdForTesting +inline const PrefetchContainerIdForTesting
InvalidPrefetchContainerIdForTesting = PrefetchContainerIdForTesting(""); InvalidPrefetchContainerIdForTesting = PrefetchContainerIdForTesting("");
class TestPrefetchWatcherImpl; class TestPrefetchWatcherImpl;
@@ -90,3 +90,19 @@ author: Andres Salomon <dilinger@debian.org>
// Estimated token count of the preamble text in prompt. // Estimated token count of the preamble text in prompt.
static constexpr size_t kPreambleTokenBufferSize = 100u; static constexpr size_t kPreambleTokenBufferSize = 100u;
// Estimated token count of overhead text per passage. // Estimated token count of overhead text per passage.
--- a/components/compose/core/browser/config.cc
+++ b/components/compose/core/browser/config.cc
@@ -46,11 +46,11 @@
}
constexpr auto DEFAULT_COMPOSE_ENABLED_COUNTRIES =
- base::MakeFixedFlatSet<std::string>({"bd", "ca", "gh", "in", "ke", "my",
+ base::MakeFixedFlatSet<std::string_view>({"bd", "ca", "gh", "in", "ke", "my",
"ng", "ph", "pk", "sg", "tz", "ug",
"us", "zm", "zw"});
constexpr auto DEFAULT_PROACTIVE_NUDGE_ENABLED_COUNTRIES =
- base::MakeFixedFlatSet<std::string>({"us"});
+ base::MakeFixedFlatSet<std::string_view>({"us"});
} // namespace

View File

@@ -10,7 +10,33 @@ diff -up chromium-127.0.6533.72/build/rust/rust_bindgen.gni.me chromium-127.0.65
} }
# Template to build Rust/C bindings with bindgen. # Template to build Rust/C bindings with bindgen.
@@ -195,6 +195,8 @@ @@ -105,6 +105,14 @@
# it's declared.
deps = [ ":${_rust_bindgen_generator_name}_static_fns" ]
}
+
+ # Default configs include "-fvisibility=hidden", and for some reason this
+ # causes bindgen not to emit function bindings. Override it.
+ args = []
+ if (!is_win) {
+ args += [ "-fvisibility=default" ]
+ }
+
if (defined(cpp) && cpp) {
# This cfg is used to control the bindings public export.
rustflags = [
--- chromium-132.0.6811.2/build/rust/rust_bindgen_generator.gni 2024/11/07 11:34:54 1.1
+++ chromium-132.0.6811.2/build/rust/rust_bindgen_generator.gni 2024/11/07 11:35:41
@@ -22,7 +22,7 @@
if (host_os == "win") {
_libclang_path += "/bin"
} else {
- _libclang_path += "/lib"
+ _libclang_path += "/lib64"
}
# Template to build Rust/C bindings with bindgen.
@@ -266,6 +266,8 @@
# causes bindgen not to emit function bindings. Override it. # causes bindgen not to emit function bindings. Override it.
if (!is_win) { if (!is_win) {
args += [ "-fvisibility=default" ] args += [ "-fvisibility=default" ]
@@ -19,4 +45,13 @@ diff -up chromium-127.0.6533.72/build/rust/rust_bindgen.gni.me chromium-127.0.65
} }
if (is_win) { if (is_win) {
--- chromium-132.0.6811.2/build/config/gcc/BUILD.gn 2024/11/07 14:13:22 1.1
+++ chromium-132.0.6811.2/build/config/gcc/BUILD.gn 2024/11/07 14:13:45
@@ -32,7 +32,6 @@
# See http://gcc.gnu.org/wiki/Visibility
config("symbol_visibility_hidden") {
cflags = [ "-fvisibility=hidden" ]
- rustflags = [ "-Zdefault-visibility=hidden" ]
# Visibility attribute is not supported on AIX.
if (current_os != "aix") {

View File

@@ -1,24 +1,12 @@
diff --git a/media/filters/ffmpeg_glue.cc b/media/filters/ffmpeg_glue.cc --- chromium-133.0.6943.16/media/filters/ffmpeg_glue.cc 2025/01/20 15:06:56 1.1
index eaabc740e710e..229818059dc2c 100644 +++ chromium-133.0.6943.16/media/filters/ffmpeg_glue.cc 2025/01/20 15:07:32
--- a/media/filters/ffmpeg_glue.cc @@ -111,7 +111,8 @@
+++ b/media/filters/ffmpeg_glue.cc
@@ -21,7 +21,7 @@ namespace media {
// TODO(crbug.com/355485812): Re-enable this flag.
BASE_FEATURE(kAllowOnlyAudioCodecsDuringDemuxing,
"AllowOnlyAudioCodecsDuringDemuxing",
- base::FEATURE_ENABLED_BY_DEFAULT);
+ base::FEATURE_DISABLED_BY_DEFAULT);
BASE_FEATURE(kForbidH264ParsingDuringDemuxing,
"ForbidH264ParsingDuringDemuxing",
base::FEATURE_ENABLED_BY_DEFAULT);
@@ -121,7 +121,8 @@ FFmpegGlue::FFmpegGlue(FFmpegURLProtocol* protocol) {
// We don't allow H.264 parsing during demuxing since we have our own parser // We don't allow H.264 parsing during demuxing since we have our own parser
// and the ffmpeg one increases memory usage unnecessarily. // and the ffmpeg one increases memory usage unnecessarily.
if (base::FeatureList::IsEnabled(kForbidH264ParsingDuringDemuxing)) { - format_context_->flags |= AVFMT_FLAG_NOH264PARSE;
- format_context_->flags |= AVFMT_FLAG_NOH264PARSE; + // TODO(crbug.com/355485812): Re-enable this flag.
+ // TODO(crbug.com/355485812): Re-enable this flag. + // format_context_->flags |= AVFMT_FLAG_NOH264PARSE;
+ // format_context_->flags |= AVFMT_FLAG_NOH264PARSE;
}
// Ensures format parsing errors will bail out. From an audit on 11/2017, all // Ensures format parsing errors will bail out. From an audit on 11/2017, all
// instances were real failures. Solves bugs like http://crbug.com/710791.

View File

@@ -1,22 +0,0 @@
diff --git a/components/media_router/common/providers/cast/channel/enum_table.h b/components/media_router/common/providers/cast/channel/enum_table.h
index 18fd272c6a9d8..20dc7d913e1c5 100644
--- a/components/media_router/common/providers/cast/channel/enum_table.h
+++ b/components/media_router/common/providers/cast/channel/enum_table.h
@@ -12,7 +12,6 @@
#include <cstdint>
#include <cstring>
-#include <new>
#include <optional>
#include <ostream>
#include <string_view>
@@ -368,7 +367,8 @@ class EnumTable {
private:
#ifdef ARCH_CPU_64_BITS
- alignas(std::hardware_destructive_interference_size)
+ // Align the data on a cache line boundary.
+ alignas(64)
#endif
std::initializer_list<Entry> data_;
bool is_sorted_;

View File

@@ -1,13 +0,0 @@
--- chromium-131.0.6778.24/build/linux/unbundle/freetype.gn 2024/11/01 23:01:18 1.1
+++ chromium-131.0.6778.24/build/linux/unbundle/freetype.gn 2024/11/01 23:01:33
@@ -11,4 +11,10 @@
# System FreeType configurations other than as described WILL INTRODUCE TEXT
# RENDERING AND SECURITY REGRESSIONS.
use_system_freetype = true
+
+
+ # Use FreeType for font rendering. If this is set to false, FreeType is
+ # replaced with the Rust-based Fontations set of libraries plus Skia
+ # path rendering.
+ enable_freetype = true
}

BIN
chromium-131.0.6778.264.tar.xz (Stored with Git LFS)

Binary file not shown.

View File

@@ -21,11 +21,11 @@ Signed-off-by: Marek Behún <kabel@kernel.org>
media/filters/ffmpeg_demuxer.cc | 16 ++++++++++++++++ media/filters/ffmpeg_demuxer.cc | 16 ++++++++++++++++
2 files changed, 20 insertions(+) 2 files changed, 20 insertions(+)
Index: chromium-126.0.6478.8/media/filters/audio_decoder_unittest.cc Index: chromium-119.0.6045.21/media/filters/audio_decoder_unittest.cc
=================================================================== ===================================================================
--- chromium-126.0.6478.8.orig/media/filters/audio_decoder_unittest.cc --- chromium-119.0.6045.21.orig/media/filters/audio_decoder_unittest.cc
+++ chromium-126.0.6478.8/media/filters/audio_decoder_unittest.cc +++ chromium-119.0.6045.21/media/filters/audio_decoder_unittest.cc
@@ -109,7 +109,11 @@ void SetDiscardPadding(AVPacket* packet, @@ -108,7 +108,11 @@ void SetDiscardPadding(AVPacket* packet,
} }
// If the timestamp is positive, try to use FFmpeg's discard data. // If the timestamp is positive, try to use FFmpeg's discard data.
@@ -37,11 +37,11 @@ Index: chromium-126.0.6478.8/media/filters/audio_decoder_unittest.cc
const uint32_t* skip_samples_ptr = const uint32_t* skip_samples_ptr =
reinterpret_cast<const uint32_t*>(av_packet_get_side_data( reinterpret_cast<const uint32_t*>(av_packet_get_side_data(
packet, AV_PKT_DATA_SKIP_SAMPLES, &skip_samples_size)); packet, AV_PKT_DATA_SKIP_SAMPLES, &skip_samples_size));
Index: chromium-126.0.6478.8/media/filters/ffmpeg_demuxer.cc Index: chromium-119.0.6045.21/media/filters/ffmpeg_demuxer.cc
=================================================================== ===================================================================
--- chromium-126.0.6478.8.orig/media/filters/ffmpeg_demuxer.cc --- chromium-119.0.6045.21.orig/media/filters/ffmpeg_demuxer.cc
+++ chromium-126.0.6478.8/media/filters/ffmpeg_demuxer.cc +++ chromium-119.0.6045.21/media/filters/ffmpeg_demuxer.cc
@@ -401,7 +401,11 @@ void FFmpegDemuxerStream::EnqueuePacket( @@ -390,7 +390,11 @@ void FFmpegDemuxerStream::EnqueuePacket(
scoped_refptr<DecoderBuffer> buffer; scoped_refptr<DecoderBuffer> buffer;
@@ -53,8 +53,8 @@ Index: chromium-126.0.6478.8/media/filters/ffmpeg_demuxer.cc
uint8_t* side_data = av_packet_get_side_data( uint8_t* side_data = av_packet_get_side_data(
packet.get(), AV_PKT_DATA_MATROSKA_BLOCKADDITIONAL, &side_data_size); packet.get(), AV_PKT_DATA_MATROSKA_BLOCKADDITIONAL, &side_data_size);
@@ -461,7 +465,11 @@ void FFmpegDemuxerStream::EnqueuePacket( @@ -453,7 +457,11 @@ void FFmpegDemuxerStream::EnqueuePacket(
side_data + side_data_size); packet->size - data_offset);
} }
+#if LIBAVUTIL_VERSION_MAJOR < 57 +#if LIBAVUTIL_VERSION_MAJOR < 57

View File

@@ -0,0 +1,13 @@
Index: chromium-123.0.6312.46/chrome/browser/media/router/media_router_feature.cc
===================================================================
--- chromium-123.0.6312.46.orig/chrome/browser/media/router/media_router_feature.cc
+++ chromium-123.0.6312.46/chrome/browser/media/router/media_router_feature.cc
@@ -59,7 +59,7 @@ BASE_FEATURE(kFallbackToAudioTabMirrorin
#if BUILDFLAG(IS_CHROMEOS)
base::FEATURE_DISABLED_BY_DEFAULT);
#else
- base::FEATURE_ENABLED_BY_DEFAULT);
+ base::FEATURE_DISABLED_BY_DEFAULT);
#endif // BUILDFLAG(IS_CHROMEOS)
BASE_FEATURE(kCastMirroringPlayoutDelay,

View File

@@ -0,0 +1,13 @@
diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
index 01d97a360..a9a721403 100644
--- a/build/config/compiler/BUILD.gn
+++ b/build/config/compiler/BUILD.gn
@@ -415,8 +415,6 @@ config("compiler") {
# https://groups.google.com/a/chromium.org/group/chromium-dev/browse_thread/thread/281527606915bb36
# Only apply this to the target linker, since the host
# linker might not be gold, but isn't used much anyway.
- "-Wl,--threads",
- "-Wl,--thread-count=4",
]
}

View File

@@ -10,3 +10,98 @@ diff -up chromium-122.0.6261.29/chrome/browser/safe_browsing/download_protection
#if BUILDFLAG(IS_MAC) #if BUILDFLAG(IS_MAC)
} else if (inspection_type == DownloadFileType::DMG) { } else if (inspection_type == DownloadFileType::DMG) {
StartExtractDmgFeatures(); StartExtractDmgFeatures();
diff -up chromium-122.0.6261.29/chrome/common/safe_browsing/BUILD.gn.nounrar chromium-122.0.6261.29/chrome/common/safe_browsing/BUILD.gn
--- chromium-122.0.6261.29/chrome/common/safe_browsing/BUILD.gn.nounrar 2024-02-07 19:49:27.000000000 +0100
+++ chromium-122.0.6261.29/chrome/common/safe_browsing/BUILD.gn 2024-02-11 18:55:29.965450629 +0100
@@ -143,7 +143,6 @@ source_set("safe_browsing") {
"//components/safe_browsing/content/common:file_type_policies",
"//components/safe_browsing/core/common",
"//third_party/lzma_sdk/google:seven_zip_reader",
- "//third_party/unrar:unrar",
]
public_deps = [
diff -up chromium-122.0.6261.29/chrome/services/file_util/safe_archive_analyzer.cc.nounrar chromium-122.0.6261.29/chrome/services/file_util/safe_archive_analyzer.cc
--- chromium-122.0.6261.29/chrome/services/file_util/safe_archive_analyzer.cc.nounrar 2024-02-07 19:49:27.000000000 +0100
+++ chromium-122.0.6261.29/chrome/services/file_util/safe_archive_analyzer.cc 2024-02-11 23:49:25.061324007 +0100
@@ -74,6 +74,7 @@ void SafeArchiveAnalyzer::AnalyzeRarFile
const std::optional<std::string>& password,
mojo::PendingRemote<chrome::mojom::TemporaryFileGetter> temp_file_getter,
AnalyzeRarFileCallback callback) {
+#if 0
DCHECK(rar_file.IsValid());
temp_file_getter_.Bind(std::move(temp_file_getter));
callback_ = std::move(callback);
@@ -90,6 +91,9 @@ void SafeArchiveAnalyzer::AnalyzeRarFile
/*password=*/password,
std::move(analysis_finished_callback),
std::move(temp_file_getter_callback), &results_);
+#else
+ NOTREACHED();
+#endif
}
void SafeArchiveAnalyzer::AnalyzeSevenZipFile(
diff -up chromium-122.0.6261.29/chrome/services/file_util/safe_archive_analyzer.h.nounrar chromium-122.0.6261.29/chrome/services/file_util/safe_archive_analyzer.h
--- chromium-122.0.6261.29/chrome/services/file_util/safe_archive_analyzer.h.nounrar 2024-02-07 19:49:27.000000000 +0100
+++ chromium-122.0.6261.29/chrome/services/file_util/safe_archive_analyzer.h 2024-02-11 18:55:29.966450653 +0100
@@ -9,7 +9,6 @@
#include "chrome/common/safe_browsing/archive_analyzer_results.h"
#include "chrome/services/file_util/public/mojom/safe_archive_analyzer.mojom.h"
-#include "chrome/utility/safe_browsing/rar_analyzer.h"
#include "chrome/utility/safe_browsing/seven_zip_analyzer.h"
#include "chrome/utility/safe_browsing/zip_analyzer.h"
#include "mojo/public/cpp/bindings/remote.h"
@@ -67,7 +66,6 @@ class SafeArchiveAnalyzer : public chrom
void Timeout();
safe_browsing::ZipAnalyzer zip_analyzer_;
- safe_browsing::RarAnalyzer rar_analyzer_;
safe_browsing::SevenZipAnalyzer seven_zip_analyzer_;
#if BUILDFLAG(IS_MAC)
safe_browsing::dmg::DMGAnalyzer dmg_analyzer_;
Index: chromium-118.0.5993.18/chrome/utility/safe_browsing/BUILD.gn
===================================================================
--- chromium-118.0.5993.18.orig/chrome/utility/safe_browsing/BUILD.gn
+++ chromium-118.0.5993.18/chrome/utility/safe_browsing/BUILD.gn
@@ -31,8 +31,6 @@ source_set("safe_browsing") {
sources = [
"archive_analyzer.cc",
"archive_analyzer.h",
- "rar_analyzer.cc",
- "rar_analyzer.h",
"seven_zip_analyzer.cc",
"seven_zip_analyzer.h",
"zip_analyzer.cc",
@@ -55,7 +53,6 @@ source_set("safe_browsing") {
"//components/safe_browsing/content/common:file_type_policies",
"//components/safe_browsing/core/common",
"//third_party/lzma_sdk/google:seven_zip_reader",
- "//third_party/unrar:unrar",
"//third_party/zlib",
]
Index: chromium-118.0.5993.18/chrome/utility/safe_browsing/archive_analyzer.cc
===================================================================
--- chromium-118.0.5993.18.orig/chrome/utility/safe_browsing/archive_analyzer.cc
+++ chromium-118.0.5993.18/chrome/utility/safe_browsing/archive_analyzer.cc
@@ -8,7 +8,6 @@
#include "build/build_config.h"
#include "build/buildflag.h"
#include "chrome/common/safe_browsing/archive_analyzer_results.h"
-#include "chrome/utility/safe_browsing/rar_analyzer.h"
#include "chrome/utility/safe_browsing/seven_zip_analyzer.h"
#include "chrome/utility/safe_browsing/zip_analyzer.h"
#include "components/safe_browsing/content/common/proto/download_file_types.pb.h"
@@ -23,9 +22,7 @@ namespace safe_browsing {
// static
std::unique_ptr<ArchiveAnalyzer> ArchiveAnalyzer::CreateForArchiveType(
DownloadFileType_InspectionType file_type) {
- if (file_type == DownloadFileType::RAR) {
- return std::make_unique<RarAnalyzer>();
- } else if (file_type == DownloadFileType::ZIP) {
+ if (file_type == DownloadFileType::ZIP) {
return std::make_unique<ZipAnalyzer>();
} else if (file_type == DownloadFileType::SEVEN_ZIP) {
return std::make_unique<SevenZipAnalyzer>();

View File

@@ -13,5 +13,5 @@ Index: chromium-106.0.5249.91/media/BUILD.gn
-} -}
- -
# Common configuration for targets in the media directory; these must not be # Common configuration for targets in the media directory; these must not be
# exported since things like USE_NEON have different meanings elsewhere in the # exported since things like USE_NEON and USE_CRAS have different meanings
# code base. # elsewhere in the code base.

View File

@@ -1,487 +1,11 @@
-------------------------------------------------------------------
Fri Jan 10 14:56:40 CET 2025 - ro@suse.de
- more work on 15.7/15-SP7 using recent llvm,rust,gcc
- cleanup use of suse_version macro
- cleanup use of conditionally applied patches, switch from
autoset to setup/autopatch which allows to specify a range
and apply remaining patches conditionally
-------------------------------------------------------------------
Wed Jan 8 11:18:49 CET 2025 - ro@suse.de
- Chromium 131.0.6778.264 (boo#1235422)
* CVE-2025-0291: Type Confusion in V8
* Various fixes from internal audits, fuzzing and other initiatives
-------------------------------------------------------------------
Thu Dec 19 14:58:31 CET 2024 - ro@suse.de
- Chromium 131.0.6778.204 (boo#1234704)
* CVE-2024-12692: Type Confusion in V8
* CVE-2024-12693: Out of bounds memory access in V8
* CVE-2024-12694: Use after free in Compositing
* CVE-2024-12695: Out of bounds write in V8
* Various fixes from internal audits, fuzzing and other initiatives
-------------------------------------------------------------------
Wed Dec 11 01:24:06 UTC 2024 - Andreas Stieger <andreas.stieger@gmx.de>
- Chromium 131.0.6778.139 (boo#1234361)
* CVE-2024-12381: Type Confusion in V8
* CVE-2024-12382: Use after free in Translate
* Various fixes from internal audits, fuzzing and other initiatives
-------------------------------------------------------------------
Wed Dec 4 10:31:04 CET 2024 - ro@suse.de
- Chromium 131.0.6778.108
(stable released 2024-12-04) (boo#1234118)
* CVE-2024-12053: Type Confusion in V8
- update patches:
chromium-127-constexpr.patch
-------------------------------------------------------------------
Wed Nov 20 23:20:12 CET 2024 - ro@suse.de
- Chromium 131.0.6778.85
(stable released 2024-11-19) (boo#1233534)
* CVE-2024-11395: Type Confusion in V8
-------------------------------------------------------------------
Thu Nov 7 00:32:31 CET 2024 - ro@suse.de
- Chromium 131.0.6778.69
(stable released 2024-11-12) (boo#1233311)
* CVE-2024-11110: Inappropriate implementation in Blink.
* CVE-2024-11111: Inappropriate implementation in Autofill.
* CVE-2024-11112: Use after free in Media.
(n/a for linux)
* CVE-2024-11113: Use after free in Accessibility.
* CVE-2024-11114: Inappropriate implementation in Views.
(n/a for linux)
* CVE-2024-11115: Insufficient policy enforcement in Navigation.
(n/a for linux)
* CVE-2024-11116: Inappropriate implementation in Paint.
* CVE-2024-11117: Inappropriate implementation in FileSystem.
- dropped patches:
* chromium-130-missing-includes.patch (upstream)
* chromium-125-lp155-typename.patch (not required with llvm)
- modified patches:
* chromium-127-bindgen.patch (drop all allowlist changes)
* chromium-127-constexpr.patch (update from debian patch)
- added patches:
* chromium-131-unbundle-enable-freetype.patch
from git, missing in 131 release
* chromium-131-clang-stack-protector.patch
(partial revert of upstream commit
c3dadb02f611a360fb40fd8844ed3c1ef1e7834e)
- drop from keeplibs: (deleted upstream)
third_party/devtools-frontend/src/front_end/third_party/lodash-isequal
- add to keeplibs:
third_party/tflite/src/third_party/xla/xla/tsl (drop subdirs)
third_party/ink
-------------------------------------------------------------------
Wed Nov 6 00:52:13 CET 2024 - ro@suse.de
- Chromium 130.0.6723.116 (boo#1232843)
* CVE-2024-10826: Use after free in Family Experiences
* CVE-2024-10827: Use after free in Serial
-------------------------------------------------------------------
Wed Oct 30 11:16:19 CET 2024 - ro@suse.de
- Chromium 130.0.6723.91 (boo#1232566)
* CVE-2024-10487: Out of bounds write in Dawn
* CVE-2024-10488: Use after free in WebRTC
-------------------------------------------------------------------
Mon Oct 28 12:13:15 CET 2024 - ro@suse.de
- change BR for rust to require version 1.81
(1.82 uses a newer llvm)
-------------------------------------------------------------------
Sat Oct 26 08:16:55 UTC 2024 - Andreas Stieger <andreas.stieger@gmx.de>
- Chromium 130.0.6723.69 (boo#1232060)
* CVE-2024-10229: Inappropriate implementation in Extensions
* CVE-2024-10230: Type Confusion in V8
* CVE-2024-10231: Type Confusion in V8
-------------------------------------------------------------------
Sat Oct 12 10:45:36 UTC 2024 - Andreas Stieger <andreas.stieger@gmx.de>
- Chromium 130.0.6723.58 (boo#1231694)
* CVE-2024-9954: Use after free in AI
* CVE-2024-9955: Use after free in Web Authentication
* CVE-2024-9956: Inappropriate implementation in Web Authentication
* CVE-2024-9957: Use after free in UI
* CVE-2024-9958: Inappropriate implementation in PictureInPicture
* CVE-2024-9959: Use after free in DevTools
* CVE-2024-9960: Use after free in Dawn
* CVE-2024-9961: Use after free in Parcel Tracking
* CVE-2024-9962: Inappropriate implementation in Permissions
* CVE-2024-9963: Insufficient data validation in Downloads
* CVE-2024-9964: Inappropriate implementation in Payments
* CVE-2024-9965: Insufficient data validation in DevTools
* CVE-2024-9966: Inappropriate implementation in Navigations
- modified patches:
* exclude_ymp.patch update context
* chromium-125-compiler.patch update context
* chromium-125-lp155-typename.patch drop hunks for rewritten
proto_fetcher.h
* chromium-127-bindgen.patch update context
- added patches:
* chromium-130-missing-includes.patch include optional, stack
* chromium-130-no-hardware_destructive_interference_size.patch
workaround for older libcpp
- drop from keeplibs:
courgette/third_party dropped upstream
- add to keepllibs:
third_party/fast_float needed by v8/src/numbers/conversion.cc
-------------------------------------------------------------------
Sat Oct 12 10:07:57 UTC 2024 - Andreas Stieger <andreas.stieger@gmx.de>
- Chromium 129.0.6668.100 (boo#1231420)
* CVE-2024-9602: Type Confusion in V8
* CVE-2024-9603: Type Confusion in V8
-------------------------------------------------------------------
Wed Oct 2 10:54:17 CEST 2024 - ro@suse.de
- Chromium 129.0.6668.89 (stable released 2024-09-24)
(boo#1231232)
* CVE-2024-7025: Integer overflow in Layout
* CVE-2024-9369: Insufficient data validation in Mojo
* CVE-2024-9370: Inappropriate implementation in V8
-------------------------------------------------------------------
Wed Sep 25 16:01:32 CEST 2024 - ro@suse.de
- Chromium 129.0.6668.70 (stable released 2024-09-24)
(boo#1230964)
* CVE-2024-9120: Use after free in Dawn
* CVE-2024-9121: Inappropriate implementation in V8
* CVE-2024-9122: Type Confusion in V8
* CVE-2024-9123: Integer overflow in Skia
-------------------------------------------------------------------
Thu Sep 19 15:23:46 CEST 2024 - ro@suse.de
- bump BR for nodejs to minimal 20.0
- dropped patches:
* chromium-disable-GlobalMediaControlsCastStartStop.patch
it was applied at the wrong place and the crash is gone
-------------------------------------------------------------------
Wed Sep 18 17:29:16 CEST 2024 - ro@suse.de
- Chromium 129.0.6668.58 (stable released 2024-09-17)
(boo#1230678)
* CVE-2024-8904: Type Confusion in V8
* CVE-2024-8905: Inappropriate implementation in V8
* CVE-2024-8906: Incorrect security UI in Downloads
* CVE-2024-8907: Insufficient data validation in Omnibox
* CVE-2024-8908: Inappropriate implementation in Autofill
* CVE-2024-8909: Inappropriate implementation in UI
- modified patches:
* chromium-prop-codecs.patch update context
- add to keeplibs:
third_party/rapidhash
- drop from keeplibs:
third_party/libudev dropped upstream
third_party/catapult/third_party/html5lib-python dropped upstream
- add patches:
chromium-129-revert-AVFMT_FLAG_NOH264PARSE.patch
(not in our ffmpeg yet)
-------------------------------------------------------------------
Wed Sep 11 12:07:53 CEST 2024 - ro@suse.de
- Chromium 128.0.6613.137 (released 2024-09-10) (boo#1230391)
* CVE-2024-8636: Heap buffer overflow in Skia
* CVE-2024-8637: Use after free in Media Router
* CVE-2024-8638: Type Confusion in V8
* CVE-2024-8639: Use after free in Autofill
-------------------------------------------------------------------
Tue Sep 3 14:42:04 CEST 2024 - ro@suse.de
- Chromium 128.0.6613.119 (released 2024-09-02) (boo#1230108)
* CVE-2024-8362: Use after free in WebAudio
* CVE-2024-7970: Out of bounds write in V8
-------------------------------------------------------------------
Thu Aug 29 04:50:54 UTC 2024 - Andreas Stieger <andreas.stieger@gmx.de>
- Chromium 128.0.6613.113 (boo#1229897)
* CVE-2024-7969: Type Confusion in V8
* CVE-2024-8193: Heap buffer overflow in Skia
* CVE-2024-8194: Type Confusion in V8
* CVE-2024-8198: Heap buffer overflow in Skia
-------------------------------------------------------------------
Wed Aug 21 21:10:50 UTC 2024 - Andreas Stieger <andreas.stieger@gmx.de>
- Chromium 128.0.6613.84 (boo#1229591)
* CVE-2024-7964: Use after free in Passwords
* CVE-2024-7965: Inappropriate implementation in V8
* CVE-2024-7966: Out of bounds memory access in Skia
* CVE-2024-7967: Heap buffer overflow in Fonts
* CVE-2024-7968: Use after free in Autofill
* CVE-2024-7969: Type Confusion in V8
* CVE-2024-7971: Type confusion in V8
* CVE-2024-7972: Inappropriate implementation in V8
* CVE-2024-7973: Heap buffer overflow in PDFium
* CVE-2024-7974: Insufficient data validation in V8 API
* CVE-2024-7975: Inappropriate implementation in Permissions
* CVE-2024-7976: Inappropriate implementation in FedCM
* CVE-2024-7977: Insufficient data validation in Installer
* CVE-2024-7978: Insufficient policy enforcement in Data Transfer
* CVE-2024-7979: Insufficient data validation in Installer
* CVE-2024-7980: Insufficient data validation in Installer
* CVE-2024-7981: Inappropriate implementation in Views
* CVE-2024-8033: Inappropriate implementation in WebApp Installs
* CVE-2024-8034: Inappropriate implementation in Custom Tabs
* CVE-2024-8035: Inappropriate implementation in Extensions
* Various fixes from internal audits, fuzzing and other initiatives
-------------------------------------------------------------------
Mon Aug 19 00:24:44 CEST 2024 - ro@suse.de
- Chromium 128.0.6613.36 (boo#1229426)
- modified patches:
* chromium-norar.patch drop most hunks,
upstream has a config for this now
* gcc-enable-lto.patch update context
* chromium-125-compiler.patch update context
* chromium-127-constexpr.patch update context
- drop patches: (should be obsolete with llvm>17 and libc++)
chromium-120-emplace.patch
chromium-125-emplace-struct.patch
- drop patches: (upstream)
* chromium-121-nullptr_t-without-namespace-std.patch
* chromium-123-stats-collector.patch
* chromium-127-paint-layer-header.patch
* chromium-127-ninja-1.21.1-deps-part0.patch
* chromium-127-ninja-1.21.1-deps-part1.patch
* chromium-127-ninja-1.21.1-deps-part2.patch
* chromium-127-ninja-1.21.1-deps-part3.patch
- disable rpmlint only for factory/tw where it is broken because
of the large archive size of the source here
- keeplibs add
third_party/devtools-frontend/src/front_end/third_party/
puppeteer/package/lib/esm/third_party/parsel-js
third_party/tflite/src/third_party/xla/xla/tsl/framework
- buildflags add
safe_browsing_use_unrar=false
-------------------------------------------------------------------
Thu Aug 15 15:35:42 CEST 2024 - ro@suse.de
- Chromium 127.0.6533.119 (boo#1228941)
* CVE-2024-7532: Out of bounds memory access in ANGLE
* CVE-2024-7533: Use after free in Sharing
* CVE-2024-7550: Type Confusion in V8
* CVE-2024-7534: Heap buffer overflow in Layout
* CVE-2024-7535: Inappropriate implementation in V8
* CVE-2024-7536: Use after free in WebAudio
-------------------------------------------------------------------
Thu Aug 1 18:40:59 CEST 2024 - ro@suse.de
- Chromium 127.0.6533.88 (boo#1228628, boo#1228940, boo#1228942)
* CVE-2024-6988: Use after free in Downloads
* CVE-2024-6989: Use after free in Loader
* CVE-2024-6991: Use after free in Dawn
* CVE-2024-6992: Out of bounds memory access in ANGLE
* CVE-2024-6993: Inappropriate implementation in Canvas
* CVE-2024-6994: Heap buffer overflow in Layout
* CVE-2024-6995: Inappropriate implementation in Fullscreen
* CVE-2024-6996: Race in Frames
* CVE-2024-6997: Use after free in Tabs
* CVE-2024-6998: Use after free in User Education
* CVE-2024-6999: Inappropriate implementation in FedCM
* CVE-2024-7000: Use after free in CSS. Reported by Anonymous
* CVE-2024-7001: Inappropriate implementation in HTML
* CVE-2024-7003: Inappropriate implementation in FedCM
* CVE-2024-7004: Insufficient validation of untrusted input
in Safe Browsing
* CVE-2024-7005: Insufficient validation of untrusted input
in Safe Browsing
* CVE-2024-6990: Uninitialized Use in Dawn
* CVE-2024-7255: Out of bounds read in WebTransport
* CVE-2024-7256: Insufficient data validation in Dawn
- drop patches:
* chromium-115-compiler-SkColor4f.patch only for llvm < 16
* chromium-117-system-zstd.patch upstreamed
* chromium-122-workaround_clang_bug-structured_binding.patch
* chromium-125-tabstrip-include.patch upstreamed
* chromium-126-missing-header-files.patch
* chromium-126-RealTimeReportingBindings-missing-decl.patch
upstreamed
* chromium-126-no_matching_constructor.patch
* chromium-126-no-format.patch upstreamed
- switch from libstdc++ to libc++
- drop patches obsolete when using libc++
* chromium-126-debian-bad-font-gc00000.patch
* chromium-126-debian-bad-font-gc2.patch
* chromium-126-debian-bad-font-gc1.patch
* chromium-126-debian-bad-font-gc00.patch
* chromium-126-debian-bad-font-gc000.patch
* chromium-126-debian-bad-font-gc11.patch
* chromium-126-debian-bad-font-gc0.patch
* chromium-126-debian-bad-font-gc0000.patch
* chromium-126-debian-bad-font-gc3.patch
- modify patches:
* chromium-125-lp155-typename.patch
- drop hunk in model_execution_util.h
- drop hunk in model_quality_log_entry.h
- dropping from keeplibs: (does not exist)
base/third_party/valgrind
third_party/maldoca
third_party/maldoca/src/third_party
- requires updated gn to build (newer than Feb 14 2024)
- add patches:
* chromium-127-bindgen.patch (from debian/patches/fixes))
* chromium-127-rust-clanglib.patch (just first hunk from fedora)
* chromium-127-clang17-traitors.patch
workaround for clang < 18 from debiana (only used on 15.6)
* chromium-127-constexpr.patch (from debian/patches/bookworm)
* chromium-127-paint-layer-header.patch (from debian/patches/upstream)
* chromium-127-ninja-1.21.1-deps-part0.patch (from fedora)
* chromium-127-ninja-1.21.1-deps-part1.patch (from fedora)
* chromium-127-ninja-1.21.1-deps-part2.patch (from fedora)
* chromium-127-ninja-1.21.1-deps-part3.patch (from fedora)
- buildrequire rust-bindgen to get proper binaries per arch
- use qt5 for factory as well, qt6 fails with:
ld.lld: error: undefined symbol: QByteArray::toStdString() const
referenced by qt_shim.cc
obj/ui/qt/qt6_shim/libqt6_shim.so.lto.qt_shim.o:(qt::QtShim::GetFontDescription() const)
- drop patches:
* chromium-125-debian-bad-font-gc11.patch
* chromium-125-debian-bad-font-gc0000.patch
* chromium-125-debian-bad-font-gc00.patch
* chromium-125-debian-bad-font-gc0.patch
* chromium-125-debian-bad-font-gc000.patch
* chromium-125-debian-bad-font-gc1.patch
-------------------------------------------------------------------
Wed Jul 17 16:11:41 UTC 2024 - Andreas Stieger <andreas.stieger@gmx.de>
- Chromium 126.0.6478.182 (boo#1227979)
* CVE-2024-6772: Inappropriate implementation in V8
* CVE-2024-6773: Type Confusion in V8
* CVE-2024-6774: Use after free in Screen Capture
* CVE-2024-6775: Use after free in Media Stream
* CVE-2024-6776: Use after free in Audio
* CVE-2024-6777: Use after free in Navigation
* CVE-2024-6778: Race in DevTools
* CVE-2024-6779: Out of bounds memory access in V8
-------------------------------------------------------------------
Tue Jul 9 10:09:56 UTC 2024 - Callum Farmer <gmbr3@opensuse.org>
- Finalize 126
- Removed patches:
* chromium-125-debian-bad-font-gc2.patch
* chromium-125-debian-bad-font-gc3.patch
- Added patches:
* chromium-126-RealTimeReportingBindings-missing-decl.patch
* chromium-126-no-format.patch
-------------------------------------------------------------------
Mon Jul 1 14:09:50 UTC 2024 - Andreas Stieger <andreas.stieger@gmx.de>
- Chromium 126.0.6478.126 (boo#1226504, boo#1226205, boo#1226933)
* CVE-2024-6290: Use after free in Dawn
* CVE-2024-6291: Use after free in Swiftshader
* CVE-2024-6292: Use after free in Dawn
* CVE-2024-6293: Use after free in Dawn
* CVE-2024-6100: Type Confusion in V8
* CVE-2024-6101: Inappropriate implementation in WebAssembly
* CVE-2024-6102: Out of bounds memory access in Dawn
* CVE-2024-6103: Use after free in Dawn
* CVE-2024-5830: Type Confusion in V8
* CVE-2024-5831: Use after free in Dawn
* CVE-2024-5832: Use after free in Dawn
* CVE-2024-5833: Type Confusion in V8
* CVE-2024-5834: Inappropriate implementation in Dawn
* CVE-2024-5835: Heap buffer overflow in Tab Groups
* CVE-2024-5836: Inappropriate Implementation in DevTools
* CVE-2024-5837: Type Confusion in V8
* CVE-2024-5838: Type Confusion in V8
* CVE-2024-5839: Inappropriate Implementation in Memory Allocator
* CVE-2024-5840: Policy Bypass in CORS
* CVE-2024-5841: Use after free in V8
* CVE-2024-5842: Use after free in Browser UI
* CVE-2024-5843: Inappropriate implementation in Downloads
* CVE-2024-5844: Heap buffer overflow in Tab Strip
* CVE-2024-5845: Use after free in Audio
* CVE-2024-5846: Use after free in PDFium
* CVE-2024-5847: Use after free in PDFium
- drop patches:
* chromium-disable-parallel-gold.patch
* chromium-125-appservice-include.patch
* chromium-125-lens-include.patch
* chromium-125-mojo-bindings-include.patch
* chromium-125-no-vector-consts.patch
* chromium-125-vulkan-include.patch
* chromium-125-ninja.patch
* chromium-125-no_matching_constructor.patch
* chromium-125-missing-header-files.patch
- add patches:
* chromium-126-missing-header-files.patch
* chromium-126-quiche-interator.patch
* chromium-126-no_matching_constructor.patch
-------------------------------------------------------------------
Wed Jun 12 13:00:59 UTC 2024 - Callum Farmer <gmbr3@opensuse.org>
- Amend fix_building_widevinecdm_with_chromium.patch to allow
Widevine on ARM64 (bsc#1226170)
-------------------------------------------------------------------
Fri May 31 07:29:22 UTC 2024 - Andreas Stieger <andreas.stieger@gmx.de>
- Chromium 125.0.6422.141 (boo#1225690)
* CVE-2024-5493: Heap buffer overflow in WebRTC
* CVE-2024-5494: Use after free in Dawn
* CVE-2024-5495: Use after free in Dawn
* CVE-2024-5496: Use after free in Media Session
* CVE-2024-5497: Out of bounds memory access in Keyboard Inputs
* CVE-2024-5498: Use after free in Presentation API
* CVE-2024-5499: Out of bounds write in Streams API
-------------------------------------------------------------------
Fri May 24 04:24:22 UTC 2024 - Andreas Stieger <andreas.stieger@gmx.de>
- Chromium 125.0.6422.112
* CVE-2024-5274: Type Confusion in V8 (boo#1225199)
-------------------------------------------------------------------
Tue May 21 20:47:44 UTC 2024 - Andreas Stieger <andreas.stieger@gmx.de>
- Chromium 125.0.6422.76 (boo#1224818)
* CVE-2024-5157: Use after free in Scheduling
* CVE-2024-5158: Type Confusion in V8
* CVE-2024-5159: Heap buffer overflow in ANGLE
* CVE-2024-5160: Heap buffer overflow in Dawn
* Various fixes from internal audits, fuzzing and other initiatives
------------------------------------------------------------------- -------------------------------------------------------------------
Thu May 16 16:57:33 CEST 2024 - ro@suse.de Thu May 16 16:57:33 CEST 2024 - ro@suse.de
- Chromium 125.0.6422.60 (boo#1224341) - Chromium 125.0.6422.60
* CVE-2024-4947: Type Confusion in V8 * High CVE-2024-4947: Type Confusion in V8
* CVE-2024-4948: Use after free in Dawn * High CVE-2024-4948: Use after free in Dawn
* CVE-2024-4949: Use after free in V8 * Medium CVE-2024-4949: Use after free in V8
* CVE-2024-4950: Inappropriate implementation in Downloads * Low CVE-2024-4950: Inappropriate implementation in Downloads
- Chromium 125.0.6422.41 - Chromium 125.0.6422.41
* New upstream (early) stable release. * New upstream (early) stable release.
@@ -541,16 +65,10 @@ Thu May 16 16:57:33 CEST 2024 - ro@suse.de
added to keeplibs for added to keeplibs for
gen/third_party/lens_server_proto gen/third_party/lens_server_proto
-------------------------------------------------------------------
Tue May 14 05:03:09 UTC 2024 - Andreas Stieger <andreas.stieger@gmx.de>
- Chromium 124.0.6367.207 (boo#1224294)
* CVE-2024-4761: Out of bounds write in V8
------------------------------------------------------------------- -------------------------------------------------------------------
Fri May 10 12:16:29 UTC 2024 - Andreas Stieger <andreas.stieger@gmx.de> Fri May 10 12:16:29 UTC 2024 - Andreas Stieger <andreas.stieger@gmx.de>
- Chromium 124.0.6367.201 (boo#1224208) - Chromium 124.0.6367.201
* CVE-2024-4671: Use after free in Visuals * CVE-2024-4671: Use after free in Visuals
- Chromium 124.0.6367.155 (boo#1224045) - Chromium 124.0.6367.155 (boo#1224045)
* CVE-2024-4558: Use after free in ANGLE * CVE-2024-4558: Use after free in ANGLE

View File

@@ -1,7 +1,7 @@
# #
# spec file for package chromium # spec file for package chromium
# #
# Copyright (c) 2025 SUSE LLC # Copyright (c) 2024 SUSE LLC
# Copyright (c) 2024 Callum Farmer <gmbr3@opensuse.org> # Copyright (c) 2024 Callum Farmer <gmbr3@opensuse.org>
# Copyright (c) 2024 Andreas Stieger <Andreas.Stieger@gmx.de> # Copyright (c) 2024 Andreas Stieger <Andreas.Stieger@gmx.de>
# #
@@ -22,10 +22,7 @@
%define outputdir out %define outputdir out
# bsc#1108175 # bsc#1108175
%define __provides_exclude ^lib.*\\.so.*$ %define __provides_exclude ^lib.*\\.so.*$
# suse_version 1500 all of sle code 15, all of leap15 %if 0%{?suse_version} >= 1550 || 0%{?sle_version} >= 150400
# suse_version 1600 all of alp, slfo
# suse_version 1699 tw
%if 0%{?suse_version} >= 1600 || 0%{?sle_version} >= 150400
%bcond_without gtk4 %bcond_without gtk4
%bcond_without qt %bcond_without qt
%else %else
@@ -37,55 +34,37 @@
%else %else
%bcond_without swiftshader %bcond_without swiftshader
%endif %endif
%if 0%{?suse_version} >= 1600 %if 0%{?suse_version} >= 1599
%bcond_without system_harfbuzz %bcond_without system_harfbuzz
%bcond_without system_freetype %bcond_without system_freetype
%bcond_without arm_bti %bcond_without arm_bti
# ERROR Unresolved dependencies. %bcond_without system_icu
# //chrome/browser/ui/lens:unit_tests(//build/toolchain/linux/unbundle:default)
# needs //third_party/icu:icuuc_public(//build/toolchain/linux/unbundle:default)
#bcond_without system_icu
%bcond_with qt6
%bcond_without ffmpeg_51 %bcond_without ffmpeg_51
%define ffmpeg_version 59 %bcond_without qt6
%else %else
%bcond_with system_harfbuzz %bcond_with system_harfbuzz
%bcond_with system_freetype %bcond_with system_freetype
%bcond_with arm_bti %bcond_with arm_bti
%bcond_with system_icu %bcond_with system_icu
%bcond_with qt6
%bcond_with ffmpeg_51 %bcond_with ffmpeg_51
%define ffmpeg_version 58 %bcond_with qt6
%endif %endif
%bcond_with system_zstd %bcond_with system_zstd
%if 0%{?suse_version} >= 1600 || 0%{?sle_version} >= 150700
# LLVM version
%define llvm_version 19
# RUST version
%define rust_version 1.83
# GCC version
%define gcc_version 14
%else
# LLVM version # LLVM version
%define llvm_version 17 %define llvm_version 17
# RUST version
%define rust_version 1.81
# GCC version # GCC version
%define gcc_version 13 %define gcc_version 13
%endif
%if 0%{?suse_version} <= 1699 %if 0%{?suse_version} <= 1699
%bcond_with system_webp
%bcond_with system_re2 %bcond_with system_re2
%bcond_with system_webp
%else %else
%bcond_without system_webp
%bcond_without system_re2 %bcond_without system_re2
%bcond_without system_webp
%endif %endif
%bcond_with is_beta # CHANNEL SWITCH %bcond_without is_beta # CHANNEL SWITCH
%bcond_with system_avif %bcond_with system_avif
# Compiler # Compiler
%bcond_without clang %bcond_without clang
# libstdc++ or libc++
%bcond_with libstdcpp
# Chromium built with GCC 11 and LTO enabled crashes (boo#1194055) # Chromium built with GCC 11 and LTO enabled crashes (boo#1194055)
%bcond_without lto %bcond_without lto
%bcond_without pipewire %bcond_without pipewire
@@ -97,6 +76,12 @@
%else %else
%bcond_with libxml2_2_12 %bcond_with libxml2_2_12
%endif %endif
# FFmpeg version
%if %{with ffmpeg_51}
%define ffmpeg_version 59
%else
%define ffmpeg_version 58
%endif
# Package names # Package names
%if %{with is_beta} %if %{with is_beta}
%define chromedriver_name %{name}-chromedriver %define chromedriver_name %{name}-chromedriver
@@ -106,7 +91,7 @@
%define n_suffix %{nil} %define n_suffix %{nil}
%endif %endif
Name: chromium%{n_suffix} Name: chromium%{n_suffix}
Version: 131.0.6778.264 Version: 125.0.6422.60
Release: 0 Release: 0
Summary: Google's open source browser project Summary: Google's open source browser project
License: BSD-3-Clause AND LGPL-2.1-or-later License: BSD-3-Clause AND LGPL-2.1-or-later
@@ -114,6 +99,9 @@ URL: https://www.chromium.org/
Source0: https://commondatastorage.googleapis.com/chromium-browser-official/%{rname}-%{version}.tar.xz Source0: https://commondatastorage.googleapis.com/chromium-browser-official/%{rname}-%{version}.tar.xz
Source1: esbuild.tar.gz Source1: esbuild.tar.gz
Source3: README.SUSE Source3: README.SUSE
Source4: ffmpeg-new-channel-layout.patch
Source5: Cr122-ffmpeg-new-channel-layout.patch
Source6: chromium-125-ffmpeg-5.x-reordered_opaque.patch
# Toolchain definitions # Toolchain definitions
Source30: master_preferences Source30: master_preferences
Source104: chromium-symbolic.svg Source104: chromium-symbolic.svg
@@ -133,39 +121,49 @@ Patch6: gcc-enable-lto.patch
# Do not use unrar code, it is non-free # Do not use unrar code, it is non-free
Patch7: chromium-norar.patch Patch7: chromium-norar.patch
Patch9: system-libdrm.patch Patch9: system-libdrm.patch
Patch10: chromium-disable-parallel-gold.patch
# gentoo/fedora/arch patchset # gentoo/fedora/arch patchset
Patch15: chromium-125-compiler.patch Patch15: chromium-125-compiler.patch
Patch40: chromium-91-java-only-allowed-in-android-builds.patch Patch40: chromium-91-java-only-allowed-in-android-builds.patch
Patch62: chromium-93-ffmpeg-4.4.patch Patch62: chromium-93-ffmpeg-4.4.patch
Patch68: chromium-94-ffmpeg-roll.patch
Patch98: chromium-102-regex_pattern-array.patch Patch98: chromium-102-regex_pattern-array.patch
# PATCH-FIX-SUSE: allow prop codecs to be set with chromium branding # PATCH-FIX-SUSE: allow prop codecs to be set with chromium branding
Patch202: chromium-prop-codecs.patch Patch202: chromium-prop-codecs.patch
Patch203: chromium-106-ffmpeg-duration.patch
Patch205: chromium-disable-GlobalMediaControlsCastStartStop.patch
Patch224: chromium-115-compiler-SkColor4f.patch
Patch240: chromium-117-string-convert.patch Patch240: chromium-117-string-convert.patch
Patch244: chromium-117-system-zstd.patch
Patch248: chromium-119-assert.patch Patch248: chromium-119-assert.patch
Patch250: chromium-120-emplace.patch
Patch254: chromium-125-emplace-struct.patch
Patch256: chromium-120-make_unique-struct.patch Patch256: chromium-120-make_unique-struct.patch
Patch258: chromium-121-nullptr_t-without-namespace-std.patch
Patch261: chromium-121-rust-clang_lib.patch Patch261: chromium-121-rust-clang_lib.patch
Patch311: chromium-125-disable-FFmpegAllowLists.patch Patch311: chromium-125-disable-FFmpegAllowLists.patch
Patch316: chromium-125-missing-header-files.patch
Patch317: chromium-125-no_matching_constructor.patch
Patch322: chromium-125-lp155-typename.patch
Patch324: chromium-122-workaround_clang_bug-structured_binding.patch
Patch326: chromium-123-stats-collector.patch
Patch336: chromium-124-system-libxml.patch
Patch337: chromium-123-missing-QtGui.patch Patch337: chromium-123-missing-QtGui.patch
Patch359: chromium-126-quiche-interator.patch Patch340: chromium-125-appservice-include.patch
Patch360: chromium-127-bindgen.patch Patch341: chromium-125-lens-include.patch
Patch361: chromium-127-rust-clanglib.patch Patch342: chromium-125-mojo-bindings-include.patch
Patch363: chromium-127-constexpr.patch Patch343: chromium-125-no-vector-consts.patch
Patch364: chromium-129-revert-AVFMT_FLAG_NOH264PARSE.patch Patch345: chromium-125-vulkan-include.patch
Patch366: chromium-130-no-hardware_destructive_interference_size.patch Patch346: chromium-125-tabstrip-include.patch
Patch367: chromium-131-unbundle-enable-freetype.patch Patch347: chromium-125-ninja.patch
Patch368: chromium-131-clang-stack-protector.patch Patch350: chromium-125-debian-bad-font-gc0000.patch
# conditionally applied patches Patch351: chromium-125-debian-bad-font-gc000.patch
# patch where ffmpeg < 5 Patch352: chromium-125-debian-bad-font-gc00.patch
Patch1001: chromium-94-ffmpeg-roll.patch Patch353: chromium-125-debian-bad-font-gc0.patch
Patch1002: chromium-125-ffmpeg-5.x-reordered_opaque.patch Patch354: chromium-125-debian-bad-font-gc11.patch
Patch1003: Cr122-ffmpeg-new-channel-layout.patch Patch355: chromium-125-debian-bad-font-gc1.patch
Patch1004: ffmpeg-new-channel-layout.patch Patch356: chromium-125-debian-bad-font-gc2.patch
Patch1005: chromium-106-ffmpeg-duration.patch Patch357: chromium-125-debian-bad-font-gc3.patch
# patch where libxml < 2.12
Patch1010: chromium-124-system-libxml.patch
# patch where llvm < 19
Patch1020: chromium-127-clang17-traitors.patch
# end conditionally applied patches
BuildRequires: SDL-devel BuildRequires: SDL-devel
BuildRequires: bison BuildRequires: bison
BuildRequires: cups-devel BuildRequires: cups-devel
@@ -188,10 +186,10 @@ BuildRequires: libpng-devel
BuildRequires: memory-constraints BuildRequires: memory-constraints
BuildRequires: nasm BuildRequires: nasm
BuildRequires: ninja >= 1.7.2 BuildRequires: ninja >= 1.7.2
BuildRequires: nodejs >= 20.0 BuildRequires: nodejs >= 8.0
BuildRequires: pam-devel BuildRequires: pam-devel
BuildRequires: pkgconfig BuildRequires: pkgconfig
%if 0%{?suse_version} >= 1600 %if 0%{?suse_version} >= 1599
BuildRequires: python3 BuildRequires: python3
BuildRequires: python3-setuptools BuildRequires: python3-setuptools
BuildRequires: python3-six BuildRequires: python3-six
@@ -200,6 +198,7 @@ BuildRequires: python311
BuildRequires: python311-setuptools BuildRequires: python311-setuptools
BuildRequires: python311-six BuildRequires: python311-six
%endif %endif
BuildRequires: rust
BuildRequires: snappy-devel BuildRequires: snappy-devel
BuildRequires: update-desktop-files BuildRequires: update-desktop-files
BuildRequires: util-linux BuildRequires: util-linux
@@ -285,10 +284,9 @@ BuildRequires: pkgconfig(xshmfence)
BuildRequires: pkgconfig(xt) BuildRequires: pkgconfig(xt)
BuildRequires: pkgconfig(xtst) BuildRequires: pkgconfig(xtst)
# BEG add rust BR # BEG add rust BR
BuildRequires: cargo%{rust_version} BuildRequires: cargo
BuildRequires: rust%{rust_version} BuildRequires: rust >= 1.47
# END add rust BR # END add rust BR
BuildRequires: rust-bindgen
Requires: xdg-utils Requires: xdg-utils
Requires(pre): permissions Requires(pre): permissions
Recommends: noto-coloremoji-fonts Recommends: noto-coloremoji-fonts
@@ -349,13 +347,13 @@ BuildRequires: pkgconfig(libyuv)
%endif %endif
%if %{with qt} %if %{with qt}
BuildRequires: pkgconfig(Qt5Core) BuildRequires: pkgconfig(Qt5Core)
BuildRequires: pkgconfig(Qt5Gui)
BuildRequires: pkgconfig(Qt5Widgets) BuildRequires: pkgconfig(Qt5Widgets)
BuildRequires: pkgconfig(Qt5Gui)
%endif %endif
%if %{with qt6} %if %{with qt6}
BuildRequires: pkgconfig(Qt6Core) BuildRequires: pkgconfig(Qt6Core)
BuildRequires: pkgconfig(Qt6Gui)
BuildRequires: pkgconfig(Qt6Widgets) BuildRequires: pkgconfig(Qt6Widgets)
BuildRequires: pkgconfig(Qt6Gui)
%endif %endif
%if %{with system_re2} %if %{with system_re2}
BuildRequires: pkgconfig(re2) >= 11 BuildRequires: pkgconfig(re2) >= 11
@@ -367,42 +365,30 @@ BuildRequires: pkgconfig(libwebp) >= 0.4.0
BuildRequires: pkgconfig(libzstd) >= 1.5.5 BuildRequires: pkgconfig(libzstd) >= 1.5.5
%endif %endif
%if %{with clang} %if %{with clang}
%if 0%{?suse_version} <= 1500 %if 0%{?suse_version} < 1570
BuildRequires: clang%{llvm_version} BuildRequires: clang%{llvm_version}
%if %{with libstdcpp} BuildRequires: gcc%{gcc_version}
BuildRequires: libstdc++6-devel-gcc%{gcc_version} BuildRequires: libstdc++6-devel-gcc%{gcc_version}
%else
BuildRequires: clang%{llvm_version}-devel
#BuildRequires: libc++-devel
BuildRequires: libc++.so >= %{llvm_version}
%endif
BuildRequires: lld%{llvm_version} BuildRequires: lld%{llvm_version}
BuildRequires: llvm%{llvm_version} BuildRequires: llvm%{llvm_version}
#!BuildIgnore: gcc #!BuildIgnore: gcc
%else %else
BuildRequires: clang BuildRequires: clang
%if %{with libstdcpp}
BuildRequires: libstdc++-devel BuildRequires: libstdc++-devel
%else
BuildRequires: libc++-devel
%endif
BuildRequires: lld BuildRequires: lld
BuildRequires: llvm BuildRequires: llvm
%endif %endif
%endif %endif
%if %{without clang} %if %{without clang}
BuildRequires: binutils-gold BuildRequires: binutils-gold
%if 0%{?suse_version} <= 1500 %if 0%{?suse_version} >= 1550
BuildRequires: gcc%{gcc_version}
BuildRequires: gcc%{gcc_version}-c++
%else
BuildRequires: gcc BuildRequires: gcc
BuildRequires: gcc-c++ BuildRequires: gcc-c++
%else
BuildRequires: gcc%{gcc_version}
BuildRequires: gcc%{gcc_version}-c++
%endif %endif
%endif %endif
%if 0%{?suse_version} >= 1699
#!BuildIgnore: rpmlint rpmlint-Factory rpmlint-mini
%endif
%description %description
Chromium is the open-source project behind Google Chrome. We invite you to join us in our effort to help build a safer, faster, and more stable way for all Internet users to experience the web, and to create a powerful platform for developing a new generation of web applications. Chromium is the open-source project behind Google Chrome. We invite you to join us in our effort to help build a safer, faster, and more stable way for all Internet users to experience the web, and to create a powerful platform for developing a new generation of web applications.
@@ -420,26 +406,17 @@ Provides: chromedriver = %{version}-%{release}
WebDriver is an open source tool for automated testing of webapps across many browsers. It provides capabilities for navigating to web pages, user input, JavaScript execution, and more. ChromeDriver is a standalone server which implements WebDriver's wire protocol for Chromium. It is being developed by members of the Chromium and WebDriver teams. WebDriver is an open source tool for automated testing of webapps across many browsers. It provides capabilities for navigating to web pages, user input, JavaScript execution, and more. ChromeDriver is a standalone server which implements WebDriver's wire protocol for Chromium. It is being developed by members of the Chromium and WebDriver teams.
%prep %prep
%setup -q -n %{rname}-%{version} %autosetup -p1 -n %{rname}-%{version}
# apply all patches up to 999 %if 0%{?suse_version} >= 1550
%autopatch -p1 -M 999 patch -R -p1 < %{PATCH68}
%endif
%if %{without ffmpeg_51} %if %{without ffmpeg_51}
# ffmpeg is too old patch -R -p1 < %{SOURCE6}
%patch -p1 -P 1001 patch -R -p1 < %{SOURCE5}
%patch -p1 -R -P 1002 patch -R -p1 < %{SOURCE4}
%patch -p1 -R -P 1003
%patch -p1 -R -P 1004
%patch -p1 -P 1005
%endif %endif
%if %{with libxml2_2_12}
%if %{without libxml2_2_12} patch -R -p1 < %{PATCH336}
%patch -p1 -P 1010
%endif
%if 0%{?llvm_version} == 17
# chromium-127-clang17-traitors.patch only needed for older clang
%patch -p1 -P 1020
%endif %endif
%build %build
@@ -448,7 +425,7 @@ rm third_party/devtools-frontend/src/third_party/esbuild/esbuild
tar -xf %{SOURCE1} tar -xf %{SOURCE1}
pushd esbuild pushd esbuild
gflags="-mod=vendor" gflags="-mod=vendor"
%if 0%{?suse_version} >= 1600 %if 0%{?suse_version} >= 1550
gflags+=" -buildvcs=false" gflags+=" -buildvcs=false"
%endif %endif
GO_FLAGS="${gflags}" make GO_FLAGS="${gflags}" make
@@ -457,7 +434,6 @@ popd
# Fix the path to nodejs binary # Fix the path to nodejs binary
mkdir -p third_party/node/linux/node-linux-x64/bin mkdir -p third_party/node/linux/node-linux-x64/bin
rm -f third_party/node/linux/node-linux-x64/bin/node
ln -s %{_bindir}/node third_party/node/linux/node-linux-x64/bin/node ln -s %{_bindir}/node third_party/node/linux/node-linux-x64/bin/node
rm buildtools/third_party/eu-strip/bin/eu-strip rm buildtools/third_party/eu-strip/bin/eu-strip
@@ -465,7 +441,7 @@ ln -s %{_bindir}/eu-strip buildtools/third_party/eu-strip/bin/eu-strip
# python3 # python3
mkdir -p $HOME/bin mkdir -p $HOME/bin
%if 0%{?suse_version} >= 1600 %if 0%{?suse_version} >= 1599
export PYTHON=python3 export PYTHON=python3
%else %else
export PYTHON=python3.11 export PYTHON=python3.11
@@ -491,28 +467,24 @@ clang_base_path="$(clang --version | grep InstalledDir | cut -d' ' -f2 | sed 's#
keeplibs=( keeplibs=(
base/third_party/cityhash base/third_party/cityhash
base/third_party/double_conversion base/third_party/double_conversion
base/third_party/dynamic_annotations
base/third_party/icu base/third_party/icu
base/third_party/nspr base/third_party/nspr
base/third_party/superfasthash base/third_party/superfasthash
base/third_party/symbolize base/third_party/symbolize
base/third_party/valgrind
base/third_party/xdg_user_dirs base/third_party/xdg_user_dirs
buildtools/third_party/eu-strip buildtools/third_party/eu-strip
buildtools/third_party/libc++ buildtools/third_party/libc++
buildtools/third_party/libc++abi buildtools/third_party/libc++abi
buildtools/third_party/libunwind buildtools/third_party/libunwind
chrome/third_party/mozilla_security_manager chrome/third_party/mozilla_security_manager
courgette/third_party
net/third_party/mozilla_security_manager net/third_party/mozilla_security_manager
net/third_party/nss net/third_party/nss
net/third_party/quic net/third_party/quic
net/third_party/uri_template net/third_party/uri_template
third_party/abseil-cpp third_party/abseil-cpp
third_party/abseil-cpp/absl
third_party/abseil-cpp/absl/algorithm
third_party/abseil-cpp/absl/base
third_party/abseil-cpp/absl/flags
third_party/abseil-cpp/absl/functional
third_party/abseil-cpp/absl/strings
third_party/abseil-cpp/absl/types
third_party/angle third_party/angle
third_party/angle/src/common/third_party/xxhash third_party/angle/src/common/third_party/xxhash
third_party/angle/src/third_party/ceval third_party/angle/src/third_party/ceval
@@ -533,6 +505,7 @@ keeplibs=(
third_party/catapult/common/py_vulcanize/third_party/rjsmin third_party/catapult/common/py_vulcanize/third_party/rjsmin
third_party/catapult/third_party/beautifulsoup4 third_party/catapult/third_party/beautifulsoup4
third_party/catapult/third_party/html5lib-1.1/ third_party/catapult/third_party/html5lib-1.1/
third_party/catapult/third_party/html5lib-python
third_party/catapult/third_party/polymer third_party/catapult/third_party/polymer
third_party/catapult/third_party/six third_party/catapult/third_party/six
third_party/catapult/tracing/third_party/d3 third_party/catapult/tracing/third_party/d3
@@ -550,7 +523,6 @@ keeplibs=(
third_party/crashpad third_party/crashpad
third_party/crashpad/crashpad/third_party/lss third_party/crashpad/crashpad/third_party/lss
third_party/crashpad/crashpad/third_party/zlib third_party/crashpad/crashpad/third_party/zlib
third_party/crabbyavif
third_party/crc32c third_party/crc32c
third_party/cros_system_api third_party/cros_system_api
third_party/d3 third_party/d3
@@ -569,10 +541,10 @@ keeplibs=(
third_party/devtools-frontend/src/front_end/third_party/i18n third_party/devtools-frontend/src/front_end/third_party/i18n
third_party/devtools-frontend/src/front_end/third_party/intl-messageformat third_party/devtools-frontend/src/front_end/third_party/intl-messageformat
third_party/devtools-frontend/src/front_end/third_party/lighthouse third_party/devtools-frontend/src/front_end/third_party/lighthouse
third_party/devtools-frontend/src/front_end/third_party/lodash-isequal
third_party/devtools-frontend/src/front_end/third_party/marked third_party/devtools-frontend/src/front_end/third_party/marked
third_party/devtools-frontend/src/front_end/third_party/puppeteer third_party/devtools-frontend/src/front_end/third_party/puppeteer
third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/esm/third_party/mitt third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/esm/third_party/mitt
third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/esm/third_party/parsel-js
third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/esm/third_party/rxjs third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/esm/third_party/rxjs
third_party/devtools-frontend/src/front_end/third_party/wasmparser third_party/devtools-frontend/src/front_end/third_party/wasmparser
third_party/devtools-frontend/src/third_party third_party/devtools-frontend/src/third_party
@@ -581,7 +553,6 @@ keeplibs=(
third_party/eigen3 third_party/eigen3
third_party/emoji-segmenter third_party/emoji-segmenter
third_party/farmhash third_party/farmhash
third_party/fast_float
third_party/fdlibm third_party/fdlibm
third_party/fft2d third_party/fft2d
third_party/flatbuffers third_party/flatbuffers
@@ -596,7 +567,6 @@ keeplibs=(
third_party/highway third_party/highway
third_party/hunspell third_party/hunspell
third_party/iccjpeg third_party/iccjpeg
third_party/ink
third_party/inspector_protocol third_party/inspector_protocol
third_party/ipcz third_party/ipcz
third_party/jinja2 third_party/jinja2
@@ -617,6 +587,7 @@ keeplibs=(
third_party/libsecret third_party/libsecret
third_party/libsrtp third_party/libsrtp
third_party/libsync third_party/libsync
third_party/libudev
third_party/liburlpattern third_party/liburlpattern
third_party/libva_protected_content third_party/libva_protected_content
third_party/libwebm third_party/libwebm
@@ -629,6 +600,8 @@ keeplibs=(
third_party/lss third_party/lss
third_party/lzma_sdk third_party/lzma_sdk
third_party/mako third_party/mako
third_party/maldoca
third_party/maldoca/src/third_party
third_party/markupsafe third_party/markupsafe
third_party/material_color_utilities third_party/material_color_utilities
third_party/mesa third_party/mesa
@@ -652,7 +625,6 @@ keeplibs=(
third_party/pdfium/third_party/libtiff third_party/pdfium/third_party/libtiff
third_party/perfetto third_party/perfetto
third_party/perfetto/protos/third_party/chromium third_party/perfetto/protos/third_party/chromium
third_party/perfetto/protos/third_party/simpleperf
third_party/pffft third_party/pffft
third_party/ply third_party/ply
third_party/polymer third_party/polymer
@@ -664,23 +636,18 @@ keeplibs=(
third_party/pyjson5 third_party/pyjson5
third_party/pyyaml third_party/pyyaml
third_party/qcms third_party/qcms
third_party/rapidhash
third_party/rnnoise third_party/rnnoise
third_party/rust third_party/rust
third_party/ruy third_party/ruy
third_party/s2cellid third_party/s2cellid
third_party/securemessage third_party/securemessage
third_party/selenium-atoms third_party/selenium-atoms
third_party/sentencepiece
third_party/sentencepiece/src/third_party/darts_clone
third_party/shell-encryption third_party/shell-encryption
third_party/simplejson third_party/simplejson
third_party/skia third_party/skia
third_party/skia/include/third_party/vulkan/ third_party/skia/include/third_party/vulkan/
third_party/skia/third_party/vulkan third_party/skia/third_party/vulkan
third_party/smhasher third_party/smhasher
third_party/spirv-headers
third_party/spirv-tools
third_party/sqlite third_party/sqlite
third_party/swiftshader third_party/swiftshader
third_party/swiftshader/third_party/astc-encoder third_party/swiftshader/third_party/astc-encoder
@@ -696,7 +663,7 @@ keeplibs=(
third_party/tflite/src/third_party/eigen3 third_party/tflite/src/third_party/eigen3
third_party/tflite/src/third_party/fft2d third_party/tflite/src/third_party/fft2d
third_party/tflite/src/third_party/xla/third_party/tsl third_party/tflite/src/third_party/xla/third_party/tsl
third_party/tflite/src/third_party/xla/xla/tsl third_party/tflite/src/third_party/xla/xla/tsl/util
third_party/ukey2 third_party/ukey2
third_party/utf third_party/utf
third_party/vulkan third_party/vulkan
@@ -711,7 +678,6 @@ keeplibs=(
third_party/webrtc/modules/third_party/g722 third_party/webrtc/modules/third_party/g722
third_party/webrtc/rtc_base/third_party/base64 third_party/webrtc/rtc_base/third_party/base64
third_party/webrtc/rtc_base/third_party/sigslot third_party/webrtc/rtc_base/third_party/sigslot
third_party/webrtc/rtc_tools
third_party/widevine third_party/widevine
third_party/woff2 third_party/woff2
third_party/wuffs third_party/wuffs
@@ -777,10 +743,6 @@ keeplibs+=( third_party/zstd )
keeplibs+=( third_party/lit ) keeplibs+=( third_party/lit )
keeplibs+=( third_party/rust/chromium_crates_io ) keeplibs+=( third_party/rust/chromium_crates_io )
keeplibs+=( third_party/rust/cxx ) keeplibs+=( third_party/rust/cxx )
%if %{without libstdcpp}
keeplibs+=( third_party/snappy )
%endif
build/linux/unbundle/remove_bundled_libraries.py "${keeplibs[@]}" --do-remove build/linux/unbundle/remove_bundled_libraries.py "${keeplibs[@]}" --do-remove
# GN sets lto on its own and we need just ldflag options, not cflags # GN sets lto on its own and we need just ldflag options, not cflags
@@ -826,11 +788,6 @@ export CXXFLAGS="${CXXFLAGS} -I/usr/include/wayland -I/usr/include/libxkbcommon
export LDFLAGS="${LDFLAGS} -Wl,--build-id=sha1" export LDFLAGS="${LDFLAGS} -Wl,--build-id=sha1"
export CXXFLAGS="${CXXFLAGS} -Wno-unused-command-line-argument -Wno-unknown-warning-option" export CXXFLAGS="${CXXFLAGS} -Wno-unused-command-line-argument -Wno-unknown-warning-option"
%endif %endif
%if %{without libstdcpp}
export LDFLAGS="${LDFLAGS} -stdlib=libc++"
export CXXFLAGS="${CXXFLAGS} -stdlib=libc++ -I/usr/include/c++/v1"
%endif
%ifarch aarch64 %ifarch aarch64
%if %{without clang} %if %{without clang}
export CXXFLAGS="${CXXFLAGS} -flax-vector-conversions -fno-omit-frame-pointer" export CXXFLAGS="${CXXFLAGS} -flax-vector-conversions -fno-omit-frame-pointer"
@@ -877,12 +834,8 @@ gn_system_libraries=(
libxml libxml
libxslt libxslt
opus opus
)
%if %{with libstdcpp}
gn_system_libraries+=(
snappy snappy
) )
%endif
%if %{with system_harfbuzz} %if %{with system_harfbuzz}
gn_system_libraries+=( gn_system_libraries+=(
harfbuzz-ng harfbuzz-ng
@@ -967,11 +920,9 @@ myconf_gn+=" rtc_use_h264=false"
myconf_gn+=" use_v8_context_snapshot=true" myconf_gn+=" use_v8_context_snapshot=true"
myconf_gn+=" v8_use_external_startup_data=true" myconf_gn+=" v8_use_external_startup_data=true"
myconf_gn+=" rust_sysroot_absolute=\"%{_prefix}\"" myconf_gn+=" rust_sysroot_absolute=\"%{_prefix}\""
myconf_gn+=" rust_bindgen_root=\"%{_prefix}\""
myconf_gn+=" rustc_version=\"$rustc_version\"" myconf_gn+=" rustc_version=\"$rustc_version\""
myconf_gn+=" clang_base_path=\"$clang_base_path\"" myconf_gn+=" clang_base_path=\"$clang_base_path\""
myconf_gn+=" clang_version=\"$clang_version\"" myconf_gn+=" clang_version=\"$clang_version\""
myconf_gn+=" safe_browsing_use_unrar=false"
%if %{with gtk4} %if %{with gtk4}
myconf_gn+=" gtk_version=4" myconf_gn+=" gtk_version=4"
%endif %endif
@@ -1000,7 +951,7 @@ myconf_gn+=" rtc_use_pipewire=true rtc_link_pipewire=true"
%if %{with clang} %if %{with clang}
myconf_gn+=" is_clang=true clang_use_chrome_plugins=false" myconf_gn+=" is_clang=true clang_use_chrome_plugins=false"
%if %{with lto} && %{with clang} %if %{with lto} && %{with clang}
%if 0%{?suse_version} >= 1500 || 0%{?sle_version} >= 150300 %if 0%{?suse_version} >= 1550 || 0%{?sle_version} >= 150300
myconf_gn+=" use_thin_lto=true" myconf_gn+=" use_thin_lto=true"
%endif %endif
%endif %endif
@@ -1068,8 +1019,6 @@ mkdir -p %{buildroot}%{_datadir}/chromium/extensions
mkdir -p %{buildroot}%{_sysconfdir}/chromium/native-messaging-hosts mkdir -p %{buildroot}%{_sysconfdir}/chromium/native-messaging-hosts
# SVG # SVG
install -Dm 0644 %{SOURCE104} %{buildroot}%{_datadir}/icons/hicolor/symbolic/apps/chromium-browser.svg install -Dm 0644 %{SOURCE104} %{buildroot}%{_datadir}/icons/hicolor/symbolic/apps/chromium-browser.svg
# link for the manpage
ln -sf chromium-browser.1%{?ext_man} %{buildroot}%{_mandir}/man1/chromium.1%{?ext_man}
%fdupes -s %{buildroot} %fdupes -s %{buildroot}
@@ -1090,7 +1039,6 @@ ln -sf chromium-browser.1%{?ext_man} %{buildroot}%{_mandir}/man1/chromium.1%{?ex
%exclude %{_libdir}/chromium/chromedriver %exclude %{_libdir}/chromium/chromedriver
%{_bindir}/chromium-browser %{_bindir}/chromium-browser
%{_bindir}/chromium %{_bindir}/chromium
%{_mandir}/man1/chromium.1%{?ext_man}
%{_mandir}/man1/chromium-browser.1%{?ext_man} %{_mandir}/man1/chromium-browser.1%{?ext_man}
%files -n %{chromedriver_name} %files -n %{chromedriver_name}

View File

@@ -1,10 +1,10 @@
--- a/third_party/blink/common/mime_util/mime_util.cc 2013-08-25 10:12:05.428599992 +0200 --- a/third_party/blink/common/mime_util/mime_util.cc 2013-08-25 10:12:05.428599992 +0200
+++ b/third_party/blink/common/mime_util/mime_util.cc 2013-08-25 10:12:05.428599992 +0200 +++ b/third_party/blink/common/mime_util/mime_util.cc 2013-08-25 10:12:05.428599992 +0200
@@ -79,6 +79,7 @@ @@ -79,6 +79,7 @@
"text/x-csv", "text/x-csv",
"text/x-vcf", "text/x-vcf",
"text/rtf", "text/rtf",
+ "text/x-suse-ymp", + "text/x-suse-ymp",
"text/comma-separated-values", "text/comma-separated-values",
"text/csv", "text/csv",
"text/tab-separated-values", "text/tab-separated-values",

View File

@@ -111,7 +111,7 @@ diff --git a/media/ffmpeg/ffmpeg_common.cc b/media/ffmpeg/ffmpeg_common.cc
index 87ca8969626..76f03d6608e 100644 index 87ca8969626..76f03d6608e 100644
--- a/media/ffmpeg/ffmpeg_common.cc --- a/media/ffmpeg/ffmpeg_common.cc
+++ b/media/ffmpeg/ffmpeg_common.cc +++ b/media/ffmpeg/ffmpeg_common.cc
@@ -334,10 +334,11 @@ bool AVCodecContextToAudioDecoderConfig(const AVCodecContext* codec_context, @@ -345,10 +345,11 @@ bool AVCodecContextToAudioDecoderConfig(const AVCodecContext* codec_context,
codec_context->sample_fmt, codec_context->codec_id); codec_context->sample_fmt, codec_context->codec_id);
ChannelLayout channel_layout = ChannelLayout channel_layout =
@@ -124,8 +124,8 @@ index 87ca8969626..76f03d6608e 100644
+ codec_context->ch_layout.u.mask, + codec_context->ch_layout.u.mask,
+ codec_context->ch_layout.nb_channels); + codec_context->ch_layout.nb_channels);
int sample_rate = codec_context->sample_rate;
switch (codec) { switch (codec) {
// For AC3/EAC3 we enable only demuxing, but not decoding, so FFmpeg does
@@ -401,7 +402,7 @@ bool AVCodecContextToAudioDecoderConfig(const AVCodecContext* codec_context, @@ -401,7 +402,7 @@ bool AVCodecContextToAudioDecoderConfig(const AVCodecContext* codec_context,
extra_data, encryption_scheme, seek_preroll, extra_data, encryption_scheme, seek_preroll,
codec_context->delay); codec_context->delay);

View File

@@ -9,15 +9,3 @@ Index: chromium-79.0.3941.4/third_party/widevine/cdm/widevine_cdm_version.h
+#define WIDEVINE_CDM_VERSION_STRING "unknown" +#define WIDEVINE_CDM_VERSION_STRING "unknown"
#endif // WIDEVINE_CDM_VERSION_H_ #endif // WIDEVINE_CDM_VERSION_H_
--- chromium-125.0.6422.141.orig/third_party/widevine/cdm/widevine.gni
+++ chromium-125.0.6422.141/third_party/widevine/cdm/widevine.gni
@@ -27,7 +27,7 @@
library_widevine_cdm_available =
(is_chromeos &&
(target_cpu == "x64" || target_cpu == "arm" || target_cpu == "arm64")) ||
- (target_os == "linux" && target_cpu == "x64") ||
+ (target_os == "linux" && (target_cpu == "x64" || target_cpu == "arm64")) ||
(target_os == "mac" && (target_cpu == "x64" || target_cpu == "arm64")) ||
(target_os == "win" &&
(target_cpu == "x86" || target_cpu == "x64" || target_cpu == "arm64"))

View File

@@ -57,14 +57,14 @@ Index: chromium-120.0.6099.18/base/BUILD.gn
=================================================================== ===================================================================
--- chromium-120.0.6099.18.orig/base/BUILD.gn --- chromium-120.0.6099.18.orig/base/BUILD.gn
+++ chromium-120.0.6099.18/base/BUILD.gn +++ chromium-120.0.6099.18/base/BUILD.gn
@@ -3561,6 +3561,10 @@ @@ -3830,6 +3830,10 @@ test("base_unittests") {
sources += [ "location_unittest.cc" ] }
} }
+ if (gcc_lto) { + if (gcc_lto) {
+ configs -= [ "//build/config/compiler:gcc_lto" ] + configs -= [ "//build/config/compiler:gcc_lto" ]
+ } + }
+ +
if (build_rust_base_conversions) { if (use_partition_alloc) {
sources += [ sources += [
"containers/span_rust_unittest.cc", "allocator/partition_allocator/src/partition_alloc/address_pool_manager_unittest.cc",