Files
cef/cef3/patch/patches/renderer_host_1026.patch
2013-07-22 17:05:18 +00:00

51 lines
1.9 KiB
Diff

Index: render_widget_host_view_mac.mm
===================================================================
--- render_widget_host_view_mac.mm (revision 212850)
+++ render_widget_host_view_mac.mm (working copy)
@@ -2097,13 +2097,20 @@
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) {
+ if (supportsBackingPropertiesNotification) {
+ [notificationCenter
+ removeObserver:self
+ name:NSWindowDidChangeBackingPropertiesNotification
+ object:oldWindow];
+ }
[notificationCenter
removeObserver:self
- name:NSWindowDidChangeBackingPropertiesNotification
- object:oldWindow];
- [notificationCenter
- removeObserver:self
name:NSWindowDidMoveNotification
object:oldWindow];
[notificationCenter
@@ -2112,13 +2119,15 @@
object:oldWindow];
}
if (newWindow) {
+ if (supportsBackingPropertiesNotification) {
+ [notificationCenter
+ addObserver:self
+ selector:@selector(windowDidChangeBackingProperties:)
+ name:NSWindowDidChangeBackingPropertiesNotification
+ object:newWindow];
+ }
[notificationCenter
addObserver:self
- selector:@selector(windowDidChangeBackingProperties:)
- name:NSWindowDidChangeBackingPropertiesNotification
- object:newWindow];
- [notificationCenter
- addObserver:self
selector:@selector(windowChangedGlobalFrame:)
name:NSWindowDidMoveNotification
object:newWindow];