summarylogtreecommitdiffstats
path: root/only-disable-cfi-icall-when-use_system_libjpeg-true.patch
blob: 3a71f8c0571999512320240fe220becfb0e6784c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
From 20f81a066ffdf6bd30fb4b696b8b3e101368e2f6 Mon Sep 17 00:00:00 2001
From: Vlad Tsyrklevich <vtsyrklevich@chromium.org>
Date: Tue, 31 Jul 2018 23:21:09 +0000
Subject: [PATCH] Only disable cfi-icall when use_system_libjpeg=true

Bug: 866290
Change-Id: Ic5d175b3b854665f50781650406d599d09ee9849
Reviewed-on: https://chromium-review.googlesource.com/1157136
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Vlad Tsyrklevich <vtsyrklevich@chromium.org>
Cr-Commit-Position: refs/heads/master@{#579614}
---
 .../platform/image-decoders/jpeg/jpeg_image_decoder.cc       | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/third_party/blink/renderer/platform/image-decoders/jpeg/jpeg_image_decoder.cc b/third_party/blink/renderer/platform/image-decoders/jpeg/jpeg_image_decoder.cc
index fd4e72ba053c..afa90d83efee 100644
--- a/third_party/blink/renderer/platform/image-decoders/jpeg/jpeg_image_decoder.cc
+++ b/third_party/blink/renderer/platform/image-decoders/jpeg/jpeg_image_decoder.cc
@@ -643,7 +643,10 @@ class JPEGImageReader final {
   IntSize UvSize() const { return uv_size_; }
 
  private:
-  NO_SANITIZE_CFI_ICALL JSAMPARRAY AllocateSampleArray() {
+#if defined(USE_SYSTEM_LIBJPEG)
+  NO_SANITIZE_CFI_ICALL
+#endif
+  JSAMPARRAY AllocateSampleArray() {
 // Some output color spaces don't need the sample array: don't allocate in that
 // case.
 #if defined(TURBO_JPEG_RGB_SWIZZLE)
-- 
2.18.0