Bug 712939 - Replace JS_STATIC_ASSERT with static_assert outside js/ directory. r=BenWa r=bsmedberg r=mccr8

This commit is contained in:
Chris Peterson 2014-02-17 22:10:50 -08:00
parent 790a3e8ead
commit 10a0737dbc
3 changed files with 6 additions and 3 deletions

View File

@ -70,7 +70,8 @@ namespace mozilla {
namespace plugins {
namespace parent {
JS_STATIC_ASSERT(sizeof(NPIdentifier) == sizeof(jsid));
static_assert(sizeof(NPIdentifier) == sizeof(jsid),
"NPIdentifier must be binary compatible with jsid.");
inline jsid
NPIdentifierToJSId(NPIdentifier id)

View File

@ -382,7 +382,8 @@ public:
return;
}
JS_STATIC_ASSERT(sizeof(mStack[0]) == sizeof(js::ProfileEntry));
static_assert(sizeof(mStack[0]) == sizeof(js::ProfileEntry),
"mStack must be binary compatible with js::ProfileEntry.");
js::SetRuntimeProfilingStack(runtime,
(js::ProfileEntry*) mStack,
(uint32_t*) &mStackPointer,

View File

@ -549,7 +549,8 @@ CycleCollectedJSRuntime::DescribeGCThing(bool aIsMarked, void* aThing,
"BaseShape",
"TypeObject",
};
JS_STATIC_ASSERT(MOZ_ARRAY_LENGTH(trace_types) == JSTRACE_LAST + 1);
static_assert(MOZ_ARRAY_LENGTH(trace_types) == JSTRACE_LAST + 1,
"JSTRACE_LAST enum must match trace_types count.");
JS_snprintf(name, sizeof(name), "JS %s", trace_types[aTraceKind]);
}