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

Unified Diff: Source/bindings/core/v8/WrapperTypeInfo.h

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/core/v8/WrapperTypeInfo.h
diff --git a/Source/bindings/core/v8/WrapperTypeInfo.h b/Source/bindings/core/v8/WrapperTypeInfo.h
index 864efb506f3d47d9ed78ec6187a9312f2e18841c..90d0cf7be16a923c2195c6a0b6f196135726a47f 100644
--- a/Source/bindings/core/v8/WrapperTypeInfo.h
+++ b/Source/bindings/core/v8/WrapperTypeInfo.h
@@ -171,7 +171,7 @@ struct WrapperTypeInfo {
visitDOMWrapperFunction(isolate, scriptWrappable, wrapper);
}
- // This field must be the first member of the struct WrapperTypeInfo. This is also checked by a COMPILE_ASSERT() below.
+ // This field must be the first member of the struct WrapperTypeInfo. This is also checked by a static_assert() below.
const gin::GinEmbedder ginEmbedder;
DomTemplateFunction domTemplateFunction;
@@ -190,7 +190,7 @@ struct WrapperTypeInfo {
const unsigned gcType : 2; // GCType
};
-COMPILE_ASSERT(offsetof(struct WrapperTypeInfo, ginEmbedder) == offsetof(struct gin::WrapperInfo, embedder), wrapper_type_info_compatible_to_gin);
+static_assert(offsetof(struct WrapperTypeInfo, ginEmbedder) == offsetof(struct gin::WrapperInfo, embedder), "offset of WrapperTypeInfo.ginEmbedder must be the same as gin::WrapperInfo.embedder");
template<typename T, int offset>
inline T* getInternalField(const v8::Persistent<v8::Object>& persistent)
« no previous file with comments | « Source/bindings/core/v8/V8ScriptRunner.cpp ('k') | Source/bindings/modules/v8/ScriptValueSerializerForModules.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698