From d48e22be8ba470a81a11886515162e674f088305 Mon Sep 17 00:00:00 2001 From: Nikos Gorogiannis Date: Thu, 13 Sep 2018 08:14:38 -0700 Subject: [PATCH] [starvation] prefer shorter UI-thread traces Summary: There may be several reasons why we think a method is on the UI thread. Choose to keep the shortest via join. Reviewed By: jeremydubreil Differential Revision: D9806944 fbshipit-source-id: 89d27456d --- infer/src/concurrency/starvationDomain.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/infer/src/concurrency/starvationDomain.ml b/infer/src/concurrency/starvationDomain.ml index 9cb34bc38..7f05668fc 100644 --- a/infer/src/concurrency/starvationDomain.ml +++ b/infer/src/concurrency/starvationDomain.ml @@ -224,7 +224,7 @@ module UIThreadExplanationDomain = struct type astate = t - let join lhs _ = lhs + let join lhs rhs = if List.length lhs.trace <= List.length rhs.trace then lhs else rhs let widen ~prev ~next ~num_iters:_ = join prev next