From ff566374afe6928a9bb43970ddb4c69cf7341bfd Mon Sep 17 00:00:00 2001 From: Peter Varga Date: Tue, 21 Feb 2023 10:22:38 +0100 Subject: Add checksum to mailbox name in Release build too The lack of checksum may cause assert and error messages when a mailbox is passed from a release render process to a debug render process. Task-number: QTBUG-110504 Change-Id: Ib7d78e1e86a3f2ddda6dc8066abf9198040c38f6 Reviewed-on: https://codereview.qt-project.org/c/qt/qtwebengine-chromium/+/461554 Reviewed-by: Allan Sandfeld Jensen (cherry picked from commit f10c0c429f688fa7ee39ca8af4ff522e30776bea) Reviewed-on: https://codereview.qt-project.org/c/qt/qtwebengine-chromium/+/462336 Reviewed-by: Qt Cherry-pick Bot --- chromium/gpu/command_buffer/common/mailbox.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chromium/gpu/command_buffer/common/mailbox.cc b/chromium/gpu/command_buffer/common/mailbox.cc index ac7f9dd54e2..2b814e84e0c 100644 --- a/chromium/gpu/command_buffer/common/mailbox.cc +++ b/chromium/gpu/command_buffer/common/mailbox.cc @@ -34,7 +34,7 @@ Mailbox GenerateMailbox(bool is_shared_image) { // Generates cryptographically-secure bytes. base::RandBytes(result.name, sizeof(result.name)); MarkMailboxAsSharedImage(is_shared_image, result.name); -#if !defined(NDEBUG) +#if !defined(NDEBUG) || defined(TOOLKIT_QT) int8_t value = 1; for (size_t i = 1; i < sizeof(result.name); ++i) value ^= result.name[i]; -- cgit v1.2.1