| Index: chrome/browser/chrome_browser_application_mac.mm
|
| diff --git a/chrome/browser/chrome_browser_application_mac.mm b/chrome/browser/chrome_browser_application_mac.mm
|
| index a332cb17c4053ccfd86da5a91d7b6229b7f0ee67..5b4967e7564bc58e91cae4cec7a0ab3fda63c0c2 100644
|
| --- a/chrome/browser/chrome_browser_application_mac.mm
|
| +++ b/chrome/browser/chrome_browser_application_mac.mm
|
| @@ -4,6 +4,7 @@
|
|
|
| #import "chrome/browser/chrome_browser_application_mac.h"
|
|
|
| +#include <AvailabilityMacros.h>
|
| #include <objc/objc-exception.h>
|
|
|
| #import "base/auto_reset.h"
|
| @@ -266,6 +267,32 @@ void CancelTerminate() {
|
| [appController stopTryingToTerminateApplication:self];
|
| }
|
|
|
| +// The event |mask| has historically been declared as an NSUInteger
|
| +// (unsigned long). Starting in the 10.12 SDK, the mask type changed to
|
| +// NSEventMask (unsigned long long) if __LP64__ and NSUInteger otherwise.
|
| +// These types are incompatible, which creates an issue for suppporting
|
| +// both 10.10/10.11 and 10.12 SDKs. Work around it using the #if below.
|
| +- (NSEvent*)nextEventMatchingMask:
|
| +#if !defined(MAC_OS_X_VERSION_10_12) || \
|
| + MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_12 || \
|
| + !defined(__LP64__)
|
| + (NSUInteger)mask
|
| +#else
|
| + (NSEventMask)mask
|
| +#endif
|
| + untilDate:(NSDate*)expiration
|
| + inMode:(NSString*)mode
|
| + dequeue:(BOOL)dequeue {
|
| + __block NSEvent* event = nil;
|
| + base::mac::CallWithEHFrame(^{
|
| + event = [super nextEventMatchingMask:mask
|
| + untilDate:expiration
|
| + inMode:mode
|
| + dequeue:dequeue];
|
| + });
|
| + return event;
|
| +}
|
| +
|
| - (BOOL)sendAction:(SEL)anAction to:(id)aTarget from:(id)sender {
|
| // The Dock menu contains an automagic section where you can select
|
| // amongst open windows. If a window is closed via JavaScript while
|
|
|