diff --git a/shell/platform/darwin/ios/framework/Source/FlutterCallbackCache.mm b/shell/platform/darwin/ios/framework/Source/FlutterCallbackCache.mm index 1aea364a58aa7..624bc7b4ce795 100644 --- a/shell/platform/darwin/ios/framework/Source/FlutterCallbackCache.mm +++ b/shell/platform/darwin/ios/framework/Source/FlutterCallbackCache.mm @@ -4,6 +4,7 @@ #import "flutter/shell/platform/darwin/ios/framework/Source/FlutterCallbackCache_Internal.h" +#include "flutter/fml/logging.h" #include "flutter/lib/ui/plugins/callback_cache.h" @implementation FlutterCallbackInformation @@ -32,7 +33,7 @@ + (FlutterCallbackInformation*)lookupCallbackInformation:(int64_t)handle { } + (void)setCachePath:(NSString*)path { - assert(path != nil); + FML_DCHECK(path != nil); flutter::DartCallbackCache::SetCachePath([path UTF8String]); NSString* cache_path = [NSString stringWithUTF8String:flutter::DartCallbackCache::GetCachePath().c_str()]; diff --git a/shell/platform/darwin/ios/framework/Source/FlutterFakeKeyEvents.mm b/shell/platform/darwin/ios/framework/Source/FlutterFakeKeyEvents.mm index 461c2c4662ac5..abbdbc062632a 100644 --- a/shell/platform/darwin/ios/framework/Source/FlutterFakeKeyEvents.mm +++ b/shell/platform/darwin/ios/framework/Source/FlutterFakeKeyEvents.mm @@ -3,6 +3,8 @@ // found in the LICENSE file. #import "flutter/shell/platform/darwin/ios/framework/Source/FlutterFakeKeyEvents.h" + +#include "flutter/fml/logging.h" #import "flutter/shell/platform/darwin/common/framework/Headers/FlutterMacros.h" #import "flutter/shell/platform/darwin/ios/framework/Source/KeyCodeMap_Internal.h" @@ -108,8 +110,8 @@ - (NSString*)charactersIgnoringModifiers API_AVAILABLE(ios(13.4)) { const char* characters, const char* charactersIgnoringModifiers) API_AVAILABLE(ios(13.4)) { - assert(!(modifierFlags & kModifierFlagSidedMask) && - "iOS doesn't supply modifier side flags, so don't create events with them."); + FML_DCHECK(!(modifierFlags & kModifierFlagSidedMask)) + << "iOS doesn't supply modifier side flags, so don't create events with them."; UIKey* key = [[FakeUIKey alloc] initWithData:keyCode modifierFlags:modifierFlags diff --git a/shell/platform/darwin/ios/framework/Source/accessibility_bridge.mm b/shell/platform/darwin/ios/framework/Source/accessibility_bridge.mm index 92b73b187ee78..66f903f7f77b3 100644 --- a/shell/platform/darwin/ios/framework/Source/accessibility_bridge.mm +++ b/shell/platform/darwin/ios/framework/Source/accessibility_bridge.mm @@ -2,10 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include - #import "flutter/shell/platform/darwin/ios/framework/Source/accessibility_bridge.h" +#include + +#include "flutter/fml/logging.h" #import "flutter/shell/platform/darwin/ios/framework/Source/FlutterEngine_Internal.h" #import "flutter/shell/platform/darwin/ios/framework/Source/FlutterViewController_Internal.h" #import "flutter/shell/platform/darwin/ios/framework/Source/accessibility_text_entry.h" @@ -243,7 +244,7 @@ static void ReplaceSemanticsObject(SemanticsObject* oldObject, SemanticsObject* newObject, NSMutableDictionary* objects) { // `newObject` should represent the same id as `oldObject`. - assert(oldObject.node.id == newObject.uid); + FML_DCHECK(oldObject.node.id == newObject.uid); NSNumber* nodeId = @(oldObject.node.id); NSUInteger positionInChildlist = [oldObject.parent.children indexOfObject:oldObject]; [[oldObject retain] autorelease]; diff --git a/shell/platform/darwin/macos/framework/Source/FlutterSurfaceManager.mm b/shell/platform/darwin/macos/framework/Source/FlutterSurfaceManager.mm index 50d7be11117da..8473d2b739521 100644 --- a/shell/platform/darwin/macos/framework/Source/FlutterSurfaceManager.mm +++ b/shell/platform/darwin/macos/framework/Source/FlutterSurfaceManager.mm @@ -3,11 +3,14 @@ // found in the LICENSE file. #import "flutter/shell/platform/darwin/macos/framework/Source/FlutterSurfaceManager.h" -#import "flutter/shell/platform/darwin/macos/framework/Source/FlutterSurface.h" #import + #include +#include "flutter/fml/logging.h" +#import "flutter/shell/platform/darwin/macos/framework/Source/FlutterSurface.h" + @implementation FlutterSurfacePresentInfo @end @@ -75,7 +78,7 @@ - (FlutterSurface*)surfaceForSize:(CGSize)size { } - (void)commit:(NSArray*)surfaces { - assert([NSThread isMainThread]); + FML_DCHECK([NSThread isMainThread]); // Release all unused back buffer surfaces and replace them with front surfaces. [_backBufferCache replaceSurfaces:_frontSurfaces]; diff --git a/shell/platform/darwin/macos/framework/Source/FlutterThreadSynchronizer.mm b/shell/platform/darwin/macos/framework/Source/FlutterThreadSynchronizer.mm index 7c095afa26f31..3afa2d53f3551 100644 --- a/shell/platform/darwin/macos/framework/Source/FlutterThreadSynchronizer.mm +++ b/shell/platform/darwin/macos/framework/Source/FlutterThreadSynchronizer.mm @@ -1,11 +1,13 @@ #import "flutter/shell/platform/darwin/macos/framework/Source/FlutterThreadSynchronizer.h" -#import "fml/synchronization/waitable_event.h" #import #include #include +#import "flutter/fml/logging.h" +#import "flutter/fml/synchronization/waitable_event.h" + @interface FlutterThreadSynchronizer () { std::mutex _mutex; BOOL _shuttingDown; @@ -23,7 +25,7 @@ @interface FlutterThreadSynchronizer () { @implementation FlutterThreadSynchronizer - (void)drain { - assert([NSThread isMainThread]); + FML_DCHECK([NSThread isMainThread]); [CATransaction begin]; [CATransaction setDisableActions:YES];