Suppress a warning treated as error about size conversion from size_t to uint32
BUG=
Review-Url: https://codereview.chromium.org/2146113002
Cr-Commit-Position: refs/heads/master@{#405380}
diff --git a/components/webcrypto/fuzzer_support.cc b/components/webcrypto/fuzzer_support.cc
index f44f8bc..6b1d4959 100644
--- a/components/webcrypto/fuzzer_support.cc
+++ b/components/webcrypto/fuzzer_support.cc
@@ -6,6 +6,7 @@
#include "base/command_line.h"
#include "base/lazy_instance.h"
+#include "base/numerics/safe_conversions.h"
#include "components/test_runner/test_common.h"
#include "components/webcrypto/algorithm_dispatch.h"
#include "components/webcrypto/crypto_data.h"
@@ -83,7 +84,7 @@
blink::WebCryptoKey key;
webcrypto::Status status = webcrypto::ImportKey(
- format, webcrypto::CryptoData(data, size),
+ format, webcrypto::CryptoData(data, base::checked_cast<uint32_t>(size)),
CreateEcImportAlgorithm(algorithm_id, curve), true, usages, &key);
// These errors imply a bad setup of parameters, and means ImportKey() may not
@@ -116,7 +117,7 @@
blink::WebCryptoKey key;
webcrypto::Status status = webcrypto::ImportKey(
- format, webcrypto::CryptoData(data, size),
+ format, webcrypto::CryptoData(data, base::checked_cast<uint32_t>(size)),
CreateRsaHashedImportAlgorithm(algorithm_id, hash_id), true, usages,
&key);