Bug 1085475 - Don't attempt to use vibrancy in 32-bit mode. r=smichaud, a=lmandel
authorMarkus Stange <mstange@themasta.com>
Thu, 23 Oct 2014 22:44:39 +0200
changeset 225809 184b704568ff
parent 225808 46916559304f
child 225810 9fd76ad57dbe
push id4023
push userryanvm@gmail.com
push date2014-10-24 20:40 +0000
treeherdermozilla-beta@184b704568ff [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmichaud, lmandel
bugs1085475
milestone34.0
Bug 1085475 - Don't attempt to use vibrancy in 32-bit mode. r=smichaud, a=lmandel
widget/cocoa/VibrancyManager.mm
--- a/widget/cocoa/VibrancyManager.mm
+++ b/widget/cocoa/VibrancyManager.mm
@@ -160,18 +160,23 @@ VibrancyManager::CreateEffectView(Vibran
   [effectView performSelector:@selector(setAppearance:)
                    withObject:AppearanceForVibrancyType(aType)];
   return effectView;
 }
 
 static bool
 ComputeSystemSupportsVibrancy()
 {
+#ifdef __x86_64__
   return NSClassFromString(@"NSAppearance") &&
       NSClassFromString(@"NSVisualEffectView");
+#else
+  // objc_allocateClassPair doesn't work in 32 bit mode, so turn off vibrancy.
+  return false;
+#endif
 }
 
 /* static */ bool
 VibrancyManager::SystemSupportsVibrancy()
 {
   static bool supportsVibrancy = ComputeSystemSupportsVibrancy();
   return supportsVibrancy;
 }