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 772171 e81fdb3b711feb859cb780f6d20a291a34c43eaa
parent 772170 a0832da6741d15c722a86ac851c335b1d2be472d
child 772172 660d7b66d239b2d89f0b1a4e0f9d7a866ad3af56
push id103870
push userbmo:ntim.bugs@gmail.com
push dateSun, 25 Mar 2018 10:23:38 +0000
reviewersxidorn
bugs1448436
milestone61.0a1
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)
   {