2018-11-06 19:51:02 +01:00
|
|
|
diff --git content/browser/scheduler/responsiveness/native_event_observer_mac.mm content/browser/scheduler/responsiveness/native_event_observer_mac.mm
|
2023-08-09 23:17:17 +02:00
|
|
|
index d7f32cb53ea3a..2bab5de59657f 100644
|
2018-11-06 19:51:02 +01:00
|
|
|
--- content/browser/scheduler/responsiveness/native_event_observer_mac.mm
|
|
|
|
+++ content/browser/scheduler/responsiveness/native_event_observer_mac.mm
|
2023-08-09 23:17:17 +02:00
|
|
|
@@ -11,13 +11,15 @@
|
2023-07-21 00:11:34 +02:00
|
|
|
namespace content::responsiveness {
|
2018-11-06 19:51:02 +01:00
|
|
|
|
|
|
|
void NativeEventObserver::RegisterObserver() {
|
|
|
|
- DCHECK([NSApp conformsToProtocol:@protocol(NativeEventProcessor)]);
|
|
|
|
+ if (![NSApp conformsToProtocol:@protocol(NativeEventProcessor)])
|
|
|
|
+ return;
|
|
|
|
id<NativeEventProcessor> processor =
|
|
|
|
static_cast<id<NativeEventProcessor>>(NSApp);
|
|
|
|
[processor addNativeEventProcessorObserver:this];
|
|
|
|
}
|
|
|
|
void NativeEventObserver::DeregisterObserver() {
|
|
|
|
- DCHECK([NSApp conformsToProtocol:@protocol(NativeEventProcessor)]);
|
|
|
|
+ if (![NSApp conformsToProtocol:@protocol(NativeEventProcessor)])
|
|
|
|
+ return;
|
|
|
|
id<NativeEventProcessor> processor =
|
|
|
|
static_cast<id<NativeEventProcessor>>(NSApp);
|
|
|
|
[processor removeNativeEventProcessorObserver:this];
|