зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1622688 - Un-#ifdef to enable std::is_trivially_constructible everywhere. r=jwalden
Differential Revision: https://phabricator.services.mozilla.com/D66913 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
fa85504114
Коммит
09ce329898
|
@ -787,20 +787,12 @@ Statistics::Statistics(GCRuntime* gc)
|
|||
|
||||
#ifdef DEBUG
|
||||
for (const auto& duration : totalTimes_) {
|
||||
# if defined(XP_WIN) || defined(XP_MACOSX) || \
|
||||
(defined(XP_UNIX) && !defined(__clang__))
|
||||
// build-linux64-asan/debug and static-analysis-linux64-st-an/debug
|
||||
// currently use an STL that lacks std::is_trivially_constructible.
|
||||
// This #ifdef probably isn't as precise as it could be, but given
|
||||
// |totalTimes_| contains |TimeDuration| defined platform-independently
|
||||
// it's not worth the trouble to nail down a more exact condition.
|
||||
using ElementType =
|
||||
typename mozilla::RemoveReference<decltype(duration)>::Type;
|
||||
static_assert(!std::is_trivially_constructible<ElementType>::value,
|
||||
"Statistics::Statistics will only initialize "
|
||||
"totalTimes_'s elements if their default constructor is "
|
||||
"non-trivial");
|
||||
# endif // mess'o'tests
|
||||
MOZ_ASSERT(duration.IsZero(),
|
||||
"totalTimes_ default-initialization should have "
|
||||
"default-initialized every element of totalTimes_ to zero");
|
||||
|
|
Загрузка…
Ссылка в новой задаче