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
|
2021-04-21 00:52:34 +02:00
|
|
|
index 7cb3238e97edb..ae800739b6863 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
|
2018-11-30 23:21:07 +01:00
|
|
|
@@ -12,13 +12,15 @@ namespace content {
|
2018-11-06 19:51:02 +01:00
|
|
|
namespace responsiveness {
|
|
|
|
|
|
|
|
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];
|