Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Fix isolate premature kill and CPU-only fallback config leak

Amrithesh Kakkoth Ented2c1dbfc0ec5
diff --git a/mobile/apps/photos/lib/utils/isolate/super_isolate.dart b/mobile/apps/photos/lib/utils/isolate/super_isolate.dart
index 3a83eaef1b..60ca4936e7 100644
--- a/mobile/apps/photos/lib/utils/isolate/super_isolate.dart
+++ b/mobile/apps/photos/lib/utils/isolate/super_isolate.dart
@@ -133,6 +133,7 @@ abstract class SuperIsolate {
logger.severe("Received isolate message with wrong taskID");
return;
}
+ _activeTasks--;
final logs = receivedMessage['logs'] as List<String>;
IsolateLogger.handLogStringsToMainLogger(logs);
final data = receivedMessage['data'];
@@ -147,7 +148,6 @@ abstract class SuperIsolate {
completer.complete(data);
}
});
- _activeTasks--;
return completer.future;
});
diff --git a/mobile/apps/photos/rust/src/ml/runtime.rs b/mobile/apps/photos/rust/src/ml/runtime.rs
index 94c3741320..de9c363842 100644
--- a/mobile/apps/photos/rust/src/ml/runtime.rs
+++ b/mobile/apps/photos/rust/src/ml/runtime.rs
@@ -345,13 +345,6 @@ where
func(&state.runtime)
};
- if retry_result.is_ok() {
- let mut guard = write_runtime();
- if let Some(state) = guard.as_mut() {
- state.config = config.clone();
- }
- }
-
retry_result
}
}