Bug 1313560: Undefine windows.h's LoadImage macro, to avoid bustage in nsImageFrame.cpp. r=dmajor
☠☠ backed out by 691c898f58a2 ☠ ☠
authorDaniel Holbert <dholbert@cs.stanford.edu>
Thu, 27 Oct 2016 21:01:14 -0700
changeset 319965 4f928f174d21555a623a2ba24dd6a8e42824fcb9
parent 319964 53679ebdd1a82107b9679839e2302b0f98e332b7
child 319966 691c898f58a275dd965ad6bca4d93ea8f98c3996
push id20749
push userryanvm@gmail.com
push dateSat, 29 Oct 2016 13:21:21 +0000
treeherderfx-team@1b170b39ed6b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdmajor
bugs1313560
milestone52.0a1
Bug 1313560: Undefine windows.h's LoadImage macro, to avoid bustage in nsImageFrame.cpp. r=dmajor windows.h isn't directly included by nsImageFrame.cpp, but it may be pulled in via unified builds. Landing on a CLOSED TREE to fix bustage. MozReview-Commit-ID: 7QiM57dpYAd
layout/generic/nsImageFrame.cpp
--- a/layout/generic/nsImageFrame.cpp
+++ b/layout/generic/nsImageFrame.cpp
@@ -74,16 +74,21 @@
 #include "mozilla/StyleSetHandleInlines.h"
 #include "nsBlockFrame.h"
 #include "nsStyleStructInlines.h"
 
 #include "mozilla/Preferences.h"
 
 #include "mozilla/dom/Link.h"
 
+// Undo the windows.h damage
+#if defined(XP_WIN) && defined(LoadImage)
+#undef LoadImage
+#endif
+
 using namespace mozilla;
 using namespace mozilla::dom;
 using namespace mozilla::gfx;
 using namespace mozilla::image;
 using namespace mozilla::layers;
 
 // sizes (pixels) for image icon, padding and border frame
 #define ICON_SIZE        (16)