Bug 1244006 - Use const instead of MOZ_CONSTEXPR to avoid startup crash; r?dbaron
PGO builds on Visual Studio 2015 Update 1 did not take kindly to
MOZ_CONSTEXPR in this file, causing a startup crash (for reasons
I can't explain). Switching to literal "const" makes the crash
go away.
MozReview-Commit-ID: K1A43NIa6lG
--- a/layout/generic/nsIFrame.h
+++ b/layout/generic/nsIFrame.h
@@ -845,32 +845,35 @@ public:
nsPoint GetPositionIgnoringScrolling();
typedef AutoTArray<nsIContent*, 2> ContentArray;
static void DestroyContentArray(ContentArray* aArray);
#define NS_DECLARE_FRAME_PROPERTY_WITH_DTOR(prop, type, dtor) \
static const mozilla::FramePropertyDescriptor<type>* prop() { \
- static MOZ_CONSTEXPR auto descriptor = \
+ /* Use of MOZ_CONSTEXPR caused startup crashes with MSVC2015u1 PGO. */\
+ static const auto descriptor = \
mozilla::FramePropertyDescriptor<type>::NewWithDestructor<dtor>(); \
return &descriptor; \
}
// Don't use this unless you really know what you're doing!
#define NS_DECLARE_FRAME_PROPERTY_WITH_FRAME_IN_DTOR(prop, type, dtor) \
static const mozilla::FramePropertyDescriptor<type>* prop() { \
- static MOZ_CONSTEXPR auto descriptor = mozilla:: \
+ /* Use of MOZ_CONSTEXPR caused startup crashes with MSVC2015u1 PGO. */\
+ static const auto descriptor = mozilla:: \
FramePropertyDescriptor<type>::NewWithDestructorWithFrame<dtor>(); \
return &descriptor; \
}
#define NS_DECLARE_FRAME_PROPERTY_WITHOUT_DTOR(prop, type) \
static const mozilla::FramePropertyDescriptor<type>* prop() { \
- static MOZ_CONSTEXPR auto descriptor = \
+ /* Use of MOZ_CONSTEXPR caused startup crashes with MSVC2015u1 PGO. */\
+ static const auto descriptor = \
mozilla::FramePropertyDescriptor<type>::NewWithoutDestructor(); \
return &descriptor; \
}
#define NS_DECLARE_FRAME_PROPERTY_DELETABLE(prop, type) \
NS_DECLARE_FRAME_PROPERTY_WITH_DTOR(prop, type, DeleteValue)
#define NS_DECLARE_FRAME_PROPERTY_RELEASABLE(prop, type) \