Bug 1084589 - Fix a Yosemite topcrasher. r=gijskruitbosch
authorSteven Michaud <smichaud@pobox.com>
Fri, 17 Oct 2014 19:16:04 -0500
changeset 211088 2ae5cd9d4dcaa85e264262715229888e9d342965
parent 211087 35ba8c31d7f3cdd4c93926d3cfd3977105b8a2d3
child 211089 444b7b1ed52bbfec43c429a393771f284255da0e
push id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
reviewersgijskruitbosch
bugs1084589
milestone36.0a1
Bug 1084589 - Fix a Yosemite topcrasher. r=gijskruitbosch
widget/cocoa/nsNativeThemeCocoa.mm
--- a/widget/cocoa/nsNativeThemeCocoa.mm
+++ b/widget/cocoa/nsNativeThemeCocoa.mm
@@ -869,17 +869,17 @@ GetAquaAppearance()
 
 @interface NSObject(NSAppearanceCoreUIRendering)
 - (void)_drawInRect:(CGRect)rect context:(CGContextRef)cgContext options:(id)options;
 @end
 
 static void
 RenderWithCoreUI(CGRect aRect, CGContextRef cgContext, NSDictionary* aOptions)
 {
-  static id appearance = GetAquaAppearance();
+  id appearance = GetAquaAppearance();
 
   if (aRect.size.width * aRect.size.height > BITMAP_MAX_AREA) {
     return;
   }
 
   if (appearance && [appearance respondsToSelector:@selector(_drawInRect:context:options:)]) {
     // Render through NSAppearance on Mac OS 10.10 and up. This will call
     // CUIDraw with a CoreUI renderer that will give us the correct 10.10