From 20f81a066ffdf6bd30fb4b696b8b3e101368e2f6 Mon Sep 17 00:00:00 2001 From: Vlad Tsyrklevich 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 Commit-Queue: Vlad Tsyrklevich 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