Index: content/browser/renderer_host/render_widget_host_view_mac.mm |
diff --git a/content/browser/renderer_host/render_widget_host_view_mac.mm b/content/browser/renderer_host/render_widget_host_view_mac.mm |
index 0a1aeaf2aa980020c38d4793ccf9183aac977091..758dab5234d4ef19014f69bac2da77d7b8c5e584 100644 |
--- a/content/browser/renderer_host/render_widget_host_view_mac.mm |
+++ b/content/browser/renderer_host/render_widget_host_view_mac.mm |
@@ -2378,11 +2378,18 @@ void RenderWidgetHostViewMac::FrameSwapped() { |
NSNotificationCenter* notificationCenter = |
[NSNotificationCenter defaultCenter]; |
+ |
+ // Backing property notifications crash on 10.6 when building with the 10.7 |
+ // SDK, see http://crbug.com/260595. |
+ BOOL supportsBackingPropertiesNotification = base::mac::IsOSLionOrLater(); |
+ |
if (oldWindow) { |
- [notificationCenter |
- removeObserver:self |
- name:NSWindowDidChangeBackingPropertiesNotification |
- object:oldWindow]; |
+ if (supportsBackingPropertiesNotification) { |
+ [notificationCenter |
+ removeObserver:self |
+ name:NSWindowDidChangeBackingPropertiesNotification |
+ object:oldWindow]; |
+ } |
[notificationCenter |
removeObserver:self |
name:NSWindowDidMoveNotification |
@@ -2393,11 +2400,13 @@ void RenderWidgetHostViewMac::FrameSwapped() { |
object:oldWindow]; |
} |
if (newWindow) { |
- [notificationCenter |
- addObserver:self |
- selector:@selector(windowDidChangeBackingProperties:) |
- name:NSWindowDidChangeBackingPropertiesNotification |
- object:newWindow]; |
+ if (supportsBackingPropertiesNotification) { |
+ [notificationCenter |
+ addObserver:self |
+ selector:@selector(windowDidChangeBackingProperties:) |
+ name:NSWindowDidChangeBackingPropertiesNotification |
+ object:newWindow]; |
+ } |
[notificationCenter |
addObserver:self |
selector:@selector(windowChangedGlobalFrame:) |