Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(181)

Unified Diff: Source/bindings/modules/v8/ScriptValueSerializerForModules.cpp

Issue 797283005: replace COMPILE_ASSERT with static_assert in bindings/ (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/bindings/modules/v8/ScriptValueSerializerForModules.cpp
diff --git a/Source/bindings/modules/v8/ScriptValueSerializerForModules.cpp b/Source/bindings/modules/v8/ScriptValueSerializerForModules.cpp
index 8415a2cded599eea63beadd1819372f02b3387f5..08add9b64a162f1c2349c1a1f0b7f4b41428265f 100644
--- a/Source/bindings/modules/v8/ScriptValueSerializerForModules.cpp
+++ b/Source/bindings/modules/v8/ScriptValueSerializerForModules.cpp
@@ -249,7 +249,7 @@ void SerializedScriptValueWriterForModules::doWriteNamedCurve(WebCryptoNamedCurv
void SerializedScriptValueWriterForModules::doWriteKeyUsages(const WebCryptoKeyUsageMask usages, bool extractable)
{
// Reminder to update this when adding new key usages.
- COMPILE_ASSERT(EndOfWebCryptoKeyUsage == (1 << 7) + 1, UpdateMe);
+ static_assert(EndOfWebCryptoKeyUsage == (1 << 7) + 1, "update required when adding new key usages");
uint32_t value = 0;
@@ -554,7 +554,7 @@ bool SerializedScriptValueReaderForModules::doReadNamedCurve(WebCryptoNamedCurve
bool SerializedScriptValueReaderForModules::doReadKeyUsages(WebCryptoKeyUsageMask& usages, bool& extractable)
{
// Reminder to update this when adding new key usages.
- COMPILE_ASSERT(EndOfWebCryptoKeyUsage == (1 << 7) + 1, UpdateMe);
+ static_assert(EndOfWebCryptoKeyUsage == (1 << 7) + 1, "update required when adding new key usages");
const uint32_t allPossibleUsages = ExtractableUsage | EncryptUsage | DecryptUsage | SignUsage | VerifyUsage | DeriveKeyUsage | WrapKeyUsage | UnwrapKeyUsage | DeriveBitsUsage;
uint32_t rawUsages;
« no previous file with comments | « Source/bindings/core/v8/WrapperTypeInfo.h ('k') | Source/bindings/modules/v8/SerializedScriptValueForModulesFactory.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698