You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Refactor FXIOS-15851 WindowManager tabManager API should return an optional value (#33928)
* [FXIOS-15851] Refactor tabManager(for:) to return an optional value
* Unit test updates
* [FXIOS-15851] Comments
* Spacing
* [FXIOS-15851] Add unit tests
assertionFailure("No window for UUID: \(windowUUID). This is a client error.")
149
-
logger.log("No window for UUID: \(windowUUID)", level:.fatal, category:.window)
150
-
returnunsafeAnyTabManager()
136
+
if !AppConstants.isRunningUnitTest {
137
+
assertionFailure("No window for UUID: \(windowUUID). This is a client error. It will return nil in production but querying a non-existent window is always indicative of a bug.")
138
+
logger.log("No window for UUID: \(windowUUID)", level:.fatal, category:.window)
139
+
}
140
+
returnnil
151
141
}
152
142
153
143
guardlet manager = window.tabManager else{
154
-
assertionFailure("Window alive, but no TabManager for UUID: \(windowUUID). This is a client error.")
155
-
logger.log("Window alive, but no TabManager for UUID: \(windowUUID)", level:.fatal, category:.window)
156
-
returnunsafeAnyTabManager()
144
+
if !AppConstants.isRunningUnitTest {
145
+
assertionFailure("Valid window but no TabManager for UUID: \(windowUUID). This is a client error. It will return nil in production but is indicative of a bug.")
146
+
logger.log("Window alive, but no TabManager for UUID: \(windowUUID)", level:.fatal, category:.window)
147
+
}
148
+
returnnil
157
149
}
158
150
159
151
return manager
@@ -285,15 +277,10 @@ final class WindowManagerImplementation: WindowManager {
0 commit comments