summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Cheng <dcheng@chromium.org>2021-11-10 23:13:54 +0000
committerMichal Klocek <michal.klocek@qt.io>2022-07-25 07:37:20 +0000
commit1c316daff337ed065e66e42141d60209a957be22 (patch)
tree1012b6cbd8609ae99a1a030189ae3cc2064ed8eb
parentbb8a10a90551248e5da3d569a6f3731a5a47a968 (diff)
downloadqtwebengine-chromium-1c316daff337ed065e66e42141d60209a957be22.tar.gz
[Backport] Make base::UnguessableToken::operator!= constant time.
This is a followup to https://crrev.com/c/3023887, which made operator== constant time by using BoringSSL helpers. The same CL also aimed to make operator!= constant time, but accidentally delegated to base::Token's operator== which is not constant time. Patch reviewed on: https://chromium-review.googlesource.com/c/chromium/src/+/3269926 Bug: 1004921 Task-number: QTBUG-104477 Change-Id: Ieda8fb6a736ced143831d9bcde75cddaaff50243 Reviewed-by: Marc Mutz <marc.mutz@qt.io>
-rw-r--r--chromium/base/unguessable_token.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/chromium/base/unguessable_token.h b/chromium/base/unguessable_token.h
index 83a22862608..20e6569f992 100644
--- a/chromium/base/unguessable_token.h
+++ b/chromium/base/unguessable_token.h
@@ -100,7 +100,7 @@ class BASE_EXPORT UnguessableToken {
bool operator==(const UnguessableToken& other) const;
bool operator!=(const UnguessableToken& other) const {
- return !(token_ == other.token_);
+ return !(*this == other);
}
private: