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 233471 233bff53ae151677767cc23be523690e9934d11d
parent 233470 e203a2376b264e371515e4b405b235cd81ac6854
child 233472 9ccf53948f02f00577e5274a7a046bc4d7dc618f
push id4187
push userbhearsum@mozilla.com
push dateFri, 28 Nov 2014 15:29:12 +0000
treeherdermozilla-beta@f23cc6a30c11 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmichaud, lmandel
bugs1085475
milestone35.0a2
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;
 }