public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/chromium] epel9-next: Backport upstream, fix Print preview almost fails and prevents printing
@ 2026-08-07 16:07 Than Ngo
0 siblings, 0 replies; only message in thread
From: Than Ngo @ 2026-08-07 16:07 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/chromium
Branch : epel9-next
Commit : 09bc163b2e823a3d430e1c048ef50e30c2265385
Author : Than Ngo <than@redhat.com>
Date : 2025-04-14T10:41:17+02:00
Stats : +47/-0 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/chromium/c/09bc163b2e823a3d430e1c048ef50e30c2265385?branch=epel9-next
Log:
Backport upstream, fix Print preview almost fails and prevents printing
---
diff --git a/chromium-135-print-review-fail.patch b/chromium-135-print-review-fail.patch
new file mode 100644
index 0000000..478b3dc
--- /dev/null
+++ b/chromium-135-print-review-fail.patch
@@ -0,0 +1,44 @@
+Only call format_message when needed
+
+SkJpegDecoderMgr.cpp#print_message calls into `format_message` to print
+informational strings from the jpeg decoder. However, the informational
+strings are only output in developer builds where
+`SK_PRINT_CODEC_MESSAGES` is defined. As a result this call is usually
+just extra work which is then ignored. Move the call of `format_message`
+into the argument list of `SkCodecPrintf` so that the call is only
+performed if its result is going to be used.
+
+When Skia is compiled to use the system libjpeg-turbo the
+`format_message` function pointer is set by an external library to point
+at a function inside an external library and is then called by Skia.
+This can cause false positive reports [0] from CFI icall [1]. This
+change effectively solves this issue by never calling `format_message`
+in a CFI enabled build.
+
+[0] https://gitlab.archlinux.org/archlinux/packaging/packages/chromium/-/issues/13
+[1] https://clang.llvm.org/docs/ControlFlowIntegrity.html#indirect-function-call-checking
+
+Change-Id: I5a59459e1e87bf8cdb3d7e90481a115a2a77d6cf
+Reviewed-on: https://skia-review.googlesource.com/c/skia/+/961356
+Reviewed-by: Daniel Dilan <danieldilan@google.com>
+Commit-Queue: Ben Wagner <bungeman@google.com>
+
+diff --git a/third_party/skia/src/codec/SkJpegDecoderMgr.cpp b/third_party/skia/src/codec/SkJpegDecoderMgr.cpp
+index c905ee1..5ae9573 100644
+--- a/third_party/skia/src/codec/SkJpegDecoderMgr.cpp
++++ b/third_party/skia/src/codec/SkJpegDecoderMgr.cpp
+@@ -24,9 +24,11 @@
+ * Print information, warning, and error messages
+ */
+ static void print_message(const j_common_ptr info, const char caller[]) {
+- char buffer[JMSG_LENGTH_MAX];
+- info->err->format_message(info, buffer);
+- SkCodecPrintf("libjpeg error %d <%s> from %s\n", info->err->msg_code, buffer, caller);
++ [[maybe_unused]] char buffer[JMSG_LENGTH_MAX];
++ SkCodecPrintf("libjpeg error %d <%s> from %s\n",
++ info->err->msg_code,
++ (info->err->format_message(info, buffer), buffer),
++ caller);
+ }
+
+ /*
diff --git a/chromium.spec b/chromium.spec
index f2e1557..e99eaad 100644
--- a/chromium.spec
+++ b/chromium.spec
@@ -455,6 +455,8 @@ Patch502: flatpak-Expose-Widevine-into-the-sandbox.patch
Patch600: chromium-135-add-cfi-suppressions-for-pipewire-functions.patch
# https://chromium-review.googlesource.com/c/chromium/src/+/6445471
Patch601: chromium-135-gperf.patch
+# https://skia-review.googlesource.com/c/skia/+/961356
+Patch602: chromium-135-print-review-fail.patch
# Use chromium-latest.py to generate clean tarball from released build tarballs, found here:
# http://build.chromium.org/buildbot/official/
@@ -1144,6 +1146,7 @@ Qt6 UI for chromium.
# Upstream patches
%patch -P600 -p1 -b .add-cfi-suppressions-for-pipewire-functions
%patch -P601 -p1 -b .gperf-3.2
+%patch -P602 -p1 -b .print-review-fail
# Change shebang in all relevant files in this directory and all subdirectories
# See `man find` for how the `-exec command {} +` syntax works
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-08-07 16:07 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-07 16:07 [rpms/chromium] epel9-next: Backport upstream, fix Print preview almost fails and prevents printing Than Ngo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox