Bug 1448436 - Remove an unneeded workaround for MSVC <2017 from CounterStyleManager.cpp. r=xidorn
authorRyan VanderMeulen <ryanvm@gmail.com>
Sat, 24 Mar 2018 12:19:44 -0400
changeset 409839 e81fdb3b711feb859cb780f6d20a291a34c43eaa
parent 409838 a0832da6741d15c722a86ac851c335b1d2be472d
child 409840 660d7b66d239b2d89f0b1a4e0f9d7a866ad3af56
push id33704
push usershindli@mozilla.com
push dateSun, 25 Mar 2018 09:35:08 +0000
treeherdermozilla-central@6862624e24d0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersxidorn
bugs1448436
milestone61.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1448436 - Remove an unneeded workaround for MSVC <2017 from CounterStyleManager.cpp. r=xidorn
layout/style/CounterStyleManager.cpp
--- a/layout/style/CounterStyleManager.cpp
+++ b/layout/style/CounterStyleManager.cpp
@@ -951,39 +951,29 @@ BuiltinCounterStyle::GetInitialCounterTe
       return EthiopicToText(aOrdinal, aResult);
 
     default:
       NS_NOTREACHED("Unknown builtin counter style");
       return false;
   }
 }
 
-// MSVC 2015 has a bug that vtable pointer of constexpr objects is null,
-// which would cause startup crash. So const is used instead here for
-// pre-2017 version of MSVC to workaround this issue.
-#if !defined(_MSC_VER) || _MSC_VER >= 1910
-static constexpr BuiltinCounterStyle gBuiltinStyleTable[] =
-#else
-static const BuiltinCounterStyle gBuiltinStyleTable[] =
-#endif
-{
+static constexpr BuiltinCounterStyle gBuiltinStyleTable[] = {
 #define BUILTIN_COUNTER_STYLE(value_, atom_) \
   { NS_STYLE_LIST_STYLE_ ## value_, &nsGkAtoms::atom_ },
 #include "BuiltinCounterStyleList.h"
 #undef BUILTIN_COUNTER_STYLE
 };
 
-#if !defined(_MSC_VER) || _MSC_VER >= 1910
 #define BUILTIN_COUNTER_STYLE(value_, atom_) \
   static_assert(gBuiltinStyleTable[NS_STYLE_LIST_STYLE_ ## value_].GetStyle() \
                 == NS_STYLE_LIST_STYLE_ ## value_, "Builtin counter style " \
                 #atom_ " has unmatched index and value.");
 #include "BuiltinCounterStyleList.h"
 #undef BUILTIN_COUNTER_STYLE
-#endif
 
 class DependentBuiltinCounterStyle final : public BuiltinCounterStyle
 {
 public:
   DependentBuiltinCounterStyle(int32_t aStyle, CounterStyleManager* aManager)
     : BuiltinCounterStyle(gBuiltinStyleTable[aStyle]),
       mManager(aManager)
   {