[starvation] stop considering View.get... as blocking.

Reviewed By: ddino

Differential Revision: D9397992

fbshipit-source-id: da6d5a987
master
Nikos Gorogiannis 6 years ago committed by Facebook Github Bot
parent 527fb90bbe
commit af14da6a13

@ -711,13 +711,6 @@ module Models = struct
is_call_of_class ~actuals_pred ["android.os.IBinder"] "transact" |> Staged.unstage
(** is it a call to android.view.View.getWindowVisibleDisplayFrame? *)
let is_getWindowVisibleDisplayFrame =
is_call_of_class ~search_superclasses:false ["android.view.View"]
"getWindowVisibleDisplayFrame"
|> Staged.unstage
(** is it a call to Future.get()? *)
let is_future_get =
is_call_of_class ~search_superclasses:false ~actuals_pred:empty_or_excessive_timeout
@ -747,7 +740,6 @@ module Models = struct
; (is_countdownlatch_await, High)
; (is_thread_sleep, High)
; (is_object_wait, High)
; (is_getWindowVisibleDisplayFrame, Medium)
; (is_asyncTask_get, Low)
; (is_future_get, Low) ]
in

@ -1,24 +0,0 @@
/*
* Copyright (c) 2018-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
import android.view.View;
import android.graphics.Rect;
import android.support.annotation.UiThread;
class VisDispFrame {
View view;
Rect rect;
@UiThread
void callsGetVisibleDisplayFrameOnUiThreadBad() {
view.getWindowVisibleDisplayFrame(rect);
}
void callsGetVisibleDisplayFrameOk() {
view.getWindowVisibleDisplayFrame(rect);
}
}

@ -41,4 +41,3 @@ codetoanalyze/java/starvation/SuppLint.java, SuppLint.onUiThreadBad():void, 26,
codetoanalyze/java/starvation/ThreadSleep.java, ThreadSleep.indirectSleepOnUIThreadBad():void, 25, STARVATION, no_bucket, ERROR, [[Trace 1] `void ThreadSleep.indirectSleepOnUIThreadBad()`,locks `this.ThreadSleep.lock` in class `ThreadSleep*`,[Trace 2] `void ThreadSleep.lockAndSleepOnNonUIThread()`,locks `this.ThreadSleep.lock` in class `ThreadSleep*`,Method call: `void ThreadSleep.sleepOnAnyThreadOk()`,calls `void Thread.sleep(long)` from `void ThreadSleep.sleepOnAnyThreadOk()`]
codetoanalyze/java/starvation/ThreadSleep.java, ThreadSleep.sleepOnUIThreadBad():void, 18, STARVATION, no_bucket, ERROR, [`void ThreadSleep.sleepOnUIThreadBad()`,calls `void Thread.sleep(long)` from `void ThreadSleep.sleepOnUIThreadBad()`]
codetoanalyze/java/starvation/UIDeadlock.java, UIDeadlock.onUIThreadBad():void, 26, DEADLOCK, no_bucket, ERROR, [[Trace 1] `void UIDeadlock.onUIThreadBad()`,locks `this` in class `UIDeadlock*`,locks `this.UIDeadlock.lockB` in class `UIDeadlock*`,[Trace 2] `void UIDeadlock.notOnUIThreadBad()`,locks `this.UIDeadlock.lockB` in class `UIDeadlock*`,locks `this` in class `UIDeadlock*`]
codetoanalyze/java/starvation/VisDispFrame.java, VisDispFrame.callsGetVisibleDisplayFrameOnUiThreadBad():void, 18, STARVATION, no_bucket, ERROR, [`void VisDispFrame.callsGetVisibleDisplayFrameOnUiThreadBad()`,calls `void View.getWindowVisibleDisplayFrame(Rect)` from `void VisDispFrame.callsGetVisibleDisplayFrameOnUiThreadBad()`]

Loading…
Cancel
Save